diff --git a/app/fax/fax_send.php b/app/fax/fax_send.php index 4d5eb50568..e796825edb 100644 --- a/app/fax/fax_send.php +++ b/app/fax/fax_send.php @@ -422,6 +422,7 @@ if (!function_exists('fax_split_dtmf')) { } //add blank page + $total_pages = $fax_page_count; //Starts total count with attachment pages $pdf->AddPage('P', array($page_width, $page_height)); // content offset, if necessary @@ -555,9 +556,12 @@ if (!function_exists('fax_split_dtmf')) { $pdf->Write(0.3, format_phone($fax_caller_id_number)); } } - if ($fax_page_count > 0) { - $pdf->Text($x + 2.0, $y + 2.6, $fax_page_count.' '.$text['label-fax-page'.(($fax_page_count > 1) ? 's' : null)]); - } + //if ($fax_page_count > 0) { + //$pdf->Text($x + 2.0, $y + 2.6, $fax_page_count.' '.$text['label-fax-page'.(($fax_page_count > 1) ? 's' : null)]); + //} + $total_pages = $fax_page_count + 1; // 1 = cover page add in the total + $pdf->Text($x + 2.0, $y + 2.6, $total_pages.' '.$text['label-fax-page'.(($total_pages > 1) ? 's' : null)]); + if (!empty($fax_subject)) { $pdf->Text($x + 2.0, $y + 2.9, $fax_subject); } @@ -572,6 +576,7 @@ if (!function_exists('fax_split_dtmf')) { } $pages = $pdf->getNumPages(); + $total_pages += $pages; // If your cover page expands into multiple pages (long message), those pages are added to total if ($pages > 1) { //save ynew for last page diff --git a/app/fax_queue/resources/job/fax_send.php b/app/fax_queue/resources/job/fax_send.php index 657dc70a26..4961d2f247 100644 --- a/app/fax_queue/resources/job/fax_send.php +++ b/app/fax_queue/resources/job/fax_send.php @@ -225,6 +225,7 @@ $fax_accountcode = $row["fax_accountcode"]; $fax_command = $row["fax_command"]; $fax_toll_allow = $row["fax_toll_allow"]; + $fax_retry_date = $row["fax_retry_date"]; } else { // Notify user using the system logs syslog(E_WARNING, "Fax Send: UUID {$fax_queue_uuid} not found in fax queue"); @@ -655,6 +656,7 @@ $email_body = str_replace('${fax_date}', date('Y-m-d H:i:s', $fax_epoch), $email_body); $email_body = str_replace('${fax_duration}', $fax_duration, $email_body); $email_body = str_replace('${fax_duration_formatted}', $fax_duration_formatted, $email_body); + $email_body = str_replace('${fax_retry_date}', $fax_retry_date, $email_body); //send the email if (isset($fax_email_address) && !empty($fax_email_address)) {