Skip to content
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

[REF] Remove always false if #20653

Merged
merged 1 commit into from
Jun 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -3407,6 +3407,10 @@ public static function recordFinancialAccounts(&$params, $financialTrxnValues =
$entityID[] = $entityId;
if (!empty($additionalParticipantId)) {
$entityID += $additionalParticipantId;
// build line item array if necessary
if ($additionalParticipantId) {
CRM_Price_BAO_LineItem::getLineItemArray($params, $entityID, str_replace('civicrm_', '', $entityTable));
}
}
// prevContribution appears to mean - original contribution object- ie copy of contribution from before the update started that is being updated
if (empty($params['prevContribution'])) {
Expand All @@ -3415,11 +3419,6 @@ public static function recordFinancialAccounts(&$params, $financialTrxnValues =

$statusId = $params['contribution']->contribution_status_id;

// build line item array if its not set in $params
if (empty($params['line_item']) || $additionalParticipantId) {
CRM_Price_BAO_LineItem::getLineItemArray($params, $entityID, str_replace('civicrm_', '', $entityTable), $isRelatedId);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isRelatedId also removed as that is only set for memberships

}

if ($contributionStatus != 'Failed' &&
!($contributionStatus == 'Pending' && !$params['contribution']->is_pay_later)
) {
Expand Down