namespace MMDAL.DTO.InventoryReports { // Subcontractor Material Tracker tile. Built on TSTOCKLEDGER.LOCATIONTYPE/PARTYBRANCHID // (0=Inside, 1=Site -- confirmed via GB5's own StockLedgerRowDTO.cs comment), NOT // TRESERVATION -- the user clarified TRESERVATION is a separate, parallel "material reserved // for a purpose" concept, and the generic MM document form/service already accommodates all // subcontracting classes through the normal TMMHEAD/TMMDETAIL pipeline (no separate biz-type // code path needed). A running-balance query over TSTOCKLEDGER filtered to LOCATIONTYPE=1, // grouped by PARTYBRANCHID, answers "how much of our material is at each subcontractor right // now" directly -- same running-balance technique as StockHoldingTrendDTO. public class SubcontractorMaterialTrackerDTO { public int PartyBranchId { get; set; } public string PartyBranchName { get; set; } = string.Empty; public string PartyName { get; set; } = string.Empty; // Cumulative material sent to this party's site, net of what's come back -- the current // "still out there" balance, not a point-in-time snapshot. public decimal CurrentAtSiteQuantity { get; set; } public decimal CurrentAtSiteValue { get; set; } public DateTime? LastMovementDate { get; set; } } }