支出合同结算 微调金额/税额

This commit is contained in:
程小伟 2025-05-23 17:02:16 +08:00
parent 3e9553704a
commit b8803e16c1
1 changed files with 18 additions and 0 deletions

View File

@ -55,6 +55,8 @@ public class ContractSettleBillPlugin extends ContractSettleCommonEditPlugin{
} else if (StringUtils.equals("unitproject", name)) {
DynamicObject contract = (DynamicObject)this.getModel().getValue("contract");
this.contractChanged(contract);
}else if (StringUtils.equals(name, "zcgj_adjustmounttax")) {
this.adjustAmountTax(changeData);
}
} else {
this.setDateEditMinAndMaxDate();
@ -62,6 +64,22 @@ public class ContractSettleBillPlugin extends ContractSettleCommonEditPlugin{
}
private void adjustAmountTax(ChangeData changeData) {
boolean isAdjust = (boolean)changeData.getNewValue();
int rowCount = this.getModel().getEntryRowCount("itementry");
if (isAdjust) {
for (int i = 0; i < rowCount; ++i) {
this.getView().setEnable(true,i,new String[]{"amount","taxamt"});
this.getView().setEnable(false,i,new String[]{"oftaxamount"});
}
}else {
for (int i = 0; i < rowCount; ++i) {
this.getView().setEnable(true,i,new String[]{"oftaxamount"});
this.getView().setEnable(false,i,new String[]{"amount","taxamt"});
}
}
}
private void taxamtChanged(ChangeData changeData) {
int rowIndex = changeData.getRowIndex();
BigDecimal taxamt = (BigDecimal)changeData.getNewValue();