入库单优化

This commit is contained in:
xuhaihui 2025-10-24 10:02:55 +08:00
parent ca1c54c379
commit 376e843391
1 changed files with 3 additions and 0 deletions

View File

@ -558,6 +558,9 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen
BigDecimal oftaxamount = EcNumberHelper.toBigDecimal(this.getModel().getValue("oftaxamount", i)); BigDecimal oftaxamount = EcNumberHelper.toBigDecimal(this.getModel().getValue("oftaxamount", i));
BigDecimal notaxamount = oftaxamount.divide(BigDecimal.ONE.add(taxrate.divide(BigDecimal.valueOf(100L))), 10, RoundingMode.HALF_UP); BigDecimal notaxamount = oftaxamount.divide(BigDecimal.ONE.add(taxrate.divide(BigDecimal.valueOf(100L))), 10, RoundingMode.HALF_UP);
BigDecimal qty = EcNumberHelper.toBigDecimal(this.getModel().getValue("qty", 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); BigDecimal price = notaxamount.divide(qty, 10, RoundingMode.HALF_UP);
this.getModel().setValue("price", price, i);//入库单价 this.getModel().setValue("price", price, i);//入库单价
BigDecimal taxprice = oftaxamount.divide(qty, 10, RoundingMode.HALF_UP); BigDecimal taxprice = oftaxamount.divide(qty, 10, RoundingMode.HALF_UP);