[freeside-commits] branch FREESIDE_3_BRANCH updated. 8c865c1e8ab994e14ee81b11b0544f2a280d2d07

Ivan ivan at 420.am
Sun Mar 27 01:19:45 PDT 2016


The branch, FREESIDE_3_BRANCH has been updated
       via  8c865c1e8ab994e14ee81b11b0544f2a280d2d07 (commit)
      from  6b4bd778163bbb938c72a1e9ad3e3f127a519d27 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8c865c1e8ab994e14ee81b11b0544f2a280d2d07
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Mar 27 01:19:44 2016 -0700

    freeside inc. web services for address normalizaion and printing, RT#33849

diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 16cf757..aee7410 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -1555,8 +1555,8 @@ and customer address. Include units.',
 
   {
     'key'         => 'invoice_latexverticalreturnaddress',
-    'section'     => 'invoicing',
-    'description' => 'Place the return address under the company logo rather than beside it.',
+    'section'     => 'deprecated',
+    'description' => 'Deprecated.  With old invoice_latex template, places the return address under the company logo rather than beside it.',
     'type'        => 'checkbox',
     'per_agent'   => 1,
   },
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 775cc3d..04ea1eb 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -1666,6 +1666,13 @@ sub print_generic {
 
   } else { # this is where we actually create the invoice
 
+    if ( $params{no_addresses} ) {
+      delete $invoice_data{$_} foreach qw(
+        payname company address1 address2 city state zip country
+      );
+      $invoice_data{returnaddress} = '~';
+    }
+
     warn "filling in template for invoice ". $self->invnum. "\n"
       if $DEBUG;
     warn join("\n", map " $_ => ". $invoice_data{$_}, keys %invoice_data). "\n"
@@ -2383,7 +2390,7 @@ sub postal_mail_fsinc {
     die "Unparsable company_address; contact support\@freeside.biz\n";
   }
 
-  my $file = $self->print_pdf(%opt);
+  my $file = $self->print_pdf(%opt, 'no_addresses' => 1);
   my $pages = CAM::PDF->new($file)->numPages;
 
   my $ua = LWP::UserAgent->new( 'ssl_opts' => { 'verify_hostname'=>0 });
diff --git a/conf/invoice_html b/conf/invoice_html
index e1af707..9d6f528 100644
--- a/conf/invoice_html
+++ b/conf/invoice_html
@@ -51,8 +51,8 @@
 
   <table class="invoice_header" width="100%">
     <tr>
-     <td><img src="<%= $cid ? "cid:$cid" : "cust_bill-logo.cgi?invnum=$invnum;template=$template" %>"></td>
      <td align="left"><%= $returnaddress %></td>
+     <td align="left"><img src="<%= $cid ? "cid:$cid" : "cust_bill-logo.cgi?invnum=$invnum;template=$template" %>"></td>
       <td align="right">
         <table CLASS="invoice_headerright" cellspacing=0>
           <tr>
@@ -83,9 +83,11 @@
         </table>
       </td>
     </tr>
+  </table>
 
+  <table class="invoice_header" width="100%">
     <tr>
-      <td>
+      <td WIDTH="10%">
       </td>
       <td align="left">
         <b><%= $payname %></b><BR>
diff --git a/conf/invoice_latex b/conf/invoice_latex
index ceff84b..b64cc69 100644
--- a/conf/invoice_latex
+++ b/conf/invoice_latex
@@ -39,7 +39,7 @@
 
 \addtolength{\voffset}{-0.0cm}		% top margin to top of header
 \addtolength{\hoffset}{-0.6cm}		% left margin on page
-\addtolength{\topmargin}{[@-- defined($topmargin) ? $topmargin : '-1.25cm' --@]}
+\addtolength{\topmargin}{[@-- defined($topmargin) ? $topmargin : '-1.00cm' --@]}
 \setlength{\headheight}{2.0cm} 		% height of header
 \setlength{\headsep}{[@-- defined($headsep) ? $headsep : '1.0cm' --@]}
 \setlength{\footskip}{1.0cm}		% bottom of footer from bottom of text
@@ -124,10 +124,10 @@
     \returninset
     \makebox{
       \begin{tabular}{ll}
-        \includegraphics{[@-- $logo_file --@]} & [@-- $verticalreturnaddress ? '\\\\' : '' --@]
         \begin{minipage}[b]{5.5cm}
 [@-- $returnaddress --@]
-        \end{minipage}\\
+        \end{minipage} &
+        \includegraphics{[@-- $logo_file --@]}\\
       \end{tabular}
     }
   }

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Conf.pm           |    4 ++--
 FS/FS/Template_Mixin.pm |    9 ++++++++-
 conf/invoice_html       |    6 ++++--
 conf/invoice_latex      |    6 +++---
 4 files changed, 17 insertions(+), 8 deletions(-)




More information about the freeside-commits mailing list