Subversion Repositories SmartDukaan

Rev

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

Rev 5591 Rev 5663
Line 826... Line 826...
826
 
826
 
827
    warehouse = warehouses[warehouse_retid]
827
    warehouse = warehouses[warehouse_retid]
828
    billingWarehouseId = warehouse.billingWarehouseId
828
    billingWarehouseId = warehouse.billingWarehouseId
829
 
829
 
830
    # Fetching billing warehouse of a Good billable warehouse corresponding to the virtual one
830
    # Fetching billing warehouse of a Good billable warehouse corresponding to the virtual one
831
    if warehouse.billingWarehouseId is None:
831
    if not warehouse.billingWarehouseId:
832
        for w in Warehouse.query.filter_by(vendor_id = warehouse.vendor_id, inventoryType = InventoryType._VALUES_TO_NAMES[InventoryType.GOOD]).all():
832
        for w in Warehouse.query.filter_by(vendor_id = warehouse.vendor_id, inventoryType = InventoryType._VALUES_TO_NAMES[InventoryType.GOOD]).all():
833
            if w.billingWarehouseId:
833
            if w.billingWarehouseId:
834
                billingWarehouseId = w.billingWarehouseId
834
                billingWarehouseId = w.billingWarehouseId
835
                break
835
                break
836
 
836