[freeside-commits] freeside/FS/FS Conf.pm, 1.229, 1.230 Conf_compat17.pm, 1.3, 1.4 cust_bill.pm, 1.204, 1.205

Jeff Finucane,420,, jeff at wavetail.420.am
Mon Jun 2 04:16:11 PDT 2008


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv1084/FS/FS

Modified Files:
	Conf.pm Conf_compat17.pm cust_bill.pm 
Log Message:
typeset tear-off remittance coupon

Index: Conf_compat17.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf_compat17.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Conf_compat17.pm	14 May 2008 21:23:00 -0000	1.3
+++ Conf_compat17.pm	2 Jun 2008 11:16:09 -0000	1.4
@@ -693,6 +693,13 @@
   },
 
   {
+    'key'         => 'invoice_latexcoupon',
+    'section'     => 'billing',
+    'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.',
+    'type'        => 'textarea',
+  },
+
+  {
     'key'         => 'invoice_latexreturnaddress',
     'section'     => 'billing',
     'description' => 'Return address for LaTeX typeset PostScript invoices.',

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.229
retrieving revision 1.230
diff -u -d -r1.229 -r1.230
--- Conf.pm	19 May 2008 18:50:59 -0000	1.229
+++ Conf.pm	2 Jun 2008 11:16:09 -0000	1.230
@@ -533,21 +533,7 @@
                    invoice_latexfooter
                    invoice_latexsmallfooter
                    invoice_latexnotes
-                   invoice_html
-                   invoice_htmlreturnaddress
-                   invoice_htmlfooter
-                   invoice_htmlnotes
-                   logo.png
-                   logo.eps
-                 );
-
- at base_items = qw (
-                   invoice_template
-                   invoice_latex
-                   invoice_latexreturnaddress
-                   invoice_latexfooter
-                   invoice_latexsmallfooter
-                   invoice_latexnotes
+                   invoice_latexcoupon
                    invoice_html
                    invoice_htmlreturnaddress
                    invoice_htmlfooter
@@ -830,6 +816,13 @@
   },
 
   {
+    'key'         => 'invoice_latexcoupon',
+    'section'     => 'billing',
+    'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.',
+    'type'        => 'textarea',
+  },
+
+  {
     'key'         => 'invoice_latexreturnaddress',
     'section'     => 'billing',
     'description' => 'Return address for LaTeX typeset PostScript invoices.',

Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.204
retrieving revision 1.205
diff -u -d -r1.204 -r1.205
--- cust_bill.pm	2 Jun 2008 02:16:13 -0000	1.204
+++ cust_bill.pm	2 Jun 2008 11:16:09 -0000	1.205
@@ -1671,6 +1671,7 @@
                  'footer'        => sub { map "$_", @_ },
                  'smallfooter'   => sub { map "$_", @_ },
                  'returnaddress' => sub { map "$_", @_ },
+                 'coupon'        => sub { map "$_", @_ },
                },
     'html'  => {
                  'notes' =>
@@ -1702,6 +1703,7 @@
                        $_;
                      }  @_
                    },
+                 'coupon'        => sub { "" },
                },
     'template' => {
                  'notes' =>
@@ -1731,6 +1733,7 @@
                        $_;
                      }  @_
                    },
+                 'coupon'        => sub { "" },
                },
   );
 
@@ -1872,8 +1875,17 @@
   push @address, ''
     while (scalar(@address) < 5);
 
+  $invoice_data{'logo_file'} = $params{'logo_file'}
+    if $params{'logo_file'};
+
+  my( $pr_total, @pr_cust_bill ) = $self->previous; #previous balance
+#  my( $cr_total, @cr_cust_credit ) = $self->cust_credit; #credits
+  #my $balance_due = $self->owed + $pr_total - $cr_total;
+  my $balance_due = $self->owed + $pr_total;
+  $invoice_data{'balance'} = $balance_due;
+
   #do variable substitution in notes, footer, smallfooter
-  foreach my $include (qw( notes footer smallfooter )) {
+  foreach my $include (qw( notes footer smallfooter coupon )) {
 
     my $inc_file = $conf->key_orbase("invoice_${format}$include", $template);
     my @inc_src;
@@ -1919,11 +1931,6 @@
       ? &$escape_function("Purchase Order #". $cust_main->payinfo)
       : $nbsp;
 
-  my( $pr_total, @pr_cust_bill ) = $self->previous; #previous balance
-#  my( $cr_total, @cr_cust_credit ) = $self->cust_credit; #credits
-  #my $balance_due = $self->owed + $pr_total - $cr_total;
-  my $balance_due = $self->owed + $pr_total;
-
   my %money_chars = ( 'latex'    => '',
                       'html'     => $conf->config('money_char') || '$',
                       'template' => '',
@@ -2233,9 +2240,6 @@
     }
   }
 
-  $invoice_data{'logo_file'} = $params{'logo_file'}
-    if $params{'logo_file'};
-
   $invoice_lines = 0;
   my $wasfunc = 0;
   foreach ( grep /invoice_lines\(\d*\)/, @invoice_template ) { #kludgy



More information about the freeside-commits mailing list