mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 02:30:55 +00:00
add hard capacity ceiling to weight limit rules
This commit is contained in:
@@ -43,8 +43,8 @@ export interface ShipmentPriceLine {
|
||||
* Pre-create validation + authoritative price preview for a booking under a
|
||||
* contract. `lineItems`/`totalAmount` are the full server-computed breakdown —
|
||||
* the same pricing pass the booking persists at create (rail freight,
|
||||
* first/last mile, overweight and every other surcharge). `pairingErrors` are
|
||||
* HARD BLOCKS; `overweightLines` are warnings.
|
||||
* first/last mile, overweight and every other surcharge). `pairingErrors` and
|
||||
* `capacityErrors` are HARD BLOCKS; `overweightLines` are warnings.
|
||||
*/
|
||||
export interface ShipmentValidation {
|
||||
overweightLines: Array<{
|
||||
@@ -56,6 +56,8 @@ export interface ShipmentValidation {
|
||||
overweightSurchargeAmount: number;
|
||||
currency: string | null;
|
||||
pairingErrors: string[];
|
||||
/** Lines above the container type's hard max capacity — booking cannot be created. */
|
||||
capacityErrors?: string[];
|
||||
lineItems?: ShipmentPriceLine[];
|
||||
totalAmount?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user