| Line 16... |
Line 16... |
| 16 |
get_undelivered_orders, get_order_for_customer, get_valid_order_count,\
|
16 |
get_undelivered_orders, get_order_for_customer, get_valid_order_count,\
|
| 17 |
get_cust_count_with_successful_txn, get_valid_orders_amount_range,\
|
17 |
get_cust_count_with_successful_txn, get_valid_orders_amount_range,\
|
| 18 |
get_valid_orders, toggle_doa_flag, request_pickup_number, authorize_pickup,\
|
18 |
get_valid_orders, toggle_doa_flag, request_pickup_number, authorize_pickup,\
|
| 19 |
receive_return, validate_doa, reship_order, refund_order, get_return_orders,\
|
19 |
receive_return, validate_doa, reship_order, refund_order, get_return_orders,\
|
| 20 |
process_return, get_return_order, mark_doas_as_picked_up,\
|
20 |
process_return, get_return_order, mark_doas_as_picked_up,\
|
| 21 |
create_purchase_order, verify_order, is_alive
|
21 |
create_purchase_order, verify_order, is_alive, get_orders_by_shipping_date
|
| 22 |
|
22 |
|
| 23 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
23 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
| 24 |
to_t_alert, to_t_order, to_t_lineitem
|
24 |
to_t_alert, to_t_order, to_t_lineitem
|
| 25 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
25 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
| 26 |
LineItem, Order, TransactionServiceException
|
26 |
LineItem, Order, TransactionServiceException
|
| Line 155... |
Line 155... |
| 155 |
orders = get_orders_by_billing_date(status, current_start_billing_date, current_end_billing_date, warehouse_id)
|
155 |
orders = get_orders_by_billing_date(status, current_start_billing_date, current_end_billing_date, warehouse_id)
|
| 156 |
return [to_t_order(order) for order in orders]
|
156 |
return [to_t_order(order) for order in orders]
|
| 157 |
finally:
|
157 |
finally:
|
| 158 |
close_session()
|
158 |
close_session()
|
| 159 |
|
159 |
|
| - |
|
160 |
def getOrdersByShippingDate(self, fromShippingDate, toShippingDate, providerId, warehouseId):
|
| - |
|
161 |
"""
|
| - |
|
162 |
Returns orders for a particular provider and warehouse which were shipped between the given dates.
|
| - |
|
163 |
Pass providerId and warehouseId as -1 to ignore both the parameters.
|
| - |
|
164 |
|
| - |
|
165 |
Parameters:
|
| - |
|
166 |
- fromShippingDate
|
| - |
|
167 |
- toShippingDate
|
| - |
|
168 |
- providerId
|
| - |
|
169 |
- warehouseId
|
| - |
|
170 |
"""
|
| - |
|
171 |
try:
|
| - |
|
172 |
from_shipping_date, to_shipping_date = get_fdate_tdate(fromShippingDate, toShippingDate)
|
| - |
|
173 |
orders = get_orders_by_shipping_date(from_shipping_date, to_shipping_date, providerId, warehouseId)
|
| - |
|
174 |
return [to_t_order(order) for order in orders]
|
| - |
|
175 |
finally:
|
| - |
|
176 |
close_session()
|
| - |
|
177 |
|
| 160 |
def getReturnableOrdersForCustomer(self, customerId, limit = None):
|
178 |
def getReturnableOrdersForCustomer(self, customerId, limit = None):
|
| 161 |
"""
|
179 |
"""
|
| 162 |
Parameters:
|
180 |
Parameters:
|
| 163 |
- customerId
|
181 |
- customerId
|
| 164 |
- limit
|
182 |
- limit
|