Subversion Repositories SmartDukaan

Rev

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

Rev 4486 Rev 4488
Line 887... Line 887...
887
        order.status = OrderStatus.DELIVERY_SUCCESS
887
        order.status = OrderStatus.DELIVERY_SUCCESS
888
        order.statusDescription = "Order delivered"
888
        order.statusDescription = "Order delivered"
889
    session.commit()
889
    session.commit()
890
    return True
890
    return True
891
    
891
    
-
 
892
def mark_order_return_request_received(orderId):
-
 
893
    order = get_order(orderId)
-
 
894
    if order.status != OrderStatus.DELIVERY_SUCCESS:
-
 
895
        return False
-
 
896
    order.status = OrderStatus.RET_REQUEST_RECEIVED
-
 
897
    order.statusDescription = "Return Request Received"
-
 
898
    session.commit()
-
 
899
    return True
-
 
900
 
-
 
901
def mark_order_return_request_authorized(orderId, isAuthorized):
-
 
902
    order = get_order(orderId)
-
 
903
    if order.status != OrderStatus.RET_REQUEST_RECEIVED:
-
 
904
        return False
-
 
905
    if isAuthorized:
-
 
906
        order.status = OrderStatus.RET_REQUEST_AUTHORIZED
-
 
907
        order.statusDescription = "Return Request Authorized"
-
 
908
    else:
-
 
909
        order.status = OrderStatus.DELIVERY_SUCCESS
-
 
910
        order.statusDescription = "Order delivered"
-
 
911
    session.commit()
-
 
912
    return True
-
 
913
    
892
def request_pickup_number(order_id):
914
def request_pickup_number(order_id):
893
    order = get_order(order_id)
915
    order = get_order(order_id)
894
    if order.status != OrderStatus.DELIVERY_SUCCESS and order.status != OrderStatus.DOA_PICKUP_REQUEST_RAISED:
916
    if order.status != OrderStatus.DELIVERY_SUCCESS and order.status != OrderStatus.DOA_PICKUP_REQUEST_RAISED:
895
        return False
917
        return False
896
    from_user = 'cnc.center@shop2020.in'
918
    from_user = 'cnc.center@shop2020.in'