summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_bill-ps.cgi
diff options
context:
space:
mode:
authorcvs2git <cvs2git>2009-10-11 02:42:17 +0000
committercvs2git <cvs2git>2009-10-11 02:42:17 +0000
commita83a000a027d1272e813259d09230d701d84df64 (patch)
tree71500c957e6d7db3e1ad3d59e74ca7bbb14e44ff /httemplate/view/cust_bill-ps.cgi
parent097a12385d80ef52f37d4cc2bb93bc3f81e6f8e6 (diff)
parent0b69c091543b56a45f2ae6b8718fc67f381a6686 (diff)
This commit was manufactured by cvs2svn to create branchfreeside_1_9_1
'FREESIDE_1_9_BRANCH'.
Diffstat (limited to 'httemplate/view/cust_bill-ps.cgi')
-rwxr-xr-xhttemplate/view/cust_bill-ps.cgi21
1 files changed, 16 insertions, 5 deletions
diff --git a/httemplate/view/cust_bill-ps.cgi b/httemplate/view/cust_bill-ps.cgi
index 5313dbf..881491f 100755
--- a/httemplate/view/cust_bill-ps.cgi
+++ b/httemplate/view/cust_bill-ps.cgi
@@ -1,14 +1,25 @@
-<% $cust_bill->print_ps( '', $templatename) %>
+<% $cust_bill->print_ps(\%opt) %>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('View invoices');
-#untaint invnum
+my( $invnum, $template, $notice_name );
my($query) = $cgi->keywords;
-$query =~ /^((.+)-)?(\d+)$/;
-my $templatename = $2;
-my $invnum = $3;
+if ( $query =~ /^((.+)-)?(\d+)(.pdf)?$/ ) {
+ $template = $2;
+ $invnum = $3;
+ $notice_name = 'Invoice';
+} else {
+ $invnum = $cgi->param('invnum');
+ $template = $cgi->param('template');
+ $notice_name = ( $cgi->param('notice_name') || 'Invoice' );
+}
+
+my %opt = (
+ 'template' => $template,
+ 'notice_name' => $notice_name,
+);
my $cust_bill = qsearchs({
'select' => 'cust_bill.*',