Currencies, Precision & Rounding

Overview

Mezan uses specific precision and rounding rules for financial calculations, which are used to ensure the accuracy and consistency of financial data.

Mezan expects organizations to setup their currency choice at the time of creating their organization, and assumes you will consistently use the same currency for all your transactions within the same organization.

Currencies Supported in Mezan Currently

We're currently supporting the following currencies:

  1. Saudi Riyal (SAR)
  2. US Dollar (USD)
  3. Emirati Dirham (AED)
  4. Bahraini Dinar (BHD)
  5. Kuwaiti Dinar (KWD)
  6. Omani Riyal (OMR)
  7. Jordanian Dinar (JOD)

And ready to add any currency you need. Reach out if you would like to see a currency added.

Precision & Rounding

Mezan uses specific precision and rounding rules for financial calculations, which are used to ensure the accuracy and consistency of financial data.

There is two types of precisions in Mezan:

  1. Exact Precision: This allows decimal places up the lowest denomination of the organization's currency (for example: for Saudi Riyal, a maximum of 2 decimal places is allowed). This is always enforced for any field or operation that can be directly reported in financial statements.
  2. Full Precision: This allows additional decimal places to be used, up to a maximum of 16 digits before the decimal point, and 12 places after the decimal point. This is allowed for any field or operation that is not directly reported in financial statements. Such as unit prices, quantities, etc. This is useful to support higher precision for pricing units as needed, but the subtotals will be rounded to the exact precision of the currency as mentioned above.

Why is this important?

The reason fields such as "Subtotals" in invoices are rounded to the exact precision of the currency, is because in Mezan revenue transactions are recorded on a per product level. If subtotals were not rounded, you would find your financial statements have data that doesn't match the actual transactions.

Tax Calculations using Rounding Rules

Mezan calculates tax subtotals on each line, as a rounded value to the exact precision of the currency, and then adds them up to get the total tax amount in invoices. For the same reason mentioned above, this is because Mezan invoices can include products with different tax types, different tax rates, and associated accounts.

The invoice tax total is the result of adding up the tax subtotals of each line, which are already rounded to the exact precision of the currency.

This may sometimes result in differences if you try to calculate the tax total manually by using the invoice total, but this is the expected behavior and is not an error. It is also compliant with the Saudi Arabian tax authority's requirements.

Example Scenario: Subtotals Tax Calculation

ItemSubtotal (Rounded)Tax Amount 15% (Rounded)
Product A29.974.50
Product B22.003.30
Product C33.305.00
TOTAL85.3012.80

The tax amount is calculated as follows:

  • Product A: 29.97 × 0.15 = 4.4955, rounded to 4.50
  • Product B: 22.00 × 0.15 = 3.30, rounded to 3.30
  • Product C: 33.30 × 0.15 = 4.995, rounded to 5.00

Adding up the tax amounts per line results in a tax total of 12.80

The other method of calculating the tax total:

  • Invoice Total: 85.30 × 0.15 = 12.79

This results in a difference of 0.01, which is due to the rounding of the tax amounts per line. This is expected behaviour in Mezan and is a practice widely used in accounting software to eliminate rounding errors in financial reporting.