Constants table
This checker makes use of a constants table, where the import duty of liquors are calculated based on fixed rates. This example is modelled after the tax on intoxicating liquors from customs.gov.sg.
Last updated
This checker makes use of a constants table, where the import duty of liquors are calculated based on fixed rates. This example is modelled after the tax on intoxicating liquors from customs.gov.sg.
Last updated
When you have a list of items with prices/rates/numbers associated with each item. Learn more about constants
We want to check what is the total duties payable for an alcoholic product with duty rates based on per litre of alcohol. The formula (as taken from customs.gov.sg) is as follows:
Duties payable = Duty rate x Total quantity in litres x Percentage of alcoholic strength
In the questions tab
, since we have <5 options, we'll use aradio question to set the alcohol choice, andnumber questions to find out the quantity and alcohol strength.
Here's what it should look like:
The rates of each alcohol type is as below:
Alcohol
Duty rate
Stout
$60 per litre of alcohol
Whiskies
$88 per litre of alcohol
In the constants tab
, let's create a new constant table. The Reference will be the alcohol name, and the Constant will be the duty rate. Ensure your Reference is an exact match to the radio option.
We need to manually map the constant table to the respective radio question. This helps associate a constant to a radio option.
Let's Save draft
then Preview
our checker.
Create amap constant logic block and choose the question and constant table from the dropdown
Hide the block so that it wont appear in the results section
Following the formula from before, let's create acalculated result and put in our inputs.
Duties payable = Duty rate x Total quantity in litres x %Percentage of alcoholic strength