From 2a131e0c456ffda694897e002662d5e243e2890b Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Fri, 12 Feb 2016 10:02:52 +0530 Subject: [PATCH] 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 --- CRM/Price/BAO/LineItem.php | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.25.1