-
-
Notifications
You must be signed in to change notification settings - Fork 814
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
CRM-21656: Fix Backend Membership with Priceset Applies Taxes Twice #11513
Conversation
Steps to reproduce: - Enable Taxes, Add a tax account with a 10% tax - Add the tax account to the Membership financial type - Create a new priceset for memberships, with radio options for the main membership options. - From a contact record, add a new membership for that contact, select an option from the priceset. Notice how to total amount is OK, but when we view the contribution, the line item shows a unit_price with the tax_amount included, so then the total_line ends up adding the taxes again. This was caused by a hack for entering backend memberships using the default dropdown options (not a priceset), which makes it possible to enter an arbitrary total_amount directly.
odd.. example fatal error, from
other error:
|
jenkins, test this please |
This might be duplicating #11461 ? (in description, but not in code) |
I'm very wary of this as a fix - the $isQuick flag is really a display setting that has been mis-used in many other ways - I regard it's use outside the code layer as a code smell. More of an issue is that we have been pretty strict on requiring tests for any processing of financial stuff - there are submit unit tests for all forms that use moment |
I agree with Eileen that to fix this we shouldn't rely on isQuickConfig to be used as a flag in here. Also, this patch is causing fatal error on backoffice contribution submit, which uses Contribution price-set with radio price field. The error is
Caused by NULL As per my investigation I found that this issue is affecting ONLY Membership price-set using radio price field. So this must be something to do with some buggy code responsible to format line-item information on backoffice membership submit. I will send a PR soon with UT. |
Thanks @monishdeb |
Closing in favor of #11521 Please have a look at this patch |
Overview
Steps to reproduce:
Notice how to total amount is OK, but when we view the contribution, the line
item shows a unit_price with the tax_amount included, so then the total_line
ends up adding the taxes again.
This was caused by a hack for entering backend memberships using the default
dropdown options (not a priceset), which makes it possible to enter an arbitrary
total_amount directly.
(the JIRA issue has screenshots and rainbows)
Comments
I tested creating a new membership using a priceset, as well as without a priceset, and with entering an arbitrary total_amount.