Skip to main content

Item amounts and rounding (netto, afa, brutto)

For receipts issued in HUF (<penznem> is Ft or HUF), the item amount fields must satisfy strict rules:

  • <brutto> must be a whole number. A receipt is a cash document payable in whole forints.
  • <netto> and <afa> may contain at most 2 decimal places.
  • <netto> + <afa> must equal <brutto> exactly. There is no tolerance: the values are compared without any rounding, so send already rounded amounts.
  • <nettoEgysegar> × <mennyiseg> must match <netto>, and <netto> × <afakulcs> / 100 must match <afa>, both within a small tolerance (2 HUF).

These rules do not apply to foreign-currency receipts (any <penznem> other than Ft/HUF).

Send rounded values

The receipt amount check requires an exact match: unrounded netto and afa values (for example amounts with 10+ decimal places) are rejected with error code 261. Round the item amounts before sending, and do not reuse unrounded item data from another system or document without adjusting it.

Example

A rejected item (27% VAT, unrounded values; 787.40157480315 + 212.59842519685 = 999.999999..., which is not exactly 1000):

<netto>787.40157480315</netto>
<afa>212.59842519685</afa>
<brutto>1000.0</brutto>

The same item with correctly rounded values, which is accepted:

<netto>787.40</netto>
<afa>212.60</afa>
<brutto>1000</brutto>
Error codeMeaning
261<netto> + <afa> does not equal <brutto> exactly.
363<brutto> is not a whole number.
364<netto> has more than 2 decimal places.
365<afa> has more than 2 decimal places.

The checks run in the order above: the sum check comes first, so with unrounded values you always get error 261 first, and fixing only the gross value will surface the decimal-place errors next. See also Error handling & error codes.