Penny Differences: Line vs Document Rounding
How the cent gap between line rounding and document rounding shows up in totals and how to track it. A small example and the rounding difference field in Floemdata.

A reconciliation report shows a 0.01 gap between the totals of two systems. Nobody issued a wrong invoice and the formula is not wrong. The gap comes from the stage at which rounding is done. Over a thousand invoices it often stays close to zero, but at closing a figure that is off by even one cent tires everyone out. The numbers below are a fictional example.
A small example
Say each of three lines is 3.333 after discount and the VAT rate is 20 percent.
- Line rounding: each line becomes 3.33; three lines make 9.99. VAT per line is 0.666 → 0.67; three lines make 2.01.
- Document rounding: the three lines are added, 9.999 → 10.00. VAT is 10.00 × 0.20 = 2.00.
- The gap: 0.01 on the base, 0.01 on VAT. If the method is not written down, the two reports will not match.
Ways to manage the gap
- Pick one rule: do you round on the line or on the document? Follow the source system's rule and make the report conform to it.
- Do not round intermediate steps: calculate at full precision and round once at the end.
- Use exact numbers instead of floats: binary floating-point numbers leave residue when adding money (for example 0.1 + 0.2 is not exactly 0.3). Use integer cents or an exact decimal type.
- Make the gap its own line: instead of ignoring the rounding difference, show it as a named item; reconciliation then does not stumble over one cent.
- Set a tolerance: write a limit such as “a few cents per document at most”; a gap beyond it is a real error.
Where Floemdata stands
Floemdata's SAP Business One extraction carries the rounding difference field in the document header (RoundDif) raw; the product documents write down a check identity saying the document total can be approximated from line totals, discount, expenses, VAT, withholding and this difference. The compiler rounds money measures to the cent, and calculations use an exact decimal type. An earlier finding that the dashboard adds totals on the client side with floating-point numbers is recorded in the documents; we have not verified its current state for this post. We also did not verify by which setting SAP B1 rounds on the line or on the document.
To start, pick three documents from the last closed month, calculate the total by hand with both line and document rounding, and note which one the source system uses. Questions are welcome at info@floemdata.com or via Floemdata.