mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 05:30:55 +00:00
implement self-healing for freight payment milestones and enhance contract change request visibility
This commit is contained in:
@@ -382,6 +382,18 @@ export class BookingBatchService implements OnModuleInit {
|
||||
this.logger.log(
|
||||
`Linked PAID booking ${booking.reference ?? bookingId} to schedule ${booking.trainScheduleId}`,
|
||||
);
|
||||
} else {
|
||||
// Already linked at booking time (export FCFS: the customer books a
|
||||
// specific train, so allocate() ran up front). allocate() is where the
|
||||
// payment-settled tracking milestones are written, so on this branch we
|
||||
// record them here — otherwise a paid, already-linked booking leaves
|
||||
// FREIGHT_PAYMENT_SETTLED stuck PENDING and the clearance step never ticks.
|
||||
void this.completeTrackingMilestones(bookingId, [
|
||||
"WAGON_REQUESTED",
|
||||
"FREIGHT_PAYMENT_PENDING",
|
||||
"FREIGHT_PAYMENT_SETTLED",
|
||||
]);
|
||||
void this.markWagonAllocatedMilestone(bookingId);
|
||||
}
|
||||
|
||||
const schedule = await this.trainSchedulesRepository.findByIdWithFullGraph(
|
||||
|
||||
Reference in New Issue
Block a user