Subversion Repositories SmartDukaan

Rev

Rev 24731 | Rev 24733 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 24731 Rev 24732
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) {
237
						if (quantityToReduce > 0 && ii.getGoodQuantity() > 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() > 0) {
242
							if (ii.getGoodQuantity() > 0) {