summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--httemplate/search/cust_tax_adjustment.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/httemplate/search/cust_tax_adjustment.html b/httemplate/search/cust_tax_adjustment.html
index dfc638e8b..925476516 100644
--- a/httemplate/search/cust_tax_adjustment.html
+++ b/httemplate/search/cust_tax_adjustment.html
@@ -27,11 +27,13 @@ my $count_query = 'SELECT COUNT(*) FROM cust_tax_adjustment';
my $hashref = {};
-my $custnum = $cgi->param('custnum');
-my $cust_main;
-if ( $custnum ) {
+my $custnum = '';
+my $cust_main = '';
+if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
+ $custnum = $1;
$cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
$hashref->{'custnum'} = $custnum;
+ $count_query .= " WHERE custnum = $custnum ";
}
my $title = 'Tax adjustments';