Emailing statements of accounts, RT#4860
[freeside.git] / FS / FS / part_event / Action / cust_statement.pm
1 package FS::part_event::Action::cust_statement;
2
3 use strict;
4
5 use base qw( FS::part_event::Action );
6
7 use FS::cust_statement;
8
9 sub description {
10   'Group invoices into an informational statement.';
11 }
12
13 sub eventtable_hashref {
14     { 'cust_main' => 1, };
15     { 'cust_pkg'  => 1, };
16 }
17
18 sub default_weight {
19   90;
20 }
21
22 sub do_action {
23   my( $self, $cust_main ) = @_;
24
25   #my( $self, $object ) = @_;
26   #my $cust_main = $self->cust_main($object);
27
28   my $cust_statement = new FS::cust_statement {
29     'custnum' => $cust_main->custnum
30   };
31   my $error = $cust_statement->insert;
32   die $error if $error;
33
34   '';
35
36 }
37
38 1;