diff --git a/src_tenwa/com/tenwa/flow/rent/rentincome/RentIncomeMethod.java b/src_tenwa/com/tenwa/flow/rent/rentincome/RentIncomeMethod.java index 5e9d09fe7..ffe37f12b 100644 --- a/src_tenwa/com/tenwa/flow/rent/rentincome/RentIncomeMethod.java +++ b/src_tenwa/com/tenwa/flow/rent/rentincome/RentIncomeMethod.java @@ -336,7 +336,13 @@ public class RentIncomeMethod { BizObject bo = JBOFactory.getBizObjectManager(VI_LC_RENT_PLAN.CLASS_NAME).createQuery("id=:planID").setParameter("planID", ids[i]).getSingleResult(false); String corpusOver = bo.getAttribute("corpus_over").getString(); String interestOver = bo.getAttribute("interest_over").getString(); - String penaltyOver = bo.getAttribute("penalty_over").getString(); + // String penaltyOver = bo.getAttribute("penalty_over").getString(); + String factPenalty = bo.getAttribute("fact_penalty").getString(); + String penaltyAdjust = bo.getAttribute("penalty_adjust").getString(); + String penalty = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME) + .createQuery("select v.round(v.getRentPenalty('"+bo.getAttribute("payment_number").getString()+"','"+bo.getAttribute("plan_list").getString()+"','"+factDate+"'),2) as v.penalty from O").getSingleResult(false).getAttribute("penalty").getString(); + String penaltyOver = new BigDecimal(penalty).subtract(new BigDecimal(factPenalty)).subtract(new BigDecimal(penaltyAdjust)).toString(); + if("penalty_income".equals(penaltyRule)){ penaltyOver = "0.00"; }else{