资金计划申请科目余额取数
This commit is contained in:
parent
4088d77e2b
commit
6a8bda28d4
|
@ -126,16 +126,21 @@ public class FundingplanapplyAccountBalancePlugin extends AbstractBillPlugIn imp
|
|||
List<AccountRecord> records = gson.fromJson(data, listType);
|
||||
|
||||
BigDecimal totalbeginlocal = BigDecimal.ZERO;
|
||||
BigDecimal totalendlocal = BigDecimal.ZERO;
|
||||
BigDecimal totayeardebitfor = BigDecimal.ZERO;
|
||||
BigDecimal totalyearcreditfor = BigDecimal.ZERO;
|
||||
for (AccountRecord record : records) {
|
||||
totalbeginlocal = totalbeginlocal.add(record.getBeginlocal());//期初本位币金额
|
||||
totalendlocal = totalendlocal.add(record.getEndlocal());//期初本位币金额
|
||||
totayeardebitfor = totayeardebitfor.add(record.getYeardebitfor());//yeardebitfor
|
||||
totalyearcreditfor = totalyearcreditfor.add(record.getYearcreditfor());//yearcreditfor
|
||||
}
|
||||
DynamicObjectCollection zcgjFinApprovedAmount = this.getModel().getDataEntity(true).getDynamicObjectCollection("zcgj_infundproject_entry");
|
||||
DynamicObject dynamicObject = zcgjFinApprovedAmount.get(rowIndex);
|
||||
dynamicObject.set("zcgj_iinitialreceivable",totalbeginlocal);//年初余额取科目余额表年初数
|
||||
//年初余额 = 期末余额-本年累计借方+本年累计贷方
|
||||
BigDecimal beginningbalanceofyear =totalendlocal.subtract(totayeardebitfor).add(totalyearcreditfor);
|
||||
dynamicObject.set("zcgj_iinitialreceivable",beginningbalanceofyear);//年初余额取科目余额表年初数
|
||||
dynamicObject.set("zcgj_monthbeginreceivable",totalbeginlocal);//月初应收余额
|
||||
dynamicObject.set("zcgj_ytdoutputvalue",totayeardebitfor);//本年累计结算-借方
|
||||
dynamicObject.set("zcgj_ytdpaymentreceived",totalyearcreditfor);//本年累计回款-贷方
|
||||
this.getView().updateView("zcgj_infundproject_entry");
|
||||
|
@ -144,6 +149,7 @@ public class FundingplanapplyAccountBalancePlugin extends AbstractBillPlugIn imp
|
|||
DynamicObjectCollection zcgjFinApprovedAmount = this.getModel().getDataEntity(true).getDynamicObjectCollection("zcgj_infundproject_entry");
|
||||
DynamicObject dynamicObject = zcgjFinApprovedAmount.get(rowIndex);
|
||||
dynamicObject.set("zcgj_iinitialreceivable",BigDecimal.ZERO);//年初余额取科目余额表年初数
|
||||
dynamicObject.set("zcgj_monthbeginreceivable",BigDecimal.ZERO);//年初余额取科目余额表年初数
|
||||
dynamicObject.set("zcgj_ytdoutputvalue",BigDecimal.ZERO);//本年累计结算-借方
|
||||
dynamicObject.set("zcgj_ytdpaymentreceived",BigDecimal.ZERO);//本年累计回款-贷方
|
||||
this.getView().updateView("zcgj_infundproject_entry");
|
||||
|
@ -197,24 +203,30 @@ public class FundingplanapplyAccountBalancePlugin extends AbstractBillPlugIn imp
|
|||
List<AccountRecord> records = gson.fromJson(data, listType);
|
||||
|
||||
BigDecimal totalbeginlocal = BigDecimal.ZERO;
|
||||
BigDecimal totalendlocal = BigDecimal.ZERO;
|
||||
BigDecimal totayeardebitfor = BigDecimal.ZERO;
|
||||
BigDecimal totalyearcreditfor = BigDecimal.ZERO;
|
||||
for (AccountRecord record : records) {
|
||||
totalbeginlocal = totalbeginlocal.add(record.getBeginlocal());//期初本位币金额
|
||||
totalendlocal = totalendlocal.add(record.getEndlocal());//期初本位币金额
|
||||
totayeardebitfor = totayeardebitfor.add(record.getYeardebitfor());//yeardebitfor
|
||||
totalyearcreditfor = totalyearcreditfor.add(record.getYearcreditfor());//yearcreditfor
|
||||
}
|
||||
DynamicObjectCollection zcgjFinApprovedAmount = this.getModel().getDataEntity(true).getDynamicObjectCollection("zcgj_outfundproject_entry");
|
||||
DynamicObject dynamicObject = zcgjFinApprovedAmount.get(rowIndex);
|
||||
dynamicObject.set("zcgj_openingpayable",totalbeginlocal);//年初余额取科目余额表年初数
|
||||
dynamicObject.set("zcgj_ytdnetsettlement",totayeardebitfor);//本年累计结算-借方
|
||||
dynamicObject.set("zcgj_ytdtotalpayment",totalyearcreditfor);//本年累计付款-贷方
|
||||
//年初余额 = 期末余额-本年累计借方+本年累计贷方
|
||||
BigDecimal beginningbalanceofyear =totalendlocal.subtract(totalyearcreditfor).add(totayeardebitfor);
|
||||
dynamicObject.set("zcgj_openingpayable",beginningbalanceofyear);//年初余额取科目余额表年初数
|
||||
dynamicObject.set("zcgj_monthbeginpayable",totalbeginlocal);//月初应付余额
|
||||
dynamicObject.set("zcgj_ytdtotalpayment",totayeardebitfor);//本年累计付款-借方
|
||||
dynamicObject.set("zcgj_ytdnetsettlement",totalyearcreditfor);//本年累计结算-贷方
|
||||
this.getView().updateView("zcgj_outfundproject_entry");
|
||||
}
|
||||
}else{
|
||||
DynamicObjectCollection zcgjFinApprovedAmount = this.getModel().getDataEntity(true).getDynamicObjectCollection("zcgj_outfundproject_entry");
|
||||
DynamicObject dynamicObject = zcgjFinApprovedAmount.get(rowIndex);
|
||||
dynamicObject.set("zcgj_openingpayable",BigDecimal.ZERO);//年初余额取科目余额表年初数
|
||||
dynamicObject.set("zcgj_monthbeginpayable",BigDecimal.ZERO);//年初余额取科目余额表年初数
|
||||
dynamicObject.set("zcgj_ytdnetsettlement",BigDecimal.ZERO);//本年累计结算-借方
|
||||
dynamicObject.set("zcgj_ytdtotalpayment",BigDecimal.ZERO);//本年累计付款-贷方
|
||||
this.getView().updateView("zcgj_outfundproject_entry");
|
||||
|
|
Loading…
Reference in New Issue