Calculation and cross-field rules — when the totals do not add up

BR-CO does not check individual fields but how they relate: that the totals reconcile, that a coded reason and a written one mean the same thing, that two dates do not contradict each other.

23 rules · 19 explained · Rule set v2026-08-31

Rounding is the usual cause

The total rules — BR-CO-10 through BR-CO-17 — rarely fail because somebody calculated wrongly. They fail because of when the rounding happened. Keep line amounts internally at four decimal places, round them to two only when writing the XML, and build the total from the unrounded values, and you produce an invoice whose lines do not add up to its own total.

The norm requires the other order: round first, then sum. That is one line in the mapping and the difference between an accepted and a rejected invoice.

Entries that exclude each other

The other half of the family checks pairs where exactly one may be set, or both must say the same thing — the tax point as a date or as a code, an allowance reason as text and as a code. Systems that fill both fields “to be safe” breach these for exactly that reason.

No amount of recalculating helps here; a decision in the mapping does. Which of the two is the source, and the other stays empty.

All calculation and cross-field rules

With the official rule text. Rules with a written explanation carry their cause and fix directly beneath.

NormAPI provides technical validation, not tax or legal advice.