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 sub eventtable_hashref {
17 'ftpformat' => { label => 'Format',
19 options => [ spool_formats() ],
21 'ftpserver' => 'FTP server',
22 'ftpusername' => 'FTP username',
23 'ftppassword' => 'FTP password',
24 'ftpdir' => 'FTP directory',
28 sub default_weight { 50; }
31 my( $self, $cust_bill ) = @_;
33 #my $cust_main = $self->cust_main($cust_bill);
34 my $cust_main = $cust_bill->cust_main;
38 'server' => $self->option('ftpserver'),
39 'username' => $self->option('ftpusername'),
40 'password' => $self->option('ftppassword'),
41 'dir' => $self->option('ftpdir'),
42 'format' => $self->option('ftpformat'),