fix CDRs showing on typeset (but not printed) invoices w/squelch_cdr, RT#13561
[freeside.git] / httemplate / view / cust_bill-pdf.cgi
index 51e47e0..323e502 100755 (executable)
@@ -17,9 +17,12 @@ if ( $query =~ /^((.+)-)?(\d+)(.pdf)?$/ ) {
   $notice_name = ( $cgi->param('notice_name') || 'Invoice' );
 }
 
+my $conf = new FS::Conf;
+
 my %opt = (
-  'template'    => $template,
-  'notice_name' => $notice_name,
+  'unsquelch_cdr' => $conf->exists('voip-cdr_email'),
+  'template'      => $template,
+  'notice_name'   => $notice_name,
 );
 
 my $cust_bill = qsearchs({