MIFOSX-1550 Check for null principal amount when creating journal entry for loan write-off
This commit is contained in:
+7
-4
@@ -73,10 +73,13 @@ public class CashBasedAccountingProcessorForLoan implements AccountingProcessorF
|
|||||||
**/
|
**/
|
||||||
else if (loanTransactionDTO.getTransactionType().isWriteOff()) {
|
else if (loanTransactionDTO.getTransactionType().isWriteOff()) {
|
||||||
final BigDecimal principalAmount = loanTransactionDTO.getPrincipal();
|
final BigDecimal principalAmount = loanTransactionDTO.getPrincipal();
|
||||||
this.helper.createCashBasedJournalEntriesAndReversalsForLoan(office, currencyCode,
|
if (principalAmount != null && !(principalAmount.compareTo(BigDecimal.ZERO) == 0)) {
|
||||||
CASH_ACCOUNTS_FOR_LOAN.LOSSES_WRITTEN_OFF.getValue(), CASH_ACCOUNTS_FOR_LOAN.LOAN_PORTFOLIO.getValue(),
|
this.helper.createCashBasedJournalEntriesAndReversalsForLoan(office, currencyCode,
|
||||||
loanProductId, paymentTypeId, loanId, transactionId, transactionDate, principalAmount,
|
CASH_ACCOUNTS_FOR_LOAN.LOSSES_WRITTEN_OFF.getValue(), CASH_ACCOUNTS_FOR_LOAN.LOAN_PORTFOLIO.getValue(),
|
||||||
loanTransactionDTO.isReversed());
|
loanProductId, paymentTypeId, loanId, transactionId, transactionDate, principalAmount,
|
||||||
|
loanTransactionDTO.isReversed());
|
||||||
|
|
||||||
|
}
|
||||||
} else if (loanTransactionDTO.getTransactionType().isInitiateTransfer()
|
} else if (loanTransactionDTO.getTransactionType().isInitiateTransfer()
|
||||||
|| loanTransactionDTO.getTransactionType().isApproveTransfer()
|
|| loanTransactionDTO.getTransactionType().isApproveTransfer()
|
||||||
|| loanTransactionDTO.getTransactionType().isWithdrawTransfer()) {
|
|| loanTransactionDTO.getTransactionType().isWithdrawTransfer()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user