use of org.mifos.accounts.loan.business.LoanTrxnDetailEntity in project head by mifos.
the class WriteOffAccountingEntry method applySpecificAccountActionEntry.
@Override
protected void applySpecificAccountActionEntry() throws FinancialException {
LoanTrxnDetailEntity loanTrxn = (LoanTrxnDetailEntity) financialActivity.getAccountTrxn();
FinancialActionTypeEntity finActionWriteOff = FinancialActionCache.getFinancialAction(FinancialActionConstants.WRITEOFF);
addAccountEntryDetails(loanTrxn.getPrincipalAmount(), finActionWriteOff, getGLcode(finActionWriteOff.getApplicableDebitCharts()), FinancialConstants.DEBIT);
GLCodeEntity glcodeCredit = ((LoanBO) loanTrxn.getAccount()).getLoanOffering().getPrincipalGLcode();
addAccountEntryDetails(loanTrxn.getPrincipalAmount(), finActionWriteOff, glcodeCredit, FinancialConstants.CREDIT);
// no 999 account entries are made for write-off loans because if some
// payments have already been made
// the 999 account amount is probably very small and is ignored in 1.1
// release. In the future if we want to
// calculate the 999 amount in this case we need to store the raw amount
// for each installment.
}
Aggregations