alignment of unit price column, #18959
[freeside.git] / conf / invoice_html
index 289ada1..cd34827 100644 (file)
@@ -11,6 +11,7 @@
 .invoice_desc_more TD { font-weight: bold; font-size: 10pt }
 .invoice_extdesc TD { font-size: 8pt }
 .invoice_totaldesc TD { font-size: 10pt; empty-cells: show }
+.allcaps { text-transform:uppercase }
 </STYLE>
 
 <table class="invoice" bgcolor="#ffffff" WIDTH=625 CELLSPACING=8><tr><td>
         <table CLASS="invoice_headerright" cellspacing=0>
           <tr>
             <td align="center">
-              Invoice&nbsp;date<BR>
+              <%= emt('Invoice date') %><BR>
               <B><%= $date %></B>
             </td>
             <td>
             </td>
             <td align="center">
-              Invoice&nbsp;#<BR>
+              <%= emt('Invoice #') %><BR>
               <B><%= $invnum %></B>
             </td>
             <td>
             </td>
             <td align="center">
-              Customer&nbsp;#<BR>
+              <%= emt('Customer #') %><BR>
               <B><%= $custnum %></B>
             </td>
           </tr>
           <tr>
             <th>&nbsp;</th>
-            <th colspan=3 align="center">
-              <FONT SIZE="+3"><%= $notice_name ? substr($notice_name, 0, 1) : 'I' %></FONT><FONT SIZE="+2"><%= $notice_name ? uc(substr($notice_name, 1)) : 'NVOICE' %></FONT>
+            <th colspan=3 align="center" class="allcaps">
+             <FONT SIZE="+3"><%= substr(emt($notice_name),0,1) %></FONT><FONT SIZE="+2"><%= substr(emt($notice_name),1) %></FONT>
             </th>
             <th>&nbsp;</th>
           </tr>
@@ -64,7 +65,7 @@
         %>
       </td>
       <%= $ship_enable ? ('<td align="left">'.
-                          join('<BR>',grep length($_), '<b>Service Address</b>',
+                          join('<BR>',grep length($_), '<b>'.emt('Service Address').'</b>',
                                                        $ship_company,
                                                        $ship_address1,
                                                        $ship_address2,
@@ -86,7 +87,7 @@
            $OUT .= qq! <img src="cust_bill-barcode.cgi?invnum=$invnum;template=$template"><br> !;
        }
     %>
-        <%= $terms ? "Terms: $terms" : '' %><BR>
+        <%= $terms ? emt('Terms') . ": $terms" : '' %><BR>
         <%= $po_line %>
       </td>
     </tr>
         unless ($section->{'summarized'}) {
           $OUT .= '</table>' if ( $notfirst || $section->{'pretotal'} && !$summary );
           $OUT .= '<table><tr><td>';
-          if ($section->{'description'}) {
-            $OUT .=
-              '<p><b><font size="+1">'. uc(substr($section->{'description'},0,1)).
-              '</font><font size="+0">'. uc(substr($section->{'description'},1)).
+          my $sectionhead = $section->{'description'} || emt('Charges');
+          $OUT .=
+              '<p class="allcaps"><b><font size="+1">'. substr($sectionhead,0,1).
+              '</font><font size="+0">'. substr($sectionhead,1).
               '</font></b>'.
-              '<p>';
-          }else{
-            $OUT .=
-              '<p><b><font size="+1">C</font><font size="+0">HARGES</font></b>'.
-              '<p>';
-          }
-          $OUT .= '</td></tr></table>';
+              '<p>'.
+              '</td></tr></table>';
 
           $OUT .=
             '<table class="invoice_longtable" CELLSPACING=0 WIDTH="100%">'.
             $OUT .= $header;
             $columncount = scalar(my @array = split /<\/th><th/i, $header);
           } else {
-            $OUT .=  '<th align="center">Ref</th>'.
-                     '<th align="left">Description</th>'.
-                        ( $unitprices 
-                          ? '<th align="left">Unit Price</th>'.
-                            '<th align="left">Quantity</th>'
-                          : ''
-                        ). 
-                      '<th align="right">Amount</th>';
+            $OUT .=  '<th align="center">' . emt('Ref') . '</th>'.
+                     '<th align="left">' . emt('Description') . '</th>'.
+                     ( $unitprices 
+                       ? '<th align="right">' . emt('Unit Price') . '</th>'.
+                         '<th align="right">' . emt('Quantity') . '</th>'
+                        : '' ).
+                     '<th align="right">' . emt('Amount') . '</th>';
           }
             $OUT .= '</tr>';
 
                        ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). '</td>'.
                        '<td align="left">'. $line->{'description'}. '</td>'.
                        ( $unitprices 
-                           ? '<td align="left">'. $line->{'unit_amount'}. '</td>'.
-                             '<td align="left">'. $line->{'quantity'}. '</td>'
+                           ? '<td align="right">'. $line->{'unit_amount'}. '</td>'.
+                             '<td align="right">'. $line->{'quantity'}. '</td>'
                            : ''
                        ).
 
           }
 
 
-          if ($section->{'description'} || $multisection) {
+          if ($section->{'description'} || $multisection and !$section->{no_subtotal}) {
             my $style = 'border-top: 3px solid #000000;'.
                         'border-bottom: 3px solid #000000;';
             $OUT .=
             } else {
               $OUT .= qq(<td align="left" style="$style"). 
                       ( $unitprices ? ' colspan=3>' : '>' ).
-                      $section->{'description'}. ' Total </td>'.
+                      $section->{'description'}. ' ' . emt('Total') . '</td>'.
                       qq(<td align="right" style="$style">).
                       $section->{'subtotal'}. '</td>';
             }