fix compilation error fallout from including FS::Misc in FS::Conf, RT#17620
authorIvan Kohler <ivan@freeside.biz>
Tue, 19 Jun 2012 04:40:27 +0000 (21:40 -0700)
committerIvan Kohler <ivan@freeside.biz>
Tue, 19 Jun 2012 04:40:27 +0000 (21:40 -0700)
FS/FS/Conf.pm
FS/FS/Misc/Invoicing.pm [new file with mode: 0644]
FS/FS/cust_bill.pm
FS/FS/part_event/Action/cust_bill_send_csv_ftp.pm
FS/FS/part_event/Action/cust_bill_spool_csv.pm

index 0314992..9cfea20 100644 (file)
@@ -13,7 +13,7 @@ use FS::payby;
 use FS::conf;
 use FS::Record qw(qsearch qsearchs);
 use FS::UID qw(dbh datasrc use_confcompat);
-use FS::Misc;
+use FS::Misc::Invoicing qw( spool_formats );
 use FS::Misc::Geo;
 
 $base_dir = '%%%FREESIDE_CONF%%%';
@@ -3042,7 +3042,7 @@ and customer address. Include units.',
     'section'     => 'invoicing',
     'description' => 'Enable FTP of raw invoice data - format.',
     'type'        => 'select',
-    'options'     => [ FS::Misc::spool_formats() ],
+    'options'     => [ spool_formats() ],
   },
 
   {
@@ -3078,7 +3078,7 @@ and customer address. Include units.',
     'section'     => 'invoicing',
     'description' => 'Enable spooling of raw invoice data - format.',
     'type'        => 'select',
-    'options'     => [ FS::Misc::spool_formats() ],
+    'options'     => [ spool_formats() ],
   },
 
   {
diff --git a/FS/FS/Misc/Invoicing.pm b/FS/FS/Misc/Invoicing.pm
new file mode 100644 (file)
index 0000000..2fc52a9
--- /dev/null
@@ -0,0 +1,26 @@
+package FS::Misc::Invoicing;
+use base qw( Exporter );
+
+use vars qw( @EXPORT_OK );
+@EXPORT_OK = qw( spool_formats );
+
+=head1 NAME
+
+FS::Misc::Invoicing - Invoice subroutines
+
+=head1 SYNOPSIS
+
+use FS::Misc::Invoicing qw( spool_formats );
+
+=item spool_formats
+  
+Returns a list of the invoice spool formats.
+
+=cut
+
+sub spool_formats {
+  qw(default oneline billco bridgestone)
+}
+
+1;
+
index d94ab20..35ab9f3 100644 (file)
@@ -1753,7 +1753,7 @@ Options are:
 
 =over 4
 
-=item format - any of FS::Misc::spool_formats
+=item format - any of FS::Misc::::Invoicing::spool_formats
 
 =item dest - if set (to POST, EMAIL or FAX), only sends spools invoices if the
 customer has the corresponding invoice destinations set (see
index 8d2e36c..56ba680 100644 (file)
@@ -2,7 +2,7 @@ package FS::part_event::Action::cust_bill_send_csv_ftp;
 
 use strict;
 use base qw( FS::part_event::Action );
-use FS::Misc;
+use FS::Misc::Invoicing qw( spool_formats );
 
 sub description { 'Upload CSV invoice data to an FTP server'; }
 
@@ -16,7 +16,7 @@ sub option_fields {
   (
     'ftpformat'   => { label   => 'Format',
                        type    =>'select',
-                       options => [ FS::Misc::spool_formats() ],
+                       options => [ spool_formats() ],
                      },
     'ftpserver'   => 'FTP server',
     'ftpusername' => 'FTP username',
index 24c26ff..14349a9 100644 (file)
@@ -2,7 +2,7 @@ package FS::part_event::Action::cust_bill_spool_csv;
 
 use strict;
 use base qw( FS::part_event::Action );
-use FS::Misc;
+use FS::Misc::Invoicing qw( spool_formats );
 
 sub description { 'Spool CSV invoice data'; }
 
@@ -16,7 +16,7 @@ sub option_fields {
   (
     'spoolformat'       => { label   => 'Format',
                              type    => 'select',
-                             options => [ FS::Misc::spool_formats() ],
+                             options => [ spool_formats() ],
                            },
     'spoolbalanceover'  => { label =>
                                'If balance (this invoice and previous) over',