Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TaxSummary doesn't include shipping tax #729

Closed
martijnvdbrug opened this issue Feb 24, 2021 · 0 comments
Closed

TaxSummary doesn't include shipping tax #729

martijnvdbrug opened this issue Feb 24, 2021 · 0 comments
Assignees
Labels
type: bug 🐛 Something isn't working
Milestone

Comments

@martijnvdbrug
Copy link
Collaborator

martijnvdbrug commented Feb 24, 2021

Describe the bug
The OrderTaxSummary doesn't include the tax of shipping. The summary only holds the total per tax rate of the items in the order.

To Reproduce
Steps to reproduce the behavior:

  1. Create a shippingMethod which includes tax
  2. Create an order with 1 item.
  3. Add the shippingMethod with tax to the order
  4. Request the order.OrderTaxSummary in the GraphQL API
  5. The taxSummary only holds the tax of the order items.

Expected behavior
(See result below) order.taxSummary.taxTotal is 399, but the order.total - order.totalWithTax = 516, because the order.totalWithTax includes the shipping tax aswell.

The order.taxSummary.taxTotal should be 516 (117 of shipping tax + 399 of order item tax)

Environment (please complete the following information):

  • @vendure/core version: 0.18.4
  • Nodejs version: v12.10.0
  • Database (mysql/postgres etc): MySQL

Additional context
Result of an order with missing shipping-tax in summary

    "order": {
      "id": "12",
      "subTotal": 1901,
      "subTotalWithTax": 2300,
      "shipping": 558,
      "shippingWithTax": 675,
      "total": 2459,
      "totalWithTax": 2975,
      "taxSummary": [
        {
          "description": "Standard Tax Europe",
          "taxRate": 21,
          "taxBase": 1901,
          "taxTotal": 399
        }
      ]
    }
  }

GraphQL request for retrieving the order:

{
  order(id: "12") {
    id
    subTotal
    subTotalWithTax
    shipping
    shippingWithTax
    total
    totalWithTax
    taxSummary {
      description
      taxRate
      taxBase
      taxTotal
    }
  }
}
@martijnvdbrug martijnvdbrug added the type: bug 🐛 Something isn't working label Feb 24, 2021
@michaelbromley michaelbromley added this to the v1.0.0 milestone Feb 26, 2021
michaelbromley added a commit that referenced this issue Mar 4, 2021
Relates to #729

BREAKING CHANGE: `Order.taxSummary` now includes shipping taxes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants