X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_tax.cgi;h=eddb3da00fb37e9253b4971f8fb2874cf8703b56;hb=e68a2c760a79d6085f12be9add138067c9935074;hp=a98d36f3c50d7f3ce6904e88a456dd64ca027797;hpb=1238858779262e56f45aef69d33b54052407c7f7;p=freeside.git
diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi
index a98d36f3c..eddb3da00 100755
--- a/httemplate/search/report_tax.cgi
+++ b/httemplate/search/report_tax.cgi
@@ -1,89 +1,432 @@
-
-<%
+<% include("/elements/header.html", "$agentname Sales Tax Report - ".
+ ( $beginning
+ ? time2str('%h %o %Y ', $beginning )
+ : ''
+ ).
+ 'through '.
+ ( $ending == 4294967295
+ ? 'now'
+ : time2str('%h %o %Y', $ending )
+ ),
+ menubar( 'Main Menu'=>$p, )
+ )
+%>
+
+<% include('/elements/table-grid.html') %>
+
+
+ |
+ Sales |
+ |
+ Rate |
+ |
+ Tax owed |
+% unless ( $cgi->param('show_taxclasses') ) {
+
+ Tax invoiced |
+% }
+
+
+
+ Total |
+ |
+ Non-taxable (tax-exempt customer) |
+ |
+ Non-taxable (tax-exempt package) |
+ |
+ Non-taxable (monthly exemption) |
+ |
+ Taxable |
+
+% my $bgcolor1 = '#eeeeee';
+% my $bgcolor2 = '#ffffff';
+% my $bgcolor;
+%
+% foreach my $region ( @regions ) {
+%
+% if ( $bgcolor eq $bgcolor1 ) {
+% $bgcolor = $bgcolor2;
+% } else {
+% $bgcolor = $bgcolor1;
+% }
+%
+% my $link = '';
+% if ( $region->{'label'} ne 'Total' ) {
+% if ( $region->{'label'} eq $out ) {
+% $link = ';out=1';
+% } else {
+% $link = ';'. $region->{'url_param'};
+% }
+% }
+%
+%
+%
+%
+%
+
+
+
+ <% $region->{'label'} %> |
+
+ <% $money_char %><% sprintf('%.2f', $region->{'total'} ) %>
+ |
+ - |
+
+ <% $money_char %><% sprintf('%.2f', $region->{'exempt_cust'} ) %>
+ |
+ - |
+
+ <% $money_char %><% sprintf('%.2f', $region->{'exempt_pkg'} ) %>
+ |
+ - |
+
+ <% $money_char %><% sprintf('%.2f', $region->{'exempt_monthly'} ) %>
+ |
+ = |
+
+ <% $money_char %><% sprintf('%.2f', $region->{'taxable'} ) %>
+ |
+ <% $region->{'label'} eq 'Total' ? '' : ' X ' %> |
+ <% $region->{'rate'} %> |
+ <% $region->{'label'} eq 'Total' ? '' : ' = ' %> |
+
+ <% $money_char %><% sprintf('%.2f', $region->{'owed'} ) %>
+ |
+% unless ( $cgi->param('show_taxclasses') ) {
+
+
+ <% $money_char %><% sprintf('%.2f', $region->{'tax'} ) %>
+ |
+% }
+
+
+% }
+
+
+
+% if ( $cgi->param('show_taxclasses') ) {
+
+
+
+ <% include('/elements/table-grid.html') %>
+
+ |
+ Tax invoiced |
+
+% #some false laziness w/above
+% $bgcolor1 = '#eeeeee';
+% $bgcolor2 = '#ffffff';
+% foreach my $region ( @base_regions ) {
+%
+% if ( $bgcolor eq $bgcolor1 ) {
+% $bgcolor = $bgcolor2;
+% } else {
+% $bgcolor = $bgcolor1;
+% }
+%
+% my $link = '';
+% #if ( $region->{'label'} ne 'Total' ) {
+% if ( $region->{'label'} eq $out ) {
+% $link = ';out=1';
+% } else {
+% $link = ';'. $region->{'url_param'};
+% }
+% #}
+%
+
+
+
+ <% $region->{'label'} %> |
+
+ <% $money_char %><% sprintf('%.2f', $region->{'tax'} ) %>
+ |
+
+% }
+%
+% if ( $bgcolor eq $bgcolor1 ) {
+% $bgcolor = $bgcolor2;
+% } else {
+% $bgcolor = $bgcolor1;
+% }
+%
+
+
+
+ Total |
+
+ <% $money_char %><% sprintf('%.2f', $tax ) %>
+ |
+
+
+
+% }
+
+
+