Subversion Repositories SmartDukaan

Rev

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

Rev 8282 Rev 8303
Line 214... Line 214...
214
            orders = get_all_orders(statuses, current_from_date, current_to_date, warehouse_id)
214
            orders = get_all_orders(statuses, current_from_date, current_to_date, warehouse_id)
215
            return [to_t_order(order) for order in orders]
215
            return [to_t_order(order) for order in orders]
216
        finally:
216
        finally:
217
            close_session()
217
            close_session()
218
 
218
 
219
    def getOrdersInBatch(self, statuses, offset, limit, warehouse_id):
219
    def getOrdersInBatch(self, statuses, offset, limit, warehouse_id, source):
220
        """
220
        """
221
        Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
221
        Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
222
        Pass the status as null and the limit as 0 to ignore them.
222
        Pass the status as null and the limit as 0 to ignore them.
223
    
223
    
224
        Parameters:
224
        Parameters:
Line 226... Line 226...
226
         - offset
226
         - offset
227
         - limit
227
         - limit
228
         - warehouse_id
228
         - warehouse_id
229
        """
229
        """
230
        try:
230
        try:
231
            orders = get_orders_in_batch(statuses, offset, limit, warehouse_id)
231
            orders = get_orders_in_batch(statuses, offset, limit, warehouse_id, source)
232
            return [to_t_order(order) for order in orders]
232
            return [to_t_order(order) for order in orders]
233
        finally:
233
        finally:
234
            close_session()
234
            close_session()
235
 
235
 
236
    def getOrderCount(self, statuses, warehouseId):
236
    def getOrderCount(self, statuses, warehouseId, source):
237
        """
237
        """
238
        Returns the count of orders with the given statuses assigned to the given warehouse.
238
        Returns the count of orders with the given statuses assigned to the given warehouse.
239
    
239
    
240
        Parameters:
240
        Parameters:
241
         - statuses
241
         - statuses
242
         - warehouseId
242
         - warehouseId
243
        """
243
        """
244
        try:
244
        try:
245
            return get_order_count(statuses, warehouseId)
245
            return get_order_count(statuses, warehouseId, source)
246
        finally:
246
        finally:
247
            close_session()
247
            close_session()
248
    
248
    
249
    def getOrdersByBillingDate(self, status, start_billing_date, end_billing_date, warehouse_id):
249
    def getOrdersByBillingDate(self, status, start_billing_date, end_billing_date, warehouse_id):
250
        """
250
        """