| Line 232... |
Line 232... |
| 232 |
int ourSale = ourSaleItemQtyMap.get(itemQtyEntry.getKey());
|
232 |
int ourSale = ourSaleItemQtyMap.get(itemQtyEntry.getKey());
|
| 233 |
int quantityToReduce = itemQtyEntry.getValue() - ourSale;
|
233 |
int quantityToReduce = itemQtyEntry.getValue() - ourSale;
|
| 234 |
List<InventoryItem> itemIis = itemIdInventoryMap.get(itemQtyEntry.getKey());
|
234 |
List<InventoryItem> itemIis = itemIdInventoryMap.get(itemQtyEntry.getKey());
|
| 235 |
if (itemIdInventoryMap != null) {
|
235 |
if (itemIdInventoryMap != null) {
|
| 236 |
for (InventoryItem ii : itemIis) {
|
236 |
for (InventoryItem ii : itemIis) {
|
| 237 |
if (quantityToReduce > 0 && ii.getInitialQuantity() >= quantityToReduce) {
|
237 |
if (quantityToReduce > 0) {
|
| 238 |
LOGGER.info("Changed in inventoryItems {}, {}, {}, {}, {}, {}, {}",
|
238 |
LOGGER.info("Changed in inventoryItems {}, {}, {}, {}, {}, {}, {}",
|
| 239 |
purchase.getPurchaseReference(), ii.getId(), ii.getItemId(),
|
239 |
purchase.getPurchaseReference(), ii.getId(), ii.getItemId(),
|
| 240 |
ii.getInitialQuantity(), ii.getGoodQuantity(), ii.getBadQuantity(),
|
240 |
ii.getInitialQuantity(), ii.getGoodQuantity(), ii.getBadQuantity(),
|
| 241 |
quantityToReduce);
|
241 |
quantityToReduce);
|
| 242 |
if (ii.getGoodQuantity() >= quantityToReduce) {
|
242 |
if (ii.getGoodQuantity() >= quantityToReduce) {
|