Skip to main content
Version: Current

How Zudello Calculates Document Totals

Zudello automatically calculates the main header totals for your transaction documents to ensure accuracy and facilitate validation. Here's how the key totals are derived:

Core Principle: Header totals are primarily calculated by summing up values from the individual lines associated with the document, respecting the difference between standard item lines and landed cost lines.

Calculation Steps:

  1. Line-Level Calculation: First, Zudello calculates the total_exclusive (amount before tax) and tax_amount for each individual line (both standard items and landed costs). This calculation depends critically on whether the Are the line totals inclusive of tax? toggle is ON or OFF for the document.

  2. Header Subtotal (subtotal):

    • This represents the total value of the standard goods or services before tax.
    • It's calculated as the SUM of the total_exclusive values from all lines with line_type = ITEM.
    • Landed cost lines are excluded from this calculation.
  3. Header Freight (freight):

    • This represents the total value of landed costs (like shipping, handling, duties) before tax.
    • It's calculated as the SUM of the total_exclusive values from all lines with line_type = LANDED_COST.
    • Standard item lines are excluded from this calculation.
  4. Header Tax (tax):

    • This represents the total tax amount for the entire document.
    • It's calculated as the SUM of the tax_amount values from all lines (both ITEM type and LANDED_COST type).
  5. Header Total (total):

    • This represents the final, overall amount for the document, including tax.
    • It's calculated simply as: Header Subtotal + Header Tax + Header Freight.

Key Factors:

  • Tax Included Toggle: The setting of this header-level toggle dictates how line-level exclusive amounts and tax amounts are calculated, directly impacting all header totals.
  • Line Type: Correctly categorising lines as ITEM or LANDED_COST is essential for accurate Subtotal and Freight calculations.
  • Recalculation: Totals automatically recalculate when line data (quantity, price, tax rate) or the "Tax Included" toggle changes and the document is saved.

Understanding this calculation flow helps in troubleshooting discrepancies between Zudello totals and the source document image.

See also: Understanding How Document Totals are Calculated (How-To) See also: Troubleshooting Incorrect Totals Calculation