Compare commits

..

2 Commits

1 changed files with 21 additions and 8 deletions

View File

@ -256,12 +256,22 @@ public class OutContractSettleEditPluginExt extends AbstractBillPlugIn implement
protected QFilter getNotSettleMaterialInBillFilter(DynamicObject contract, Object endDate) { protected QFilter getNotSettleMaterialInBillFilter(DynamicObject contract, Object endDate) {
DynamicObject partB = contract.getDynamicObject("partb"); DynamicObject partB = contract.getDynamicObject("partb");
QFilter qFilter = new QFilter("supplier", "=", partB.getPkValue()); QFilter qFilter = new QFilter("supplier", "=", partB.getPkValue());//入库单供应商
qFilter.and(new QFilter("contract", "=", contract.getPkValue()));
qFilter.and(new QFilter("period.enddate", "<=", endDate)); //二开添加
qFilter.and(new QFilter("settlestatus", "=", "0")); Boolean zcgj_transset = (Boolean) this.getModel().getValue("zcgj_transset");//按入库运费结算
qFilter.and(new QFilter("ismeasure", "=", "0")); if (zcgj_transset) {
qFilter.and(new QFilter("billstatus", "=", "C")); qFilter.and(new QFilter("zcgj_contract", "=", contract.getPkValue()));//入库单运输合同
} else {
qFilter.and(new QFilter("contract", "=", contract.getPkValue()));//入库单合同编号
}
//二开添加
// qFilter.and(new QFilter("contract", "=", contract.getPkValue()));//入库单合同编号//系统代码
qFilter.and(new QFilter("period.enddate", "<=", endDate));//入库单结算期间
qFilter.and(new QFilter("settlestatus", "=", "0"));//入库单已结算
qFilter.and(new QFilter("ismeasure", "=", "0"));//入库单已计量
qFilter.and(new QFilter("billstatus", "=", "C"));//入库单单据状态
return qFilter; return qFilter;
} }
@ -560,9 +570,12 @@ public class OutContractSettleEditPluginExt extends AbstractBillPlugIn implement
this.periodChanged(changeData); this.periodChanged(changeData);
} else if (StringUtils.equals(name, "iseqsettle")) { } else if (StringUtils.equals(name, "iseqsettle")) {
this.isEqSettleChanged(changeData); this.isEqSettleChanged(changeData);
//二开添加逻辑
} else if (StringUtils.equals(name, "zcgj_transset")) { } else if (StringUtils.equals(name, "zcgj_transset")) {
//按入库运费结算 //按入库运费结算
//二开添加逻辑 this.autoFetch();
this.sumMaterialInAmountToItemEntry();
SettleUpdateAmtUtils.calAllTypeAmount(this.getModel());
Boolean zcgj_transset = (Boolean) changeData.getNewValue();//按入库运费结算新值 Boolean zcgj_transset = (Boolean) changeData.getNewValue();//按入库运费结算新值
DynamicObjectCollection materialInEntry = this.getModel().getEntryEntity("materialinentry");//入库单分录 DynamicObjectCollection materialInEntry = this.getModel().getEntryEntity("materialinentry");//入库单分录
if (materialInEntry != null && materialInEntry.size() != 0) { if (materialInEntry != null && materialInEntry.size() != 0) {
@ -598,8 +611,8 @@ public class OutContractSettleEditPluginExt extends AbstractBillPlugIn implement
this.getModel().setValue("taxamt", ofTaxAmount.subtract(amount), 0);//合同支付项-税额 this.getModel().setValue("taxamt", ofTaxAmount.subtract(amount), 0);//合同支付项-税额
} }
} }
//二开添加逻辑
} }
//二开添加逻辑
} }
protected void periodChanged(ChangeData changeData) { protected void periodChanged(ChangeData changeData) {