From d9356df7ca42d708fac351baeb72434f9b3ca992 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Sun, 28 Jan 2018 11:53:36 +0800 Subject: [PATCH] . --- B3SubstituteKill/BL/Bills/StatPay/StatPayBL.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/B3SubstituteKill/BL/Bills/StatPay/StatPayBL.cs b/B3SubstituteKill/BL/Bills/StatPay/StatPayBL.cs index adb1f0f..38e616e 100644 --- a/B3SubstituteKill/BL/Bills/StatPay/StatPayBL.cs +++ b/B3SubstituteKill/BL/Bills/StatPay/StatPayBL.cs @@ -19,9 +19,12 @@ namespace BWP.B3SubstituteKill.BL { protected override void beforeSave(StatPay dmo) { - dmo.PriceBill_ID = null; - if (dmo.Date.HasValue && dmo.Supplier_ID.HasValue) - dmo.PriceBill_ID = SupplierRpc.GetPriceBillID(dmo.Supplier_ID.Value, dmo.Date.Value); + if (dmo.SourceBillID == null || dmo.PriceBill_ID == null) + { + dmo.PriceBill_ID = null; + if (dmo.Date.HasValue && dmo.Supplier_ID.HasValue) + dmo.PriceBill_ID = SupplierRpc.GetPriceBillID(dmo.Supplier_ID.Value, dmo.Date.Value); + } foreach (var d in dmo.CostDetails) d.Money = d.Price * d.Number; foreach (var d in dmo.CallbackPayDetails)