Subversion Repositories SmartDukaan

Rev

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

Rev 28630 Rev 28647
Line 91... Line 91...
91
        billingVendorWarehouses[stateId] = warehouseId
91
        billingVendorWarehouses[stateId] = warehouseId
92
        warehouse = Warehouse.query.filter(Warehouse.warehouseType.in_(['THIRD_PARTY'])).filter(Warehouse.inventoryType == 'GOOD').filter(Warehouse.state_id == stateId).first()
92
        warehouse = Warehouse.query.filter(Warehouse.warehouseType.in_(['THIRD_PARTY'])).filter(Warehouse.inventoryType == 'GOOD').filter(Warehouse.state_id == stateId).first()
93
        if warehouse is None:
93
        if warehouse is None:
94
            warehouse = Warehouse.query.filter(Warehouse.warehouseType.in_(['THIRD_PARTY'])).filter(Warehouse.inventoryType == 'GOOD').filter(Warehouse.state_id == 0).first()
94
            warehouse = Warehouse.query.filter(Warehouse.warehouseType.in_(['THIRD_PARTY'])).filter(Warehouse.inventoryType == 'GOOD').filter(Warehouse.state_id == 0).first()
95
        virtualVendorWarehouses[stateId] = warehouse
95
        virtualVendorWarehouses[stateId] = warehouse
-
 
96
        warehouse.expunge()
96
 
97
 
97
    
98
    
98
def get_Warehouse(warehouse_id):
99
def get_Warehouse(warehouse_id):
99
    return Warehouse.get_by(id=warehouse_id)
100
    return Warehouse.get_by(id=warehouse_id)
100
 
101