From c4d3b8d3dff592b60fe76b893ddde8f5a49409fb Mon Sep 17 00:00:00 2001 From: Pratiksha Dubey Date: Thu, 7 Aug 2014 11:08:01 +0530 Subject: [PATCH] VAT-578 Remove notices --- CRM/Contribute/Form/Task/Invoice.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CRM/Contribute/Form/Task/Invoice.php b/CRM/Contribute/Form/Task/Invoice.php index c5d4a469a2..0c8e342ab9 100644 --- a/CRM/Contribute/Form/Task/Invoice.php +++ b/CRM/Contribute/Form/Task/Invoice.php @@ -396,7 +396,7 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { $source = $contribution->source; $config = CRM_Core_Config::singleton(); - if ($params['forPage'] != 'confirmpage') { + if (!isset($params['forPage'])) { $config->doNotAttachPDFReceipt = 1; } @@ -424,7 +424,6 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { 'id' => $contribution->id, 'source' => $source, 'invoice_id' => $invoiceId, - 'creditnote_id' => $creditNoteId, 'imageUploadURL' => $config->imageUploadURL, 'defaultCurrency' => $config->defaultCurrency, 'amount' => $contribution->total_amount, @@ -457,7 +456,9 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { 'domain_email' => CRM_Utils_Array::value('email', CRM_Utils_Array::value('1', $locationDefaults['email'])), 'domain_phone' => CRM_Utils_Array::value('phone', CRM_Utils_Array::value('1', $locationDefaults['phone'])), ); - + if (isset($creditNoteId)) { + $tplParams['creditnote_id'] = $creditNoteId; + } $sendTemplateParams = array( 'groupName' => 'msg_tpl_workflow_contribution', 'valueName' => 'contribution_invoice_receipt', @@ -488,7 +489,7 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { // condition to check for download PDF Invoice or email Invoice if ($invoiceElements['createPdf']) { list($sent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate($sendTemplateParams); - if ($params['forPage'] == 'confirmpage') { + if (isset($params['forPage'])) { return $html; } else { @@ -542,7 +543,7 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { } if ($invoiceElements['createPdf']) { - if ($params['forPage'] == 'confirmpage') { + if (isset($params['forPage'])) { return $html; } else { -- 2.25.1