入库单添加入库总金额计算逻辑
This commit is contained in:
parent
a4fe6fb0f0
commit
c6730121bb
|
@ -326,7 +326,7 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen
|
||||||
case "matoftaxamount"://材料含税总金额
|
case "matoftaxamount"://材料含税总金额
|
||||||
this.matoftaxamountChanged((BigDecimal) propValue);
|
this.matoftaxamountChanged((BigDecimal) propValue);
|
||||||
break;
|
break;
|
||||||
case "matamount":
|
case "matamount"://材料总金额
|
||||||
this.matamountChanged((BigDecimal) propValue);
|
this.matamountChanged((BigDecimal) propValue);
|
||||||
break;
|
break;
|
||||||
case "proboq":
|
case "proboq":
|
||||||
|
@ -811,8 +811,8 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen
|
||||||
|
|
||||||
private void matamountChanged(BigDecimal propValue) {
|
private void matamountChanged(BigDecimal propValue) {
|
||||||
this.getModel().beginInit();
|
this.getModel().beginInit();
|
||||||
BigDecimal exchangerate = (BigDecimal) this.getModel().getValue("exchangerate");
|
BigDecimal exchangerate = (BigDecimal) this.getModel().getValue("exchangerate");//汇率
|
||||||
this.getModel().setValue("stdmateamount", propValue.multiply(exchangerate));
|
this.getModel().setValue("stdmateamount", propValue.multiply(exchangerate));//材料不含税金额(本位币)
|
||||||
this.getModel().endInit();
|
this.getModel().endInit();
|
||||||
this.getView().updateView("stdmateamount");
|
this.getView().updateView("stdmateamount");
|
||||||
this.summaryTotalAmount();
|
this.summaryTotalAmount();
|
||||||
|
|
|
@ -192,6 +192,16 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
|
||||||
this.getView().updateView("transoftaxamount");
|
this.getView().updateView("transoftaxamount");
|
||||||
this.getView().updateView("totaloftaxamount");
|
this.getView().updateView("totaloftaxamount");
|
||||||
this.getModel().endInit();
|
this.getModel().endInit();
|
||||||
|
} else if ("oftaxamount".equals(key)) {
|
||||||
|
//入库单明细-含税金额
|
||||||
|
boolean inputtaxprice = (boolean) this.getModel().getValue("inputtaxprice");//录入含税价
|
||||||
|
boolean inputtotalprice = (boolean) this.getModel().getValue("inputtotalprice");//录入总价
|
||||||
|
if (inputtaxprice && inputtotalprice) {
|
||||||
|
BigDecimal matAmount = (BigDecimal) this.getModel().getValue("matamount");//材料总金额
|
||||||
|
BigDecimal transAmount = (BigDecimal) this.getModel().getValue("transamount");//总运费
|
||||||
|
BigDecimal totalAmount = matAmount.add(transAmount);
|
||||||
|
this.getModel().setValue("totalamount", totalAmount);//入库总金额
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue