Subversion Repositories SmartDukaan

Rev

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

Rev 33360 Rev 33361
Line 1090... Line 1090...
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
 
1095
            if(!sdCreditRequirement.getUtilizedAmount().equals(BigDecimal.ZERO)) {
1095
            if(sdCreditRequirement.getUtilizedAmount().compareTo(BigDecimal.ZERO) != 0) {
1096
                LOGGER.info("sdCreditRequirement - {}", sdCreditRequirement);
1096
                LOGGER.info("sdCreditRequirement - {}", sdCreditRequirement);
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());
1102
                creditAccount.setAvailableAmount((float) fofoSidbiSanction.getSanctionAmount());