Subversion Repositories SmartDukaan

Rev

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

Rev 8287 Rev 8363
Line 1228... Line 1228...
1228
 
1228
 
1229
def get_amazon_fba_inventory(itemId):
1229
def get_amazon_fba_inventory(itemId):
1230
    row = AmazonFbaInventorySnapshot.get_by(item_id=itemId)
1230
    row = AmazonFbaInventorySnapshot.get_by(item_id=itemId)
1231
    return row.availability
1231
    return row.availability
1232
 
1232
 
1233
def get_all_non_zero_amazon_fba_inventory():
-
 
1234
    return AmazonFbaInventorySnapshot.query.filter(AmazonFbaInventorySnapshot.availability!=0).all() 
-
 
1235
1233
def get_all_amazon_fba_inventory():
-
 
1234
    return AmazonFbaInventorySnapshot.query.all() 
-
 
1235
 
-
 
1236
def get_oursgood_warehouseids_for_location(state_id):
-
 
1237
    warehouseId=[]
-
 
1238
    x= session.query(Warehouse.id).filter(Warehouse.id==Warehouse.billingWarehouseId).filter(Warehouse.warehouseType=='OURS').filter(Warehouse.state_id==1).all()
-
 
1239
    for id in x:
-
 
1240
        warehouseId.append(id[0])
-
 
1241
    return session.query(Warehouse.id).filter(Warehouse.inventoryType=='GOOD').filter(Warehouse.warehouseType=='OURS').filter(Warehouse.billingWarehouseId.in_(warehouseId)).all()
-
 
1242