Troubleshooting: Incorrect Totals Calculation (Subtotal, Tax, Total)
Problem
The calculated header totals on a transaction document (subtotal
, tax
, freight
, total
) do not match the expected values based on the line items or the original document image.
Common Causes
- Incorrect "Tax Included" Toggle: The Are the line totals inclusive of tax? toggle (
tax_included
field) is set incorrectly. This is the most common cause, as it affects how line-leveltax_amount
andtotal_exclusive
are calculated, which then roll up to the header. See Understand Document Totals. - Incorrect Line Item Data: Errors in
quantity
,unit_price
, ortotal
on one or more lines. - Incorrect Tax Rates: Wrong
tax_rate
applied to one or more lines (including landed cost lines). - Incorrect Line Type: A line that should be a landed cost (contributing to header
freight
) is incorrectly marked as a standard item (contributing to headersubtotal
), or vice-versa.
- Rounding Discrepancies: Minor differences (usually $0.01) can occur due to how individual line taxes are calculated and summed versus calculating tax on the overall subtotal.
- Manual Overrides: A user might have manually overridden a calculated header total (if permissions and form configuration allow).
- Enrichment/Calculation Not Run: Changes were made to lines, but the header totals haven't automatically recalculated yet (e.g., before saving).
Troubleshooting Steps
- Verify "Tax Included" Toggle:
- Compare the line item
total
values on the document image to the line itemunit_price * quantity
. - If the line totals on the image include tax, ensure the Are the line totals inclusive of tax? toggle in Zudello is ON.
- If the line totals on the image exclude tax, ensure the toggle is OFF.
- Correct the toggle if necessary and Save the document to trigger recalculation.
- Compare the line item
- Review Line Items:
- Carefully check the
quantity
,unit_price
, andtotal
for each line item against the document image. Correct any typos or extraction errors. - Ensure the correct
tax_rate
is applied to every line.
- Carefully check the
- Review Landed Costs:
- Check the Landed Costs section of the document viewer.
- Are the lines listed here correct (e.g., freight, handling)?
- Are any lines incorrectly appearing here that should be standard items, or vice-versa? Check the linked Item's "Treat as Freight" setting if necessary.
- Verify the
total
andtax_rate
for landed cost lines.
- Check for Manual Overrides: If header total fields are editable on your form, check if a value was manually entered, overriding the calculation. Clear the manual entry and save to allow recalculation.
- Save Document: After making corrections to lines or the tax toggle, click Save or Update to ensure header totals recalculate based on the latest data.
- Use Validation Extensions: Enable extensions like
Validate purchase total
andValidate document tax
in your Document Type settings. These will automatically flag discrepancies between calculated totals and extracted totals, often highlighting the specific issue (e.g., "Total does not match sum of lines"). See Review Validation Issues. - Accept Minor Rounding: If the difference is only $0.01, it's likely a rounding difference. Check your organisation's policy on handling minor rounding variances. Validation extensions often have built-in tolerances for this.
Need Help?
If you cannot resolve the total calculation discrepancy after following these steps, contact Zudello support. Provide:
- The Document UUID.
- A clear description of which total is incorrect and what the expected value is.
- Screenshots highlighting the relevant lines and totals on the document image and in Zudello.