| Line 979... |
Line 979... |
| 979 |
"HRFB004/243", "HRFB004/514", "HRFTB155/29", "HRJND076/1146", "HRJND076/966", "HRKA134/295",
|
979 |
"HRFB004/243", "HRFB004/514", "HRFTB155/29", "HRJND076/1146", "HRJND076/966", "HRKA134/295",
|
| 980 |
"HRKA134/421", "HRKK091/381", "HRMGH106/576", "HRSP056/139", "HRYN030/103", "UPGZ019/395",
|
980 |
"HRKA134/421", "HRKK091/381", "HRMGH106/576", "HRSP056/139", "HRYN030/103", "UPGZ019/395",
|
| 981 |
"UPHRD130/1299", "UPHRD130/456", "UPHRD130/634", "UPLKO063/897", "UPMRT149/54", "UPSJP119/748",
|
981 |
"UPHRD130/1299", "UPHRD130/456", "UPHRD130/634", "UPLKO063/897", "UPMRT149/54", "UPSJP119/748",
|
| 982 |
"UPSJP119/980", "UPSTP065/1218", "UPSTP065/2039", "UPSTP090/437", "UPSTP120/164");
|
982 |
"UPSJP119/980", "UPSTP065/1218", "UPSTP065/2039", "UPSTP090/437", "UPSTP120/164");
|
| 983 |
|
983 |
|
| - |
|
984 |
int totalAmount = 0;
|
| - |
|
985 |
float saleAmount = 0;
|
| 984 |
for(String invoiceNumber : invoiceNumbers) {
|
986 |
for(String invoiceNumber : invoiceNumbers) {
|
| 985 |
int totalAmount = 0;
|
- |
|
| 986 |
List<FofoOrder> orders = fofoOrderRepository.selectByInvoiceNumberLike(invoiceNumber);
|
987 |
List<FofoOrder> orders = fofoOrderRepository.selectByInvoiceNumberLike(invoiceNumber);
|
| 987 |
orders = orders.stream().skip(1).collect(Collectors.toList());
|
988 |
orders = orders.stream().skip(1).collect(Collectors.toList());
|
| 988 |
for (FofoOrder fofoOrder : orders) {
|
989 |
for (FofoOrder fofoOrder : orders) {
|
| 989 |
LOGGER.info("Invoice {}", invoiceNumber);
|
990 |
LOGGER.info("Invoice {}", invoiceNumber);
|
| 990 |
int inventoryItemId = 0;
|
991 |
int inventoryItemId = 0;
|
| - |
|
992 |
saleAmount += fofoOrder.getTotalAmount();
|
| 991 |
//fofoOrderRepository.delete(fofoOrder);
|
993 |
//fofoOrderRepository.delete(fofoOrder);
|
| 992 |
List<FofoOrderItem> fofoOrderItems = fofoOrderItemRepository.selectByOrderId(fofoOrder.getId());
|
994 |
List<FofoOrderItem> fofoOrderItems = fofoOrderItemRepository.selectByOrderId(fofoOrder.getId());
|
| 993 |
List<PaymentOptionTransaction> paymentOptionTransactions = paymentOptionTransactionRepository.selectByReferenceIdAndType(fofoOrder.getId(), PaymentOptionReferenceType.ORDER);
|
995 |
List<PaymentOptionTransaction> paymentOptionTransactions = paymentOptionTransactionRepository.selectByReferenceIdAndType(fofoOrder.getId(), PaymentOptionReferenceType.ORDER);
|
| 994 |
for(PaymentOptionTransaction paymentOptionTransaction : paymentOptionTransactions) {
|
996 |
for(PaymentOptionTransaction paymentOptionTransaction : paymentOptionTransactions) {
|
| 995 |
//paymentOptionTransactionRepository.delete(paymentOptionTransaction);
|
997 |
//paymentOptionTransactionRepository.delete(paymentOptionTransaction);
|
| Line 1016... |
Line 1018... |
| 1016 |
}
|
1018 |
}
|
| 1017 |
//Remove order id
|
1019 |
//Remove order id
|
| 1018 |
//Remove order item Id
|
1020 |
//Remove order item Id
|
| 1019 |
//Remove lineitem id
|
1021 |
//Remove lineitem id
|
| 1020 |
}
|
1022 |
}
|
| 1021 |
LOGGER.info("Invoice - {}, Amount {}", invoiceNumber, totalAmount);
|
- |
|
| 1022 |
}
|
1023 |
}
|
| - |
|
1024 |
LOGGER.info("Total Sale Amount Reversal - {}, Total Wallet Amount Reversal {}", saleAmount, totalAmount);
|
| 1023 |
}
|
1025 |
}
|
| 1024 |
}
|
1026 |
}
|
| 1025 |
|
1027 |
|
| 1026 |
//7015845171
|
1028 |
//7015845171
|
| 1027 |
|
1029 |
|