class DecliningBalanceEqualPrincipalWithInterestGenerator implements PrincipalWithInterestGenerator {

		return lstInstallmntPricplIntrst;@Override
    public List<InstallmentPrincipalAndInterest> generateEqualInstallments(LoanInterestCalculationDetails loanInterestCalculationDetails) {

        Money loanAmount = loanInterestCalculationDetails.getLoanAmount();
        Integer numberOfInstallments = loanInterestCalculationDetails.getNumberOfInstallments();
        Double interestFractionalRatePerInstallment = loanInterestCalculationDetails.getInterestFractionalRatePerInstallment();

        GraceType graceType = loanInterestCalculationDetails.getGraceType();
        Integer gracePeriodDuration = loanInterestCalculationDetails.getGracePeriodDuration();
        
        //For M5193
        int prorateValue = 0;
		List<InstallmentPrincipalAndInterest> lstInstallmntPricplIntrst = null;
		
		LocalDate disbursalDateInLocalDate=loanInterestCalculationDetails.getDisbursementDate();
		DateTime disbursalDate=disbursalDateInLocalDate.toDateTimeAtStartOfDay();
		List<DateTime> scheduledDates=loanInterestCalculationDetails.getLoanScheduleDates();
		if(scheduledDates.size() > 2){ //chek whether loanscheduledDates are there
			DateTime firstRepaymentDay=scheduledDates.get(0);
			long  differenceOfTwoDatesinMilliseconds=(firstRepaymentDay.toDate().getTime()-disbursalDate.toDate().getTime());
			long noOfDays=differenceOfTwoDatesinMilliseconds/(1000*60*60*24);
			int noOfDaysBetweenFirstRepaymentDayAndDisbursalDate=(int)noOfDays;


			DateTime secondRepaymentDay=scheduledDates.get(1);
			long duration=(secondRepaymentDay.toDate().getTime()-firstRepaymentDay.toDate().getTime())/(1000*60*60*24);
			int noOfDaysInOneSchedule=(int)duration;	
			
			prorateValue = new ConfigurationPersistence().getConfigurationValueInteger(PRORATE_RULE);
			if (prorateValue==1)
				lstInstallmntPricplIntrst = allDecliningEPIInstallments_v2(loanAmount, numberOfInstallments, interestFractionalRatePerInstallment, graceType, gracePeriodDuration,noOfDaysBetweenFirstRepaymentDayAndDisbursalDate,noOfDaysInOneSchedule);		
		       }
		 if (prorateValue != 1){
		  lstInstallmntPricplIntrst = allDecliningEPIInstallments_v2(loanAmount, numberOfInstallments, interestFractionalRatePerInstallment, graceType, gracePeriodDuration);
		 }
		
		return lstInstallmntPricplIntrst;}

}