diff --git a/civicrm/CRM/Contribute/Form/Task/Invoice.php b/civicrm/CRM/Contribute/Form/Task/Invoice.php index f2742ee109e2dfb00e38dfad622818ce66593646..4d02644bd4bb5d7990c429cda9cbcd246b9210dc 100644 --- a/civicrm/CRM/Contribute/Form/Task/Invoice.php +++ b/civicrm/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,