| Line 1097... |
Line 1097... |
| 1097 |
throw new ProfitMandiBusinessException("Could not change to " + gateway + " unless previous loans are settled","","");
|
1097 |
throw new ProfitMandiBusinessException("Could not change to " + gateway + " unless previous loans are settled","","");
|
| 1098 |
}
|
1098 |
}
|
| 1099 |
if (gateway.equals(Gateway.SIDBI)) {
|
1099 |
if (gateway.equals(Gateway.SIDBI)) {
|
| 1100 |
//TODO - Issuance pending
|
1100 |
//TODO - Issuance pending
|
| 1101 |
FofoSidbiSanction fofoSidbiSanction = fofoSidbiSanctionRepository.selectByFofoId(creditAccount.getFofoId());
|
1101 |
FofoSidbiSanction fofoSidbiSanction = fofoSidbiSanctionRepository.selectByFofoId(creditAccount.getFofoId());
|
| 1102 |
creditAccount.setAvailableAmount((float) fofoSidbiSanction.getSanctionAmount());
|
- |
|
| 1103 |
creditAccount.setSanctionedAmount((float) fofoSidbiSanction.getSanctionAmount());
|
1102 |
creditAccount.setSanctionedAmount((float) fofoSidbiSanction.getSanctionAmount());
|
| 1104 |
sidbiService.issueLimit(fofoSidbiSanction);
|
1103 |
sidbiService.issueLimit(fofoSidbiSanction);
|
| 1105 |
sdCreditRequirement.setLimit(BigDecimal.valueOf(fofoSidbiSanction.getSanctionAmount()));
|
1104 |
sdCreditRequirement.setLimit(BigDecimal.valueOf(fofoSidbiSanction.getSanctionAmount()));
|
| 1106 |
if (sdCreditRequirement.getUtilizedAmount().compareTo(BigDecimal.ZERO) > 0) {
|
1105 |
if (sdCreditRequirement.getUtilizedAmount().compareTo(BigDecimal.ZERO) > 0) {
|
| 1107 |
throw new ProfitMandiBusinessException("Loans are not closed", "Loans are not closed", "Loans are not closed");
|
1106 |
throw new ProfitMandiBusinessException("Loans are not closed", "Loans are not closed", "Loans are not closed");
|
| 1108 |
}
|
1107 |
}
|
| 1109 |
sdCreditRequirement.setUtilizedAmount(BigDecimal.ZERO);
|
1108 |
sdCreditRequirement.setUtilizedAmount(BigDecimal.ZERO);
|
| - |
|
1109 |
creditAccount.setAvailableAmount((float) fofoSidbiSanction.getLoanAmount());
|
| - |
|
1110 |
creditAccount.setActive(true);
|
| 1110 |
}
|
1111 |
}
|
| 1111 |
}
|
1112 |
}
|
| 1112 |
|
1113 |
|
| 1113 |
Map<Integer, CustomRetailer> customRetailers = retailerService.getAllFofoRetailers();
|
1114 |
Map<Integer, CustomRetailer> customRetailers = retailerService.getAllFofoRetailers();
|
| 1114 |
|
1115 |
|