| Line 4483... |
Line 4483... |
| 4483 |
# If One gives a billing warehouse for warehouse shift, we should assign order to the GOOD warehouse
|
4483 |
# If One gives a billing warehouse for warehouse shift, we should assign order to the GOOD warehouse
|
| 4484 |
# present within it with maximum availability
|
4484 |
# present within it with maximum availability
|
| 4485 |
stateId = -1
|
4485 |
stateId = -1
|
| 4486 |
userClient, isFofo = __is_Fofo(userClient, order.customer_id)
|
4486 |
userClient, isFofo = __is_Fofo(userClient, order.customer_id)
|
| 4487 |
if isFofo:
|
4487 |
if isFofo:
|
| 4488 |
stateId = warehouse.state.id
|
4488 |
stateId = warehouse.stateId
|
| 4489 |
vendorWarehouse = warehouse
|
4489 |
vendorWarehouse = warehouse
|
| 4490 |
if warehouse.id == warehouse.billingWarehouseId:
|
4490 |
if warehouse.id == warehouse.billingWarehouseId:
|
| 4491 |
warehouse_id = inventoryClient.getItemAvailabilityAtLocation(lineitem.item_id, sourceId, stateId)[0]
|
4491 |
warehouse_id = inventoryClient.getItemAvailabilityAtLocation(lineitem.item_id, sourceId, stateId)[0]
|
| 4492 |
vendorWarehouse = inventoryClient.getWarehouse(warehouse_id)
|
4492 |
vendorWarehouse = inventoryClient.getWarehouse(warehouse_id)
|
| 4493 |
#if vendorWarehouse is None or vendorWarehouse.billingWarehouseId != warehouse.id:
|
4493 |
#if vendorWarehouse is None or vendorWarehouse.billingWarehouseId != warehouse.id:
|