| 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 |
LOGGER.info("netAmountInHand - " + netAmountInHand);
|
| 143 |
if (totalPayableAmount > 20 && netAmountInHand < totalPayableAmount) {
|
144 |
if (totalPayableAmount > 20 && netAmountInHand < totalPayableAmount) {
|
| 144 |
throw new ProfitMandiBusinessException("Skippin order due to insufficent balance for id - ", fofoId, " ,Check wallet Balance ones");
|
145 |
throw new ProfitMandiBusinessException("Skipping order due to insufficient balance for id - ", fofoId, " ,Check wallet Balance once");
|
| 145 |
}
|
146 |
}
|
| 146 |
UserCart userCart = cartService.setCartItems(fofoId, cartItems);
|
147 |
UserCart userCart = cartService.setCartItems(fofoId, cartItems);
|
| 147 |
// createtransactionInternally set the value in transaction table
|
148 |
// createtransactionInternally set the value in transaction table
|
| 148 |
|
149 |
|
| 149 |
double creditAmountRequired = totalPayableAmount - walletAmount;
|
150 |
double creditAmountRequired = totalPayableAmount - walletAmount;
|