using System; namespace MMDAL.DTO.MMHead { /// /// Maps 1:1 to TVP_TSTOCKLEDGER used in POST_MM_DOCUMENT. /// Provide these rows inline in MMHeadDTO.StockLedgerArray to save stock ledger /// entries directly within the document save transaction. /// public class StockLedgerRowDTO { public string StockLedgerNumber { get; set; } public DateTime StockLedgerDate { get; set; } public string ReferenceNumber { get; set; } public DateTime ReferenceDate { get; set; } public int OuId { get; set; } public int BizTransactionTypeId { get; set; } public int ObjectTypeId { get; set; } // EntityId of TMMDETAIL = -1899997854 public int ObjectId { get; set; } // DocumentDetailId (assigned by BLL) public byte LocationType { get; set; } // 0=Inside, 1=Site, 2=Both public int AllocationId { get; set; } = -1; public int StoreId { get; set; } public int WorkCenterId { get; set; } = -1; public int PartyBranchId { get; set; } = -1; public int ItemId { get; set; } public int SkuId { get; set; } = -1; public byte StockPostType { get; set; } // 0=IN, 1=OUT, 2=WIP IN, 3=WIP OUT public byte MaterialOwnershipType { get; set; } // 0=Own public decimal TransactionQuantity { get; set; } public int UomId { get; set; } = -1; // same as TransactionUomId typically public decimal ConversionFactor { get; set; } = 1; public decimal Quantity { get; set; } // = ActualQuantity public decimal PackQuantity { get; set; } public int PackId { get; set; } = -1; public decimal Weight { get; set; } public int CurrencyId { get; set; } = -1; public decimal RateConversionFactor { get; set; } = 1; public decimal Rate { get; set; } public int RatePerUomId { get; set; } = -1; public decimal Cost { get; set; } public decimal PostedCost { get; set; } public decimal PostedValue { get; set; } public decimal GoodQuantity { get; set; } public decimal RejectedQuantity { get; set; } public decimal ReworkQuantity { get; set; } public decimal OtherQuantity { get; set; } public decimal TransactionActualQuantity { get; set; } public decimal ActualQuantity { get; set; } public int TransactionUomId { get; set; } = -1; public int ObjectDetailTypeId { get; set; } // = -1899997854 (TMMDETAIL) public int ObjectDetailId { get; set; } // DocumentDetailId (same as ObjectId) public byte DeliveryType { get; set; } public decimal? MaterialCost { get; set; } public decimal? ProcessCost { get; set; } public decimal? ChargesCost { get; set; } public decimal? Revenue { get; set; } public int IndentDetailId { get; set; } = -1; public decimal GcCurrencyConversion { get; set; } public decimal PostedCostGc { get; set; } public decimal PostedValueGc { get; set; } } }