mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 02:58:11 +00:00
shipping line
This commit is contained in:
@@ -4531,7 +4531,10 @@ export class TrainSchedulingService {
|
||||
(b) =>
|
||||
!(targetScheduleId && b.trainScheduleId === targetScheduleId) &&
|
||||
!SCHEDULABLE_BOOKING_STATUSES.includes(b.status as 'PAID') &&
|
||||
!b.isGovernment,
|
||||
!b.isGovernment &&
|
||||
// Shipping-line bookings pay later on the credit ledger — never PAID
|
||||
// up front, schedulable from accept (FULLY_EXECUTED) like government.
|
||||
!b.shippingLineCompanyId,
|
||||
);
|
||||
if (invalidStatus.length) {
|
||||
const statuses = [...new Set(invalidStatus.map((b) => b.status))];
|
||||
@@ -8647,7 +8650,12 @@ export class TrainSchedulingService {
|
||||
.map((sb) => sb.booking)
|
||||
.filter((b): b is Booking => Boolean(b));
|
||||
const eligible = linkedBookings.filter(
|
||||
(b) => SCHEDULABLE_BOOKING_STATUSES.includes(b.status as 'PAID') || b.isGovernment,
|
||||
(b) =>
|
||||
SCHEDULABLE_BOOKING_STATUSES.includes(b.status as 'PAID') ||
|
||||
b.isGovernment ||
|
||||
// Shipping-line bookings board without paying up front — their charge
|
||||
// sits on the credit ledger, so accept (FULLY_EXECUTED) is boardable.
|
||||
Boolean(b.shippingLineCompanyId),
|
||||
);
|
||||
if (!eligible.length) return empty;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user