Subversion Repositories SmartDukaan

Rev

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

Rev 32169 Rev 32210
Line 1141... Line 1141...
1141
    @Autowired
1141
    @Autowired
1142
    StandAlone standAlone;
1142
    StandAlone standAlone;
1143
 
1143
 
1144
    public void test() throws Exception {
1144
    public void test() throws Exception {
1145
        try {
1145
        try {
1146
            checkAllPayoutsDuplicate();
1146
            this.checkItelImeiActivationNew(LocalDate.now(), 15);
1147
        } catch (Throwable e) {
1147
        } catch (Throwable e) {
1148
            throw new Exception(e);
1148
            throw new Exception(e);
1149
        }
1149
        }
1150
 
1150
 
1151
        //this.sendMailForSamsungRebilling();
1151
        //this.sendMailForSamsungRebilling();
Line 3560... Line 3560...
3560
                            paidAmount += Math.abs(interestAmount);
3560
                            paidAmount += Math.abs(interestAmount);
3561
                        }
3561
                        }
3562
 
3562
 
3563
                        double userWalletAmount = userWallet.getAmount() - Math.abs(interestAmount);
3563
                        double userWalletAmount = userWallet.getAmount() - Math.abs(interestAmount);
3564
 
3564
 
3565
                        LOGGER.info("interestAmount b {}", interestAmount);
-
 
3566
 
-
 
3567
 
-
 
3568
                        if (userWalletAmount > Math.abs(principalAmount) && principalAmount < 0) {
3565
                        if (userWalletAmount > Math.abs(principalAmount) && principalAmount < 0) {
3569
 
3566
 
3570
                            settledLoanStatement(LoanReferenceType.PRINCIPAL, BigDecimal.valueOf(principalAmount), loan.getFofoId(), loan.getId(), "Amount adjusted against loan", LocalDateTime.now());
3567
                            settledLoanStatement(LoanReferenceType.PRINCIPAL, BigDecimal.valueOf(principalAmount), loan.getFofoId(), loan.getId(), "Amount adjusted against loan", LocalDateTime.now());
3571
                            double amount = userWalletAmount - Math.abs(principalAmount);
3568
                            double amount = userWalletAmount - Math.abs(principalAmount);
3572
 
3569
 
Line 3606... Line 3603...
3606
                            loan.setPendingAmount(
3603
                            loan.setPendingAmount(
3607
                                    loan.getPendingAmount().subtract(BigDecimal.valueOf(userWalletAmount)));
3604
                                    loan.getPendingAmount().subtract(BigDecimal.valueOf(userWalletAmount)));
3608
 
3605
 
3609
                        }
3606
                        }
3610
 
3607
 
3611
                        LOGGER.info("paidAmount b {}", paidAmount);
-
 
3612
 
-
 
3613
 
-
 
3614
                        walletService.consumeAmountFromWallet(userWallet.getUserId(), loan.getId(), WalletReferenceType.LOAN_REPAYMENT, "Amount adjusted against loan", (float) Math.abs(paidAmount), LocalDateTime.now());
3608
                        walletService.consumeAmountFromWallet(userWallet.getUserId(), loan.getId(), WalletReferenceType.LOAN_REPAYMENT, "Amount adjusted against loan", (float) Math.abs(paidAmount), LocalDateTime.now());
3615
 
3609
 
3616
                        // createUserWalletHistory(userWallet.getId(), userWallet.getUserId(), WalletReferenceType.LOAN_REPAYMENT, loan.getId(), Math.abs(paidAmount));
3610
                        // createUserWalletHistory(userWallet.getId(), userWallet.getUserId(), WalletReferenceType.LOAN_REPAYMENT, loan.getId(), Math.abs(paidAmount));
3617
 
3611
 
3618
                    } else {
3612
                    } else {
Line 4563... Line 4557...
4563
        }
4557
        }
4564
 
4558
 
4565
    }
4559
    }
4566
 
4560
 
4567
 
4561
 
4568
}
-
 
4569
4562
}
-
 
4563
// 2284'
-
 
4564
4570
4565