| Line 1185... |
Line 1185... |
| 1185 |
inventory.availability = amazoninventorysnapshot.availability
|
1185 |
inventory.availability = amazoninventorysnapshot.availability
|
| 1186 |
inventory.reserved = amazoninventorysnapshot.reserved
|
1186 |
inventory.reserved = amazoninventorysnapshot.reserved
|
| 1187 |
session.commit()
|
1187 |
session.commit()
|
| 1188 |
|
1188 |
|
| 1189 |
def add_update_hold_inventory(itemId, warehouseId, holdQuantity, source):
|
1189 |
def add_update_hold_inventory(itemId, warehouseId, holdQuantity, source):
|
| 1190 |
holdInventoryDetail = HoldInventoryDetail.get_by(item_id = itemId, warehouse_id=warehouseId, source = source)
|
1190 |
hold_inventory_detail = HoldInventoryDetail.get_by(item_id = itemId, warehouse_id=warehouseId, source = source)
|
| 1191 |
if holdInventoryDetail is None:
|
1191 |
if hold_inventory_detail is None:
|
| 1192 |
diffTobeAddedInCIS = holdQuantity
|
1192 |
diffTobeAddedInCIS = holdQuantity
|
| 1193 |
hold_inventory_detail = HoldInventoryDetail()
|
1193 |
hold_inventory_detail = HoldInventoryDetail()
|
| 1194 |
hold_inventory_detail.item_id = itemId
|
1194 |
hold_inventory_detail.item_id = itemId
|
| 1195 |
hold_inventory_detail.warehouse_id = warehouseId
|
1195 |
hold_inventory_detail.warehouse_id = warehouseId
|
| 1196 |
hold_inventory_detail.held = holdQuantity
|
1196 |
hold_inventory_detail.held = holdQuantity
|
| 1197 |
hold_inventory_detail.source = source
|
1197 |
hold_inventory_detail.source = source
|
| 1198 |
else:
|
1198 |
else:
|
| 1199 |
hold_inventory_detail.held = holdQuantity
|
1199 |
hold_inventory_detail.held = holdQuantity
|
| 1200 |
diffTobeAddedInCIS = holdQuantity - holdInventoryDetail.held
|
1200 |
diffTobeAddedInCIS = holdQuantity - hold_inventory_detail.held
|
| 1201 |
|
1201 |
|
| 1202 |
current_inventory_snapshot = CurrentInventorySnapshot.get_by(item_id=itemId, warehouse_id=warehouseId)
|
1202 |
current_inventory_snapshot = CurrentInventorySnapshot.get_by(item_id=itemId, warehouse_id=warehouseId)
|
| 1203 |
if not current_inventory_snapshot:
|
1203 |
if not current_inventory_snapshot:
|
| 1204 |
current_inventory_snapshot = CurrentInventorySnapshot()
|
1204 |
current_inventory_snapshot = CurrentInventorySnapshot()
|
| 1205 |
current_inventory_snapshot.item_id = itemId
|
1205 |
current_inventory_snapshot.item_id = itemId
|