feat: add supplier payment and allocation models, API, and frontend components

- Created `SupplierPayment` and `SupplierPaymentGRN` models for managing supplier payments and their allocations.
- Implemented API endpoints for listing and creating supplier payments.
- Developed frontend components for displaying and recording supplier payments, including a dialog for payment creation.
- Integrated GRN allocations into the payment creation process, ensuring total allocations match the payment amount.
- Added pagination and loading states for the payments list.
This commit is contained in:
Kalana B. Thilakarathna
2026-10-19 21:36:01 +05:30
parent 94db2a311c
commit b992d07689
25 changed files with 7744 additions and 57 deletions
+9 -1
View File
@@ -1,4 +1,4 @@
using Distribution.Models;
using Distribution.Models;
namespace Distribution.Features.Payment;
@@ -6,8 +6,14 @@ public record CreatePaymentRequest(
decimal Amount,
PaymentMethod Method,
EntryMode EntryMode = EntryMode.RealTime,
// Cash: required. Cheque: optional (used as the deposit account hint if provided).
Guid? BankAccountId = null,
// Cheque: required.
string? ChequeNumber = null,
DateTime? ChequeDate = null,
// Cheque: optional metadata forwarded to the auto-created ReceivedCheque.
string? DrawerBankName = null,
string? AccountHolderName = null,
Guid? CollectedByUserId = null);
public record PaymentResponse(
@@ -16,6 +22,8 @@ public record PaymentResponse(
decimal Amount,
PaymentMethod Method,
EntryMode EntryMode,
Guid? BankAccountId,
Guid? ReceivedChequeId,
string? ChequeNumber,
DateTime? ChequeDate,
DateTime CollectedAt,