Subversion Repositories SmartDukaan

Rev

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

Rev 23446 Rev 23447
Line 158... Line 158...
158
            logistics_info.providerId = int(minAdvanceAmount)
158
            logistics_info.providerId = int(minAdvanceAmount)
159
            return logistics_info
159
            return logistics_info
160
        finally:
160
        finally:
161
            close_session()
161
            close_session()
162
            
162
            
163
    def get_logistics_estimation_with_type(self, itemId, destination_pin, type, pickUp=PickUpType.COURIER, stateId):
163
    def get_logistics_estimation_with_type(self, itemId, destination_pin, type, pickUp=PickUpType.COURIER, stateId=-1):
164
        try:
164
        try:
165
            #Get the id and location of actual warehouse that'll be used to fulfil this order.
165
            #Get the id and location of actual warehouse that'll be used to fulfil this order.
166
            client = InventoryClient().get_client()
166
            client = InventoryClient().get_client()
167
            fulfilmentWarehouseId, expected_delay, billingWarehouseId, sellingPrice, totalAvailability, weight = client.getItemAvailabilityAtLocation(itemId, self.sourceId, stateId)
167
            fulfilmentWarehouseId, expected_delay, billingWarehouseId, sellingPrice, totalAvailability, weight = client.getItemAvailabilityAtLocation(itemId, self.sourceId, stateId)
168
            #We assume that if totalAvailability 0 then its the case of hotspot billing where itemAvailabilityCache is sort of bypassed
168
            #We assume that if totalAvailability 0 then its the case of hotspot billing where itemAvailabilityCache is sort of bypassed