diff --git a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java index 37ae9a0e0..2e68f4ecd 100644 --- a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java +++ b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java @@ -29,6 +29,7 @@ import jbo.app.tenwa.calc.LC_FUND_RENT_ADJUST_TEMP; import jbo.app.tenwa.calc.LC_RENT_PLAN; import jbo.app.tenwa.calc.LC_RENT_PLAN_TEMP; import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT; +import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_TEMP; import jbo.com.tenwa.lease.comm.LC_OCCUPY_RENT_LIST; import jbo.com.tenwa.lease.comm.LC_PAY_CONDTION_TEMP; import jbo.sys.CODE_LIBRARY; @@ -1130,14 +1131,15 @@ public class CreateTransactionExecutor implements Transaction { public String checkMoney()throws Exception{ double sumMoney = 0.0; BizObjectManager lcctManage = JBOFactory.getBizObjectManager(LC_CALC_CONDITION_TEMP.CLASS_NAME); + BizObjectManager letManage = JBOFactory.getBizObjectManager(LB_EQUIPMENT_TEMP.CLASS_NAME); List lccts = lcctManage.createQuery(" project_id=:projectid and flowunid<>:flowunid and contract_plan_number<>'' ").setParameter("projectid", projectId).setParameter("flowunid", flowunid).getResultList(false); for (BizObject lcct : lccts) { lcct.getAttribute("EQUIP_AMT").getString(); double equip_money = new Double(lcct.getAttribute("EQUIP_AMT").getString()); sumMoney = sumMoney+equip_money; } - BizObject lcctm = lcctManage.createQuery(" project_id=:projectid AND contract_plan_number = '' ").setParameter("projectid", projectId).getSingleResult(false); - double equip_money = new Double(lcctm.getAttribute("EQUIP_AMT").getString()); + BizObject letm = letManage.createQuery("flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); + double equip_money = new Double(letm.getAttribute("EQUIP_PRICE").getString()); return (equip_money-sumMoney)+""; }