Search in sources :

Example 16 with LoanTrxnDetailEntity

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.
}
Also used : FinancialActionTypeEntity(org.mifos.accounts.financial.business.FinancialActionTypeEntity) GLCodeEntity(org.mifos.accounts.financial.business.GLCodeEntity) LoanTrxnDetailEntity(org.mifos.accounts.loan.business.LoanTrxnDetailEntity)

Aggregations

LoanTrxnDetailEntity (org.mifos.accounts.loan.business.LoanTrxnDetailEntity)16 FinancialActionTypeEntity (org.mifos.accounts.financial.business.FinancialActionTypeEntity)10 GLCodeEntity (org.mifos.accounts.financial.business.GLCodeEntity)7 LoanBO (org.mifos.accounts.loan.business.LoanBO)5 Money (org.mifos.framework.util.helpers.Money)5 Date (java.sql.Date)4 FeesTrxnDetailEntity (org.mifos.accounts.business.FeesTrxnDetailEntity)4 Test (org.junit.Test)3 FinancialTransactionBO (org.mifos.accounts.financial.business.FinancialTransactionBO)3 PersonnelBO (org.mifos.customers.personnel.business.PersonnelBO)3 AccountActionDateEntity (org.mifos.accounts.business.AccountActionDateEntity)2 AccountPaymentEntity (org.mifos.accounts.business.AccountPaymentEntity)2 PaymentTypeEntity (org.mifos.application.master.business.PaymentTypeEntity)2 ArrayList (java.util.ArrayList)1 AccountFeesActionDetailEntity (org.mifos.accounts.business.AccountFeesActionDetailEntity)1 AccountTrxnEntity (org.mifos.accounts.business.AccountTrxnEntity)1 PenaltiesTrxnDetailEntity (org.mifos.accounts.business.PenaltiesTrxnDetailEntity)1 COABO (org.mifos.accounts.financial.business.COABO)1 LoanScheduleEntity (org.mifos.accounts.loan.business.LoanScheduleEntity)1 PaymentData (org.mifos.accounts.util.helpers.PaymentData)1