Subversion Repositories SmartDukaan

Rev

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

Rev 4447 Rev 4452
Line 606... Line 606...
606
            close_session()
606
            close_session()
607
 
607
 
608
    def requestPickupNumber(self, orderId):
608
    def requestPickupNumber(self, orderId):
609
        """
609
        """
610
        Sends out an email to the account manager of the original courier provider used to ship the order.
610
        Sends out an email to the account manager of the original courier provider used to ship the order.
611
        If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
611
        If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUEST_RAISED.
612
        If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
612
        If the order status was DOA_PICKUP_REQUEST_RAISED, it is left unchanged.
613
        For any other status, it returns false.
613
        For any other status, it returns false.
614
        Throws an exception if the order with the given id couldn't be found.
614
        Throws an exception if the order with the given id couldn't be found.
615
        
615
        
616
        Parameters:
616
        Parameters:
617
         - orderId
617
         - orderId
Line 621... Line 621...
621
        finally:
621
        finally:
622
            close_session()
622
            close_session()
623
 
623
 
624
    def authorizePickup(self, orderId, pickupNumber):
624
    def authorizePickup(self, orderId, pickupNumber):
625
        """
625
        """
626
        If the order status is DOA_PICKUP_REQUESTED, it does the following
626
        If the order status is DOA_PICKUP_REQUEST_RAISED, it does the following
627
            1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
627
            1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
628
            2. Changes order status to be DOA_PICKUP_AUTHORIZED.
628
            2. Changes order status to be DOA_PICKUP_AUTHORIZED.
629
            3. Returns true
629
            3. Returns true
630
        If the order is any other status, it returns false.
630
        If the order is any other status, it returns false.
631
        Throws an exception if the order with the given id couldn't be found.
631
        Throws an exception if the order with the given id couldn't be found.
Line 654... Line 654...
654
        finally:
654
        finally:
655
            close_session()
655
            close_session()
656
    
656
    
657
    def receiveReturn(self, orderId):
657
    def receiveReturn(self, orderId):
658
        """
658
        """
659
        If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
659
        If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
660
        If the order is in any other state, it returns false.
660
        If the order is in any other state, it returns false.
661
        Throws an exception if the order with the given id couldn't be found.
661
        Throws an exception if the order with the given id couldn't be found.
662
        
662
        
663
        Parameters:
663
        Parameters:
664
         - orderId
664
         - orderId
Line 668... Line 668...
668
        finally:
668
        finally:
669
            close_session()
669
            close_session()
670
 
670
 
671
    def validateDoa(self, orderId, isValid):
671
    def validateDoa(self, orderId, isValid):
672
        """
672
        """
673
        Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
673
        Used to validate the DOA certificate for an order in the DOA_RECEIVED_PRESTINE state. If the certificate is valid,
674
        the order state is changed to DOA_CERT_PENDING.
674
        the order state is changed to DOA_CERT_PENDING.
675
        If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
675
        If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
676
        If the order is in any other state, it returns false.
676
        If the order is in any other state, it returns false.
677
        Throws an exception if the order with the given id couldn't be found.
677
        Throws an exception if the order with the given id couldn't be found.
678
        
678
        
Line 692... Line 692...
692
            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.
692
            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.
693
            
693
            
694
        If the order is in DOA_CERT_VALID state, it does the following:
694
        If the order is in DOA_CERT_VALID state, it does the following:
695
            1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
695
            1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
696
            2. Creates a return order for the warehouse executive to return the DOA material.
696
            2. Creates a return order for the warehouse executive to return the DOA material.
697
            3. Marks the current order as the final DOA_RESHIPPED state.
697
            3. Marks the current order as the final DOA_VALID_RESHIPPED state.
698
        
698
        
699
        Returns the id of the newly created order.
699
        Returns the id of the newly created order.
700
        
700
        
701
        Throws an exception if the order with the given id couldn't be found.
701
        Throws an exception if the order with the given id couldn't be found.
702
        
702