Subversion Repositories SmartDukaan

Rev

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

Rev 2697 Rev 2700
Line 936... Line 936...
936
        query = query.filter(Order.created_timestamp >from_date)
936
        query = query.filter(Order.created_timestamp >from_date)
937
    if to_date:
937
    if to_date:
938
        query = query.filter(Order.created_timestamp < to_date)
938
        query = query.filter(Order.created_timestamp < to_date)
939
    return [return_order.to_thrift_object() for return_order in query.all()]
939
    return [return_order.to_thrift_object() for return_order in query.all()]
940
 
940
 
-
 
941
def get_return_order(id):
-
 
942
    ret_order = ReturnOrder.get_by(orderId = id)
-
 
943
    if ret_order is None:
-
 
944
        raise TransactionServiceException(116, "No return order found for the given order id")
-
 
945
    return ret_order.to_thrift_object()
-
 
946
 
941
def process_return(ret_order_id):
947
def process_return(ret_order_id):
942
    ret_order = ReturnOrder.get_by(orderId = ret_order_id)
948
    ret_order = ReturnOrder.get_by(orderId = ret_order_id)
943
    if ret_order is None:
949
    if ret_order is None:
944
        raise TransactionServiceException(116, "No return order found for the given order id")
950
        raise TransactionServiceException(116, "No return order found for the given order id")
945
    ret_order.processedStatus = True
951
    ret_order.processedStatus = True