Subversion Repositories SmartDukaan

Rev

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

Rev 5572 Rev 5595
Line 167... Line 167...
167
        logistics_info.warehouseId = billingWarehouseId
167
        logistics_info.warehouseId = billingWarehouseId
168
        logistics_info.fulfilmentWarehouseId = fulfilmentWarehouseId
168
        logistics_info.fulfilmentWarehouseId = fulfilmentWarehouseId
169
        logistics_info.shippingTime = shipping_delay
169
        logistics_info.shippingTime = shipping_delay
170
        logistics_info.codAllowed = delivery_estimate.codAllowed 
170
        logistics_info.codAllowed = delivery_estimate.codAllowed 
171
        
171
        
-
 
172
        try:
172
        return logistics_info
173
            return logistics_info
-
 
174
        finally:
-
 
175
            close_session()
173
        
176
        
174
    def getDestinationCode(self, providerId, pinCode):
177
    def getDestinationCode(self, providerId, pinCode):
175
        """
178
        """
176
        Returns the short three letter code of a pincode for the given provider.
179
        Returns the short three letter code of a pincode for the given provider.
177
        Raises an exception if the pin code is not serviced by the given provider.
180
        Raises an exception if the pin code is not serviced by the given provider.
Line 269... Line 272...
269
                estimateList.append((1, estimationInfo.deliveryTime, item.id))
272
                estimateList.append((1, estimationInfo.deliveryTime, item.id))
270
            elif item.itemStatus == status.PAUSED_BY_RISK:
273
            elif item.itemStatus == status.PAUSED_BY_RISK:
271
                estimateList.append((2, estimationInfo.deliveryTime, item.id))
274
                estimateList.append((2, estimationInfo.deliveryTime, item.id))
272
 
275
 
273
        estimateList.sort()
276
        estimateList.sort()
274
        
277
        try:
275
        return [estimate[-1] for estimate in estimateList]
278
            return [estimate[-1] for estimate in estimateList]
276
    
279
        finally:
-
 
280
            close_session()
277
    
281
    
278
    def getAllPickupStores(self, ):
282
    def getAllPickupStores(self):
-
 
283
        try:
279
        return [to_t_pickup_store(pickup_store) for pickup_store in get_all_pickup_stores()] 
284
            return [to_t_pickup_store(pickup_store) for pickup_store in get_all_pickup_stores()]
-
 
285
        finally:
-
 
286
            close_session()
280
 
287
 
281
    def getPickupStore(self, storeId):
288
    def getPickupStore(self, storeId):
282
        """
289
        """
283
        Parameters:
290
        Parameters:
284
         - storeId
291
         - storeId
285
        """
292
        """
286
        storeToReturn = to_t_pickup_store(get_pickup_store(storeId))
-
 
287
        return storeToReturn
-
 
288
293
        try:
-
 
294
            storeToReturn = to_t_pickup_store(get_pickup_store(storeId))
-
 
295
            return storeToReturn
-
 
296
        finally:
-
 
297
            close_session()
-
 
298
289
299