fineract-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100126 <...@git.apache.org>
Subject [GitHub] incubator-fineract pull request #302: Ability to reopen savings accounts whe...
Date Tue, 07 Mar 2017 07:37:51 GMT
Github user nazeer1100126 commented on a diff in the pull request:

    https://github.com/apache/incubator-fineract/pull/302#discussion_r104604062
  
    --- 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 --
    
    I don't see those changes here. It just resets the account status or am I missing something?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message