Subversion Repositories SmartDukaan

Rev

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

Rev 4479 Rev 4484
Line 489... Line 489...
489
    pass
489
    pass
490
 
490
 
491
  def receiveReturn(self, orderId, receiveCondition):
491
  def receiveReturn(self, orderId, receiveCondition):
492
    """
492
    """
493
    If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
493
    If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
494
    If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
494
    If the order status is RTO_IN_TRANSIT, marks the order status as RTO_RECEIVED_PRESTINE and returns true.
495
    If the order is in any other state, it returns false.
495
    If the order is in any other state, it returns false.
496
    Throws an exception if the order with the given id couldn't be found.
496
    Throws an exception if the order with the given id couldn't be found.
497
 
497
 
498
    Parameters:
498
    Parameters:
499
     - orderId
499
     - orderId
Line 514... Line 514...
514
    """
514
    """
515
    pass
515
    pass
516
 
516
 
517
  def reshipOrder(self, orderId):
517
  def reshipOrder(self, orderId):
518
    """
518
    """
519
    If the order is in SALES_RET_RECEIVED or DOA_CERT_INVALID state, it does the following:
519
    If the order is in RTO_RECEIVED_PRESTINE or DOA_CERT_INVALID state, it does the following:
520
    	1. Creates a new order for processing in the BILLED state. All billing information is saved.
520
    	1. Creates a new order for processing in the BILLED state. All billing information is saved.
521
    	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.
521
    	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.
522
    	
522
    	
523
    If the order is in DOA_CERT_VALID state, it does the following:
523
    If the order is in DOA_CERT_VALID state, it does the following:
524
    	1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
524
    	1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
525
    	2. Creates a return order for the warehouse executive to return the DOA material.
525
    	2. Creates a return order for the warehouse executive to return the DOA material.
526
    	3. Marks the current order as the final DOA_VALID_RESHIPPED state.
526
    	3. Marks the current order as the final DOA_VALID_RESHIPPED state.
Line 534... Line 534...
534
    """
534
    """
535
    pass
535
    pass
536
 
536
 
537
  def refundOrder(self, orderId, refundedBy, reason):
537
  def refundOrder(self, orderId, refundedBy, reason):
538
    """
538
    """
539
    If the order is in SALES_RET_RECEIVED, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
539
    If the order is in RTO_RECEIVED_PRESTINE, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
540
    	1. Creates a refund request for batch processing.
540
    	1. Creates a refund request for batch processing.
541
    	2. Creates a return order for the warehouse executive to return the shipped material.
541
    	2. Creates a return order for the warehouse executive to return the shipped material.
542
    	3. Marks the current order as SALES_RET_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
542
    	3. Marks the current order as RTO_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
543
 
543
 
544
    If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
544
    If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
545
    	1. Creates a refund request for batch processing.
545
    	1. Creates a refund request for batch processing.
546
    	2. Cancels the reservation of the item in the warehouse.
546
    	2. Cancels the reservation of the item in the warehouse.
547
    	3. Marks the current order as the REFUNDED final state.
547
    	3. Marks the current order as the REFUNDED final state.
Line 2482... Line 2482...
2482
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markDoasAsPickedUp failed: unknown result");
2482
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markDoasAsPickedUp failed: unknown result");
2483
 
2483
 
2484
  def receiveReturn(self, orderId, receiveCondition):
2484
  def receiveReturn(self, orderId, receiveCondition):
2485
    """
2485
    """
2486
    If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
2486
    If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
2487
    If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
2487
    If the order status is RTO_IN_TRANSIT, marks the order status as RTO_RECEIVED_PRESTINE and returns true.
2488
    If the order is in any other state, it returns false.
2488
    If the order is in any other state, it returns false.
2489
    Throws an exception if the order with the given id couldn't be found.
2489
    Throws an exception if the order with the given id couldn't be found.
2490
 
2490
 
2491
    Parameters:
2491
    Parameters:
2492
     - orderId
2492
     - orderId
Line 2559... Line 2559...
2559
      raise result.ex
2559
      raise result.ex
2560
    raise TApplicationException(TApplicationException.MISSING_RESULT, "validateDoa failed: unknown result");
2560
    raise TApplicationException(TApplicationException.MISSING_RESULT, "validateDoa failed: unknown result");
2561
 
2561
 
2562
  def reshipOrder(self, orderId):
2562
  def reshipOrder(self, orderId):
2563
    """
2563
    """
2564
    If the order is in SALES_RET_RECEIVED or DOA_CERT_INVALID state, it does the following:
2564
    If the order is in RTO_RECEIVED_PRESTINE or DOA_CERT_INVALID state, it does the following:
2565
    	1. Creates a new order for processing in the BILLED state. All billing information is saved.
2565
    	1. Creates a new order for processing in the BILLED state. All billing information is saved.
2566
    	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.
2566
    	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.
2567
    	
2567
    	
2568
    If the order is in DOA_CERT_VALID state, it does the following:
2568
    If the order is in DOA_CERT_VALID state, it does the following:
2569
    	1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
2569
    	1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
2570
    	2. Creates a return order for the warehouse executive to return the DOA material.
2570
    	2. Creates a return order for the warehouse executive to return the DOA material.
2571
    	3. Marks the current order as the final DOA_VALID_RESHIPPED state.
2571
    	3. Marks the current order as the final DOA_VALID_RESHIPPED state.
Line 2604... Line 2604...
2604
      raise result.ex
2604
      raise result.ex
2605
    raise TApplicationException(TApplicationException.MISSING_RESULT, "reshipOrder failed: unknown result");
2605
    raise TApplicationException(TApplicationException.MISSING_RESULT, "reshipOrder failed: unknown result");
2606
 
2606
 
2607
  def refundOrder(self, orderId, refundedBy, reason):
2607
  def refundOrder(self, orderId, refundedBy, reason):
2608
    """
2608
    """
2609
    If the order is in SALES_RET_RECEIVED, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
2609
    If the order is in RTO_RECEIVED_PRESTINE, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
2610
    	1. Creates a refund request for batch processing.
2610
    	1. Creates a refund request for batch processing.
2611
    	2. Creates a return order for the warehouse executive to return the shipped material.
2611
    	2. Creates a return order for the warehouse executive to return the shipped material.
2612
    	3. Marks the current order as SALES_RET_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
2612
    	3. Marks the current order as RTO_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
2613
 
2613
 
2614
    If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
2614
    If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
2615
    	1. Creates a refund request for batch processing.
2615
    	1. Creates a refund request for batch processing.
2616
    	2. Cancels the reservation of the item in the warehouse.
2616
    	2. Cancels the reservation of the item in the warehouse.
2617
    	3. Marks the current order as the REFUNDED final state.
2617
    	3. Marks the current order as the REFUNDED final state.