All tools

Rounding tester

Check what Business Central's Round() returns before you write the code, and see how the amount, VAT and invoice rounding settings change an invoice total. Uses exact decimal arithmetic, like AL's Decimal.

DIRECTION

Leaving out Precision uses the Amount Rounding Precision from General Ledger Setup (via codeunit 45 ReadRounding), normally 0.01. Leaving out Direction means '='.

Every direction at common precisions

Round() rounds to a multiple of Precision. '=' goes to the nearest multiple and an exact half goes away from zero. '>' and '<' work on the size of the number: '>' moves away from zero and '<' towards zero. So for a negative number, '>' gives a smaller value and '<' a larger one, as Microsoft's documentation notes. Precision can be any positive number, such as 0.05 or 0.25, not only a power of ten.