| Line 282... |
Line 282... |
| 282 |
def get_cancellable_orders_for_customer(customer_id, limit = None):
|
282 |
def get_cancellable_orders_for_customer(customer_id, limit = None):
|
| 283 |
if not customer_id:
|
283 |
if not customer_id:
|
| 284 |
raise TransactionServiceException(101, "bad customer id")
|
284 |
raise TransactionServiceException(101, "bad customer id")
|
| 285 |
|
285 |
|
| 286 |
query = Order.query.filter(Order.customer_id == customer_id)
|
286 |
query = Order.query.filter(Order.customer_id == customer_id)
|
| 287 |
query = query.filter(Order.status != OrderStatus.PAYMENT_FAILED)
|
- |
|
| 288 |
query = query.filter(Order.status != OrderStatus.REJECTED)
|
287 |
query = query.filter(Order.status != OrderStatus.REJECTED)
|
| - |
|
288 |
query = query.filter(Order.status >= OrderStatus.SUBMITTED_FOR_PROCESSING)
|
| 289 |
query = query.filter(Order.status < OrderStatus.BILLED)
|
289 |
query = query.filter(Order.status < OrderStatus.BILLED)
|
| 290 |
orders = query.all()
|
290 |
orders = query.all()
|
| 291 |
return [order.id for order in orders]
|
291 |
return [order.id for order in orders]
|
| 292 |
|
292 |
|
| 293 |
def get_orders_by_billing_date(status, start_billing_date, end_billing_date, warehouse_id):
|
293 |
def get_orders_by_billing_date(status, start_billing_date, end_billing_date, warehouse_id):
|