vorburger commented on a change in pull request #614: Stop creating unnecessary
overdue charge when amount is 0.
URL: https://github.com/apache/fineract/pull/614#discussion_r301673900
##########
File path:
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
##########
@@ -2490,6 +2493,9 @@ public LoanOverdueDTO
applyChargeToOverdueLoanInstallment(final Long loanId, fin
final LoanCharge loanCharge =
LoanCharge.createNewFromJson(loan, chargeDefinition, command, entry.getValue());
+ if(BigDecimal.ZERO.compareTo(loanCharge.amount()) >= 0){
Review comment:
would it be clearer for future readers of this code to check only for
`equals(ZERO)` instead? Just a thought.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services