-
-
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
Remove code to retrieve premium data #19262
Conversation
After a bit of digging I can't see an evidence we ever have premiums on the backoffice membership forms
(Standard links)
|
@eileenmcnaughton one thing which looking at this is what if the back office user used a Price set that had for some reason a non deductible amount set for the membership option? I.e. should we switch it to a call like https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/Contribution/Confirm.php#L223, I agree I don't see products coming into this but Price sets may. |
@seamuslee001 if we agree the existing code isn't doing anything then let's remove it & add a gitlab to follow up & fix what seems to be a pre-existing bug. I think where the change would end up in the code would be very different if we do it when the form is cleaned up |
@eileenmcnaughton my point is that I'm not sure that I agree that it isn't doing anything, I'm thinking it might be, I am speculating that if someone was to choose a price set from the back office and one of those price options has a non deductible amount set for some reason then L223 of Confirm.php will cause $nonDecutableAmount to get populated and then returned at L227 before it event gets into the Product matters |
@seamuslee001 I just tried but couldn't figure out how you would configure a price set with a premium for a back office membership |
ok so I think I have come to the same conclusion slightly as you now @eileenmcnaughton but I think the bug your getting at there is that the non deductible amount isn't being carried across to the contribution right? So I did this
my guess is that this if didn't succeed https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/Contribution/Confirm.php#L222 so we didn't check the priceSet for a non deductible amount |
@seamuslee001 my bet is that backoffice contribution forms don't work either - but it seems we agree this line isn't doing anything & there might be a bigger picture of failure? |
Yeh that is where I have got to, my thinking is that for the back office forms this should be happening https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/Contribution/Confirm.php#L221 but clearly it isn't and its probably better to stand that up independently of the getNonDeductableAmount function on that confirm page |
Based on my testing above merging this |
Overview
Remove code to retrieve premium data from previous shared function
Before
Code attempts to calculate deductible amount (ie the donation less the cost of the premium) in code that has been copied from a shared function. However, I looked in the UI & the code & concluded premiums are not available on the back office membership form
After
poof
Technical Details
This is only in one obscure code path on the form - recurring card contributions. If premiums were handled they would be in more than this flow which appears to have shared a lot of code in order to do very little in common
Comments