projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
54e6a29
)
(and REALLY fix the line-item links too, whew) fix overreporting of tax invoiced...
author
ivan
<ivan>
Sun, 2 Nov 2008 20:28:09 +0000
(20:28 +0000)
committer
ivan
<ivan>
Sun, 2 Nov 2008 20:28:09 +0000
(20:28 +0000)
httemplate/search/cust_bill_pkg.cgi
patch
|
blob
|
history
httemplate/search/report_tax.cgi
patch
|
blob
|
history
diff --git
a/httemplate/search/cust_bill_pkg.cgi
b/httemplate/search/cust_bill_pkg.cgi
index
61d9a75
..
1a95d01
100644
(file)
--- a/
httemplate/search/cust_bill_pkg.cgi
+++ b/
httemplate/search/cust_bill_pkg.cgi
@@
-119,6
+119,13
@@
if ( $cgi->param('out') ) {
" ( state = $state OR $state = '' ) ",
" country = $country "
;
" ( state = $state OR $state = '' ) ",
" country = $country "
;
+ if ( $cgi->param('taxname') ) {
+ push @where, 'itemdesc = '. dbh->quote( $cgi->param('taxname') );
+ #} elsif ( $cgi->param('taxnameNULL') {
+ } else {
+ push @where, "( itemdesc IS NULL OR itemdesc = '' OR itemdesc = 'Tax' )";
+ }
+
push @where, ' taxclass = '. dbh->quote( $cgi->param('taxclass') )
if $cgi->param('taxclass');
push @where, ' taxclass = '. dbh->quote( $cgi->param('taxclass') )
if $cgi->param('taxclass');
diff --git
a/httemplate/search/report_tax.cgi
b/httemplate/search/report_tax.cgi
index
21b42e3
..
0bec85d
100755
(executable)
--- 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;
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;
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';
$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 {
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'} =
$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;
$base_regions{$base_label}->{'tax'} += $x;
$tax += $x;