feat(grn): add update functionality for draft GRNs and support document-level discounts

- Implemented Update method in GrnsController to allow editing of draft GRNs.
- Enhanced CreateGrnRequest to include an optional totalDiscount property.
- Updated GrnService to handle GRN updates, including validation and line item processing.
- Modified NewGrnPage to support editing existing GRNs and applying document-level discounts.
- Improved UI in NewItemPage and GrnDetailPage for better user experience.
- Added search functionality to Select component for improved item selection.
This commit is contained in:
2026-08-11 11:00:31 +05:30
parent 8e9974b735
commit bb6d939059
13 changed files with 450 additions and 76 deletions
+2
View File
@@ -69,6 +69,8 @@ public sealed class CreateGrnRequest
public int? VendorId { get; set; }
[Required] public int WarehouseId { get; set; }
[Required, MinLength(1)] public List<CreateGrnLineInput> Lines { get; set; } = new();
/// <summary>Optional document-level discount percentage (0100). When supplied, per-line discounts are ignored.</summary>
[Range(0, 100)] public decimal? TotalDiscountPct { get; set; }
}
public sealed class ReleaseLineRequest