From 40d974d3ce9ac2ae6cbdd415ae00bfbf7b73beef Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Mon, 18 Jun 2012 21:40:27 -0700 Subject: [PATCH] fix compilation error fallout from including FS::Misc in FS::Conf, RT#17620 --- FS/FS/Conf.pm | 6 +++--- FS/FS/Misc/Invoicing.pm | 26 +++++++++++++++++++++++ FS/FS/cust_bill.pm | 2 +- FS/FS/part_event/Action/cust_bill_send_csv_ftp.pm | 4 ++-- FS/FS/part_event/Action/cust_bill_spool_csv.pm | 4 ++-- 5 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 FS/FS/Misc/Invoicing.pm diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 0314992d8..9cfea2087 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -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 index 000000000..2fc52a99b --- /dev/null +++ b/FS/FS/Misc/Invoicing.pm @@ -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; + diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index d94ab2094..35ab9f388 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -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 diff --git a/FS/FS/part_event/Action/cust_bill_send_csv_ftp.pm b/FS/FS/part_event/Action/cust_bill_send_csv_ftp.pm index 8d2e36cd1..56ba680e1 100644 --- a/FS/FS/part_event/Action/cust_bill_send_csv_ftp.pm +++ b/FS/FS/part_event/Action/cust_bill_send_csv_ftp.pm @@ -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', diff --git a/FS/FS/part_event/Action/cust_bill_spool_csv.pm b/FS/FS/part_event/Action/cust_bill_spool_csv.pm index 24c26ff6a..14349a9dd 100644 --- a/FS/FS/part_event/Action/cust_bill_spool_csv.pm +++ b/FS/FS/part_event/Action/cust_bill_spool_csv.pm @@ -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', -- 2.11.0