Merge pull request #1745 from BLasan/issue-1031
Fix: Advanced Account Rule for Fees under Accrual Periodic type (Fineract-1031)
This commit is contained in:
+4
-8
@@ -215,17 +215,13 @@ public class AccrualBasedAccountingProcessorForLoan implements AccountingProcess
|
|||||||
|
|
||||||
// handle fees payment of writeOff (and reversals)
|
// handle fees payment of writeOff (and reversals)
|
||||||
if (feesAmount != null && !(feesAmount.compareTo(BigDecimal.ZERO) == 0)) {
|
if (feesAmount != null && !(feesAmount.compareTo(BigDecimal.ZERO) == 0)) {
|
||||||
|
|
||||||
totalDebitAmount = totalDebitAmount.add(feesAmount);
|
totalDebitAmount = totalDebitAmount.add(feesAmount);
|
||||||
|
|
||||||
if (isIncomeFromFee) {
|
if (isIncomeFromFee) {
|
||||||
GLAccount account = this.helper.getLinkedGLAccountForLoanProduct(loanProductId,
|
this.helper.createCreditJournalEntryOrReversalForLoanCharges(office, currencyCode,
|
||||||
AccrualAccountsForLoan.INCOME_FROM_FEES.getValue(), paymentTypeId);
|
AccrualAccountsForLoan.INCOME_FROM_FEES.getValue(), loanProductId, loanId, transactionId, transactionDate,
|
||||||
if (accountMap.containsKey(account)) {
|
feesAmount, isReversal, loanTransactionDTO.getFeePayments());
|
||||||
BigDecimal amount = accountMap.get(account).add(feesAmount);
|
|
||||||
accountMap.put(account, amount);
|
|
||||||
} else {
|
|
||||||
accountMap.put(account, feesAmount);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
GLAccount account = this.helper.getLinkedGLAccountForLoanProduct(loanProductId,
|
GLAccount account = this.helper.getLinkedGLAccountForLoanProduct(loanProductId,
|
||||||
AccrualAccountsForLoan.FEES_RECEIVABLE.getValue(), paymentTypeId);
|
AccrualAccountsForLoan.FEES_RECEIVABLE.getValue(), paymentTypeId);
|
||||||
|
|||||||
Reference in New Issue
Block a user