Skip to content

Add VAT Included line item for inclusive taxes - #1445

Open
pbennett1-godaddy wants to merge 3 commits into
mainfrom
inclusive-taxes-line-item
Open

Add VAT Included line item for inclusive taxes#1445
pbennett1-godaddy wants to merge 3 commits into
mainfrom
inclusive-taxes-line-item

Conversation

@pbennett1-godaddy

@pbennett1-godaddy pbennett1-godaddy commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a separate VAT Included line item to checkout and storefront order totals.

Inclusive taxes are already part of the displayed product price and are not included in order.totals.taxTotal. As a result, they were not visible in the existing Estimated taxes row. This
change derives the VAT amount from the order-level tax constituents and displays it separately without changing the amount due.

The VAT total:

  • Uses the tax constituent amount.value returned by the tax calculation pipeline.
  • Includes taxes where included === true.
  • Excludes taxes where additional === true.
  • Supports multiple inclusive tax constituents by summing their amounts.
  • Displays only when the resulting amount is greater than zero.
  • Uses the existing tax-loading state and currency formatting.
  • Does not add inclusive taxes to the order total.

The checkout draft-order query now retrieves order-level tax constituent amounts. The storefront order query also retrieves the additional flag so additive taxes can be explicitly excluded.

Localized labels were added for all supported locales, including GST Included for Australia.

CleanShot 2026-09-02 at 11 34 18@2x

Changeset

  • Changeset added (docs)

Test Plan

  • Added unit tests for inclusive tax total calculation:

    • Sums multiple inclusive tax constituents.
    • Excludes additive taxes.
    • Excludes taxes marked as both included and additional.
    • Handles missing taxes and amounts.
  • Added checkout integration coverage verifying:

    • The VAT Included row renders when inclusive taxes are present.
    • Multiple inclusive tax constituents are totaled.
    • Additive taxes are not included in the VAT amount.
    • The row is hidden when no positive inclusive tax amount exists.
  • Verified the VAT row uses the existing tax-loading state.

  • Ran the following validation:

    pnpm --filter @godaddy/localizations typecheck
    pnpm --filter @godaddy/react typecheck
    pnpm --filter @godaddy/react lint
    pnpm --filter @godaddy/react exec vitest run src/components/checkout/totals/utils/get-included-tax-total.test.ts src/components/checkout/tests/checkout-totals-summary.test.tsx

All checks and 12 relevant tests passed.

@pbennett1-godaddy
pbennett1-godaddy requested a review from a team as a code owner September 2, 2026 16:34
@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d0e428d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@godaddy/localizations Patch
@godaddy/react Patch
nextjs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant