diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/EarlyContract.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/EarlyContract.java index 01e5ec8ad..717846855 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/EarlyContract.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/EarlyContract.java @@ -355,7 +355,7 @@ public class EarlyContract { Transaction Sqlca = null; try { Sqlca = Transaction.createTransaction(tx); - Countnum = Sqlca.getString("select count(*) from (select lrp.CONTRACT_ID,lrp.PLAN_LIST,lrp.RENT - ifnull(lri.RENT,0) as RENT,lrp.CORPUS - ifnull(lri.CORPUS,0) as CORPUS,lrp.INTEREST - ifnull(lri.INTEREST,0) as INTEREST from lc_rent_plan lrp left join (select CONTRACT_ID,PLAN_LIST,sum(RENT) as RENT,sum(CORPUS) as CORPUS,sum(INTEREST) as INTEREST from lc_rent_income group by CONTRACT_ID,PLAN_LIST ) lri on lrp.CONTRACT_ID = lri.CONTRACT_ID and lrp.PLAN_LIST = lri.PLAN_LIST where lri.CORPUS <> 0) t where t.CORPUS >0 and t.CONTRACT_ID = '"+contractId+"'"); + Countnum = Sqlca.getString("select count(*) from lc_rent_plan where CONTRACT_ID = '"+contractId+"' and MEMO = '²؟·ض½لاه' "); }catch(Exception e) { try { Sqlca.rollback();