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

Shipping total is not including tax #4929

Closed
edinskeja opened this issue Sep 1, 2023 · 1 comment
Closed

Shipping total is not including tax #4929

edinskeja opened this issue Sep 1, 2023 · 1 comment

Comments

@edinskeja
Copy link
Contributor

edinskeja commented Sep 1, 2023

Bug report

I have activated "includes_tax" feature and products are working but shipping tax seems to be only working inside "shipping_methods" and not on the "shipping_total".

"shipping_total": 7920,
 "shipping_methods": [
        {
            "id": "sm_01H97SZZ0VW6A36G4DJT6FZFB5",
            "shipping_option_id": "so_01H7FDZC1D1SXYMT28FDKZ5HW4",
            "order_id": "order_01H97T3NJXTQS73HF33XXC59N6",
            "claim_order_id": null,
            "cart_id": "cart_01H95KENYTTPR03MVSMT42ABB7",
            "swap_id": null,
            "return_id": null,
            "price": 9900,
            "data": {},
            "includes_tax": true,
            "tax_lines": [
                {
                    "id": "smtl_01H97T3NG2CWQTCN5A14J3WK7M",
                    "created_at": "2023-09-01T07:25:20.736Z",
                    "updated_at": "2023-09-01T07:25:20.821Z",
                    "rate": 25,
                    "name": "default",
                    "code": "default",
                    "metadata": null,
                    "shipping_method_id": "sm_01H97SZZ0VW6A36G4DJT6FZFB5"
                }
            ],
            "original_total": 9900,
            "total": 9900,
            "subtotal": 7920,
            "original_tax_total": 1980,
            "tax_total": 1980
        }
    ],

Describe the bug

A clear and concise description of what the bug is.

System information

Medusa version (including plugins): 1.15.0
Node.js version: v18
Database: PSQL

Steps to reproduce the behavior

  1. Activate includes_tax
  2. Add shipping options with price
  3. Check order
@genox
Copy link

genox commented Oct 11, 2023

Similar issue here.

I enabled tax inclusive pricing and added shipping methods. The UI indicates tax inclusive prices:

Screenshot 2023-10-11 at 08 09 33

When fetching shipping methods by cart id (medusaJS) I get:

q]   {
[q]     id: 'so_01HCEMWQZ7YRBC2S99X170MCE3',
[q]     created_at: '2023-10-11T05:55:57.517Z',
[q]     updated_at: '2023-10-11T05:55:57.517Z',
[q]     deleted_at: null,
[q]     name: 'PostPac Economy',
[q]     region_id: 'reg_01HAHQYYPKTABSH3GZEDCCGGN2',
[q]     profile_id: 'sp_01HAH9PEC7JZFBR8JNWA7RQGM9',
[q]     provider_id: 'manual',
[q]     price_type: 'flat_rate',
[q]     amount: 900,
[q]     is_return: false,
[q]     admin_only: false,
[q]     data: { id: 'manual-fulfillment' },
[q]     metadata: {},
[q]     includes_tax: false,
[q]     profile: {
[q]       id: 'sp_01HAH9PEC7JZFBR8JNWA7RQGM9',
[q]       created_at: '2023-09-17T10:06:36.169Z',
[q]       updated_at: '2023-09-17T10:06:36.169Z',
[q]       deleted_at: null,
[q]       name: 'Default Shipping Profile',
[q]       type: 'default',
[q]       metadata: null
[q]     },
[q]     requirements: [ [Object] ],
[q]     price_incl_tax: 969,
[q]     tax_rates: [ [Object] ],
[q]     tax_amount: 69
[q]   },

You can see that includes_tax: false,.

When I attach this shipping method to a cart, the total prices are not calculated correctly.

I am using the latest version of medusa.

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

No branches or pull requests

2 participants