Skip to content
Snippets Groups Projects
Unverified Commit b355ae10 authored by Eileen McNaughton's avatar Eileen McNaughton Committed by GitHub
Browse files

Merge pull request #21734 from demeritcowboy/21729-542

financial#181 - backport 21729
parents e9c158cc 07a4c18b
No related branches found
No related tags found
No related merge requests found
......@@ -554,7 +554,11 @@ INNER JOIN civicrm_contribution con ON ( con.id = mp.contribution_id )
unset($overrides['financial_type_id']);
}
$result = array_merge($templateContribution, $overrides);
$result['line_item'][$order->getPriceSetID()] = $lineItems;
// Line items aren't always written to a contribution, for mystery reasons.
// Checking for their existence prevents $order->getPriceSetID returning NULL.
if ($lineItems) {
$result['line_item'][$order->getPriceSetID()] = $lineItems;
}
// If the template contribution was made on-behalf then add the
// relevant values to ensure the activity reflects that.
$relatedContact = CRM_Contribute_BAO_Contribution::getOnbehalfIds($result['id']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment