private InOutStoreBill CreateInOutStoreBill(PackingRecipients dmo) { var resultBill = new BWP.B3UnitedInfos.BO.InOutStoreBill() { Domain_ID = dmo.Domain_ID.Value, AccountingUnit_ID = dmo.AccountingUnit_ID.Value, InStore = false, Time = dmo.Date ?? DateTime.Now, BillKey = BWP.B3UnitedInfos.BO.InOutStoreBill.CreateBillKey(mDmoTypeID.Value, dmo.ID), SourceBillID = dmo.ID, SourceBillTypeID = mDmoTypeID.Value }; // resultBill.FromTo = string.Format("{0}→{1}", dmo.Department_Name, dmo.Store_Name); foreach (var detail in dmo.Details) { if ((detail.Number ?? 0) == 0) { continue; } var resultDetail = new BWP.B3UnitedInfos.BO.InOutStoreBill_Detail() { Store_ID = dmo.Store_ID ?? 0, Goods_ID = detail.Goods_ID, GoodsBatch_ID = detail.GoodsBatch_ID, Number = detail.Number ?? 0, SecondNumber = detail.SecondNumber, // Price = detail.Price, // Money=detail.Money.EToDecimal(), }; resultBill.Details.Add(resultDetail); } return(resultBill); }
private InOutStoreBill CreateInOutStoreBill(ProductInStore dmo) { var resultBill = new BWP.B3UnitedInfos.BO.InOutStoreBill() { Domain_ID = dmo.Domain_ID.Value, AccountingUnit_ID = dmo.AccountingUnit_ID.Value, InStore = true, Time = dmo.InStoreDate ?? DateTime.Now, BillKey = BWP.B3UnitedInfos.BO.InOutStoreBill.CreateBillKey(mDmoTypeID.Value, dmo.ID), SourceBillID = dmo.ID, SourceBillTypeID = mDmoTypeID.Value }; resultBill.FromTo = string.Format("{0}→{1}", dmo.Department_Name, dmo.Store_Name); foreach (var detail in dmo.Details) { if ((detail.Number ?? 0) == 0) { continue; } var resultDetail = new BWP.B3UnitedInfos.BO.InOutStoreBill_Detail() { Store_ID = dmo.Store_ID ?? 0, Goods_ID = detail.Goods_ID, GoodsBatch_ID = detail.GoodsBatch_ID, CargoSpace_ID = detail.CargoSpace_ID, Number = detail.Number ?? 0, SecondNumber = detail.SecondNumber, Price = detail.Price, }; resultDetail.BrandItem_ID = detail.BrandItem_ID; resultDetail.BrandItem_Name = detail.BrandItem_Name; resultBill.Details.Add(resultDetail); } return(resultBill); }