-
-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REF] Clean up handling of financial_type_id override
Currently we use the primaryContributionID to determine whether the templateContribution will have more than one line item & unset the parameter. It makes much more sense to do evaluations on how many line items the template contribution will have when we have loaded it's line items. The logic is that the financial_type_id can be overriden either by editing the recurring contribution (which you are permitted to do if only one line item exists) or by passing it in via input (which is ignored if there is more than one line item. This change ensures the input parameter reaches repeatTrannsaction - which is the appropriate place to determine whether to apply it. It removes one of 2 places that refers to primaryContributionID. The other is also inappropriate as it is basically used to look up the line items to see the number of terms for the membership. However, we already know that for any repeat transactions as we have already loaded the line items. In completeOrder the line items are that of the contribution being saved. We could pass the saved contribution id into this function as a quick way to eliminate the primaryContributionID or we could just determine num_terms rather than primaryContributionID earlier on
- Loading branch information
1 parent
a12be26
commit e427daf
Showing
3 changed files
with
60 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters