入库单优化

This commit is contained in:
xuhaihui 2025-11-13 19:40:43 +08:00
parent 3533ebc274
commit 91c33e4536
1 changed files with 9 additions and 0 deletions

View File

@ -338,6 +338,7 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
if (newValue != null && zcgj_yssupplier != null) { if (newValue != null && zcgj_yssupplier != null) {
DynamicObject invoice = (DynamicObject) newValue; DynamicObject invoice = (DynamicObject) newValue;
int rowIndex = changeData.getRowIndex(); int rowIndex = changeData.getRowIndex();
DynamicObject dataEntity = changeData.getDataEntity();
DynamicObject seller = invoice.getDynamicObject("seller");//发票号码-销售方 DynamicObject seller = invoice.getDynamicObject("seller");//发票号码-销售方
if (seller != null) { if (seller != null) {
if (seller.getString("number").equals(zcgj_yssupplier.getString("number"))) { if (seller.getString("number").equals(zcgj_yssupplier.getString("number"))) {
@ -348,6 +349,14 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
} else { } else {
this.getModel().setValue("zcgj_freight_invoice", false, rowIndex);//运费发票 this.getModel().setValue("zcgj_freight_invoice", false, rowIndex);//运费发票
} }
DynamicObject invoiceTypeId = invoice.getDynamicObject("invoicetypeid");
if (invoiceTypeId != null) {
String invoiceTypeIdName = invoiceTypeId.getString("name");
if (!invoiceTypeIdName.contains("")) {
this.getModel().setValue("zcgj_invoicetax", BigDecimal.ZERO, rowIndex);
this.getModel().setValue("zcgj_oftaxinvoiceamount", dataEntity.get("zcgj_invoiceamount"), rowIndex);
}
}
} else { } else {
this.getModel().setValue("zcgj_freight_invoice", false);//运费发票 this.getModel().setValue("zcgj_freight_invoice", false);//运费发票
} }