[freeside-commits] freeside/FS/FS cust_bill.pm, 1.163.2.36, 1.163.2.37 Conf.pm, 1.180.2.31, 1.180.2.32

Ivan,,, ivan at wavetail.420.am
Wed Sep 10 01:33:12 PDT 2008


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

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	cust_bill.pm Conf.pm 
Log Message:
add re-FTP reprint, RT#create-me-tommorow-for-enet

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.180.2.31
retrieving revision 1.180.2.32
diff -u -d -r1.180.2.31 -r1.180.2.32
--- Conf.pm	14 Aug 2008 01:58:42 -0000	1.180.2.31
+++ Conf.pm	10 Sep 2008 08:33:08 -0000	1.180.2.32
@@ -1841,12 +1841,48 @@
 
   {
     'key'         => 'hylafax',
-    'section'     => '',
+    'section'     => 'billing',
     'description' => 'Options for a HylaFAX server to enable the FAX invoice destination.  They should be in the form of a space separated list of arguments to the Fax::Hylafax::Client::sendfax subroutine.  You probably shouldn\'t override things like \'docfile\'.  *Note* Only supported when using typeset invoices (see the invoice_latex configuration option).',
     'type'        => [qw( checkbox textarea )],
   },
 
   {
+    'key'         => 'cust_bill-ftpformat',
+    'section'     => 'billing',
+    'description' => 'Enable FTP of raw invoice data - format.',
+    'type'        => 'select',
+    'select_enum' => [ '', 'default', 'billco', ],
+  },
+
+  {
+    'key'         => 'cust_bill-ftpserver',
+    'section'     => 'billing',
+    'description' => 'Enable FTP of raw invoice data - server.',
+    'type'        => 'text',
+  },
+
+  {
+    'key'         => 'cust_bill-ftpusername',
+    'section'     => 'billing',
+    'description' => 'Enable FTP of raw invoice data - server.',
+    'type'        => 'text',
+  },
+
+  {
+    'key'         => 'cust_bill-ftppassword',
+    'section'     => 'billing',
+    'description' => 'Enable FTP of raw invoice data - server.',
+    'type'        => 'text',
+  },
+
+  {
+    'key'         => 'cust_bill-ftpdir',
+    'section'     => 'billing',
+    'description' => 'Enable FTP of raw invoice data - server.',
+    'type'        => 'text',
+  },
+
+  {
     'key'         => 'svc_acct-usage_suspend',
     'section'     => 'billing',
     'description' => 'Suspends the package an account belongs to when svc_acct.seconds or a bytecount is decremented to 0 or below (accounts with an empty seconds and up|down|totalbytes value are ignored).  Typically used in conjunction with prepaid packages and freeside-sqlradius-radacctd.',

Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.163.2.36
retrieving revision 1.163.2.37
diff -u -d -r1.163.2.36 -r1.163.2.37
--- cust_bill.pm	10 Jul 2008 03:22:08 -0000	1.163.2.36
+++ cust_bill.pm	10 Sep 2008 08:33:08 -0000	1.163.2.37
@@ -913,6 +913,28 @@
 
 }
 
+=item ftp_invoice [ TEMPLATENAME ] 
+
+Sends this invoice data via FTP.
+
+TEMPLATENAME is unused?
+
+=cut
+
+sub ftp_invoice {
+  my $self = shift;
+  my $template = scalar(@_) ? shift : '';
+
+  $self->send_csv(
+    'protocol'   => 'ftp',
+    'server'     => $conf->config('cust_bill-ftpserver'),
+    'username'   => $conf->config('cust_bill-ftpusername'),
+    'password'   => $conf->config('cust_bill-ftppassword'),
+    'dir'        => $conf->config('cust_bill-ftpdir'),
+    'format'     => $conf->config('cust_bill-ftpformat'),
+  );
+}
+
 =item send_if_newest [ TEMPLATENAME [ , AGENTNUM [ , INVOICE_FROM ] ] ]
 
 Like B<send>, but only sends the invoice if it is the newest open invoice for
@@ -2670,6 +2692,14 @@
   process_re_X('fax', @_);
 }
 
+=item reftp
+
+=cut
+
+sub process_reftp {
+  process_re_X('ftp', @_);
+}
+
 use Storable qw(thaw);
 use Data::Dumper;
 use MIME::Base64;
@@ -2713,6 +2743,8 @@
     'debug' => 1,
   } );
 
+  $method .= '_invoice' unless $method eq 'email' || $method eq 'print';
+
   warn " $me re_X $method: ". scalar(@cust_bill). " invoices found\n"
     if $DEBUG;
 



More information about the freeside-commits mailing list