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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/account/jobs/executestandinginstructions/ExecuteStandingInstructionsTasklet.java:
##########
@@ -151,17 +160,21 @@ private boolean transferAmount(final List<Throwable> 
errors, final AccountTransf
             errorLog.append("Exception while trasfering funds 
").append(e.getMessage());
 
         }
-        updateQuery.append(instructionId).append(",");
-        if (errorLog.length() > 0) {
+
+        if (!errorLog.isEmpty()) {
             transferCompleted = false;
-            updateQuery.append("'failed'").append(",");
-        } else {
-            updateQuery.append("'success'").append(",");
         }
-        
updateQuery.append(accountTransferDTO.getTransactionAmount().doubleValue());
-        updateQuery.append(", now(),");
-        updateQuery.append("'").append(errorLog).append("')");
-        jdbcTemplate.update(updateQuery.toString());
+
+        final AccountTransferStandingInstructionsHistory newHistory = new 
AccountTransferStandingInstructionsHistory();

Review Comment:
   I would move this whole logic into a repository



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