| Line 114... |
Line 114... |
| 114 |
totalAmount += cartItem.getSellingPrice() * cartItem.getQuantity();
|
114 |
totalAmount += cartItem.getSellingPrice() * cartItem.getQuantity();
|
| 115 |
cartItems.add(cartItem);
|
115 |
cartItems.add(cartItem);
|
| 116 |
}
|
116 |
}
|
| 117 |
LOGGER.info("totalAmount of item " + totalAmount);
|
117 |
LOGGER.info("totalAmount of item " + totalAmount);
|
| 118 |
double walletAmount = walletService.getWalletAmount(fofoId);
|
118 |
double walletAmount = walletService.getWalletAmount(fofoId);
|
| 119 |
if (walletAmount < totalAmount) {
|
119 |
if (totalAmount > 20 && walletAmount < totalAmount) {
|
| 120 |
throw new ProfitMandiBusinessException("Skippin order due to insufficent balance for id - ", fofoId, " ,Check wallet Balance ones");
|
120 |
throw new ProfitMandiBusinessException("Skippin order due to insufficent balance for id - ", fofoId, " ,Check wallet Balance ones");
|
| 121 |
}
|
121 |
}
|
| 122 |
UserCart userCart = cartService.setCartItems(fofoId, cartItems);
|
122 |
UserCart userCart = cartService.setCartItems(fofoId, cartItems);
|
| 123 |
// createtransactionInternally set the value in transaction table
|
123 |
// createtransactionInternally set the value in transaction table
|
| 124 |
int transactionId = transactionService.createTransactionInternally(userCart, totalAmount, 0);
|
124 |
int transactionId = transactionService.createTransactionInternally(userCart, totalAmount, 0);
|