Subversion Repositories SmartDukaan

Rev

Rev 33359 | Rev 33361 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33359 Rev 33360
Line 1089... Line 1089...
1089
        CreditAccount creditAccount = creditAccountRepository.selectById(id);
1089
        CreditAccount creditAccount = creditAccountRepository.selectById(id);
1090
        if (creditAccount.getGateway().equals(gateway)) {
1090
        if (creditAccount.getGateway().equals(gateway)) {
1091
            creditAccount.setActive(true);
1091
            creditAccount.setActive(true);
1092
        } else {
1092
        } else {
1093
                SDCreditRequirement sdCreditRequirement = sdCreditRequirementRepository.selectByFofoId(creditAccount.getFofoId());
1093
                SDCreditRequirement sdCreditRequirement = sdCreditRequirementRepository.selectByFofoId(creditAccount.getFofoId());
-
 
1094
 
1094
            if(!sdCreditRequirement.getUtilizedAmount().equals(BigDecimal.ZERO)) {
1095
            if(!sdCreditRequirement.getUtilizedAmount().equals(BigDecimal.ZERO)) {
-
 
1096
                LOGGER.info("sdCreditRequirement - {}", sdCreditRequirement);
1095
                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","","");
1096
            }
1098
            }
1097
            if (gateway.equals(Gateway.SIDBI)) {
1099
            if (gateway.equals(Gateway.SIDBI)) {
1098
                //TODO - Issuance pending
1100
                //TODO - Issuance pending
1099
                FofoSidbiSanction fofoSidbiSanction = fofoSidbiSanctionRepository.selectByFofoId(creditAccount.getFofoId());
1101
                FofoSidbiSanction fofoSidbiSanction = fofoSidbiSanctionRepository.selectByFofoId(creditAccount.getFofoId());