| Line 121... |
Line 121... |
| 121 |
CartItem cartItem = new CartItem();
|
121 |
CartItem cartItem = new CartItem();
|
| 122 |
cartItem.setQuantity(fofoBulkOrderModel.getQuantity());
|
122 |
cartItem.setQuantity(fofoBulkOrderModel.getQuantity());
|
| 123 |
cartItem.setItemId(fofoBulkOrderModel.getItemId());
|
123 |
cartItem.setItemId(fofoBulkOrderModel.getItemId());
|
| 124 |
boolean isPriceZero = fofoBulkOrderModel.getItemPrice() == 0d;
|
124 |
boolean isPriceZero = fofoBulkOrderModel.getItemPrice() == 0d;
|
| 125 |
TagListing tagListing = tagListingRepository.selectByItemId(fofoBulkOrderModel.getItemId());
|
125 |
TagListing tagListing = tagListingRepository.selectByItemId(fofoBulkOrderModel.getItemId());
|
| - |
|
126 |
if (tagListing == null) {
|
| - |
|
127 |
String message = "Pricing Does not exist for " + fofoBulkOrderModel.getItemId() + "(" + fofoBulkOrderModel.getDescription() + ")";
|
| - |
|
128 |
throw new ProfitMandiBusinessException(message, message, message);
|
| - |
|
129 |
}
|
| 126 |
double itemSellingPrice = tagListing.getSellingPrice();
|
130 |
double itemSellingPrice = tagListing.getSellingPrice();
|
| 127 |
double customSellingPrice = fofoBulkOrderModel.getItemPrice();
|
131 |
double customSellingPrice = fofoBulkOrderModel.getItemPrice();
|
| 128 |
int itemId = cartItem.getItemId();
|
132 |
int itemId = cartItem.getItemId();
|
| 129 |
if (isPriceZero) {
|
133 |
if (isPriceZero) {
|
| 130 |
cartItem.setSellingPrice(itemSellingPrice);
|
134 |
cartItem.setSellingPrice(itemSellingPrice);
|