| Line 430... |
Line 430... |
| 430 |
pass
|
430 |
pass
|
| 431 |
|
431 |
|
| 432 |
def requestPickupNumber(self, orderId):
|
432 |
def requestPickupNumber(self, orderId):
|
| 433 |
"""
|
433 |
"""
|
| 434 |
Sends out an email to the account manager of the original courier provider used to ship the order.
|
434 |
Sends out an email to the account manager of the original courier provider used to ship the order.
|
| 435 |
If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
|
435 |
If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUEST_RAISED.
|
| 436 |
If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
|
436 |
If the order status was DOA_PICKUP_REQUEST_RAISED, it is left unchanged.
|
| 437 |
For any other status, it returns false.
|
437 |
For any other status, it returns false.
|
| 438 |
Throws an exception if the order with the given id couldn't be found.
|
438 |
Throws an exception if the order with the given id couldn't be found.
|
| 439 |
|
439 |
|
| 440 |
Parameters:
|
440 |
Parameters:
|
| 441 |
- orderId
|
441 |
- orderId
|
| 442 |
"""
|
442 |
"""
|
| 443 |
pass
|
443 |
pass
|
| 444 |
|
444 |
|
| 445 |
def authorizePickup(self, orderId, pickupNumber):
|
445 |
def authorizePickup(self, orderId, pickupNumber):
|
| 446 |
"""
|
446 |
"""
|
| 447 |
If the order status is DOA_PICKUP_REQUESTED, it does the following
|
447 |
If the order status is DOA_PICKUP_REQUEST_RAISED, it does the following
|
| 448 |
1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
|
448 |
1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
|
| 449 |
2. Changes order status to be DOA_PICKUP_AUTHORIZED.
|
449 |
2. Changes order status to be DOA_PICKUP_AUTHORIZED.
|
| 450 |
3. Returns true
|
450 |
3. Returns true
|
| 451 |
If the order is in any other status, it returns false.
|
451 |
If the order is in any other status, it returns false.
|
| 452 |
Throws an exception if the order with the given id couldn't be found.
|
452 |
Throws an exception if the order with the given id couldn't be found.
|
| Line 468... |
Line 468... |
| 468 |
"""
|
468 |
"""
|
| 469 |
pass
|
469 |
pass
|
| 470 |
|
470 |
|
| 471 |
def receiveReturn(self, orderId):
|
471 |
def receiveReturn(self, orderId):
|
| 472 |
"""
|
472 |
"""
|
| 473 |
If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
|
473 |
If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
|
| 474 |
If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
|
474 |
If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
|
| 475 |
If the order is in any other state, it returns false.
|
475 |
If the order is in any other state, it returns false.
|
| 476 |
Throws an exception if the order with the given id couldn't be found.
|
476 |
Throws an exception if the order with the given id couldn't be found.
|
| 477 |
|
477 |
|
| 478 |
Parameters:
|
478 |
Parameters:
|
| Line 480... |
Line 480... |
| 480 |
"""
|
480 |
"""
|
| 481 |
pass
|
481 |
pass
|
| 482 |
|
482 |
|
| 483 |
def validateDoa(self, orderId, isValid):
|
483 |
def validateDoa(self, orderId, isValid):
|
| 484 |
"""
|
484 |
"""
|
| 485 |
Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
|
485 |
Used to validate the DOA certificate for an order in the DOA_RECEIVED_PRESTINE state. If the certificate is valid,
|
| 486 |
the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
|
486 |
the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
|
| 487 |
If the order is in any other state, it returns false.
|
487 |
If the order is in any other state, it returns false.
|
| 488 |
Throws an exception if the order with the given id couldn't be found.
|
488 |
Throws an exception if the order with the given id couldn't be found.
|
| 489 |
|
489 |
|
| 490 |
Parameters:
|
490 |
Parameters:
|
| Line 500... |
Line 500... |
| 500 |
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.
|
500 |
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.
|
| 501 |
|
501 |
|
| 502 |
If the order is in DOA_CERT_VALID state, it does the following:
|
502 |
If the order is in DOA_CERT_VALID state, it does the following:
|
| 503 |
1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
|
503 |
1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
|
| 504 |
2. Creates a return order for the warehouse executive to return the DOA material.
|
504 |
2. Creates a return order for the warehouse executive to return the DOA material.
|
| 505 |
3. Marks the current order as the final DOA_RESHIPPED state.
|
505 |
3. Marks the current order as the final DOA_VALID_RESHIPPED state.
|
| 506 |
|
506 |
|
| 507 |
Returns the id of the newly created order.
|
507 |
Returns the id of the newly created order.
|
| 508 |
|
508 |
|
| 509 |
Throws an exception if the order with the given id couldn't be found.
|
509 |
Throws an exception if the order with the given id couldn't be found.
|
| 510 |
|
510 |
|
| Line 2276... |
Line 2276... |
| 2276 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "toggleDOAFlag failed: unknown result");
|
2276 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "toggleDOAFlag failed: unknown result");
|
| 2277 |
|
2277 |
|
| 2278 |
def requestPickupNumber(self, orderId):
|
2278 |
def requestPickupNumber(self, orderId):
|
| 2279 |
"""
|
2279 |
"""
|
| 2280 |
Sends out an email to the account manager of the original courier provider used to ship the order.
|
2280 |
Sends out an email to the account manager of the original courier provider used to ship the order.
|
| 2281 |
If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
|
2281 |
If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUEST_RAISED.
|
| 2282 |
If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
|
2282 |
If the order status was DOA_PICKUP_REQUEST_RAISED, it is left unchanged.
|
| 2283 |
For any other status, it returns false.
|
2283 |
For any other status, it returns false.
|
| 2284 |
Throws an exception if the order with the given id couldn't be found.
|
2284 |
Throws an exception if the order with the given id couldn't be found.
|
| 2285 |
|
2285 |
|
| 2286 |
Parameters:
|
2286 |
Parameters:
|
| 2287 |
- orderId
|
2287 |
- orderId
|
| Line 2313... |
Line 2313... |
| 2313 |
raise result.ex
|
2313 |
raise result.ex
|
| 2314 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "requestPickupNumber failed: unknown result");
|
2314 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "requestPickupNumber failed: unknown result");
|
| 2315 |
|
2315 |
|
| 2316 |
def authorizePickup(self, orderId, pickupNumber):
|
2316 |
def authorizePickup(self, orderId, pickupNumber):
|
| 2317 |
"""
|
2317 |
"""
|
| 2318 |
If the order status is DOA_PICKUP_REQUESTED, it does the following
|
2318 |
If the order status is DOA_PICKUP_REQUEST_RAISED, it does the following
|
| 2319 |
1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
|
2319 |
1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
|
| 2320 |
2. Changes order status to be DOA_PICKUP_AUTHORIZED.
|
2320 |
2. Changes order status to be DOA_PICKUP_AUTHORIZED.
|
| 2321 |
3. Returns true
|
2321 |
3. Returns true
|
| 2322 |
If the order is in any other status, it returns false.
|
2322 |
If the order is in any other status, it returns false.
|
| 2323 |
Throws an exception if the order with the given id couldn't be found.
|
2323 |
Throws an exception if the order with the given id couldn't be found.
|
| Line 2389... |
Line 2389... |
| 2389 |
return result.success
|
2389 |
return result.success
|
| 2390 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "markDoasAsPickedUp failed: unknown result");
|
2390 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "markDoasAsPickedUp failed: unknown result");
|
| 2391 |
|
2391 |
|
| 2392 |
def receiveReturn(self, orderId):
|
2392 |
def receiveReturn(self, orderId):
|
| 2393 |
"""
|
2393 |
"""
|
| 2394 |
If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
|
2394 |
If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
|
| 2395 |
If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
|
2395 |
If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
|
| 2396 |
If the order is in any other state, it returns false.
|
2396 |
If the order is in any other state, it returns false.
|
| 2397 |
Throws an exception if the order with the given id couldn't be found.
|
2397 |
Throws an exception if the order with the given id couldn't be found.
|
| 2398 |
|
2398 |
|
| 2399 |
Parameters:
|
2399 |
Parameters:
|
| Line 2426... |
Line 2426... |
| 2426 |
raise result.ex
|
2426 |
raise result.ex
|
| 2427 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "receiveReturn failed: unknown result");
|
2427 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "receiveReturn failed: unknown result");
|
| 2428 |
|
2428 |
|
| 2429 |
def validateDoa(self, orderId, isValid):
|
2429 |
def validateDoa(self, orderId, isValid):
|
| 2430 |
"""
|
2430 |
"""
|
| 2431 |
Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
|
2431 |
Used to validate the DOA certificate for an order in the DOA_RECEIVED_PRESTINE state. If the certificate is valid,
|
| 2432 |
the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
|
2432 |
the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
|
| 2433 |
If the order is in any other state, it returns false.
|
2433 |
If the order is in any other state, it returns false.
|
| 2434 |
Throws an exception if the order with the given id couldn't be found.
|
2434 |
Throws an exception if the order with the given id couldn't be found.
|
| 2435 |
|
2435 |
|
| 2436 |
Parameters:
|
2436 |
Parameters:
|
| Line 2472... |
Line 2472... |
| 2472 |
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.
|
2472 |
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.
|
| 2473 |
|
2473 |
|
| 2474 |
If the order is in DOA_CERT_VALID state, it does the following:
|
2474 |
If the order is in DOA_CERT_VALID state, it does the following:
|
| 2475 |
1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
|
2475 |
1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
|
| 2476 |
2. Creates a return order for the warehouse executive to return the DOA material.
|
2476 |
2. Creates a return order for the warehouse executive to return the DOA material.
|
| 2477 |
3. Marks the current order as the final DOA_RESHIPPED state.
|
2477 |
3. Marks the current order as the final DOA_VALID_RESHIPPED state.
|
| 2478 |
|
2478 |
|
| 2479 |
Returns the id of the newly created order.
|
2479 |
Returns the id of the newly created order.
|
| 2480 |
|
2480 |
|
| 2481 |
Throws an exception if the order with the given id couldn't be found.
|
2481 |
Throws an exception if the order with the given id couldn't be found.
|
| 2482 |
|
2482 |
|