Subversion Repositories SmartDukaan

Rev

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

Rev 9758 Rev 9761
Line 1305... Line 1305...
1305
    heldInventoryMap = {}
1305
    heldInventoryMap = {}
1306
    holdInventories = HoldInventoryDetail.query.filter_by(item_id= itemId, warehouse_id = warehouseId).all()
1306
    holdInventories = HoldInventoryDetail.query.filter_by(item_id= itemId, warehouse_id = warehouseId).all()
1307
    for holdInventory in holdInventories:
1307
    for holdInventory in holdInventories:
1308
        heldInventoryMap[holdInventory.source] = holdInventory.held
1308
        heldInventoryMap[holdInventory.source] = holdInventory.held
1309
    return heldInventoryMap 
1309
    return heldInventoryMap 
-
 
1310
def get_hold_inventory_details(itemId, warehouseId, source):
-
 
1311
    heldInventoryQuery = HoldInventoryDetail.query
-
 
1312
    if itemId:
-
 
1313
        heldInventoryQuery = heldInventoryQuery.filter_by(item_id = itemId)
-
 
1314
    if warehouseId:
-
 
1315
        heldInventoryQuery = heldInventoryQuery.filter_by(warehouse_id = warehouseId)
-
 
1316
    if source:
-
 
1317
        heldInventoryQuery = heldInventoryQuery.filter_by(source = source)
-
 
1318
    holdInventoryDetails = heldInventoryQuery.all()
-
 
1319
    return holdInventoryDetails
1310
    
1320
    
1311
1321