event refactor, landing on HEAD!
[freeside.git] / FS / FS / part_event / Action / collect.pm
1 package FS::part_event::Action::collect;
2
3 use strict;
4 use base qw( FS::part_event::Action );
5
6 sub description {
7   #'Collect on invoices (normally only used with a <i>Late Fee</i> and <i>Generate Invoice</i> events)';
8   'Collect on invoices (normally only used with a Late Fee and Generate Invoice events)';
9 }
10
11 sub deprecated {
12   1;
13 }
14
15 sub default_weight {
16   80;
17 }
18
19 sub do_action {
20   my( $self, $cust_object ) = @_;
21
22   my $cust_main = $self->cust_main($cust_object);
23
24   my $error = $cust_main->collect;
25   die $error if $error;
26
27   '';
28 }
29
30 1;