| Line 473... |
Line 473... |
| 473 |
CustomerAddress customerAddress = this.createCustomerAddress(customCustomer.getAddress(), customer.getId());
|
473 |
CustomerAddress customerAddress = this.createCustomerAddress(customCustomer.getAddress(), customer.getId());
|
| 474 |
|
474 |
|
| 475 |
FofoOrder fofoOrder = this.createAndGetFofoOrder(customer.getId(), customCustomer.getGstNumber(), fofoId,
|
475 |
FofoOrder fofoOrder = this.createAndGetFofoOrder(customer.getId(), customCustomer.getGstNumber(), fofoId,
|
| 476 |
documentNumber, totalAmount, customerAddress.getId());
|
476 |
documentNumber, totalAmount, customerAddress.getId());
|
| 477 |
|
477 |
|
| 478 |
List<FofoOrderItem> fofoItems = fofoOrderItemRepository.selectByOrderId(fofoOrder.getId());
|
- |
|
| 479 |
|
- |
|
| 480 |
for (FofoOrderItem fofoItem : fofoItems) {
|
- |
|
| 481 |
Item orderItem = itemRepository.selectById(fofoItem.getItemId());
|
- |
|
| 482 |
if (orderItem.getCategoryId() == ProfitMandiConstants.MOBILE_CATEGORY_ID) {
|
- |
|
| 483 |
this.createAndGetHygieneData(fofoOrder.getId(), fofoOrder.getFofoId());
|
- |
|
| 484 |
}
|
- |
|
| 485 |
}
|
- |
|
| 486 |
|
- |
|
| 487 |
this.createPaymentOptions(fofoOrder, createOrderRequest.getPaymentOptions());
|
478 |
this.createPaymentOptions(fofoOrder, createOrderRequest.getPaymentOptions());
|
| 488 |
|
479 |
|
| 489 |
int retailerAddressId = retailerRegisteredAddressRepository.selectAddressIdByRetailerId(fofoId);
|
480 |
int retailerAddressId = retailerRegisteredAddressRepository.selectAddressIdByRetailerId(fofoId);
|
| 490 |
|
481 |
|
| 491 |
Address retailerAddress = addressRepository.selectById(retailerAddressId);
|
482 |
Address retailerAddress = addressRepository.selectById(retailerAddressId);
|
| Line 512... |
Line 503... |
| 512 |
|
503 |
|
| 513 |
this.updateInventoryItemsAndScanRecord(inventoryItems, fofoId, inventoryItemIdQuantityUsed,
|
504 |
this.updateInventoryItemsAndScanRecord(inventoryItems, fofoId, inventoryItemIdQuantityUsed,
|
| 514 |
fofoOrder.getId());
|
505 |
fofoOrder.getId());
|
| 515 |
}
|
506 |
}
|
| 516 |
|
507 |
|
| - |
|
508 |
List<FofoOrderItem> fofoItems = fofoOrderItemRepository.selectByOrderId(fofoOrder.getId());
|
| - |
|
509 |
|
| - |
|
510 |
for (FofoOrderItem fofoItem : fofoItems) {
|
| - |
|
511 |
Item orderItem = itemRepository.selectById(fofoItem.getItemId());
|
| - |
|
512 |
if (orderItem.getCategoryId() == ProfitMandiConstants.MOBILE_CATEGORY_ID) {
|
| - |
|
513 |
this.createAndGetHygieneData(fofoOrder.getId(), fofoOrder.getFofoId());
|
| - |
|
514 |
}
|
| - |
|
515 |
}
|
| 517 |
// insurance calculation is insurance flag is enabled
|
516 |
// insurance calculation is insurance flag is enabled
|
| 518 |
//
|
517 |
//
|
| 519 |
if (!insuranceSerialNumberMap.isEmpty()) {
|
518 |
if (!insuranceSerialNumberMap.isEmpty()) {
|
| 520 |
LOGGER.info("Processing insurane for serialNumbers");
|
519 |
LOGGER.info("Processing insurane for serialNumbers");
|
| 521 |
|
520 |
|