[freeside-commits] freeside/httemplate/view cust_bill-pdf.cgi, 1.10, 1.10.6.1 cust_bill-ps.cgi, 1.7, 1.7.6.1
Ivan,,,
ivan at wavetail.420.am
Thu Jul 14 10:13:08 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail.420.am:/tmp/cvs-serv8196
Modified Files:
Tag: FREESIDE_2_1_BRANCH
cust_bill-pdf.cgi cust_bill-ps.cgi
Log Message:
fix CDRs showing on typeset (but not printed) invoices w/squelch_cdr, RT#13561
Index: cust_bill-ps.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_bill-ps.cgi,v
retrieving revision 1.7
retrieving revision 1.7.6.1
diff -u -w -d -r1.7 -r1.7.6.1
--- cust_bill-ps.cgi 7 Oct 2009 23:44:26 -0000 1.7
+++ cust_bill-ps.cgi 14 Jul 2011 17:13:06 -0000 1.7.6.1
@@ -1,4 +1,4 @@
-<% $cust_bill->print_ps(\%opt) %>
+<% $ps %>
<%init>
die "access denied"
@@ -16,7 +16,10 @@
$notice_name = ( $cgi->param('notice_name') || 'Invoice' );
}
+my $conf = new FS::Conf;
+
my %opt = (
+ 'unsquelch_cdr' => $conf->exists('voip-cdr_email'),
'template' => $template,
'notice_name' => $notice_name,
);
@@ -30,6 +33,10 @@
});
die "Invoice #$invnum not found!" unless $cust_bill;
+my $ps = $cust_bill->print_ps(\%opt);
+
http_header('Content-Type' => 'application/postscript' );
+http_header('Content-Length' => length($pdf) );
+http_header('Cache-control' => 'max-age=60' );
</%init>
Index: cust_bill-pdf.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_bill-pdf.cgi,v
retrieving revision 1.10
retrieving revision 1.10.6.1
diff -u -w -d -r1.10 -r1.10.6.1
--- cust_bill-pdf.cgi 7 Oct 2009 23:44:26 -0000 1.10
+++ cust_bill-pdf.cgi 14 Jul 2011 17:13:06 -0000 1.10.6.1
@@ -17,7 +17,10 @@
$notice_name = ( $cgi->param('notice_name') || 'Invoice' );
}
+my $conf = new FS::Conf;
+
my %opt = (
+ 'unsquelch_cdr' => $conf->exists('voip-cdr_email'),
'template' => $template,
'notice_name' => $notice_name,
);
More information about the freeside-commits
mailing list