Skip to content

Commit

Permalink
Merge pull request #292 from fiterlatam/fix/FBR-412
Browse files Browse the repository at this point in the history
Fix undo disbusal on cheque reassignment
  • Loading branch information
BrianMuhimbura authored Nov 21, 2023
2 parents 89f5514 + e436b82 commit d5fa200
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
import org.apache.fineract.organisation.monetary.domain.NumberToWordsConverter;
import org.apache.fineract.portfolio.loanaccount.domain.Loan;
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepositoryWrapper;
import org.apache.fineract.portfolio.loanaccount.domain.LoanStatus;
import org.apache.fineract.portfolio.loanaccount.service.LoanWritePlatformService;
import org.apache.fineract.useradministration.domain.AppUser;
import org.springframework.jdbc.core.JdbcTemplate;
Expand Down Expand Up @@ -203,7 +202,6 @@ public CommandProcessingResult reassignCheque(final Long chequeId, JsonCommand c
final Long loanId = chequeData.getLoanAccId();
final Loan loan = this.loanRepositoryWrapper.findOneWithNotFoundDetection(loanId);
loan.setCheque(newCheque);
loan.setLoanStatus(LoanStatus.DISBURSE_AUTHORIZATION_PENDING.getValue());
this.loanRepositoryWrapper.saveAndFlush(loan);
}
}
Expand Down Expand Up @@ -377,7 +375,7 @@ public CommandProcessingResult printCheques(JsonCommand command) {
if (loan.getCheque() != null && (loan.getCheque().getId() != null && !loan.getCheque().getId().equals(cheque.getId()))) {
throw new BankChequeException("print.cheques", "Loan: " + loan.getAccountNumber() + " has a cheque assigned already");
}
if (!loan.isPendingDisbursementAuthorization()) {
if (!loan.isPendingDisbursementAuthorization() && !chequeData.getReassingedCheque()) {
throw new BankChequeException(
"print.cheques.loan:" + loan.getAccountNumber() + " is.not.in.disbursement.authorization.status");
}
Expand Down

0 comments on commit d5fa200

Please sign in to comment.