Files
ERP_Distribution/Distribution/Features/Payment/PaymentDTOs.cs
Kalana B. Thilakarathna b992d07689 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.
2026-10-19 21:36:01 +05:30

33 lines
934 B
C#

using Distribution.Models;
namespace Distribution.Features.Payment;
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(
Guid Id,
Guid InvoiceId,
decimal Amount,
PaymentMethod Method,
EntryMode EntryMode,
Guid? BankAccountId,
Guid? ReceivedChequeId,
string? ChequeNumber,
DateTime? ChequeDate,
DateTime CollectedAt,
Guid CollectedBy,
Guid? RecordedBy,
DateTime CreatedAt);