Files
ERP_Distribution/Distribution/Features/SupplierPayment/ISupplierPaymentRepository.cs
T
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

18 lines
724 B
C#

using Distribution.Models;
namespace Distribution.Features.SupplierPayment;
public interface ISupplierPaymentRepository
{
Task<Models.SupplierPayment?> GetByIdAsync(Guid id);
Task<List<Models.SupplierPayment>> ListBySupplierAsync(Guid supplierId, int page, int pageSize);
Task<int> CountBySupplierAsync(Guid supplierId);
Task AddAsync(Models.SupplierPayment payment);
/// <summary>Sum of currently-allocated amounts to a GRN, across all active SupplierPayments.</summary>
Task<decimal> GetAllocatedTotalForGrnAsync(Guid goodsReceiptId);
/// <summary>Load a GRN with its items so the total can be computed.</summary>
Task<Models.GoodsReceipt?> GetGrnWithItemsAsync(Guid goodsReceiptId);
}