Subversion Repositories SmartDukaan

Rev

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

Rev 33341 Rev 33343
Line 138... Line 138...
138
            double walletAmount = walletService.getWalletAmount(fofoId);
138
            double walletAmount = walletService.getWalletAmount(fofoId);
139
 
139
 
140
            BigDecimal creditAvailability = sdCreditService.getAvailableAmount(fofoId);
140
            BigDecimal creditAvailability = sdCreditService.getAvailableAmount(fofoId);
141
 
141
 
142
            double netAmountInHand = creditAvailability.doubleValue() + walletAmount;
142
            double netAmountInHand = creditAvailability.doubleValue() + walletAmount;
143
            if (totalPayableAmount > 20 && walletAmount < netAmountInHand) {
143
            if (totalPayableAmount > 20 && netAmountInHand < totalPayableAmount) {
144
                throw new ProfitMandiBusinessException("Skippin order due to insufficent balance for id - ", fofoId, " ,Check wallet Balance ones");
144
                throw new ProfitMandiBusinessException("Skippin order due to insufficent balance for id - ", fofoId, " ,Check wallet Balance ones");
145
            }
145
            }
146
            UserCart userCart = cartService.setCartItems(fofoId, cartItems);
146
            UserCart userCart = cartService.setCartItems(fofoId, cartItems);
147
            // createtransactionInternally set the value in transaction table
147
            // createtransactionInternally set the value in transaction table
148
 
148