CRM-16188, fetch line item using contribution_id when entity is contribution
authorPradeep Nayak <pradpnayak@gmail.com>
Fri, 12 Feb 2016 04:32:52 +0000 (10:02 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Tue, 16 Feb 2016 17:04:57 +0000 (22:34 +0530)
----------------------------------------
* CRM-16188: Create an order API
  https://issues.civicrm.org/jira/browse/CRM-16188

CRM/Price/BAO/LineItem.php

index c793357db2b0e589f91ea84bba67085adf60d697..8ecf74dad35d93630e7df4802a2acfb7e70f84a3 100644 (file)
@@ -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) {