Subversion Repositories SmartDukaan

Rev

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

Rev 2609 Rev 2616
Line 695... Line 695...
695
        return False
695
        return False
696
    finally:
696
    finally:
697
        if os.path.exists(filename):
697
        if os.path.exists(filename):
698
            os.remove(filename)
698
            os.remove(filename)
699
 
699
 
700
def accept_doa(order_id):
700
def receive_return(order_id):
701
    order = get_order(order_id)
701
    order = get_order(order_id)
702
    if order.status != OrderStatus.DOA_RETURN_AUTHORIZED and order.status != OrderStatus.DOA_RETURN_IN_TRANSIT:
702
    if order.status in [OrderStatus.DOA_RETURN_AUTHORIZED, OrderStatus.DOA_RETURN_IN_TRANSIT]:
-
 
703
        order.status = OrderStatus.DOA_RECEIVED
-
 
704
        order.statusDescription = "DOA package received"
-
 
705
        session.commit()
-
 
706
    elif order.status == OrderStatus.SALES_RETURN_IN_TRANSIT :
-
 
707
        order.status = OrderStatus.SALES_RET_RECEIVED
-
 
708
        order.statusDescription = "Sales return received"
-
 
709
        session.commit()
-
 
710
    else:
703
        return False
711
        return False
704
    order.status = OrderStatus.DOA_RECEIVED
-
 
705
    order.statusDescription = "DOA package received"
-
 
706
    session.commit()
-
 
707
    return True
712
    return True
708
 
713
 
709
def validate_doa(order_id, is_valid):
714
def validate_doa(order_id, is_valid):
710
    order = get_order(order_id)
715
    order = get_order(order_id)
711
    if order.status != OrderStatus.DOA_RECEIVED:
716
    if order.status != OrderStatus.DOA_RECEIVED: