| Line 95... |
Line 95... |
| 95 |
session.commit()
|
95 |
session.commit()
|
| 96 |
__send_mail_for_oos_item(item)
|
96 |
__send_mail_for_oos_item(item)
|
| 97 |
#This will clear cache from tomcat
|
97 |
#This will clear cache from tomcat
|
| 98 |
__clear_homepage_cache()
|
98 |
__clear_homepage_cache()
|
| 99 |
else:
|
99 |
else:
|
| 100 |
availability = currentInventorySnapshot[0].availability
|
100 |
availability = currentInventorySnapshot[0].availability - currentInventorySnapshot[0].reserved
|
| 101 |
else:
|
101 |
else:
|
| 102 |
availability = item.get_total_inventory
|
102 |
availability = item.get_total_inventory
|
| 103 |
t_item_shipping_info.isActive = (item.status == status.ACTIVE)
|
103 |
t_item_shipping_info.isActive = (item.status == status.ACTIVE)
|
| 104 |
t_item_shipping_info.quantity = availability
|
104 |
t_item_shipping_info.quantity = availability
|
| 105 |
except InventoryServiceException:
|
105 |
except InventoryServiceException:
|
| Line 798... |
Line 798... |
| 798 |
warehouse = warehouses[warehouse_retid]
|
798 |
warehouse = warehouses[warehouse_retid]
|
| 799 |
billingWarehouseId = warehouse.billingWarehouseId
|
799 |
billingWarehouseId = warehouse.billingWarehouseId
|
| 800 |
|
800 |
|
| 801 |
# Fetching billing warehouse of a Good billable warehouse corresponding to the virtual one
|
801 |
# Fetching billing warehouse of a Good billable warehouse corresponding to the virtual one
|
| 802 |
if warehouse.billingWarehouseId is None:
|
802 |
if warehouse.billingWarehouseId is None:
|
| 803 |
for warehouse in Warehouse.query.filter_by(vendor_id = warehouse.vendor_id, inventoryType = InventoryType._VALUES_TO_NAMES[InventoryType.GOOD]).all():
|
803 |
for w in Warehouse.query.filter_by(vendor_id = warehouse.vendor_id, inventoryType = InventoryType._VALUES_TO_NAMES[InventoryType.GOOD]).all():
|
| 804 |
if warehouse.billingWarehouseId:
|
804 |
if w.billingWarehouseId:
|
| 805 |
billingWarehouseId = warehouse.billingWarehouseId
|
805 |
billingWarehouseId = w.billingWarehouseId
|
| 806 |
break
|
806 |
break
|
| 807 |
|
807 |
|
| 808 |
expectedDelay = item.expectedDelay
|
808 |
expectedDelay = item.expectedDelay
|
| 809 |
if expectedDelay is None:
|
809 |
if expectedDelay is None:
|
| 810 |
print 'expectedDelay field for this item was Null. Resetting it to 0'
|
810 |
print 'expectedDelay field for this item was Null. Resetting it to 0'
|