Subversion Repositories SmartDukaan

Rev

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

Rev 23448 Rev 23469
Line 673... Line 673...
673
    currentInventorySnapshots = get_item_inventory_by_item_id(itemId)
673
    currentInventorySnapshots = get_item_inventory_by_item_id(itemId)
674
    totalAvailability = 0
674
    totalAvailability = 0
675
    expectedDelay = 0
675
    expectedDelay = 0
676
    if len(currentInventorySnapshots) > 0:
676
    if len(currentInventorySnapshots) > 0:
677
        for currentInventorySnapshot in currentInventorySnapshots:
677
        for currentInventorySnapshot in currentInventorySnapshots:
678
            if warehouseMap[currentInventorySnapshot.warehouseId].state_id == stateId:
678
            if currentInventorySnapshot.warehouse.state.id == stateId:
679
                availability = currentInventorySnapshot.availability - currentInventorySnapshot.reserved
679
                availability = currentInventorySnapshot.availability - currentInventorySnapshot.reserved
680
                if availability > 0:
680
                if availability > 0:
681
                    warehouse = warehouseMap[currentInventorySnapshot.warehouseId]
681
                    warehouse = warehouseMap[currentInventorySnapshot.warehouseId]
682
                totalAvailability += availability 
682
                totalAvailability += availability 
683
    if totalAvailability <= 0:
683
    if totalAvailability <= 0: