more detailed view of invoice taxes
[freeside.git] / httemplate / view / cust_bill.cgi
index d952575..c7238e6 100755 (executable)
@@ -83,7 +83,7 @@ function areyousure(href, message) {
 %   $onclick = '<A HREF="#" onclick="'.$onclick.'">';
 %   if ( $cust_bill->promised_date ) {
 %     my $date_format = $conf->config('date_format') || '%b %o, %Y';
-      <% mt('Payment promised by [_1]', 
+      <% emt('Payment promised by [_1]', 
             time2str($date_format, $cust_bill->promised_date) ) %>
       (&nbsp;<% $onclick %><% mt('change') |h %></A>&nbsp;)
       <BR><BR>
@@ -132,19 +132,13 @@ function areyousure(href, message) {
   <A HREF="<% $p %>view/cust_bill-pdf.cgi?<% $link %>"><% mt('View typeset invoice PDF') |h %></A>
 
 %   $br++;
-% } 
-
-% if ( $cust_bill->num_cust_event ) {
-<% $br ? '|' : '' %>
-<A HREF="<%$p%>search/cust_event.html?invnum=<% $cust_bill->invnum %>"><% mt('View invoice events') |h %></A> 
-%   $br++;
 % }
 
 % my @modes = grep {! $_->disabled} 
 %   $cust_bill->cust_main->agent->invoice_modes;
 % if ( @modes || $include_statement_template ) {
 <% $br ? '|' : '' %>
-<% mt('View as:') %>
+<% emt('View as:') %>
 <FORM STYLE="display:inline" ACTION="<% $cgi->url %>" METHOD="GET">
 <INPUT NAME="invnum" VALUE="<% $invnum %>" TYPE="hidden">
 <& /elements/select-table.html,
@@ -164,6 +158,25 @@ function change_invoice_mode(obj) {
   obj.form.submit();
 }
 </SCRIPT>
+</FORM>
+% }
+
+% if ( $cust_bill->num_cust_event ) {
+<% $br ? '|' : '' %>
+<A HREF="<%$p%>search/cust_event.html?invnum=<% $cust_bill->invnum %>"><% mt('View invoice events') |h %></A> 
+%   $br++;
+% }
+% if ( $cust_bill->tax > 0 ) { # inefficient
+<% $br ? '|' : '' %>
+<& /elements/popup_link.html,
+  'action'      => 'cust_bill_tax_matrix.html?' . $cust_bill->invnum,
+  'label'       => mt('View tax details'),
+  'actionlabel' => mt('Tax details'),
+  'width'       => 1050,
+  'height'      => 500,
+  'title'       => emt('Tax details'),
+&>
+%   $br++;
 % }
 
 <BR><BR>