mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 14:08:11 +00:00
fix issue -> consolidation
This commit is contained in:
@@ -571,6 +571,12 @@ export class BookingBatchService implements OnModuleInit {
|
||||
relations: { company: true },
|
||||
});
|
||||
if (!booking) return;
|
||||
// A dead booking keeps payment_status = 'PAID' (it was paid before it died),
|
||||
// so every rescue path below would happily re-place and re-allocate it —
|
||||
// that is how a cancelled consolidation-lapse booking came back onto its
|
||||
// train 30s after being cancelled. Never resurrect a dead booking.
|
||||
if (["CANCELLED", "EXPIRED", "REJECTED", "COMPLETED"].includes(booking.status))
|
||||
return;
|
||||
if (!booking.trainScheduleId) {
|
||||
// A paid booking with no train is money taken and nothing boarding. The
|
||||
// hold was expired before the payment landed (webhook lag beat the
|
||||
|
||||
Reference in New Issue
Block a user