Subversion Repositories SmartDukaan

Rev

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

Rev 4481 Rev 4484
Line 712... Line 712...
712
        finally:
712
        finally:
713
            close_session()
713
            close_session()
714
 
714
 
715
    def reshipOrder(self, orderId):
715
    def reshipOrder(self, orderId):
716
        """
716
        """
717
        If the order is in SALES_RET_RECEIVED or DOA_CERT_INVALID state, it does the following:
717
        If the order is in RTO_RECEIVED_PRESTINE or DOA_CERT_INVALID state, it does the following:
718
            1. Creates a new order for processing in the BILLED state. All billing information is saved.
718
            1. Creates a new order for processing in the BILLED state. All billing information is saved.
719
            2. Marks the current order as one of the final states SALES_RET_RESHIPPED and DOA_INVALID_RESHIPPED depending on what state the order started in.
719
            2. Marks the current order as one of the final states RTO_RESHIPPED and DOA_INVALID_RESHIPPED depending on what state the order started in.
720
            
720
            
721
        If the order is in DOA_CERT_VALID state, it does the following:
721
        If the order is in DOA_CERT_VALID state, it does the following:
722
            1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
722
            1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
723
            2. Creates a return order for the warehouse executive to return the DOA material.
723
            2. Creates a return order for the warehouse executive to return the DOA material.
724
            3. Marks the current order as the final DOA_VALID_RESHIPPED state.
724
            3. Marks the current order as the final DOA_VALID_RESHIPPED state.
Line 735... Line 735...
735
        finally:
735
        finally:
736
            close_session()
736
            close_session()
737
 
737
 
738
    def refundOrder(self, orderId, refundedBy, reason):
738
    def refundOrder(self, orderId, refundedBy, reason):
739
        """
739
        """
740
        If the order is in SALES_RET_RECEIVED, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
740
        If the order is in RTO_RECEIVED_PRESTINE, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
741
            1. Creates a refund request for batch processing.
741
            1. Creates a refund request for batch processing.
742
            2. Creates a return order for the warehouse executive to return the shipped material.
742
            2. Creates a return order for the warehouse executive to return the shipped material.
743
            3. Marks the current order as SALES_RET_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
743
            3. Marks the current order as RTO_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
744
        
744
        
745
        If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
745
        If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
746
            1. Creates a refund request for batch processing.
746
            1. Creates a refund request for batch processing.
747
            2. Cancels the reservation of the item in the warehouse.
747
            2. Cancels the reservation of the item in the warehouse.
748
            3. Marks the current order as the REFUNDED final state.
748
            3. Marks the current order as the REFUNDED final state.