X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_tax.html;h=f920adbac515f625e8a4c59997401df005fb1333;hp=85af212d7c040aa7b38a47cddf6d65c8d4a0e540;hb=949a80c148a8bbeeeec54c5a0be5d73b292423a5;hpb=34647c32b50ce3b8ee1b6d3d7aef4ba9d0297bdb diff --git a/httemplate/search/report_tax.html b/httemplate/search/report_tax.html index 85af212d7..f920adbac 100755 --- a/httemplate/search/report_tax.html +++ b/httemplate/search/report_tax.html @@ -1,44 +1,111 @@ - - - Tax Report Criteria - - - - - -

Tax Report Criteria

-
- Return tax report for period: - - - - - - - - - - - -
From:
m/d/y
To:
m/d/y
+ $('[name=all]').change(); +}); + + +<% include('/elements/footer.html') %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); + +my $conf = new FS::Conf; + +my $sth = dbh->prepare('SELECT DISTINCT(COALESCE(taxname, \'Tax\')) FROM cust_main_county'); +$sth->execute or die $sth->errstr; +my @taxnames = map { $_->[0] } @{ $sth->fetchall_arrayref }; -
+$sth = dbh->prepare('SELECT DISTINCT(country) FROM cust_location'); +$sth->execute or die $sth->errstr; +my @countries = map { $_->[0] } @{ $sth->fetchall_arrayref }; -
- - +my @breakdown; +if ( $conf->exists('enable_taxclasses') ) { + push @breakdown, 'taxclass'; +} +if ( FS::pkg_class->count() > 0 ) { + push @breakdown, 'pkgclass'; +} +if ( FS::cust_main_county->count("city is not null and city != ''") > 0 ) { + push @breakdown, 'city'; +} +if ( FS::cust_main_county->count("district is not null") > 0 ) { + push @breakdown, 'district'; +} +