marta-jankovics commented on code in PR #3317:
URL: https://github.com/apache/fineract/pull/3317#discussion_r1274764054
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPoster.java:
##########
@@ -206,7 +206,8 @@ private void batchUpdate(final List<SavingsAccountData>
savingsAccountDataList)
savingsAccountTransactionData.getBalanceNumberOfDays(),
savingsAccountTransactionData.getRunningBalance(),
Review Comment:
This change is ok, but checked a bit the usages of
SavingsAccountTransactionData and found several issues. Started to collect but
there are more.
Please rename SavingsAccountTransactionData constructor parameter createdDate
SavingsAccountTransactionData line 522: this.submittedOnDate =
transactionDate;
does not seem to be correct
SavingsAccountReadPlatformServiceImpl.extractData line 603:
final LocalDate transSubmittedOnDate = JdbcSupport.getLocalDate(rs,
"createdDate");
not correct
RecurringAccountDepositTransactionTemplateMapper sends
m_mandatory_savings_schedule.duedate as submittedOnDate - is this correct?
SavingsAccountTransactionsMapper in DepositAccountReadPlatformServiceImpl
sends transaction_date - not correct
and this init is used from 8 other places
Please check all the usages of SavingsAccountTransactionData static
initialisers (all of them), even if it is it is hard to follow.
Other place to check for submittedOnDate:
SavingsAccountReadPlatformServiceImpl.SavingsAccountTransactionsMapper
sqlBuilder.append("tr.created_date as submittedOnDate,");
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransaction.java:
##########
@@ -345,6 +348,7 @@ private SavingsAccountTransaction(final SavingsAccount
savingsAccount, final Off
this.reversed = isReversed;
this.paymentDetail = paymentDetail;
this.createdDate = createdDate;
+ this.submittedOnDate = DateUtils.getBusinessLocalDate();
Review Comment:
Agreed. It is a wrong pattern having multiple constructors in the middle of
the class, because it leads to these mistakes. Better to have only one at the
beginning of the class (or somewhere agreed on generally)
--
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]