namespace Distribution.Features.Grn; public interface IGrnRepository { Task GetByIdAsync(Guid id); Task> GetByPurchaseOrderIdAsync(Guid purchaseOrderId); Task AddAsync(Models.GoodsReceipt entity); /// True if at least one GoodsReceipt exists against this Po (createPurchaseReturn guard). Task HasAnyForPurchaseOrderAsync(Guid purchaseOrderId); /// Sum of AcceptedQuantity per ItemId across all receipts for a Po. Task> GetAcceptedTotalsByItemAsync(Guid purchaseOrderId); }