summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-05-20 18:15:18 -0700
committerMark Wells <mark@freeside.biz>2014-05-20 18:15:18 -0700
commit523a0d904238cd573e4ae6a4a12dfcfea37cd703 (patch)
tree1714c4534bdccc56ac645699c3a21a347e7fcf9c /httemplate/view
parent2224bc4165a482da4bbaf4f09210f358cd825f99 (diff)
search voided invoices, #28684
Diffstat (limited to 'httemplate/view')
-rwxr-xr-xhttemplate/view/cust_bill-logo.cgi8
1 files changed, 5 insertions, 3 deletions
diff --git a/httemplate/view/cust_bill-logo.cgi b/httemplate/view/cust_bill-logo.cgi
index d55ec041e..dc8b674ec 100755
--- a/httemplate/view/cust_bill-logo.cgi
+++ b/httemplate/view/cust_bill-logo.cgi
@@ -9,10 +9,12 @@ my $conf;
my $templatename;
my $agentnum = '';
-if ( $cgi->param('invnum') ) {
+if ( $cgi->param('invnum') =~ /^(\d+)$/ ) {
+ my $invnum = $1;
$templatename = $cgi->param('template') || $cgi->param('templatename');
- my $cust_bill = qsearchs('cust_bill', { 'invnum' => $cgi->param('invnum') } )
- or die 'unknown invnum';
+ my $cust_bill = FS::cust_bill->by_key($invnum)
+ || FS::cust_bill_void->by_key($invnum);
+ die 'unknown invnum' unless $cust_bill;
$conf = $cust_bill->conf;
$agentnum = $cust_bill->cust_main->agentnum;
} else {