disable charge and interest waivers for periodic accrual accounting
This commit is contained in:
+8
@@ -14,6 +14,7 @@ import org.mifosplatform.accounting.common.AccountingConstants.CASH_ACCOUNTS_FOR
|
|||||||
import org.mifosplatform.accounting.common.AccountingConstants.FINANCIAL_ACTIVITY;
|
import org.mifosplatform.accounting.common.AccountingConstants.FINANCIAL_ACTIVITY;
|
||||||
import org.mifosplatform.accounting.journalentry.data.LoanDTO;
|
import org.mifosplatform.accounting.journalentry.data.LoanDTO;
|
||||||
import org.mifosplatform.accounting.journalentry.data.LoanTransactionDTO;
|
import org.mifosplatform.accounting.journalentry.data.LoanTransactionDTO;
|
||||||
|
import org.mifosplatform.infrastructure.core.exception.PlatformDataIntegrityException;
|
||||||
import org.mifosplatform.organisation.office.domain.Office;
|
import org.mifosplatform.organisation.office.domain.Office;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -36,6 +37,13 @@ public class AccrualBasedAccountingProcessorForLoan implements AccountingProcess
|
|||||||
final Date transactionDate = loanTransactionDTO.getTransactionDate();
|
final Date transactionDate = loanTransactionDTO.getTransactionDate();
|
||||||
this.helper.checkForBranchClosures(latestGLClosure, transactionDate);
|
this.helper.checkForBranchClosures(latestGLClosure, transactionDate);
|
||||||
|
|
||||||
|
// FIXME Disable charge and Interest Waivers for Periodic accounting
|
||||||
|
if (loanDTO.isPeriodicAccrualBasedAccountingEnabled()
|
||||||
|
|| (loanTransactionDTO.getTransactionType().isWaiveCharges() && loanTransactionDTO.getTransactionType()
|
||||||
|
.isWaiveInterest())) { throw new PlatformDataIntegrityException(
|
||||||
|
"Restricted functionality with Periodic Accrual accounting...charge and interest waivers are not allowed",
|
||||||
|
"Restricted functionality with Periodic Accrual accounting...charge and interest waivers are not allowed"); }
|
||||||
|
|
||||||
/** Handle Disbursements **/
|
/** Handle Disbursements **/
|
||||||
if (loanTransactionDTO.getTransactionType().isDisbursement()) {
|
if (loanTransactionDTO.getTransactionType().isDisbursement()) {
|
||||||
createJournalEntriesForDisbursements(loanDTO, loanTransactionDTO, office);
|
createJournalEntriesForDisbursements(loanDTO, loanTransactionDTO, office);
|
||||||
|
|||||||
Reference in New Issue
Block a user