-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
Add 'tax category' to the All Products report #13018
Add 'tax category' to the All Products report #13018
Conversation
8da296d
to
c331d57
Compare
@@ -19,7 +25,8 @@ def columns | |||
super.merge( | |||
{ | |||
on_demand: proc{ |variant| variant.on_demand }, | |||
on_hand: proc{ |variant| variant.on_demand ? I18n.t(:on_demand) : variant.on_hand } | |||
on_hand: proc{ |variant| variant.on_demand ? I18n.t(:on_demand) : variant.on_hand }, | |||
tax_category: proc { |variant| variant.tax_category_id && variant.tax_category.name } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tax_category
returns the default TaxCategory
if the variant doesn't have one.
That's why we need to ensure that this tax category value maps to the variant's assigned tax category, rather than the default one.
This is the whole purpose of the addition of this field in the report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Hey @chahmedejaz, I've checked the acceptance criteria from the issue:
Ok, so indeed now the report easily allows identifying the products which are missing tax categories. However, as displayed in the pic above, the string is not translatable, on the report page (right side). We can see, that on the products page, this is the case, so the strings' translation is available on Transifex. I'll open an issue to address this. (This is also the case with the column Group Buy Unit Quantity). Other than this minor glitch, the PR looks fine - I'll merge this now, so we include it on the latest release. |
What? Why?
What should we test?
Release notes
Changelog Category (reviewers may add a label for the release notes):