Subversion Repositories SmartDukaan

Rev

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

Rev 5399 Rev 5423
Line 217... Line 217...
217
            List<Item> items = fetchItems();
217
            List<Item> items = fetchItems();
218
            for (Item item : items) {
218
            for (Item item : items) {
219
                if (hotspotMappings.containsKey(item.getId())) {
219
                if (hotspotMappings.containsKey(item.getId())) {
220
                    PLBDetails plbDetails = currentInventory
220
                    PLBDetails plbDetails = currentInventory
221
                            .get(hotspotMappings.get(item.getId()));
221
                            .get(hotspotMappings.get(item.getId()));
222
                    Long currentSnapshotAvailibility = fetchInventory(item.getId()).getAvailability().get(warehouseId);
222
                    Long currentSnapshotAvailability = fetchInventory(item.getId()).getAvailability().get(warehouseId);
223
                    if ((currentSnapshotAvailibility == null || currentSnapshotAvailibility.equals(0l)) && 
223
                    if ((currentSnapshotAvailability == null || currentSnapshotAvailability.equals(0l)) && 
224
                        (plbDetails == null || plbDetails.getQuantity().longValue() == 0))
224
                        (plbDetails == null || plbDetails.getQuantity().longValue() == 0))
225
                    {
225
                    {
226
                        continue;
226
                        continue;
227
                    }
227
                    }
228
 
228
 
229
                    if (currentSnapshotAvailibility == null || plbDetails == null ||
229
                    if (currentSnapshotAvailability == null || plbDetails == null ||
230
                        !currentSnapshotAvailibility.equals(plbDetails.getQuantity().longValue()))
230
                        !currentSnapshotAvailability.equals(plbDetails.getQuantity().longValue()))
231
                    {
231
                    {
232
                        mismatches.put(item, plbDetails);
232
                        mismatches.put(item, plbDetails);
233
                    }
233
                    }
234
                }
234
                }
235
            }
235
            }