invoice service address modifications
authorjeff <jeff>
Mon, 23 Jun 2008 15:37:15 +0000 (15:37 +0000)
committerjeff <jeff>
Mon, 23 Jun 2008 15:37:15 +0000 (15:37 +0000)
FS/FS/cust_bill.pm
conf/invoice_html
conf/invoice_latex

index c23e856..7b05cad 100644 (file)
@@ -1853,16 +1853,18 @@ sub print_generic {
     'unitprices'      => $conf->exists('invoice-unitprice'),
   );
 
+  my $countrydefault = $conf->config('countrydefault') || 'US';
   my $prefix = $cust_main->has_ship_address ? 'ship_' : '';
   foreach ( qw( contact company address1 address2 city state zip country fax) ){
     my $method = $prefix.$_;
     $invoice_data{"ship_$_"} = _latex_escape($cust_main->$method);
   }
+  $invoice_data{'ship_country'} = ''
+    if ( $invoice_data{'ship_country'} eq $countrydefault );
   
   $invoice_data{'cid'} = $params{'cid'}
     if $params{'cid'};
 
-  my $countrydefault = $conf->config('countrydefault') || 'US';
   if ( $cust_main->country eq $countrydefault ) {
     $invoice_data{'country'} = '';
   } else {
index e2f1664..0e7021e 100644 (file)
                 )
         %>
       </td>
+      <%= $ship_enable ? ('<td align="left">'.
+                          join('<BR>',grep length($_), '<b>Service Address</b>',
+                                                       $ship_company,
+                                                       $ship_address1,
+                                                       $ship_address2,
+                                                       "$ship_city,&nbsp;$ship_state&nbsp;$ship_zip",
+                                                       $ship_country,
+                                                       ' ',
+                                                       ' ',
+                              ).
+                           ($agent_custid ? "<b>ID:</b> $agent_custid<BR>" : '').
+                           ($ship_fax ? "<b>Fax:</b> $ship_fax<BR>" : '').
+                           '</td><tr><td></td><td></td>'
+                         )
+                       : ''
+      %>
       <td align="right">
         Terms: <%= $terms %><BR>
         <%= $po_line %>
index 693d66e..6bfc41d 100644 (file)
 \hfill\r
 \makebox{\r
 \begin{minipage}[t]{6.4cm}\r
-\begin{flushright}\r
 [@--\r
   if ($ship_enable) {\r
     $OUT .= '\textbf{Service Address}\\\\';\r
     $OUT .= '';\r
   }\r
 --@]\r
+\begin{flushright}\r
 Terms: [@-- $terms --@]\\\r
 [@-- $po_line --@]\\\r
 \end{flushright}\r