Subversion Repositories SmartDukaan

Rev

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

Rev 22719 Rev 22720
Line 324... Line 324...
324
    #TODO: Amit Should be removed
324
    #TODO: Amit Should be removed
325
    returnMap = {}
325
    returnMap = {}
326
    if not item_ids:
326
    if not item_ids:
327
        return returnMap
327
        return returnMap
328
    physicalWarehouseIdsForFofo = [7678, 7681]
328
    physicalWarehouseIdsForFofo = [7678, 7681]
329
    fofoWarehouses = Warehouse.query.filter(Warehouse.warehouseType.in_(['OURS', 'THIRD_PARTY'])).filter(Warehouse.warehouseType == 'GOOD').filter(Warehouse.billingWarehouseId.in_(physicalWarehouseIdsForFofo)).all()
329
    fofoWarehouses = Warehouse.query.filter(Warehouse.warehouseType.in_(['OURS', 'THIRD_PARTY'])).filter(Warehouse.inventoryType == 'GOOD').filter(Warehouse.billingWarehouseId.in_(physicalWarehouseIdsForFofo)).all()
330
    warehouse_ids = []
330
    warehouse_ids = []
331
    for fofoWarehouse in fofoWarehouses:
331
    for fofoWarehouse in fofoWarehouses:
332
        warehouse_ids.append(fofoWarehouse.id)
332
        warehouse_ids.append(fofoWarehouse.id)
333
    snapshots = CurrentInventorySnapshot.query.filter(CurrentInventorySnapshot.warehouse_id.in_(warehouse_ids)).filter(CurrentInventorySnapshot.item_id.in_(item_ids)).all()
333
    snapshots = CurrentInventorySnapshot.query.filter(CurrentInventorySnapshot.warehouse_id.in_(warehouse_ids)).filter(CurrentInventorySnapshot.item_id.in_(item_ids)).all()
334
    for snapshot in snapshots:
334
    for snapshot in snapshots: