API reference / Quittio \ Core \ Calculation
DeclaredAmountsMode
string-backed enum in quittio/core
Quittio\Core\Calculation\DeclaredAmountsMode · Source
What the calculator does with the declared amounts of an existing document (line net amounts BT-131 and VAT breakdown BT-116, BT-117 that another system rounded differently, see Meta::FLAG_DECLARED_AMOUNTS).
Cases#
| Case | Value | Description |
|---|---|---|
Keep | 'keep' | Keeps declared amounts within the tolerances of EN 16931 and Peppol, so that foreign rounding is reversed exactly; amounts outside the tolerances are recalculated and reported (QUITTIO-DECLARED-AMOUNTS). |
Recalculate | 'recalculate' | Recalculates every amount and reports that declared amounts were replaced (QUITTIO-DECLARED-AMOUNTS). Partial cancellations aligned with the earlier ones keep their VAT, otherwise cumulative rounding would no longer reverse the original. |
Reject | 'reject' | Like Keep, but declared amounts outside the tolerances throw a CalculationException instead of being recalculated. |