Skip to content

Commit

Permalink
Merge pull request #11702 from jmcclelland/pdf-receipt-filename
Browse files Browse the repository at this point in the history
ensure pdfFilename is set
  • Loading branch information
seamuslee001 authored Feb 27, 2018
2 parents e5e6e75 + bdaf4ff commit 4e99154
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions CRM/Contribute/Form/Task/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@ public static function printPDF($contribIDs, &$params, $contactIds) {

list($sent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate($sendTemplateParams);
// functions call for adding activity with attachment
$pdfFileName = "{$invoiceNumber}.pdf";
$fileName = self::putFile($html, $pdfFileName);
self::addActivities($subject, $contribution->contact_id, $fileName, $params);
}
Expand All @@ -509,7 +508,6 @@ public static function printPDF($contribIDs, &$params, $contactIds) {

list($sent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate($sendTemplateParams);
// functions call for adding activity with attachment
$pdfFileName = "{$invoiceNumber}.pdf";
$fileName = self::putFile($html, $pdfFileName);
self::addActivities($subject, $contribution->contact_id, $fileName, $params);
}
Expand All @@ -521,7 +519,6 @@ public static function printPDF($contribIDs, &$params, $contactIds) {
return $html;
}
else {
$pdfFileName = "{$invoiceNumber}.pdf";
CRM_Utils_PDF_Utils::html2pdf($messageInvoice, $pdfFileName, FALSE, array(
'margin_top' => 10,
'margin_left' => 65,
Expand Down

0 comments on commit 4e99154

Please sign in to comment.