mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 16:28:12 +00:00
export flow and fix intercity issue
This commit is contained in:
@@ -217,10 +217,20 @@ export class IntercityService {
|
||||
// board a train that is full only on other legs.
|
||||
const leg = budget.legForYards(booking.originYardId, booking.destinationYardId);
|
||||
if (!budget.fits(need, leg)) {
|
||||
// Offer the part that DOES fit the leg (split-on-payment): customer is
|
||||
// notified with a pay window for the fitting wagons; the remainder can
|
||||
// be re-booked on a later train. Budget is consumed by the offer so the
|
||||
// next booking in this pass sees the reduced room.
|
||||
const offered = await this.bookingBatchService.offerIntercityPartial(
|
||||
booking,
|
||||
scheduleId,
|
||||
budget,
|
||||
);
|
||||
rejected.push({
|
||||
bookingId,
|
||||
reason:
|
||||
'Does not fit the remaining wagon/weight/length capacity for this train',
|
||||
reason: offered
|
||||
? 'Does not fit whole — a partial offer for the wagons that fit was sent to the customer'
|
||||
: 'Does not fit the remaining wagon/weight/length capacity for this train',
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user