prinpaid_amt and expireperiod_date <(select ending_of_account from accaccountyear where close_account_stat = 0) and rownum<=1 and loancontract_no=$P{loancontract_no} order by expireperiod_date desc)]]>