Subversion Repositories SmartDukaan

Rev

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

Rev 5966 Rev 5978
Line 119... Line 119...
119
            inventory = get_item_inventory_by_item_id(item_id)
119
            inventory = get_item_inventory_by_item_id(item_id)
120
            return to_t_item_inventory(inventory, item_id)
120
            return to_t_item_inventory(inventory, item_id)
121
        finally:
121
        finally:
122
            close_session()
122
            close_session()
123
 
123
 
124
    def getItemAvailabilityAtLocation(self, itemId):
124
    def getItemAvailabilityAtLocation(self, itemId, sourceId):
125
        """
125
        """
126
        Determines the warehouse that should be used to fulfil an order for the given item.
126
        Determines the warehouse that should be used to fulfil an order for the given item.
127
        It first checks all the warehouses which are in the logistics location given by the
127
        It first checks all the warehouses which are in the logistics location given by the
128
        warehouse_loc parameter. If none of the warehouses there have any inventory, then the
128
        warehouse_loc parameter. If none of the warehouses there have any inventory, then the
129
        preferred warehouse for the item is used.
129
        preferred warehouse for the item is used.
Line 134... Line 134...
134
        3. Inventory size in the selected warehouse.
134
        3. Inventory size in the selected warehouse.
135
        4. Expected delay added by the category manager.
135
        4. Expected delay added by the category manager.
136
        
136
        
137
        Parameters:
137
        Parameters:
138
         - itemId
138
         - itemId
-
 
139
         - sourceId
139
        """
140
        """
140
        try:
141
        try:
141
            return get_item_availability_for_location(itemId)
142
            return get_item_availability_for_location(itemId, sourceId)
142
        finally:
143
        finally:
143
            close_session()
144
            close_session()
144
            
145
            
145
    def getItemAvailibilityAtWarehouse(self, warehouse_id, item_id):
146
    def getItemAvailibilityAtWarehouse(self, warehouse_id, item_id):
146
        """
147
        """