优化代码 合同结算
This commit is contained in:
parent
28ee9e2915
commit
22a04670b1
|
@ -1,6 +1,7 @@
|
|||
package zcgj.zcdev.zcdev.pr.plugin.form;
|
||||
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.LocaleString;
|
||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||
import kd.bos.form.field.ComboEdit;
|
||||
|
@ -64,6 +65,19 @@ public class ContractPublicBillPlugin extends AbstractBillPlugIn implements Plug
|
|||
ComboEdit comboEdit = getView().getControl("zcgj_belongingsector");
|
||||
comboEdit.setComboItems(comboList);
|
||||
}
|
||||
}else if (name.equals("contracttype")){
|
||||
// Object contracttype = this.getModel().getValue("contracttype");
|
||||
// if(contracttype!=null && contracttype!=""){
|
||||
// DynamicObject contracttypeInfo = (DynamicObject)contracttype;
|
||||
// String number = contracttypeInfo.getString("number");
|
||||
// if(number.equals("jjfb")||number.equals("hfzl")||number.equals("jjbc")||number.equals("jjzb")){
|
||||
// this.getView().setVisible(true,"zcgj_xmtz");
|
||||
// }else{
|
||||
// this.getView().setVisible(false,"zcgj_xmtz");
|
||||
//
|
||||
// }
|
||||
// this.getView().updateView("treelistentry");
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -31,8 +31,12 @@ public class InContractSettlementValidator extends InContractSettleValidator {
|
|||
if (itementry.size() == 0) {
|
||||
this.addErrorMessage(dataEntity, ResManager.loadKDString("支付合同项不能为空", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
|
||||
}
|
||||
BigDecimal oftaxamount = itementry.get(0).getBigDecimal("oftaxamount");
|
||||
if (oftaxamount.compareTo(new BigDecimal(0)) > 0) {
|
||||
BigDecimal amount = new BigDecimal(0);
|
||||
for (DynamicObject object : itementry) {
|
||||
BigDecimal oftaxamount = object.getBigDecimal("oftaxamount");
|
||||
amount = amount.add(oftaxamount);
|
||||
}
|
||||
if (amount.compareTo(new BigDecimal(0)) <= 0) {
|
||||
this.addErrorMessage(dataEntity, ResManager.loadKDString("支付合同项分录中的金额不能为空!", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
|
||||
}
|
||||
DynamicObject contract = BusinessDataServiceHelper.loadSingle(dataEntity.getDataEntity().getDynamicObject("contract").getPkValue(), "ec_in_contract");
|
||||
|
|
|
@ -22,8 +22,12 @@ public class OutContractSettlementValidator extends OutContractSettleValidator {
|
|||
if (itementry.isEmpty()) {
|
||||
this.addErrorMessage(dataEntity, ResManager.loadKDString("支付合同项不能为空", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
|
||||
}
|
||||
BigDecimal oftaxamount = itementry.get(0).getBigDecimal("oftaxamount");
|
||||
if (oftaxamount.compareTo(new BigDecimal(0)) > 0) {
|
||||
BigDecimal amount = new BigDecimal(0);
|
||||
for (DynamicObject object : itementry) {
|
||||
BigDecimal oftaxamount = object.getBigDecimal("oftaxamount");
|
||||
amount = amount.add(oftaxamount);
|
||||
}
|
||||
if (amount.compareTo(new BigDecimal(0)) <= 0) {
|
||||
this.addErrorMessage(dataEntity, ResManager.loadKDString("支付合同项分录中的金额不能为空!", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
|
||||
}
|
||||
if (contractTemp == null) {
|
||||
|
|
Loading…
Reference in New Issue