Subversion Repositories SmartDukaan

Rev

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

Rev 2611 Rev 2614
Line 24... Line 24...
24
	COMPLETED,
24
	COMPLETED,
25
	CANCELED,
25
	CANCELED,
26
	FAILED,
26
	FAILED,
27
	SALES_RETURN_IN_TRANSIT,
27
	SALES_RETURN_IN_TRANSIT,
28
	SALES_RET_RECEIVED,
28
	SALES_RET_RECEIVED,
29
	SALES_RET_RESHIPPED,
-
 
30
	DOA_PICKUP_REQUESTED,
29
	DOA_PICKUP_REQUESTED,
31
	DOA_RETURN_AUTHORIZED,
30
	DOA_RETURN_AUTHORIZED,
32
	DOA_RETURN_IN_TRANSIT,
31
	DOA_RETURN_IN_TRANSIT,
33
	DOA_RECEIVED,
32
	DOA_RECEIVED,
34
	DOA_CERT_INVALID,
33
	DOA_CERT_INVALID,
35
	DOA_CERT_VALID
34
	DOA_CERT_VALID,
-
 
35
	SALES_RET_RESHIPPED,
-
 
36
	DOA_INVALID_RESHIPPED,
-
 
37
	DOA_RESHIPPED,
-
 
38
	SALES_RET_REFUNDED,
-
 
39
	DOA_VALID_REFUNDED,
-
 
40
	DOA_INVALID_REFUNDED,
-
 
41
	REFUNDED
36
}
42
}
37
 
43
 
38
enum TransactionStatus{
44
enum TransactionStatus{
39
	INIT,
45
	INIT,
40
	IN_PROCESS,
46
	IN_PROCESS,
Line 326... Line 332...
326
	*/
332
	*/
327
	bool authorizePickup(1:i64 orderId, 2:string pickupNumber) throws (1:TransactionServiceException ex),
333
	bool authorizePickup(1:i64 orderId, 2:string pickupNumber) throws (1:TransactionServiceException ex),
328
	
334
	
329
	/**
335
	/**
330
	If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
336
	If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
-
 
337
	If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
331
	If the order is in any other state, it returns false.
338
	If the order is in any other state, it returns false.
332
	Throws an exception if the order with the given id couldn't be found.
339
	Throws an exception if the order with the given id couldn't be found.
333
	*/
340
	*/
334
	bool acceptDoa(1:i64 orderId) throws (1:TransactionServiceException ex),
341
	bool receiveReturn(1:i64 orderId) throws (1:TransactionServiceException ex),
335
	
342
	
336
	/**
343
	/**
337
	Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
344
	Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
338
	the order state is changed to DOA_CERT_VALID.
-
 
339
	If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
345
	the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
340
	If the order is in any other state, it returns false.
346
	If the order is in any other state, it returns false.
341
	Throws an exception if the order with the given id couldn't be found.
347
	Throws an exception if the order with the given id couldn't be found.
342
	*/
348
	*/
343
	bool validateDoa(1:i64 orderId, 2:bool isValid) throws (1:TransactionServiceException ex),
349
	bool validateDoa(1:i64 orderId, 2:bool isValid) throws (1:TransactionServiceException ex),
-
 
350
	
-
 
351
	/**
-
 
352
	If the order is in SALES_RET_RECEIVED or DOA_CERT_INVALID state, it does the following:
-
 
353
		1. Creates a new order for processing in the BILLED state. All billing information is saved.
-
 
354
		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.
-
 
355
		
-
 
356
	If the order is in DOA_CERT_VALID state, it does the following:
-
 
357
		1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
-
 
358
		2. Creates a return order for the warehouse executive to return the DOA material.
-
 
359
		3. Marks the current order as the final DOA_RESHIPPED state.
-
 
360
	
-
 
361
	Returns the id of the newly created order.
-
 
362
	
-
 
363
	Throws an exception if the order with the given id couldn't be found.
-
 
364
	*/
-
 
365
	i64 reshipOrder(1:i64 orderId) throws (1:TransactionServiceException ex),
-
 
366
	
-
 
367
	/**
-
 
368
	If the order is in SALES_RET_RECEIVED, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
-
 
369
		1. Creates a refund request for batch processing.
-
 
370
		2. Creates a return order for the warehouse executive to return the shipped material.
-
 
371
		3. Marks the current order as SALES_RET_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
-
 
372
	
-
 
373
	If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
-
 
374
		1. Creates a refund request for batch processing.
-
 
375
		2. Marks the current order as the REFUNDED final state.
-
 
376
 
-
 
377
	Returns True if it is successful, False otherwise.
-
 
378
 
-
 
379
	Throws an exception if the order with the given id couldn't be found.
-
 
380
	*/
-
 
381
	bool refundOrder(1:i64 orderId) throws (1:TransactionServiceException ex) 	
344
}
382
}
345
383