diff options
author | ivan <ivan> | 2008-11-02 20:28:09 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-11-02 20:28:09 +0000 |
commit | af0bf34fadc9bb398e54560657dce51987c975a9 (patch) | |
tree | d7a959fc7b19e3898c71171bc3833930a7175ba5 /httemplate/search/report_tax.cgi | |
parent | 54e6a299668387fd2b0256e8ec0ed10f5caea871 (diff) |
(and REALLY fix the line-item links too, whew) fix overreporting of tax invoiced when using & reporting with taxclasses, RT#4131
Diffstat (limited to 'httemplate/search/report_tax.cgi')
-rwxr-xr-x | httemplate/search/report_tax.cgi | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi index 21b42e370..0bec85d70 100755 --- a/httemplate/search/report_tax.cgi +++ b/httemplate/search/report_tax.cgi @@ -301,7 +301,10 @@ foreach my $r ( qsearch({ 'table' => 'cust_main_county', my $label = getlabel($r); $regions{$label}->{'label'} = $label; - $regions{$label}->{'url_param'} = join(';', map "$_=".$r->$_(), qw( county state country ) ); + $regions{$label}->{'url_param'} = + join(';', map "$_=".uri_escape($r->$_()), + qw( county state country taxname ) + ); my @param = @base_param; my $mywhere = $where; @@ -310,7 +313,7 @@ foreach my $r ( qsearch({ 'table' => 'cust_main_county', $mywhere .= " AND taxclass = ? "; push @param, 'taxclass'; - $regions{$label}->{'url_param'} .= ';taxclass='. $r->taxclass + $regions{$label}->{'url_param'} .= ';taxclass='. uri_escape($r->taxclass) if $cgi->param('show_taxclasses'); } else { @@ -494,13 +497,9 @@ if ( $cgi->param('show_taxclasses') ) { $base_regions{$base_label}->{'label'} = $base_label; $base_regions{$base_label}->{'url_param'} = - join(';', map "$_=".$r->$_(), qw( county state country ) ); #taxname??? - - if ( $r->taxclass ) { - $base_regions{$base_label}->{'url_param'} .= ';taxclass='. $r->taxclass; - } else { - $base_regions{$base_label}->{'url_param'} .= ';taxclassNULL=1' - } + join(';', map "$_=". uri_escape($r->$_()), + qw( county state country taxname ) + ); $base_regions{$base_label}->{'tax'} += $x; $tax += $x; |