namespace QMSDAL.DTO
{
// Matrix-independent replacement for MatrixSummaryDTO. Sourced only from
// TPENDINGALLOCATION / TALLOCATION / MALLOCATION / MPARTY / MITEM (for the
// allocation/item/party facts) and TLOT (for SetsGenerated). Deliberately
// does NOT touch TMATRIX / TMATRIXINPUT / TMATRIXOUTPUT.
public class MatrixAllocationSummaryDTO
{
public int AllotedAllocationId { get; set; }
public int HeaderAllocationId { get; set; }
public int BizTransactionTypeId { get; set; }
public string AllocationName { get; set; } = string.Empty;
/// MALLOCATION.ALLOCATIONSHORTNAME — short SO reference, safe for narrow columns like TLOTDETAIL.STOCKLEDGERNUMBER/REFERENCENUMBER.
public string AllocationShortName { get; set; } = string.Empty;
public int ItemId { get; set; }
public string ItemCode { get; set; } = string.Empty;
public string ItemName { get; set; } = string.Empty;
public int PartyId { get; set; }
public string PartyCode { get; set; } = string.Empty;
public string PartyName { get; set; } = string.Empty;
/// TALLOCATION.QUANTITY for this alloted line — treated as sets ordered.
public int SetsOrdered { get; set; }
/// Count of TLOT rows already created for this item + allocation.
public int SetsGenerated { get; set; }
public int Remaining => SetsOrdered - SetsGenerated;
}
}