TransactionManager::cancelTransaction() releases held lines, cancels confirmed lines, then unconditionally stamps the order as cancelled. On an order that has already settled (all bookings completed, or marked a no-show), there is nothing to cancel, but the order is still flipped to cancelled while its bookings stay completed. This is inconsistent with the booking level, where cancel() already refuses a non-confirmed booking.
Fix: cancelTransaction() refuses when the order is in a settled terminal state (completed or no-show) or is already cancelled, returning 0 without changing state. A re-check under the row lock keeps a concurrently settled order from being overwritten. Covered by a kernel test.
Issue fork yoyaku-3611922
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
mably commented