All rules

A total that is not the sum of its items

total-mismatchon by defaultJapanese / English

A total in a quote, invoice or contract that is not the sum of its items

Example

Flagged
| Item | Amount | | --- | --- | | Design | $3,000 | | Build | $5,000 | | Total | $9,000 |
What chaff prints
5:12 The total $9,000 is not the sum of its items ($8,000)
Fixed
| Item | Amount | | --- | --- | | Design | $3,000 | | Build | $5,000 | | Total | $8,000 |
What chaff prints
no finding

How to fix

Check which is right, the items or the total, and correct the other.

Why it matters

When the total of a quote or an invoice is not the sum of the amounts listed above it, the reader has to add them up again to find out which is right. It happens when a line is added or removed and the total is not updated. In a list or a table, a line starting with a total word (Total, Subtotal) is compared with the sum of the amounts in the same unit and column above it. A total with a word that the header of the table's first column, or of the column the total holds its number in, names ("Total deductions" under "Deduction", "Total credits earned" in the "Credits" column) is read as a total line too, and so is a total naming the span it covers ("Total for the year", "Year total", "Annual total"). Under a header that names nothing ("Item"), a "Total deductions" on the table's last row is read too, when no row above it is a total or a gross or net amount and the table has one column of amounts. A total written in a sentence, as contracts do ("$6,000 for hosting and $3,000 for support, for a total of $9,000", "$8 per month, made up of …", "a total of $12,000 — $5,000 for design and $6,000 for development"), is compared with the amounts in the same unit listed in that sentence, and with the amounts of the next sentence when it opens with a breakdown phrase ("This consists of …"). When there is more than one way to add them up, such as a grand total after a subtotal and tax, it is pointed out only when none of them matches.

What it does not flag

Amounts in another unit or column are not added. A total with a word the table's header does not name ("Total tax" under "Item") is not compared, as it may be a total of another kind, nor is a total of a quantity that need not be the sum of the rows (Total area). Under such a header, "Total deductions" is not compared when it is not the last row, when a total or a gross or net amount (Gross pay) is above it, or when the table has two columns of amounts; it is not reported when it matches the last few rows, or the rows above those less them. A total for another span ("Prior-year total") is not read, and a total naming its span that is the items scaled to a year (exactly 4, 12 or 52 times their sum, as monthly items under an annual total) is not compared. Mass, volume and length (mg, g, mL, L, cm, km) are converted and added when every row of the column is the same kind of measure (500 mg and 0.5 g make 1 g); a column with an amount per something (300 mg/tablet), a rough amount (about 300 mg) or a range (300-400 mg) is not added. Where there is more than one way to add them up, it is reported only when none matches. In a sentence, only the amount right after a total phrase (a total of) or right before a breakdown phrase (made up of) is read as a total, and only when two or more items in its unit are listed. It is not reported when the items nearest the phrase add up to it, or when it matches with one item taken away (a discount). Items after a colon or a dash right after a total are not compared when "including", "or" or "up to" shows they may not be every item, when one of them is in another unit, or when they are percentages. Items introduced as only the main ones ("mainly", 主な) are not compared, as they need not be every item. When the total and every item are written in a rounded unit (millions, billions, 百万円) with at least three significant digits ($6,655 million, not $4 million), a difference of up to (number of items − 1) last digits ($2 million for three items in whole millions) is rounding and is not reported.

Turning it off or relaxing it

Silence this one spot (in the document)
<!-- stet: total-mismatch — reason -->
Relax it for the team (the reason is kept as a comment in chaff.yaml)
npx chaffjs relax total-mismatch --why "reason"
Turn it off for the team (chaff.yaml)
rules: total-mismatch: off
Technical details
Layer
L3
Status
stable
Severity
error
Languages
Japanese and English
Suited to
business, technical, blog, legal, docs, academic, literature, speech
Reads from the document
quantities

Levels

Set a level for this rule under rules in chaff.yaml. With nothing set, it runs at the level its genre gives it (see By genre below).

normalerror
relaxedwarning

This rule has no limit to count to. A level sets how a finding is marked: relaxed keeps the finding and marks it a step lower.

By genre

Runs by default in
technical/spec, technical/readme, blog/tech, blog/essay, blog/owned-media, business/proposal, business/report, business/email, business/press-release, business/meeting-notes, legal/contract, legal/statute, legal/judgment, legal/patent, docs/manual, docs/faq, docs/glossary, academic/paper, speech/address, speech/transcript
Turned off by the genre in
literature/fiction, literature/essay, literature/poetry, literature/play

Genres

Message

The total {written} is not the sum of its items ({sum})

Sources

This page is built from the rule's definition file:packages/chaff/rules/total-mismatch.yaml