public void InitBalanceItem() { CTable o = GetDbObject(); ArrayList arr = o.GetChildArray("CURRENT_BALANCE_ITEM"); if (arr == null) { return; } foreach (CTable t in arr) { MInventoryCurrentBalance v = new MInventoryCurrentBalance(t); currentBalance.Add(v); } }
public void InitMovementSummaries() { CTable o = GetDbObject(); ArrayList arr = o.GetChildArray("SUMMARY_ITEM"); if (arr == null) { return; } movementSummaries = null; movementSummaries = new ObservableCollection <MInventoryCurrentBalance>(); int seq = 0; foreach (CTable t in arr) { MInventoryCurrentBalance v = new MInventoryCurrentBalance(t); if (seq == 0) { MInventoryCurrentBalance fw = new MInventoryCurrentBalance(t.Clone()); fw.IsBalanceForward = true; fw.EndQuantity = fw.BeginQuantity; fw.EndAmountAvg = fw.BeginAmountAvg; fw.EndAmountFifo = fw.BeginAmountFifo; fw.EndAvg = fw.BeginUnitPriceAvg; fw.EndAvgFifo = fw.BeginUnitPriceFifo; movementSummaries.Add(fw); } movementSummaries.Add(v); seq++; } }