Test the calculation
Once the input object and tariffs are in place, run a test calculation to confirm the numbers match your fee schedule.
Run a test calculation
- Go to Sidebar → Cost Calculator.
- On the Cost Calculations overview, click New.
- In the Template dropdown, select your port (e.g.
Den Helder). - Set the Tariff date to a date within the tariff validity period (e.g.
2026-01-01). - Fill in the form sections:
- Ship — use the ship picker to select a vessel; the calculator reads GT, LOA, and other attributes from the ship record.
- Basis information / General — ship type, ISPS flag, and similar inputs.
- Inbound / Outbound — draft, area, number of pilots or tugs as applicable.
- Any other port-specific sections you configured.
- Click Calculate.
The results panel appears below the form. Lines are grouped by tariff group (e.g. Harbour dues, Pilotage inbound). Each line shows the tariff name and the calculated amount.
Reconcile each line against the expected amount you calculated by hand from the fee schedule. If a line is missing or wrong, use the troubleshooting table below.
Worked example: Den Helder
The table below lists a set of hand-calculated expected results from the Den Helder 2026 tariff schedule. Use these as a quick sanity check after running the setup.
| Scenario | Expected result |
|---|---|
| Zeeschip, GT 10,000, Nieuwe Diep, ISPS yes | Havengeld 10,000 × €0.93 = €9,300 · ISPS 10,000 × €0.28 = €2,800 · HAP (band ≥ 10,000) = €1,220 |
| Pilotage inbound, draught 55 dm | €2,526 (S 1,823 + TC16 703) |
| Pilotage inbound, draught ≤ 27 dm | €624 |
| Pilotage inbound, draught 90 dm | €7,858 |
| Boatmen, call period = day | €120 |
| Boatmen, call period = night | €180 |
| Cruise vessel, GT 30,000 | 30,000 × €0.35 = €10,500 |
If your numbers match, the tariff setup is correct. Discrepancies point to a misconfigured condition, a wrong Amount, or a bracket boundary issue.
Save the calculation
To keep a record of the test run:
- Click Save calculation in the results panel.
- Enter a Name for the saved calculation.
- Optionally pick a Customer.
- Confirm. The calculation is saved and appears in the Cost Calculations list.
Saved calculations can be opened, reviewed, and set to Quoted or Closed status.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Port not in the Template dropdown | Available is off, or Application area is not "Cost calculation" | Open the object in Object definitions, turn Available on, and confirm Application area = Cost calculation |
| Page crash: "Cannot convert undefined or null to object" | No linked field on the main port object has a blank Group, or every field in a section has Visibility set to Private or Hidden | Set the ship field's Group to blank; set every field's Visibility to the first option (Public) |
| No result lines for a tariff group | Port gate condition is missing or wrong | Check the Conditions tab on the group: Field type ConditionString, Source field $.__DefinitionSystemCode, operator Equals, value = exact port System code |
| Matrix lookup returns nothing | Amount source template key is wrong, input value is 0 (blocked by a ConditionNumeric), or brackets don't cover the value | Check the {{field}} key in Amount source template matches the field's System code; check the ConditionNumeric lets the value through; check bracket From / To ranges are contiguous and cover the full range |
| Per-unit amount is 0 despite a non-zero rate | CalculationPricePerUnit source field path is wrong, or the field is empty on the form | Verify the source field path (e.g. $.ship.gt) and that the user filled in that field before clicking Calculate |
| A line appears but the amount is wrong | Bracket boundary off-by-one, or wrong Amount in a bracket row | Review the matrix rows; remember brackets are [From, To) — the From value is included, the To value is not |