How tariffs and repair prices are resolved¶
This page explains how CDMS decides which rate applies when a charge is billed — for storage and gate charges, and separately for repair estimate lines. It's the reference other billing pages point to instead of re-explaining pricing logic every time. Read it once before touching Tariff Profiles, Repair Rate Books, or Batch Invoice generation, because every one of those screens behaves the way it does because of the rules below.
Before you start¶
- Charge Codes — the catalogue of billable items (gate fees, storage, etc.) that tariff rates attach to.
- Tariffs & Rate Profiles setup — creating and publishing a Tariff Profile.
- Repair Rate Books setup — creating and publishing a repair rate book.
- Customer–shipping line authorization — a prerequisite for the shipping-line-specific tariff override described below.
Walkthrough¶
Storage & gate charge resolution¶
Every customer has one default Tariff Profile, assigned on the customer's own Tariff tab (see Customers). That profile supplies the rates for every shipping line the customer is authorised to move containers under — unless one specific line has been given its own override.
- Customer's default Tariff Profile. Set once per customer. Every charge for that customer resolves from this profile unless step 2 applies.
- Shipping-line-specific override. On the customer's Shipping Lines tab, any one of their authorised lines can be assigned a different Tariff Profile. Containers moving under that line are then billed from the override profile instead of the customer's default — every other linked line keeps using the customer's default. A shipping line can carry only one override at a time.
Within whichever profile is selected, CDMS narrows further to find the exact rate or slab table:
- Charge code — the type of charge (e.g. Gate In Fee, Storage).
- Container size (ISO size/type) — a rate that explicitly lists the container's size wins over a catch-all rate that lists no sizes; among explicit matches, the one listing fewer sizes wins.
- Applicability conditions (optional) — a rate or slab group can be restricted further to only apply when specific gate-pass fields match (e.g. only Import movements). CDMS refuses to save a rate whose conditions could ever tie with another rate for the same size/line, so there is never an ambiguous "which one applies" situation at billing time.
A Draft profile never bills
A Tariff Profile must be Published — not Draft — before it prices any real charge. Draft exists specifically so you can build and test a profile's rates without touching live billing. Click Publish on the profile detail page once it's ready; Revert to Draft unlocks it again for edits (and pulls it back out of billing until republished).
Under the hood (advanced)
The resolution engine actually walks a 9-level priority order: a direct per-customer rate override (priorities 1–4, most specific to least), then the assigned profile — customer's default or shipping-line override — narrowed the same way (priorities 5–8), then the default profile as the last resort (priority 9). The direct per-customer override tier (1–4) has no authoring screen in the current UI — it exists in the data model but today every customer's pricing flows through a Tariff Profile (default or line-specific), never a raw per-customer rate row.
Storage slab (day-band) rates¶
Storage charge codes are usually slab-rated: the daily rate changes based on how long the container has been in the depot (e.g. days 1–5 free, 6–15 at one rate, 16+ at a higher rate). Slab rates are configured per Tariff Profile, per charge code, per container size, per shipping line — open a profile's detail page to add or extend a slab group. See Tariffs & Rate Profiles setup for the walkthrough on building these.
Repair pricing (Repair Rate Books)¶
Repair estimate lines are priced by a separate, equally strict resolution chain. From Billing → Tariff Profiles → Repair Rates, the Price Preview tab lets you resolve the price of one repair operation for one counterparty on demand — the same walk an estimate performs, priority by priority, so a surprising number can be explained rather than argued about.
The full resolution order, most specific first:
- Customer + shipping line + explicit container size override
- Customer + shipping line override
- Customer + explicit container size override
- Customer override (any line/size) — set from the Customer Overrides tab 5–8. The customer's assigned rate book, narrowed by the same shipping-line/size specificity
- Default rate book (house rates) — the last resort
Only two tiers are reachable today
Tiers 5–8 depend on a customer being assigned to a specific (non-default) rate book, and that assignment screen does not exist yet in this build — every customer without a matching Customer Override falls straight through to the Default Rate Book. In practice this means: configure exceptions as Customer Overrides, and keep the Default Rate Book current and Published, since it is what prices every repair that has no override. Creating additional, non-default rate books is supported (for future use), but they won't price anything for a customer until book assignment ships.
Only a Published rate book inside its effective date window is considered — a Draft book is still being built, and an Archived book is retired; neither may price real work.
The "never bill $0" rule¶
CDMS refuses to price at zero
If no rate can be found at any priority level — for a storage/gate charge or a repair line — CDMS does not default to zero and does not silently skip the charge. It raises an error naming the customer, shipping line, container size, and charge/operation, and logs the unresolved context. For repairs, this means estimate generation is refused until a rate is added — either to a Published rate book or as a Customer Override. A repair that costs nothing is a revenue leak nobody notices; a repair that fails to price is a five-minute configuration fix.
Tax¶
Invoice line tax is driven by Tax Components (Settings → Tax Components). A Tariff Profile (or an individual rate/slab within it) can carry its own set of tax components, which override the charge code's default when specified. The resolved tax components are applied to each line when an invoice is generated, and the subtotal/tax/total breakdown is visible both in the Preview (before you commit) and on the finished invoice detail page.
Related pages¶
- Running batch invoices — where this resolution logic actually gets used to produce real charges.
- Payments — recording money against the invoices this logic produces.
- Work order estimates — where repair pricing surfaces to a technician building an estimate.
- Shipping-line portal — Repair Approvals — where the resolved repair total is shown to the shipping line for approval.
Who can access this¶
Tariff Profiles and Repair Rate Books (Billing → Tariff Profiles) can only be opened and edited by the Admin and Billing roles. Manager, Gate Operator, Yard Operator, and Viewer cannot open this screen at all, even though Manager has general billing visibility elsewhere. The Repair Rate Book detail page has an additional access check tied to work order visibility, which Admin, Manager, and Viewer hold but Billing does not by default — in practice only Admin can be relied on to see everything on this page.