From 0c152a9e6f7516bb373231de2ecac6827f583e6c Mon Sep 17 00:00:00 2001 From: xuhaihui <2098865055@qq.com> Date: Wed, 22 Oct 2025 14:16:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E4=BC=98=E5=8C=96bu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zcdev/pr/plugin/form/MaterialInBillEditPluginExt.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/MaterialInBillEditPluginExt.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/MaterialInBillEditPluginExt.java index 1164ff1..99f5644 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/MaterialInBillEditPluginExt.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/MaterialInBillEditPluginExt.java @@ -467,7 +467,7 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen protected void initFormPage(int rowIndex) { /* this.getView().setEnable(true, rowIndex, new String[]{"lot", "lotid", "measureunit", "entrytaxrate", "price", "ismainmaterial"}); this.getView().setEnable(false, rowIndex, new String[]{"taxprice", "taxamount", "contprice", "oftaxamount", "notaxamount"});//系统源码*/ - this.getView().setEnable(true, rowIndex, new String[]{"lot", "lotid", "measureunit", "entrytaxrate", "price","ismainmaterial", "notaxamount"});//二开修改添加金额字段 + this.getView().setEnable(true, rowIndex, new String[]{"lot", "lotid", "measureunit", "entrytaxrate", "price", "ismainmaterial", "notaxamount"});//二开修改添加金额字段 this.getView().setEnable(false, rowIndex, new String[]{"taxprice", "taxamount", "contprice", "oftaxamount"});//二开修改去除金额字段 Boolean poundIn = (Boolean) this.getModel().getValue("poundin"); this.getView().setEnable(!poundIn, rowIndex, new String[]{"material", "modelnum", "qty"}); @@ -588,6 +588,9 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen // BigDecimal notaxamount = EcNumberHelper.toBigDecimal(this.getModel().getValue("notaxamount"), i);//源码 BigDecimal notaxamount = EcNumberHelper.toBigDecimal(this.getModel().getValue("notaxamount", i));//金额 //二开修改 BigDecimal qty = EcNumberHelper.toBigDecimal(this.getModel().getValue("qty", i));// 数量 + if (qty.compareTo(BigDecimal.ZERO) == 0) { + return; + } BigDecimal price = notaxamount.divide(qty, 10, RoundingMode.HALF_UP);//金额 ÷ 数量 this.getModel().setValue("price", price, i);//"入库单价" = 金额 ÷ 数量