| Line 144... |
Line 144... |
| 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 |
|
| 149 |
double creditAmountRequired = totalPayableAmount - walletAmount - 20;
|
149 |
double creditAmountRequired = totalPayableAmount - walletAmount;
|
| 150 |
if (creditAmountRequired > 0d) {
|
150 |
if (creditAmountRequired > 20) {
|
| 151 |
sdCreditService.createLoan(userCart.getUserId(), creditAmountRequired, 0);
|
151 |
sdCreditService.createLoan(userCart.getUserId(), creditAmountRequired, 0);
|
| 152 |
}
|
152 |
}
|
| 153 |
//return this.createLoan(userCart.getUserId(), creditAmountRequired);
|
153 |
//return this.createLoan(userCart.getUserId(), creditAmountRequired);
|
| 154 |
int transactionId = transactionService.createTransactionInternally(userCart, totalPayableAmount, 0);
|
154 |
int transactionId = transactionService.createTransactionInternally(userCart, totalPayableAmount, 0);
|
| 155 |
//Set here created by
|
155 |
//Set here created by
|