Subversion Repositories SmartDukaan

Rev

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

Rev 2700 Rev 2701
Line 947... Line 947...
947
def process_return(ret_order_id):
947
def process_return(ret_order_id):
948
    ret_order = ReturnOrder.get_by(orderId = ret_order_id)
948
    ret_order = ReturnOrder.get_by(orderId = ret_order_id)
949
    if ret_order is None:
949
    if ret_order is None:
950
        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")
951
    ret_order.processedStatus = True
951
    ret_order.processedStatus = True
-
 
952
    ret_order.processedAt = datetime.datetime.now()
952
    session.commit()
953
    session.commit()
953
 
954
 
954
def close_session():
955
def close_session():
955
    if session.is_active:
956
    if session.is_active:
956
        print "session is active. closing it."
957
        print "session is active. closing it."