adamsaghy commented on code in PR #3973:
URL: https://github.com/apache/fineract/pull/3973#discussion_r1680882624
##########
fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForSavings.java:
##########
@@ -198,6 +205,7 @@ else if
(savingsTransactionDTO.getTransactionType().isWithholdTax()) {
/** Handle Fees Deductions and reversals of Fees Deductions **/
else if
(savingsTransactionDTO.getTransactionType().isFeeDeduction() &&
savingsTransactionDTO.isOverdraftTransaction()) {
boolean isPositive =
amount.subtract(overdraftAmount).compareTo(BigDecimal.ZERO) > 0;
+ AccrualAccountsForSavings accountTypeToBeDebited =
AccrualAccountsForSavings.SAVINGS_CONTROL;
Review Comment:
Why to extract this into a field? the accountTypeToBeCredited still
inline...
##########
fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForSavings.java:
##########
@@ -217,48 +224,48 @@ else if
(savingsTransactionDTO.getTransactionType().isFeeDeduction() && savingsT
feePayments);
if (isPositive) {
this.helper.createAccrualBasedJournalEntriesAndReversalsForSavingsCharges(office,
currencyCode,
- AccrualAccountsForSavings.SAVINGS_CONTROL,
AccrualAccountsForSavings.INCOME_FROM_FEES, savingsProductId,
- paymentTypeId, savingsId, transactionId,
transactionDate, amount.subtract(overdraftAmount), isReversal,
- feePayments);
+ accountTypeToBeDebited,
AccrualAccountsForSavings.INCOME_FROM_FEES, savingsProductId, paymentTypeId,
+ savingsId, transactionId, transactionDate,
amount.subtract(overdraftAmount), isReversal, feePayments);
}
}
}
else if
(savingsTransactionDTO.getTransactionType().isFeeDeduction()) {
+ AccrualAccountsForSavings accountTypeToBeCredited =
AccrualAccountsForSavings.INCOME_FROM_PENALTIES;
Review Comment:
Why to extract this into a field? the accountTypeToBeCredited still
inline...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]