Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / FS / FS / part_event / Action / cust_bill_print_pdf.pm
1 package FS::part_event::Action::cust_bill_print_pdf;
2
3 use strict;
4 use base qw( FS::part_event::Action );
5
6 sub description { 'Send invoice (spool PDF only)'; }
7
8 sub eventtable_hashref {
9   { 'cust_bill' => 1 };
10 }
11
12 sub default_weight { 51; }
13
14 sub do_action {
15   my( $self, $cust_bill ) = @_;
16
17   #my $cust_main = $self->cust_main($cust_bill);
18   #my $cust_main = $cust_bill->cust_main;
19
20   my $opt = { $self->options };
21   $opt->{'notice_name'} ||= 'Invoice';
22
23   $cust_bill->batch_invoice($opt);
24 }
25
26 1;