关联发票带出三个金额

This commit is contained in:
李贵强 2025-04-23 10:34:34 +08:00
parent 5faa6da5ce
commit d80b3b9e8a
1 changed files with 18 additions and 1 deletions

View File

@ -546,6 +546,23 @@ public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF
} }
private void updateAmt(){
DynamicObject dataEntity = this.getModel().getDataEntity();
DynamicObjectCollection invoiceentry = dataEntity.getDynamicObjectCollection("invoiceentry");
if (invoiceentry!=null) {
for (int i = 0; i < invoiceentry.size(); i++) {
DynamicObject dynamicObject = invoiceentry.get(i);
DynamicObject inventry_invoicebill = dynamicObject.getDynamicObject("inventry_invoicebill");
BigDecimal notaxamt = inventry_invoicebill.getBigDecimal("notaxamt");
BigDecimal tax = inventry_invoicebill.getBigDecimal("tax");
BigDecimal amount = inventry_invoicebill.getBigDecimal("amount");
dynamicObject.set("qeug_notaxamt",notaxamt);
dynamicObject.set("qeug_tax",tax);
dynamicObject.set("qeug_amount",amount);
}
this.getView().updateView("invoiceentry");
}
}
@Override @Override
public void closedCallBack(ClosedCallBackEvent closedCallBackEvent) { public void closedCallBack(ClosedCallBackEvent closedCallBackEvent) {
super.closedCallBack(closedCallBackEvent); super.closedCallBack(closedCallBackEvent);
@ -581,7 +598,7 @@ public class ReconPayreqFormPlugin extends AbstractFormPlugin implements BeforeF
invoiceEntry.set("inventry_haswriteoffamt", invoiceBill.getBigDecimal("writeoffamount")); invoiceEntry.set("inventry_haswriteoffamt", invoiceBill.getBigDecimal("writeoffamount"));
invoiceAmt = invoiceAmt.add(invoiceBill.getBigDecimal("invoiceamount")); invoiceAmt = invoiceAmt.add(invoiceBill.getBigDecimal("invoiceamount"));
} }
this.updateAmt();
getModel().updateCache(); getModel().updateCache();
getView().updateView("invoiceentry"); getView().updateView("invoiceentry");