diff --git a/B3SheepButcherManage/BL/Bill/StatPayBL/StatPayBL.cs b/B3SheepButcherManage/BL/Bill/StatPayBL/StatPayBL.cs index 25d8246..83a3316 100644 --- a/B3SheepButcherManage/BL/Bill/StatPayBL/StatPayBL.cs +++ b/B3SheepButcherManage/BL/Bill/StatPayBL/StatPayBL.cs @@ -310,6 +310,8 @@ namespace BWP.B3SheepButcherManage.BL var 过磅单已结算 = Get过磅单已结算(dmo.ID, dmo.WeightBill_ID); var 已结算过磅单头数 = 过磅单已结算.Item1; var 已结算过磅单重量 = Math.Round((decimal)过磅单已结算.Item2, 2); + if (dmo.WeighBill_BuyNum == null || dmo.WeighBill_BuyWeigh1 == null) + DmoUtil.RefreshDependency(dmo, "WeightBill_ID"); if (总头数 + 已结算过磅单头数 > (dmo.WeighBill_BuyNum ?? 0)) { throw new Exception("已结算头数:" + 已结算过磅单头数 + " 本次结算头数:" + 总头数 + "不能大于 过磅单:" + dmo.WeightBill_ID + " 总收购头数:" + dmo.WeighBill_BuyNum);