-
-
Notifications
You must be signed in to change notification settings - Fork 825
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-21365 Fix Currency #11329
CRM-21365 Fix Currency #11329
Conversation
Change-Id: I63f3f5445b39b9bd6068835ae61c3e488177ce75
…is passed to processor Change-Id: I59a5cd16499e89fbaa54594071fd396de81dfb82
@eileenmcnaughton Yes, this is a better "fix". Does the getCurrency function have to be in CRM_Core_Form though? It couldn't go somewhere like CRM_Utils_Money or something? |
I think it's appropriate to the form class because it's about how the form holds that information. |
Yes to form class but I agree CRM_Core_Form is not a great place for something this specific. What about putting it in CRM_Core_Payment_ProcessorForm. |
The forms we care about (event forms, contribution pages) don't inherit from that class. (I did suggest about 3 years ago creating a current parent but that was not taken up then & we now have a bunch of functions in that top level form class that are there so those 2 form-sets can inherit from them.) Once 5.3 is gone we can look at moving all those functions (there are maybe half a dozen) into a trait class. |
@eileenmcnaughton I'm happy with your explanation for location of that function :-) |
Sorry I still don't get it. This diff looks to me like it would produce a fatal error. Because you're adding a function to |
In that function we call $form->getCurrency(); $form will be an instance of
|
Ah, I get it now. Thanks @eileenmcnaughton |
@GinkgoFJG can you confirm this works for your bug (looking for the pr now) |
Overview
Improve handling of currency
Comments
This is proposed as an alternative to #11210 and #11325