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

feat(dashboard) taxes + discount breakdown #9586

Merged
merged 11 commits into from
Oct 18, 2024
Merged

Conversation

fPolic
Copy link
Contributor

@fPolic fPolic commented Oct 15, 2024

What

  • add tax breakdown to order details
  • display discount total and codes

CLOSES CC-553

Copy link

vercel bot commented Oct 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2024 8:03am
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Oct 18, 2024 8:03am
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Oct 18, 2024 8:03am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Oct 18, 2024 8:03am
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Oct 18, 2024 8:03am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Oct 18, 2024 8:03am
resources-docs ⬜️ Ignored (Inspect) Visit Preview Oct 18, 2024 8:03am

Copy link

changeset-bot bot commented Oct 15, 2024

⚠️ No Changeset found

Latest commit: 4c2ab2d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@srindom
Copy link
Collaborator

srindom commented Oct 16, 2024

Looks good! Would suggest we make a small additional change in this PR if it's not too much work:

  1. Include details about the item total, and change order in which totals should be displayed.
  2. Show item, shipping and discount totals with or without taxes depending on order.region.automatic_taxes.

Specifically, if automatic_taxes: false then we should show something like:

Item Subtotal - 8.00 DKK
Shipping Subtotal - 8.00 DKK
Discount Subtotal - 2.00 DKK
Tax Total - 3.50 DKK

If automatic_taxes: true we should show something like:

Item Total - 10.00 DKK
Shipping Total - 10.00 DKK
Discount Total - 2.50 DKK
Tax Total (included) - 3.50 DKK

The reason for this is that we always want to show the details in admin as they are likely shown to the customer. automatic_taxes helps us here as it signals whether the store at any moment in time showed prices to the customer without taxes.

E.g., if automatic_taxes: false, then there was a period of time where the customer saw item prices without taxes - up until the point when the tax context was known. This likely also means that taxes is a separate line in the totals breakdown shown to the customer as opposed to being included. This is approach is for example common in the US.

It might be that we will have to revise this decision in the future, but for now this should be a pretty good solution.

Copy link
Collaborator

@srindom srindom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kodiakhq kodiakhq bot merged commit 5b91d71 into develop Oct 18, 2024
23 checks passed
@kodiakhq kodiakhq bot deleted the feat/taxes-breakdown branch October 18, 2024 09:40
420coupe pushed a commit to 420coupe/medusa that referenced this pull request Oct 18, 2024
**What**
- add tax breakdown to order details
- display discount total and codes

---

CLOSES CC-553
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants