X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_tax.cgi;h=0bec85d700768fd323975b0ccb1495c05abed351;hp=bf3fc74ff06ebacf9421eed9480d864095879faa;hb=af0bf34fadc9bb398e54560657dce51987c975a9;hpb=e7438cef2fa745d473d7770bb0f6c37ff2dfd1e8
diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi
index bf3fc74ff..0bec85d70 100755
--- a/httemplate/search/report_tax.cgi
+++ b/httemplate/search/report_tax.cgi
@@ -1,70 +1,333 @@
-<%
+<% include("/elements/header.html", "$agentname Sales Tax Report - ".
+ ( $beginning
+ ? time2str('%h %o %Y ', $beginning )
+ : ''
+ ).
+ 'through '.
+ ( $ending == 4294967295
+ ? 'now'
+ : time2str('%h %o %Y', $ending )
+ )
+ )
+%>
+
+<% 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 ) %>
+ |
+
+
+
+% }
+
+
+