projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add sales person event based on package amounts, RT#24086
[freeside.git]
/
FS
/
FS
/
part_event
/
Action
/
cust_bill_spool_csv.pm
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
11ecbc5
..
250c830
100644
(file)
--- a/
FS/FS/part_event/Action/cust_bill_spool_csv.pm
+++ b/
FS/FS/part_event/Action/cust_bill_spool_csv.pm
@@
-2,6
+2,7
@@
package FS::part_event::Action::cust_bill_spool_csv;
use strict;
use base qw( FS::part_event::Action );
use strict;
use base qw( FS::part_event::Action );
+use FS::Misc::Invoicing qw( spool_formats );
sub description { 'Spool CSV invoice data'; }
sub description { 'Spool CSV invoice data'; }
@@
-15,10
+16,7
@@
sub option_fields {
(
'spoolformat' => { label => 'Format',
type => 'select',
(
'spoolformat' => { label => 'Format',
type => 'select',
- options => ['default', 'billco'],
- option_labels => { 'default' => 'Default',
- 'billco' => 'Billco',
- },
+ options => [ spool_formats() ],
},
'spoolbalanceover' => { label =>
'If balance (this invoice and previous) over',
},
'spoolbalanceover' => { label =>
'If balance (this invoice and previous) over',
@@
-28,21
+26,30
@@
sub option_fields {
type => 'checkbox',
value => '1',
},
type => 'checkbox',
value => '1',
},
+ 'upload_targetnum' => { label => 'Upload spool to target',
+ type => 'select-table',
+ table => 'upload_target',
+ name_col => 'label',
+ empty_label => '(do not upload)',
+ order_by => 'targetnum',
+ },
);
}
sub default_weight { 50; }
sub do_action {
);
}
sub default_weight { 50; }
sub do_action {
- my( $self, $cust_bill ) = @_;
+ my( $self, $cust_bill
, $cust_event
) = @_;
#my $cust_main = $self->cust_main($cust_bill);
my $cust_main = $cust_bill->cust_main;
$cust_bill->spool_csv(
#my $cust_main = $self->cust_main($cust_bill);
my $cust_main = $cust_bill->cust_main;
$cust_bill->spool_csv(
+ 'time' => $cust_event->_date,
'format' => $self->option('spoolformat'),
'balanceover' => $self->option('spoolbalanceover'),
'agent_spools' => $self->option('spoolagent_spools'),
'format' => $self->option('spoolformat'),
'balanceover' => $self->option('spoolbalanceover'),
'agent_spools' => $self->option('spoolagent_spools'),
+ 'upload_targetnum'=> $self->option('upload_targetnum'),
);
}
);
}