-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Tax categories that are still in use can be soft deleted, creating silent failures #4683
Comments
Hi @tmtrademarked ! I tried to test this but I wasn't able to reproduce Step 4: Update taxes on the order. Please see the video below. Am I missing something? |
Hey @gsmendoza - thanks for the detailed test video! That was super helpful. I think the missing piece here is that you have to cause taxes to be recalculated on the order. That's what I meant by "update taxes on the order". So you can trigger this by starting a reimbursement for an item, for instance - or I think by simply doing |
@tmtrademarked I've done the following:
I've confirmed that even if I assigned the product to the new category before deleting the old category, the tax rate is no longer applied to the order. I'll check with the team what should be the expected behavior for this issue 👍 |
@gsmendoza did you already bring this to the team's attention? |
@kennyadsl Yes, I brought it up in slack and created a ticket for it. |
Tax categories which are still in use by products or line items are allowed to be deleted. This creates a silent failure mode when attempting to update the taxes for any order referring to these objects.
Solidus Version:
3.2.2
To Reproduce
Current behavior
The code which selects the rates for the line item will return no available rates:
solidus/core/app/models/spree/tax/tax_helpers.rb
Line 11 in 425c82f
This will result in the behavior in the bug where we clear the taxes on the order.
Expected behavior
There's two things we could do to make this more obvious:
The text was updated successfully, but these errors were encountered: