1 package FS::part_event::Action::cust_bill_spool_csv;
4 use base qw( FS::part_event::Action );
6 sub description { 'Spool CSV invoice data'; }
10 sub eventtable_hashref {
16 'spoolformat' => { label => 'Format',
18 options => ['default', 'billco'],
19 option_labels => { 'default' => 'Default',
23 'spooldest' => { label => 'For destination',
25 options => [ '', qw( POST EMAIL FAX ) ],
26 option_labels => { '' => '(all)',
27 'POST' => 'Postal Mail',
32 'spoolbalanceover' => { label =>
33 'If balance (this invoice and previous) over',
36 'spoolagent_spools' => { label => 'Individual per-agent spools',
43 sub default_weight { 50; }
46 my( $self, $cust_bill ) = @_;
48 #my $cust_main = $self->cust_main($cust_bill);
49 my $cust_main = $cust_bill->cust_main;
51 $cust_bill->spool_csv(
52 'format' => $self->option('spoolformat'),
53 'dest' => $self->option('spooldest'),
54 'balanceover' => $self->option('spoolbalanceover'),
55 'agent_spools' => $self->option('spoolagent_spools'),