From: Pradeep Nayak Date: Fri, 12 Feb 2016 04:32:52 +0000 (+0530) Subject: CRM-16188, fetch line item using contribution_id when entity is contribution X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2a131e0c456ffda694897e002662d5e243e2890b;p=civicrm-core.git CRM-16188, fetch line item using contribution_id when entity is contribution ---------------------------------------- * CRM-16188: Create an order API https://issues.civicrm.org/jira/browse/CRM-16188 --- diff --git a/CRM/Price/BAO/LineItem.php b/CRM/Price/BAO/LineItem.php index c793357db2..8ecf74dad3 100644 --- a/CRM/Price/BAO/LineItem.php +++ b/CRM/Price/BAO/LineItem.php @@ -519,6 +519,9 @@ AND li.entity_id = {$entityId} else { $setID = NULL; $totalEntityId = count($entityId); + if ($entityTable == 'contribution') { + $isRelatedID = TRUE; + } foreach ($entityId as $id) { $lineItems = CRM_Price_BAO_LineItem::getLineItems($id, $entityTable, NULL, TRUE, $isRelatedID); foreach ($lineItems as $key => $values) {