Subversion Repositories SmartDukaan

Rev

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

Rev 2599 Rev 2609
Line 709... Line 709...
709
def validate_doa(order_id, is_valid):
709
def validate_doa(order_id, is_valid):
710
    order = get_order(order_id)
710
    order = get_order(order_id)
711
    if order.status != OrderStatus.DOA_RECEIVED:
711
    if order.status != OrderStatus.DOA_RECEIVED:
712
        return False
712
        return False
713
    if is_valid:
713
    if is_valid:
714
        order.status = OrderStatus.DOA_PENDING
714
        order.status = OrderStatus.DOA_CERT_VALID
715
        order.statusDescription = "DOA Order pending"
715
        order.statusDescription = "DOA Certificate Valid"
716
    else:
716
    else:
717
        order.status = OrderStatus.DOA_CERT_INVALID
717
        order.status = OrderStatus.DOA_CERT_INVALID
718
        order.statusDescription = "DOA Certificate Invalid"
718
        order.statusDescription = "DOA Certificate Invalid"
719
    session.commit()
719
    session.commit()
720
    return True
720
    return True