The cent that is rounding and not an overcharge

· See leht on esitatud inglise keeles.

A cent of difference between a price list and an invoice is almost always rounding. Lists are kept to four decimals and invoices are issued to two, so one unit price can print two ways. Half-up, with a tolerance of one cent per unit, settles it.

A linocut of a single coin lying on a bare tabletop beside the torn corner of a long folded paper roll, cut in one dark ink on cream paper.

Price Double Check compares an invoice with the price list a buyer forwards and sends the differences by email. That cent is the whole distance between a routine people read and one they stop opening: report three of them on every document and the reader learns to delete the message unread. So the cent is settled before any line is judged, and the settling is arithmetic rather than a matter of taste.

Where the cent comes from

A supplier's price list is a working file, and the prices in it are computed rather than typed: a case price divided by units, a discount applied to a base, a conversion from another currency. The list behind this service's acceptance run holds prices such as 0.40425 and 1.173375. No invoice can print either of those. An invoice prints two decimals, because that is what an amount in euro is, and the rounding happens somewhere in between the two documents without either of them saying where.

Where a cent appearsWhat is happeningWhat the comparison does with it
Four decimals in the list, two on the invoicethe unit price is rounded before it is printedallows one cent per unit and says nothing
The line total against unit price times quantityone of the two documents rounded the unit price first and the other rounded the productcompares the line total as well, not the unit price alone
A price quoted for a pack, billed per unitthe quantity the price applies to is not the same in both filesnormalises both to one unit before subtracting
The sum of the lines against the printed totalnothing is rounding here: a line was read wronglystops, and reports nothing until the sum agrees

Half-up is a decision, not a fact

Four decimals rounded to two have a boundary case, and the boundary case is where a naive implementation starts crying wolf. One item in the acceptance set lands on 2.205. Rounded half-up that is 2.21, which is exactly what the supplier billed. Truncated it is 2.20, and every invoice carrying that line then reads as a cent of overcharge. On the real documents behind this service, a truncating implementation would have sent about three false alarms per invoice, month after month, about nothing at all.

Neither convention is written anywhere on the invoice. The supplier's accounting package made a choice and did not announce it, so the comparison has to make the same choice and stay ready to be wrong by a cent in either direction. That is the purpose of the tolerance. It is not generosity towards the supplier; it is an admission that one cent carries no information.

There is a second rounding underneath the first, and it belongs to whoever writes the code rather than to the buyer. Money held as a binary floating point number does not round the way a person expects it to, and the usual default for ties in that world is half-to-even rather than half-up. A decimal type with the rule stated explicitly behaves the way the invoice does. A spreadsheet column holding the same prices as floating point numbers is one of the quieter reasons two people checking one invoice arrive at two answers.

The gate that comes before all of it

Before a single line is compared, the extracted lines are added up and set against the total printed on the document. If the two disagree by a cent, nothing is reported: not a finding, not a tolerance, not a reassurance. In the eleven invoices of the acceptance run every document reconciled to its own printed total to the cent, and across the wider folder of seventeen the same held.

That gate is what makes the tolerance safe. A cent allowed at the line could otherwise hide a misreading rather than a rounding — a token printed as 1 15,00 and read as 115.00 is the classic one — and the sum against the printed total is the only check that catches that whole class of error. It is also the sentence a buyer actually believes: the lines add up to your total. The rest of the method, in order, is in how to check an invoice against a price list.

What is not rounding

The point of settling the cent is that everything above it then means something. These are differences no tolerance should swallow, and in the chain behind this service every one of them sat in documents the buyer had already read through by hand.

A tolerance of one cent per unit is also deliberately an amount rather than a percentage. A percentage band scales with the line, which means it is widest exactly where the money is, and the 17.75 per cent line above sat inside a large order where a percentage tolerance would have had the most room to hide it.

Lühidalt

What a cent of tolerance means in practice
The comparison allows one cent per unit between the price list and the invoice and reports nothing inside that band. Below a cent there is no information to report: the two documents keep their prices to a different number of decimals, and that is all.
Why the rounding rule has to be stated out loud
Half-up and truncation disagree about prices that land exactly halfway, and a supplier's software does not announce which of them it uses. Stating the rule makes the result reproducible and stops a boundary case arriving as a monthly complaint.
What happens when the lines do not add up to the total
The comparison stops and says so, rather than reporting findings from a document it cannot prove it read. In the acceptance run all eleven invoices reconciled to the cent, which is the strongest single sign that this family of documents is readable by machine.

Forward one invoice and the price list it should have been billed on, and the reply arrives by email with the lines that differ by more than a cent and the arithmetic behind each of them. The prices, and a sample reply to read before deciding, are on the home page.

Kõik artiklid