Subversion Repositories SmartDukaan

Rev

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

Rev 35828 Rev 36305
Line 88... Line 88...
88
        if (Math.round(amount) == 0)
88
        if (Math.round(amount) == 0)
89
            return;
89
            return;
90
        UserWallet userWallet = userWalletRepository.selectByRetailerId(retailerId);
90
        UserWallet userWallet = userWalletRepository.selectByRetailerId(retailerId);
91
        userWallet.setAmount(userWallet.getAmount() + Math.round(amount));
91
        userWallet.setAmount(userWallet.getAmount() + Math.round(amount));
92
        this.createUserWalletHistory(Math.round(amount), userWallet.getId(), referenceId, referenceType, description, businessTime);
92
        this.createUserWalletHistory(Math.round(amount), userWallet.getId(), referenceId, referenceType, description, businessTime);
-
 
93
        if (WalletReferenceType.AUTOMATED_ADVANCE.equals(referenceType)
-
 
94
                || WalletReferenceType.ADVANCE_AMOUNT.equals(referenceType)
-
 
95
                || WalletReferenceType.PAYMENT_GATEWAY.equals(referenceType)
-
 
96
                || WalletReferenceType.ONLINE_ORDER_PAYMENT.equals(referenceType)
-
 
97
                || WalletReferenceType.PURCHASE.equals(referenceType)) {
-
 
98
            partnerInvestmentService.evictInvestmentCache(retailerId);
-
 
99
        }
93
    }
100
    }
94
 
101
 
95
    @Override
102
    @Override
96
    public void consumeAmountFromWallet(int retailerId, int referenceId, WalletReferenceType referenceType,
103
    public void consumeAmountFromWallet(int retailerId, int referenceId, WalletReferenceType referenceType,
97
                                        String description, float amount, LocalDateTime businessTime) throws ProfitMandiBusinessException {
104
                                        String description, float amount, LocalDateTime businessTime) throws ProfitMandiBusinessException {