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

Default tax category is not set #12989

Open
pragai opened this issue Nov 19, 2024 · 5 comments · May be fixed by #13009
Open

Default tax category is not set #12989

pragai opened this issue Nov 19, 2024 · 5 comments · May be fixed by #13009
Assignees
Labels
bug-s4 The bug is annoying, but doesn't prevent from using the platform. Not so many users are impacted. good first issue

Comments

@pragai
Copy link

pragai commented Nov 19, 2024

Description

When adding a new product the default tax category is not the one which was set as default in the configuration.
Screenshot 2024-11-19 at 19 33 20
Screenshot 2024-11-19 at 19 33 40

This leads to tax errors when the admin forgets to set the category.

Expected Behavior

Set the tax category to default.

Actual Behaviour

When adding product the tax category is set to an arbitrary one.

Steps to Reproduce

  1. Open product creation screen.
  2. See the tax category is not the one that is set to default.

Workaround

Switch the tax category.

Severity

bug-s4: it's annoying, but you can use it

Possible Fix

Order the tax categories by default flag in the product creation form.

@github-project-automation github-project-automation bot moved this to All the things 💤 in OFN Delivery board Nov 19, 2024
@sigmundpetersen sigmundpetersen added bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. bug-s4 The bug is annoying, but doesn't prevent from using the platform. Not so many users are impacted. and removed bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. labels Nov 26, 2024
@MrBowmanXD
Copy link
Contributor

Any sugestion of where to look for someone who does not know much about the codebase?

@chahmedejaz
Copy link
Collaborator

chahmedejaz commented Nov 30, 2024

Hi @MrBowmanXD - Thanks for showing interest in the issue.
I assume it's related to the following screens:

  • http://localhost:3000/admin/products/new
  • http://localhost:3000/admin/tax_categories

And these files are related to the issue:

In the _tax_category_form.html.haml, we have a select field and right now it does not have a default selected option. We need to have a selected option here with the value of the default tax category. I hope that makes sense.

= f.collection_select(:tax_category_id, Spree::TaxCategory.all, :id, :name, {:include_blank => Spree::Config.products_require_tax_category ? false : t(:none)}, {:class => "select2 fullwidth"})

Please let me know if you face any issues, thanks.

@github-project-automation github-project-automation bot moved this to To triage (By the maintainers) in Welcome New Developers! Nov 30, 2024
@chahmedejaz chahmedejaz moved this from To triage (By the maintainers) to Frontend Easy in Welcome New Developers! Nov 30, 2024
@chahmedejaz chahmedejaz moved this from All the things 💤 to Dev ready 👋 in OFN Delivery board Nov 30, 2024
@MrBowmanXD
Copy link
Contributor

Thank you i will checkout further tomorrow morning (thanks so much for the detailed information).

@chahmedejaz chahmedejaz moved this from Dev ready 👋 to In Progress ⚙ in OFN Delivery board Nov 30, 2024
@MrBowmanXD
Copy link
Contributor

This is my solution to the problem, hope it's good and that solves the issue.

@MrBowmanXD
Copy link
Contributor

Created a new commit in order to correct the changes requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s4 The bug is annoying, but doesn't prevent from using the platform. Not so many users are impacted. good first issue
Projects
Status: In Progress ⚙
Status: Frontend Easy
Development

Successfully merging a pull request may close this issue.

4 participants