From 62467b1a8e05bf77200a677e477d0c98d8000f6d Mon Sep 17 00:00:00 2001 From: Andrei Mondoc Date: Wed, 16 Jan 2019 21:35:40 +0000 Subject: [PATCH] retrieve LineItems by contributionID regardless of component --- CRM/Contribute/Form/Task/Invoice.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/CRM/Contribute/Form/Task/Invoice.php b/CRM/Contribute/Form/Task/Invoice.php index a38c5e9327..55447fd77a 100644 --- a/CRM/Contribute/Form/Task/Invoice.php +++ b/CRM/Contribute/Form/Task/Invoice.php @@ -301,13 +301,7 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { $invoiceDate = date("F j, Y"); $dueDate = date('F j, Y', strtotime($contributionReceiveDate . "+" . $prefixValue['due_date'] . "" . $prefixValue['due_date_period'])); - if ($input['component'] == 'contribute') { - $lineItem = CRM_Price_BAO_LineItem::getLineItemsByContributionID($contribID); - } - else { - $eid = $contribution->_relatedObjects['participant']->id; - $lineItem = CRM_Price_BAO_LineItem::getLineItems($eid, 'participant', NULL, TRUE, FALSE, TRUE); - } + $lineItem = CRM_Price_BAO_LineItem::getLineItemsByContributionID($contribID); $resultPayments = civicrm_api3('Payment', 'get', [ 'sequential' => 1, -- 2.25.1