1 package FS::part_event::Action::cust_bill_send_csv_ftp;
4 use base qw( FS::part_event::Action );
5 use FS::Misc::Invoicing qw( spool_formats );
7 sub description { 'Upload CSV invoice data to an FTP server'; }
11 ## declaring that this action will send out an invoice
12 sub will_send_invoice { 1; }
14 sub eventtable_hashref {
20 'ftpformat' => { label => 'Format',
22 options => [ spool_formats() ],
24 'ftpserver' => 'FTP server',
25 'ftpusername' => 'FTP username',
26 'ftppassword' => 'FTP password',
27 'ftpdir' => 'FTP directory',
31 sub default_weight { 50; }
34 my( $self, $cust_bill ) = @_;
36 #my $cust_main = $self->cust_main($cust_bill);
37 my $cust_main = $cust_bill->cust_main;
41 'server' => $self->option('ftpserver'),
42 'username' => $self->option('ftpusername'),
43 'password' => $self->option('ftppassword'),
44 'dir' => $self->option('ftpdir'),
45 'format' => $self->option('ftpformat'),