| Line 987... |
Line 987... |
| 987 |
float schemeReverseAmount = 0;
|
987 |
float schemeReverseAmount = 0;
|
| 988 |
for(String invoiceNumber : invoiceNumbers) {
|
988 |
for(String invoiceNumber : invoiceNumbers) {
|
| 989 |
List<FofoOrder> orders = fofoOrderRepository.selectByInvoiceNumberLike(invoiceNumber);
|
989 |
List<FofoOrder> orders = fofoOrderRepository.selectByInvoiceNumberLike(invoiceNumber);
|
| 990 |
orders = orders.stream().skip(1).collect(Collectors.toList());
|
990 |
orders = orders.stream().skip(1).collect(Collectors.toList());
|
| 991 |
for (FofoOrder fofoOrder : orders) {
|
991 |
for (FofoOrder fofoOrder : orders) {
|
| 992 |
LOGGER.info("Invoice {}", invoiceNumber);
|
992 |
LOGGER.info("Fofo Order Id - {}, Invoice {}", fofoOrder.getId(), invoiceNumber);
|
| 993 |
int inventoryItemId = 0;
|
993 |
int inventoryItemId = 0;
|
| 994 |
saleAmount += fofoOrder.getTotalAmount();
|
994 |
saleAmount += fofoOrder.getTotalAmount();
|
| 995 |
//fofoOrderRepository.delete(fofoOrder);
|
995 |
//fofoOrderRepository.delete(fofoOrder);
|
| 996 |
List<FofoOrderItem> fofoOrderItems = fofoOrderItemRepository.selectByOrderId(fofoOrder.getId());
|
996 |
List<FofoOrderItem> fofoOrderItems = fofoOrderItemRepository.selectByOrderId(fofoOrder.getId());
|
| 997 |
List<PaymentOptionTransaction> paymentOptionTransactions = paymentOptionTransactionRepository.selectByReferenceIdAndType(fofoOrder.getId(), PaymentOptionReferenceType.ORDER);
|
997 |
List<PaymentOptionTransaction> paymentOptionTransactions = paymentOptionTransactionRepository.selectByReferenceIdAndType(fofoOrder.getId(), PaymentOptionReferenceType.ORDER);
|
| Line 1028... |
Line 1028... |
| 1028 |
}
|
1028 |
}
|
| 1029 |
}
|
1029 |
}
|
| 1030 |
}
|
1030 |
}
|
| 1031 |
LOGGER.info("invoiceWalletAmount - {}, invoiceSchemeReversalAmount {}", invoiceWalletAmount, invoiceSchemeReversalAmount);
|
1031 |
LOGGER.info("invoiceWalletAmount - {}, invoiceSchemeReversalAmount {}", invoiceWalletAmount, invoiceSchemeReversalAmount);
|
| 1032 |
}
|
1032 |
}
|
| 1033 |
//Remove order id
|
- |
|
| 1034 |
//Remove order item Id
|
- |
|
| 1035 |
//Remove lineitem id
|
- |
|
| 1036 |
}
|
1033 |
}
|
| 1037 |
}
|
1034 |
}
|
| 1038 |
LOGGER.info("Total Sale Amount Reversal - {}, Total Wallet Amount Reversal {}, Total Scheme Reversal Amount - {}", saleAmount, totalAmount, schemeReverseAmount);
|
1035 |
LOGGER.info("Total Sale Amount Reversal - {}, Total Wallet Amount Reversal {}, Total Scheme Reversal Amount - {}", saleAmount, totalAmount, schemeReverseAmount);
|
| 1039 |
}
|
1036 |
}
|
| 1040 |
}
|
1037 |
}
|