Repository navigation
Enforce what can share a shipment: FTL/LTL, one customer, pickup stop (#325) - #334
Merged
Merged
Conversation
Part 2 of #325. An FTL shipment carries exactly one order and FTL/LTL orders never share a shipment, enforced inside the add, combine, convert and split commands; LTL shipments may mix customers. Shipments created from orders now take serviceLevel, tempControlled and hazmat from them, where before convert/combine/split never set them, so the rules were skipped. The conversion service reports the same checks per order, and combining mixed or multiple FTL orders is now an error, not a warning. Adds scripts/backfill-shipment-service-level.ts (dry run unless --apply). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Convert, combine and split created only delivery stops, so leaving the origin was never tracked for those shipments: they never moved from ready to in_progress, their orders never went in transit and they never auto-completed (#324). They now start with a pickup stop at the origin, like shipments created through CreateShipmentCommand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Combining orders bound for different places set the shipment's destination to the first order's, so the route header and journey checkpoints pointed at a middle stop. The destination is now the last drop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Several customers' freight on one truck will be a consolidation of per-customer shipments, so each customer keeps their own bill of lading, invoice and portal view. Until then, adding or combining orders for a different customer is refused, and the compatibility check reports mixed customers as an error instead of a warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of #325.
What changed
commands/orders/shipmentLoadRules.ts), enforced inside the add, combine, convert and split commands:serviceLevel,tempControlledandhazmatfrom them; before this, convert, combine and split never set them, so the rules were skipped.OrderConversionServicereports the same checks per order; mixed customers and multiple FTL orders are now errors, not warnings.scripts/backfill-shipment-service-level.ts(dry run unless--apply).Testing
tscand lints pass.🤖 Generated with Claude Code