projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add tax class selection back for late charges w/1.9 events, RT#5665
[freeside.git]
/
FS
/
FS
/
part_event
/
Action
/
fee.pm
diff --git
a/FS/FS/part_event/Action/fee.pm
b/FS/FS/part_event/Action/fee.pm
index
81a8449
..
7d07df5
100644
(file)
--- 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 );
use strict;
use base qw( FS::part_event::Action );
-sub description {
- 'Late fee (flat)';
-}
+sub description { 'Late fee (flat)'; }
sub option_fields {
(
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);
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;
die $error if $error;