X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_tax.cgi;h=8cf6bd7588162fc78aa96a9b5a163684f3d2285d;hb=f2eeb9006f36d49a222e55f4d595a79cdef496fb;hp=aa9ed6f11c587b1bd30f790521444f2749cd3eb2;hpb=717d562bcfb691d971a01b738d0b55cdda480cf0;p=freeside.git diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi index aa9ed6f11..8cf6bd758 100755 --- a/httemplate/search/report_tax.cgi +++ b/httemplate/search/report_tax.cgi @@ -42,7 +42,7 @@ my $gotcust = " ) "; -my($total, $exempt, $taxable, $tax) = ( 0, 0, 0, 0 ); +my($total, $exempt, $taxable, $owed, $tax) = ( 0, 0, 0, 0, 0 ); my $out = 'Out of taxable region(s)'; my %regions; foreach my $r (qsearch('cust_main_county', {}, '', $gotcust) ) { @@ -125,7 +125,7 @@ foreach my $r ( my $named_tax = $r->taxname ? 'AND itemdesc = '. dbh->quote($r->taxname) - : "AND itemdesc IS NULL or itemdesc = ''"; + : "AND ( itemdesc IS NULL OR itemdesc = '' OR itemdesc = 'Tax' )"; my $x = scalar_sql($r, \@taxparam, "SELECT SUM(cust_bill_pkg.setup+cust_bill_pkg.recur) $taxwhere ". "AND pkgnum = 0 $named_tax", @@ -153,7 +153,11 @@ push @regions, { sub getlabel { my $r = shift; + + my $label; if ( $r->tax == 0 ) { + #kludge to avoid "will not stay shared" warning + my $out = 'Out of taxable region(s)'; $label = $out; } elsif ( $r->taxname ) { $label = $r->taxname;