Issue:
An order was added to a tour that had already been marked as completed. This caused the order to require deletion from the database so it could be re-imported and invoiced correctly.
Cause:
The issue occurs when an order is assigned to a tour after the tour has already been closed. This results in the order being incorrectly associated with a completed tour, preventing proper processing and invoicing.
Resolution:
To resolve this issue, the affected order and its related tour event need to be marked as deleted in the database. Perform the following steps:
- Identify the external order number of the order that needs to be deleted.
- Run the following SQL command to mark the order as deleted in the order header table:
UPDATE TBL_TOURORDERHEADER SET ISDELETED = '1' WHERE EXTERNALORDERNO = '<ExternalOrderNumber>';
- Identify the corresponding tour event ID related to the order.
- Run the following SQL command to mark the tour event as deleted:
UPDATE TBL_DPTOUREVENT SET ISDELETED = '1' WHERE ID = '<TourEventID>';
- After these updates, the order can be re-imported and processed for invoicing.
