Subversion Repositories SmartDukaan

Rev

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

Rev 995 Rev 1113
Line 8... Line 8...
8
create_order, get_new_transaction, get_transactions_for_customer, get_transaction_status,\
8
create_order, get_new_transaction, get_transactions_for_customer, get_transaction_status,\
9
 get_line_items_for_order, get_transaction, get_transactions_for_shopping_cart_id,\
9
 get_line_items_for_order, get_transaction, get_transactions_for_shopping_cart_id,\
10
 change_transaction_status, get_orders_for_customer,get_orders_for_transaction, get_order,\
10
 change_transaction_status, get_orders_for_customer,get_orders_for_transaction, get_order,\
11
 get_all_orders, change_order_status, get_alerts, set_alert, add_billing_details,\
11
 get_all_orders, change_order_status, get_alerts, set_alert, add_billing_details,\
12
    mark_orders_as_manifested, close_session, accept_order, bill_order,\
12
    mark_orders_as_manifested, close_session, accept_order, bill_order,\
13
    get_orders_by_billing_date
13
    get_orders_by_billing_date, mark_orders_as_picked_up
14
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
14
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
15
    to_t_lineitem, to_t_alert, to_t_order, to_t_lineitem
15
    to_t_lineitem, to_t_alert, to_t_order, to_t_lineitem
16
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
16
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
17
    LineItem, Order
17
    LineItem, Order
18
from shop2020.utils.Utils import to_py_date, get_fdate_tdate
18
from shop2020.utils.Utils import to_py_date, get_fdate_tdate
Line 239... Line 239...
239
        """
239
        """
240
        try:
240
        try:
241
            return mark_orders_as_manifested(warehouseId, providerId)
241
            return mark_orders_as_manifested(warehouseId, providerId)
242
        finally:
242
        finally:
243
            close_session()
243
            close_session()
-
 
244
 
-
 
245
    def markOrdersAsPickedUp(self, providerId, pickupDetails):
-
 
246
        """
-
 
247
        Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
-
 
248
        Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
-
 
249
        Raises an exception if we encounter report for an AWB number that we did not ship.
-
 
250
        
-
 
251
        Parameters:
-
 
252
         - providerId
-
 
253
         - pickupDetails
-
 
254
        """
-
 
255
        try:
-
 
256
            orders_not_picked_up = mark_orders_as_picked_up(providerId, pickupDetails)
-
 
257
            return [to_t_order(order) for order in orders_not_picked_up]
-
 
258
        finally:
-
 
259
            close_session()
244
            
260
            
245
    def getAlerts(self, orderId, valid):
261
    def getAlerts(self, orderId, valid):
246
        """
262
        """
247
        Parameters:
263
        Parameters:
248
         - orderId
264
         - orderId