Github user Ippezrobert commented on a diff in the pull request:
https://github.com/apache/incubator-fineract/pull/302#discussion_r104605492
--- Diff:
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java
---
@@ -446,6 +446,72 @@ public CommandProcessingResult rejectApplication(final
Long savingsId, final Jso
.build();
}
+ @Transactional
+ @Override
+ public CommandProcessingResult undoApplicationRejection(final Long
savingsId, final JsonCommand command) {
+ this.context.authenticatedUser();
+
+
this.savingsAccountApplicationTransitionApiJsonValidator.validateForUndo(command.json());
+
+ final SavingsAccount savingsAccount =
this.savingAccountAssembler.assembleFrom(savingsId);
+ checkClientOrGroupActive(savingsAccount);
+
+ final Map<String, Object> changes =
savingsAccount.undoApplicationRejection();
+ if (!changes.isEmpty()) {
+ this.savingAccountRepository.save(savingsAccount);
+
+ final String noteText =
command.stringValueOfParameterNamed("note");
+ if (StringUtils.isNotBlank(noteText)) {
+ final Note note = Note.savingNote(savingsAccount,
noteText);
+ changes.put("note", noteText);
+ this.noteRepository.save(note);
+ }
+ }
+
+ return new CommandProcessingResultBuilder() //
+ .withCommandId(command.commandId()) //
+ .withEntityId(savingsId) //
+ .withOfficeId(savingsAccount.officeId()) //
+ .withClientId(savingsAccount.clientId()) //
+ .withGroupId(savingsAccount.groupId()) //
+ .withSavingsId(savingsId) //
+ .with(changes) //
+ .build();
+ }
+
+ @Transactional
+ @Override
+ public CommandProcessingResult reopen(final Long savingsId, final
JsonCommand command) {
--- End diff --
@nazeer1100126 , These changes will only be possible if the issues
https://issues.apache.org/jira/browse/FINERACT-232 and
https://issues.apache.org/jira/browse/FINERACT-408 are implemented and those
are more technical for me.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---