From 41ef4d6797b0c0bad80d2c30b1cf403edc5dbb86 Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Tue, 19 Jul 2016 11:18:09 +0530 Subject: [PATCH] minor fix --- CRM/Price/BAO/LineItem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Price/BAO/LineItem.php b/CRM/Price/BAO/LineItem.php index ac894d059f..9b0ef7cc06 100644 --- a/CRM/Price/BAO/LineItem.php +++ b/CRM/Price/BAO/LineItem.php @@ -446,7 +446,7 @@ AND li.entity_id = {$entityId} } // CRM-19094: entity_table is set to civicrm_membership then ensure // the entityId is set to membership ID not contribution by default - elseif (!empty($line['entity_id']) && $line['entity_id'] == $contributionDetails->id) { + elseif ($line['entity_table'] == 'civicrm_membership' && !empty($line['entity_id']) && $line['entity_id'] == $contributionDetails->id) { $membershipId = CRM_Core_DAO::getFieldValue('CRM_Member_DAO_MembershipPayment', 'contribution_id', $line['entity_id'], 'membership_id'); $line['entity_id'] = $membershipId ? $membershipId : $line['entity_id']; } -- 2.25.1