using GB5Shared.DTO.Framework.Login; using MMDAL.DTO.StockValuation; using System.Data.Common; namespace MMBLL.FifoLotCost; public interface IFifoLotCostBLL { /// /// Allocates lot quantities for an issue transaction using FIFO or LIFO ordering. /// Returns a blended cost result with one slice per lot consumed. /// The returned BlendedUnitCost is written to TSTOCKLEDGER.PostedCost by the caller. /// Task AllocateLotsAsync( int itemId, int skuId, int storeId, int ouid, decimal issueQty, bool isLifo, long issueStockLedgerId, LoginDTO login, DbTransaction tx, CancellationToken ct); /// /// Creates a TLOT + TLOTDETAIL (inbound) record when stock is received. /// Called during transaction posting for lot-tracked items. /// Task CreateLotReceiptAsync( long lotId, int itemId, int skuId, int storeId, int ouid, decimal quantity, decimal unitCost, int objectTypeId, int objectId, long stockLedgerId, DateOnly lotDate, string? lotNumber, LoginDTO login, DbTransaction tx, CancellationToken ct); /// /// Clears lot allocation details for a document so the allocation can be re-run. /// Used during batch recosting when TSTOCKLEDGER is being reprocessed. /// Task ClearLotAllocationForRerunAsync( int objectTypeId, int objectId, LoginDTO login, DbTransaction tx, CancellationToken ct); }