| Line 291... |
Line 291... |
| 291 |
int ourSale = ourSaleItemQtyMap.get(itemQtyEntry.getKey());
|
291 |
int ourSale = ourSaleItemQtyMap.get(itemQtyEntry.getKey());
|
| 292 |
int quantityToReduce = itemQtyEntry.getValue() - ourSale;
|
292 |
int quantityToReduce = itemQtyEntry.getValue() - ourSale;
|
| 293 |
List<InventoryItem> itemIis = itemIdInventoryMap.get(itemQtyEntry.getKey());
|
293 |
List<InventoryItem> itemIis = itemIdInventoryMap.get(itemQtyEntry.getKey());
|
| 294 |
if (itemIdInventoryMap != null) {
|
294 |
if (itemIdInventoryMap != null) {
|
| 295 |
for (InventoryItem ii : itemIis) {
|
295 |
for (InventoryItem ii : itemIis) {
|
| 296 |
if (ii.getSerialNumber() != null && quantityToReduce > 0) {
|
296 |
if (ii.getSerialNumber() == null && quantityToReduce > 0) {
|
| 297 |
LOGGER.info("Changed in inventoryItems {}, {}, {}, {}, {}, {}",
|
297 |
LOGGER.info("Changed in inventoryItems {}, {}, {}, {}, {}, {}",
|
| 298 |
purchase.getPurchaseReference(), ii.getId(), ii.getItemId(),
|
298 |
purchase.getPurchaseReference(), ii.getId(), ii.getItemId(),
|
| 299 |
ii.getInitialQuantity(), ii.getGoodQuantity(), quantityToReduce);
|
299 |
ii.getInitialQuantity(), ii.getGoodQuantity(), quantityToReduce);
|
| 300 |
List<ScanRecord> scanRecords = scanRecordRepository.selectByInventoryItemId(ii.getId());
|
300 |
List<ScanRecord> scanRecords = scanRecordRepository.selectByInventoryItemId(ii.getId());
|
| 301 |
for (ScanRecord scanRecord : scanRecords) {
|
301 |
for (ScanRecord scanRecord : scanRecords) {
|