Subversion Repositories SmartDukaan

Rev

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

Rev 32147 Rev 32161
Line 1132... Line 1132...
1132
    PurchaseReturnItemRepository purchaseReturnItemRepository;
1132
    PurchaseReturnItemRepository purchaseReturnItemRepository;
1133
 
1133
 
1134
    @Autowired
1134
    @Autowired
1135
    BrandRegionMappingRepository brandRegionMappingRepository;
1135
    BrandRegionMappingRepository brandRegionMappingRepository;
1136
 
1136
 
-
 
1137
    @Autowired
1137
    @Autowired StandAlone standAlone;
1138
    StandAlone standAlone;
1138
 
1139
 
1139
    public void test() throws Exception {
1140
    public void test() throws Exception {
1140
        try {
1141
        try {
1141
            standAlone.checkOppoImeiStatus();
1142
            standAlone.checkOppoImeiStatus();
1142
        } catch (Throwable e) {
1143
        } catch (Throwable e) {
Line 3489... Line 3490...
3489
                            paidAmount += Math.abs(interestAmount);
3490
                            paidAmount += Math.abs(interestAmount);
3490
                        }
3491
                        }
3491
 
3492
 
3492
                        double userWalletAmount = userWallet.getAmount() - Math.abs(interestAmount);
3493
                        double userWalletAmount = userWallet.getAmount() - Math.abs(interestAmount);
3493
 
3494
 
-
 
3495
                        LOGGER.info("interestAmount b {}", interestAmount);
-
 
3496
 
-
 
3497
 
3494
                        if (userWalletAmount > Math.abs(principalAmount) && principalAmount < 0) {
3498
                        if (userWalletAmount > Math.abs(principalAmount) && principalAmount < 0) {
3495
 
3499
 
3496
                            settledLoanStatement(LoanReferenceType.PRINCIPAL, BigDecimal.valueOf(principalAmount), loan.getFofoId(), loan.getId(), "Amount adjusted against loan", LocalDateTime.now());
3500
                            settledLoanStatement(LoanReferenceType.PRINCIPAL, BigDecimal.valueOf(principalAmount), loan.getFofoId(), loan.getId(), "Amount adjusted against loan", LocalDateTime.now());
3497
                            double amount = userWalletAmount - Math.abs(principalAmount);
3501
                            double amount = userWalletAmount - Math.abs(principalAmount);
3498
 
3502
 
Line 3532... Line 3536...
3532
                            loan.setPendingAmount(
3536
                            loan.setPendingAmount(
3533
                                    loan.getPendingAmount().subtract(BigDecimal.valueOf(userWalletAmount)));
3537
                                    loan.getPendingAmount().subtract(BigDecimal.valueOf(userWalletAmount)));
3534
 
3538
 
3535
                        }
3539
                        }
3536
 
3540
 
-
 
3541
                        LOGGER.info("paidAmount b {}", paidAmount);
-
 
3542
 
-
 
3543
 
3537
                        walletService.consumeAmountFromWallet(userWallet.getUserId(), loan.getId(), WalletReferenceType.LOAN_REPAYMENT, "Amount adjusted against loan", (float) Math.abs(paidAmount), LocalDateTime.now());
3544
                        walletService.consumeAmountFromWallet(userWallet.getUserId(), loan.getId(), WalletReferenceType.LOAN_REPAYMENT, "Amount adjusted against loan", (float) Math.abs(paidAmount), LocalDateTime.now());
3538
 
3545
 
3539
                        // createUserWalletHistory(userWallet.getId(), userWallet.getUserId(), WalletReferenceType.LOAN_REPAYMENT, loan.getId(), Math.abs(paidAmount));
3546
                        // createUserWalletHistory(userWallet.getId(), userWallet.getUserId(), WalletReferenceType.LOAN_REPAYMENT, loan.getId(), Math.abs(paidAmount));
3540
 
3547
 
3541
                    } else {
3548
                    } else {