| Line 89... |
Line 89... |
| 89 |
inventory_client = InventoryClient().get_client()
|
89 |
inventory_client = InventoryClient().get_client()
|
| 90 |
availability = {}
|
90 |
availability = {}
|
| 91 |
virtualInventory = {}
|
91 |
virtualInventory = {}
|
| 92 |
|
92 |
|
| 93 |
ourGoodWarehouseIds = [w.id for w in inventory_client.getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 0, None, warehouseId)]
|
93 |
ourGoodWarehouseIds = [w.id for w in inventory_client.getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 0, None, warehouseId)]
|
| 94 |
ourVirtualWarehouseIds = [w.id for w in inventory_client.getWarehouses(WarehouseType.THIRD_PARTY, InventoryType.GOOD, 0, None, warehouseId)]
|
94 |
ourVirtualWarehouseIds = [w.id for w in inventory_client.getWarehouses(WarehouseType.THIRD_PARTY, InventoryType.GOOD, 0, None, None)]
|
| 95 |
itemInventorySnapshot = inventory_client.getInventorySnapshot(0)
|
95 |
itemInventorySnapshot = inventory_client.getInventorySnapshot(0)
|
| 96 |
for itemId, itemInventory in itemInventorySnapshot.iteritems():
|
96 |
for itemId, itemInventory in itemInventorySnapshot.iteritems():
|
| 97 |
'''item = self.__get_item_from_master(itemId)'''
|
97 |
'''item = self.__get_item_from_master(itemId)'''
|
| 98 |
for warehouseId, quantity in itemInventory.availability.iteritems():
|
98 |
for warehouseId, quantity in itemInventory.availability.iteritems():
|
| 99 |
if warehouseId in ourGoodWarehouseIds:
|
99 |
if warehouseId in ourGoodWarehouseIds:
|
| Line 299... |
Line 299... |
| 299 |
t_po_lineitem['verificationPending'] = verificationPendingOrders[item.id]
|
299 |
t_po_lineitem['verificationPending'] = verificationPendingOrders[item.id]
|
| 300 |
else:
|
300 |
else:
|
| 301 |
t_po_lineitem['verificationPending'] = 0
|
301 |
t_po_lineitem['verificationPending'] = 0
|
| 302 |
|
302 |
|
| 303 |
if virtualInventory.has_key(item.id):
|
303 |
if virtualInventory.has_key(item.id):
|
| 304 |
t_po_lineitem['virtualStock'] = virtualInventory[item.id]
|
304 |
t_po_lineitem['virtualStock'] = virtualInventory[item.id][0]
|
| 305 |
else:
|
305 |
else:
|
| 306 |
t_po_lineitem['virtualStock'] = 0
|
306 |
t_po_lineitem['virtualStock'] = 0
|
| 307 |
if previouslyOrderedQty.has_key(item.id):
|
307 |
if previouslyOrderedQty.has_key(item.id):
|
| 308 |
t_po_lineitem['previouslyOrderedQty'] = previouslyOrderedQty[item.id]
|
308 |
t_po_lineitem['previouslyOrderedQty'] = previouslyOrderedQty[item.id]
|
| 309 |
else:
|
309 |
else:
|