Open shreyas-satish opened 8 years ago
There's an additional caveat here. The foreign key (`item_id) for the line item in question cannot simply be updated with the new ticket; we'd be losing information. A copy of the line item should be stored in an archive, and the foreign key should then be updated.
Note: https://github.com/hasgeek/boxoffice/issues/105 also requires data versioning.
The foreign key for the line_item
in question doesn't need to be updated. It can simply be cancelled (which is what is happening in reality) and a new line item can be added to the order.
After discussing this with our accountant and with @jace, it seems to be better to make a new order with a link to the original order instead of new line item in the same order. I propose the following workflow.
parent_id
reference pointing to the original order. The backref should refer the 'child' orders as 'revisions'.At what price should the new ticket be charged? Should it be charged at the current price?
@zainabbawa points out that the new ticket should be charged at the price that was listed during the placement of the original order.
After further discussion, it's been decided to provide the admin the choice between charging at either the current price or the originally listed price.
This came up again during FifthEl 2018 for 2 reasons:
Users sometimes want to be able to attend a different event from what they originally they bought the ticket for. A similar case, from a customer support standpoint, is when a user wants to convert a combo ticket to single event ticket because they received a free ticket to one of the events. In such a case, an admin should be able to satisfy the request without requiring the user to make another transaction (if that's possible).
Here's how this can work: