| Line 739... |
Line 739... |
| 739 |
@Override
|
739 |
@Override
|
| 740 |
// Always being called from cancel order means no SCHEME IN is considered
|
740 |
// Always being called from cancel order means no SCHEME IN is considered
|
| 741 |
public void reverseSchemes(List<InventoryItem> inventoryItems, int reversalReference, String reversalReason,
|
741 |
public void reverseSchemes(List<InventoryItem> inventoryItems, int reversalReference, String reversalReason,
|
| 742 |
SchemeType schemeType) throws ProfitMandiBusinessException {
|
742 |
SchemeType schemeType) throws ProfitMandiBusinessException {
|
| 743 |
Map<Integer, InventoryItem> inventoryItemsMap = inventoryItems.stream()
|
743 |
Map<Integer, InventoryItem> inventoryItemsMap = inventoryItems.stream()
|
| 744 |
.collect(Collectors.toMap(x -> x.getItemId(), x -> x));
|
744 |
.collect(Collectors.toMap(x -> x.getId(), x -> x));
|
| 745 |
LOGGER.info("inventoryItems" + inventoryItems);
|
745 |
LOGGER.info("inventoryItems" + inventoryItems);
|
| 746 |
|
746 |
|
| 747 |
List<SchemeInOut> schemeInOuts = schemeInOutRepository.selectByInventoryItemIds(inventoryItemsMap.keySet());
|
747 |
List<SchemeInOut> schemeInOuts = schemeInOutRepository.selectByInventoryItemIds(inventoryItemsMap.keySet());
|
| 748 |
LOGGER.info("schemeInOuts" + schemeInOuts);
|
748 |
LOGGER.info("schemeInOuts" + schemeInOuts);
|
| 749 |
float amountToRollback = 0;
|
749 |
float amountToRollback = 0;
|