[freeside-commits] freeside/FS/FS Conf.pm, 1.180.2.26, 1.180.2.27 cust_bill.pm, 1.163.2.29, 1.163.2.30

Jeff Finucane,420,, jeff at wavetail.420.am
Wed Jun 4 06:27:45 PDT 2008


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

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	Conf.pm cust_bill.pm 
Log Message:
service address on invoice

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.180.2.26
retrieving revision 1.180.2.27
diff -u -d -r1.180.2.26 -r1.180.2.27
--- Conf.pm	2 Jun 2008 11:17:19 -0000	1.180.2.26
+++ Conf.pm	4 Jun 2008 13:27:40 -0000	1.180.2.27
@@ -1952,6 +1952,13 @@
   },
 
   {
+    'key'         => 'invoice-ship_address',
+    'section'     => 'billing',
+    'description' => 'Enable this switch to include the ship address on the invoice.',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'batch-enable',
     'section'     => 'billing',
     'description' => 'Enable credit card and/or ACH batching - leave disabled for real-time installations.',

Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.163.2.29
retrieving revision 1.163.2.30
diff -u -d -r1.163.2.29 -r1.163.2.30
--- cust_bill.pm	3 Jun 2008 21:06:32 -0000	1.163.2.29
+++ cust_bill.pm	4 Jun 2008 13:27:43 -0000	1.163.2.30
@@ -1796,6 +1796,7 @@
     'date'         => time2str('%b %o, %Y', $self->_date),
     'today'        => time2str('%b %o, %Y', $today),
     'agent'        => _latex_escape($cust_main->agent->agent),
+    'agent_custid' => _latex_escape($cust_main->agent_custid),
     'payname'      => _latex_escape($cust_main->payname),
     'company'      => _latex_escape($cust_main->company),
     'address1'     => _latex_escape($cust_main->address1),
@@ -1812,8 +1813,15 @@
     #'notes'        => join("\n", $conf->config('invoice_latexnotes') ),
     'conf_dir'     => "$FS::UID::conf_dir/conf.$FS::UID::datasrc",
     'balance'      => $balance_due,
+    'ship_enable'  => $conf->exists('invoice-ship_address'),
   );
 
+  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);
+  }
+
   my $countrydefault = $conf->config('countrydefault') || 'US';
   if ( $cust_main->country eq $countrydefault ) {
     $invoice_data{'country'} = '';
@@ -2173,6 +2181,7 @@
     'date'         => time2str('%b %o, %Y', $self->_date),
     'today'        => time2str('%b %o, %Y', $today),
     'agent'        => encode_entities($cust_main->agent->agent),
+    'agent_custid' => encode_entities($cust_main->agent_custid),
     'payname'      => encode_entities($cust_main->payname),
     'company'      => encode_entities($cust_main->company),
     'address1'     => encode_entities($cust_main->address1),
@@ -2184,9 +2193,16 @@
                       || 'Payable upon receipt',
     'cid'          => $cid,
     'template'     => $template,
+    'ship_enable'  => $conf->exists('invoice-ship_address'),
 #    'conf_dir'     => "$FS::UID::conf_dir/conf.$FS::UID::datasrc",
   );
 
+  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_$_"} = encode_entities($cust_main->$method);
+  }
+
   if (
          defined( $conf->config_orbase('invoice_htmlreturnaddress', $template) )
       && length(  $conf->config_orbase('invoice_htmlreturnaddress', $template) )



More information about the freeside-commits mailing list