X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FAction%2Ffee.pm;h=7d07df5c7f31fbc38a82084a5de74577d012ee9a;hb=cb57a42a578be11b85959c295828c995ad97f143;hp=81a84498a147eb41e4bf2fd1ffc8a6d2e6d6e9dd;hpb=c648976f0b7975f2328ebd7ba8c711fad0ca4195;p=freeside.git diff --git a/FS/FS/part_event/Action/fee.pm b/FS/FS/part_event/Action/fee.pm index 81a84498a..7d07df5c7 100644 --- a/FS/FS/part_event/Action/fee.pm +++ b/FS/FS/part_event/Action/fee.pm @@ -3,27 +3,29 @@ package FS::part_event::Action::fee; use strict; use base qw( FS::part_event::Action ); -sub description { - 'Late fee (flat)'; -} +sub description { 'Late fee (flat)'; } sub option_fields { ( - 'charge' => { label=>'Amount', type=>'money', }, # size=>7, }, - 'reason' => 'Reason', + 'charge' => { label=>'Amount', type=>'money', }, # size=>7, }, + 'reason' => 'Reason', + 'taxclass' => { label=>'Tax class', type=>'select-taxclass', }, ); -}; - -sub default_weight { - 10; } +sub default_weight { 10; } + sub do_action { my( $self, $cust_object ) = @_; my $cust_main = $self->cust_main($cust_object); - my $error = $cust_main->charge( $self->option('charge'), $self->option('reason') ); + my $error = $cust_main->charge( { + 'amount' => $self->option('charge'), + 'pkg' => $self->option('reason'), + 'taxclass' => $self->option('taxclass') + #'start_date' => $cust_main->next_bill_date, #unless its more than N months away? + } ); die $error if $error;