Subversion Repositories SmartDukaan

Rev

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

Rev 23611 Rev 23630
Line 679... Line 679...
679
    currentInventorySnapshots = get_item_inventory_by_item_id(itemId)
679
    currentInventorySnapshots = get_item_inventory_by_item_id(itemId)
680
    totalAvailability = 0
680
    totalAvailability = 0
681
    expectedDelay = 0
681
    expectedDelay = 0
682
    if len(currentInventorySnapshots) > 0:
682
    if len(currentInventorySnapshots) > 0:
683
        for currentInventorySnapshot in currentInventorySnapshots:
683
        for currentInventorySnapshot in currentInventorySnapshots:
684
            if currentInventorySnapshot.warehouse.state.id == stateId:
684
            if currentInventorySnapshot.warehouse.state_id == stateId:
685
                availability = currentInventorySnapshot.availability - currentInventorySnapshot.reserved
685
                availability = currentInventorySnapshot.availability - currentInventorySnapshot.reserved
686
                if availability > 0:
686
                if availability > 0:
687
                    warehouse = currentInventorySnapshot.warehouse
687
                    warehouse = currentInventorySnapshot.warehouse
688
                totalAvailability += availability 
688
                totalAvailability += availability 
689
    if totalAvailability <= 0:
689
    if totalAvailability <= 0: