adamsaghy commented on code in PR #5002:
URL: https://github.com/apache/fineract/pull/5002#discussion_r2372499752


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java:
##########
@@ -663,6 +664,7 @@ public CommandProcessingResult 
createActiveApplication(final SavingsAccountDataD
         final SavingsAccount account = 
this.savingAccountAssembler.assembleFrom(savingsAccountDataDTO.getClient(),
                 savingsAccountDataDTO.getGroup(), 
savingsAccountDataDTO.getSavingsProduct(), 
savingsAccountDataDTO.getApplicationDate(),
                 savingsAccountDataDTO.getAppliedBy());
+        generateAccountNumber(account, account.getAccountNumber());

Review Comment:
   You cannot move the account number generation before the account is saved. 
Account generation logic depends on savings account id which only be there if 
it was already saved and flushed.



-- 
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]

Reply via email to