The part of the computing provider that turns a shipment and a published tariff version into charges, each with its base, rate, amount and trace. Example: husked rice from Pakistan into Burundi gives the DDI at the EAC rate, Burundi's charges, then VAT on its own base.
Six stages, always in this order. The engine has no database and no clock: it is given the shipment, the day and a published version, and the same three always give the same result.
Functions
Value
Currency: every amount converted into the local currency with the rate in force.
Customs value: by the country's basis, CIF in the EAC: invoice, external freight, insurance and other costs, less deductions. Internal freight is not part of it.
Choose the measures
Match: the measures of the code or of a heading covering it, in force on the day, for the origin or its group, the procedure and any additional code.
Treatment: the treatment the trader chose, if valid for the origin; otherwise the general rate, and module 3 says when a cheaper one was valid D36.
Conditions: thresholds checked against the trader's entries; a chosen treatment stands for its certificate, as in ASYCUDA's estimate.
Compute
Components: a percentage of a base, an amount per unit, or several joined; MAX is a ceiling, MIN a floor, so "25 % or USD 200 a tonne, whichever is higher" is a MIN.
Order: each tax in its order, on its base expression, so VAT comes after the charges its base includes.
Rounding: each tax as its type says.
Explain
Trace: for every line, the measure, its legal act, the base, the rate and the formula, with the tariff version.