This is the precise behaviour of the pricing calculation. Read Pricing a quotation first for the concepts; this article is for when a number has to be explained exactly.
The three phases
Lines are not all calculated together. They are sorted into three groups and evaluated in order, because the later groups depend on the earlier ones.
| Phase | Lines | Basis |
|---|---|---|
| 1 | Unit-based lines | rate × units |
| 2 | Depend on lines, in line-order | A percentage of one earlier line's net |
| 3 | Total VAT Exclusive lines | A percentage of the net of everything above |
Two consequences follow directly:
- A Total VAT Exclusive line includes the depend-on lines from phase 2 in its base, because those have already been added by the time phase 3 runs.
- Two Total VAT Exclusive lines do not compound. Each is calculated against the running total as it stood, so ordering between them matters.
What each unit multiplies by
| Unit | Units used |
|---|---|
| Shipment | Always 1 |
| Invoice | Always 1 |
| CBM | Total CBM |
| Kilogram | Total weight |
| Unit | Number of pieces |
| Day | Days |
| W/M | The W/M figure |
| CBMCield | Total CBM, rounded up |
| WMCield | W/M, rounded up |
| CBMxDays | Total CBM × days |
| CBMCieldxDays | CBM rounded up, × days |
| WMxDays | W/M × days |
| WMCieldxDays | W/M rounded up, × days |
The
×Daysunits default days to 1 when days is absent. A storage line pricedCBMxDayson a quotation with no day count does not fail and does not come out zero — it charges one day. That is the single most easily missed behaviour here: an under-charge that looks like a correct calculation. Always set days on a quotation carrying storage or demurrage lines.
The Cield units round the quantity up to a whole unit before multiplying, not the resulting money.
Conditions decide inclusion, not rate
Conditions answer "does this line apply?" — not "at what rate?". A line whose conditions are not satisfied is removed from the calculation altogether.
A line with no conditions always applies. Where a line has several, they are combined with OR: any one match includes it.
Only three condition types exist:
| Type | Test |
|---|---|
| Day | The day count falls within a from–to range |
| Payment terms | Payment terms equal the condition's value (prepaid / collect) |
| IMO | The hazardous flag matches |
Day ranges
The range is inclusive at both ends — a range of 5 to 10 includes both 5 and 10. Adjacent ranges written as 0–5 and 5–10 therefore both match at 5, and both lines are charged. Write them as 0–5 and 6–10.
-1 means unbounded. A from of -1 has no lower limit; a to of -1 has no upper limit. That is how you express "11 days and over" — from 11, to -1.
Conditions that raise an error
A condition needs its input. If the quotation does not supply it, the calculation fails rather than guessing:
| Error | Cause |
|---|---|
DAYS_REQUIRED | A day condition exists but the quotation has no day count. |
FROM_REQUIRED / TO_REQUIRED | A day condition is missing one end of its range. Use -1 for unbounded rather than leaving it empty. |
PAYMENT_TERMS_REQUIRED | A payment-terms condition exists but the quotation has none set. |
IMO_REQUIRED | An IMO condition exists but the hazardous flag is not set. |
CONDITION_UNIT_NOT_SUPPORTED | The condition uses a type the calculator does not implement. |
These come from the pricing engine, so they surface on Calculate rather than when the line is saved.
Depend-on lines
A Depend on line references another line by its order number, and its rate is treated as a percentage: the result is referenced line's net × rate ÷ 100.
If the referenced line is not there, the base is zero and the depend-on line prices at zero. It does not raise an error. The referenced line can be absent because it was deleted, because its order number changed, or — most easily missed — because its own conditions excluded it. A percentage-based charge silently pricing at zero is nearly always this.
Depend-on lines are evaluated in line-order, and each can only reference a line from phase 1. A depend-on line cannot reference another depend-on line.
Minimum charge
Minimum charge is applied as max(calculated amount, minimum charge) — in the line's own currency, before conversion.
That ordering matters on a multi-currency quotation: a minimum charge of 50 USD is a floor of 50 USD, applied first and then translated, not a floor in the quotation's currency.
A line with no minimum charge is treated as having a minimum of zero.
VAT
VAT is calculated after conversion, on the converted net: net × VAT % ÷ 100. The line's total is net plus VAT.
VAT percentage must be between 0 and 100.
Currency conversion
Rates are quoted against the ledger's base currency, so converting between two other currencies is a cross rate:
converted = amount × rate(line currency) ÷ rate(target currency)
Three properties worth knowing:
- One as-of instant per calculation. Every line in a single Calculate converts at the same moment, so a multi-line quotation cannot straddle a rate change part-way through.
- Rates are fetched once per currency for the whole calculation.
- A line already in the target currency is not converted at all, so it carries no rounding from conversion.
Rates come from Finance — see Tax groups, tariff codes, exchange rates and configuration.
Order of operations, end to end
For a single line:
- Determine units from the unit type.
net = rate × units— or, for depend-on and total-VAT-exclusive lines, the percentage of their base.- Apply minimum charge:
max(net, minimum), in the line's currency. - Convert to the quotation's currency.
- Apply VAT on the converted net.
- Total = net + VAT.
The quotation total is the sum of every included line's total.
Diagnosing a wrong figure
| Symptom | Look at |
|---|---|
| A line is missing from the result | Its conditions — it was excluded. |
| A percentage line came out zero | The line it depends on was excluded or renumbered. |
| A storage charge is one day | Days not set; the ×Days units defaulted to 1. |
| The figure is a whole multiple when it should not be | A Cield unit is rounding the quantity up. |
| A minimum charge looks wrong after conversion | It was applied before conversion, in the line's own currency. |
| Two overlapping tiers both charged | Day ranges are inclusive and overlap at the boundary. |
| Totals differ between two runs | Rates moved between calculations; each run uses its own as-of instant. |
Last updated 9 September 2026