feat: add sales return functionality

- Introduced Sales Return types and interfaces in the frontend for managing sales returns.
- Implemented SalesReturnsController in the backend to handle sales return endpoints.
- Created SalesReturn and SalesReturnLine entities to represent sales return data.
- Added DTOs for sales return responses and requests.
- Configured Entity Framework for SalesReturn and SalesReturnLine entities.
- Developed ISalesReturnService interface and its implementation for business logic.
- Added API methods for listing sales returns, creating new returns, and fetching remaining returnable quantities.
- Created frontend components for creating and listing sales returns, including validation logic.
- Implemented UI for selecting invoices, reason codes, and managing return lines.
This commit is contained in:
2026-08-12 10:18:56 +05:30
parent d37824cecc
commit d16a227b54
18 changed files with 1005 additions and 6 deletions
@@ -47,6 +47,7 @@ import {
SlidersHorizontal,
Tag,
Truck,
Undo2,
Users,
Wallet,
Warehouse,
@@ -120,6 +121,7 @@ const navItems: {
// { title: "Reports", code: "sales.reports", href: "/dashboard/sales/reports", icon: FileBarChart },
],
},
{ title: "Sales Returns", code: "sales-returns", href: "/dashboard/sales/sales-returns", icon: Undo2 },
{ title: "Receiving", code: "receiving", href: "/dashboard/receiving/grn", icon: PackageCheck, chevron: true },
{
title: "Stock",
@@ -434,7 +436,7 @@ export function AppSidebar() {
// seed grants it. This is also flagged in 02-SECURITY.md as the AR-09 sidebar-visibility
// stopgap for HRM's salary/PII data — it hides HRM from the UI but doesn't enforce
// anything server-side.
const bypassCodes = new Set(["procurement", "sales", "hrm", "production", "stock"])
const bypassCodes = new Set(["procurement", "sales", "sales-returns", "hrm", "production", "stock"])
const visibleItems = loading
? []
: navItems