1 package FS::part_event::Action::cust_bill_fee_percent;
4 use base qw( FS::part_event::Action );
6 sub description { 'Late fee (percentage of invoice)'; }
8 sub eventtable_hashref {
14 'percent' => { label=>'Percent', size=>2, },
19 sub default_weight { 10; }
22 my( $self, $cust_bill ) = @_;
24 #my $cust_main = $self->cust_main($cust_bill);
25 my $cust_main = $cust_bill->cust_main;
27 my $error = $cust_main->charge(
28 sprintf('%.2f', $cust_bill->owed * $self->option('percent') / 100 ),
29 $self->option('reason')