diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/bankcheque/service/ChequeWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/bankcheque/service/ChequeWritePlatformServiceImpl.java index 3e45c380453..bffcc3136da 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/bankcheque/service/ChequeWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/bankcheque/service/ChequeWritePlatformServiceImpl.java @@ -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; @@ -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); } } @@ -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"); }