summaryrefslogtreecommitdiff
path: root/FS/FS/part_event/Action/fee.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/part_event/Action/fee.pm')
-rw-r--r--FS/FS/part_event/Action/fee.pm33
1 files changed, 33 insertions, 0 deletions
diff --git a/FS/FS/part_event/Action/fee.pm b/FS/FS/part_event/Action/fee.pm
new file mode 100644
index 000000000..81a84498a
--- /dev/null
+++ b/FS/FS/part_event/Action/fee.pm
@@ -0,0 +1,33 @@
+package FS::part_event::Action::fee;
+
+use strict;
+use base qw( FS::part_event::Action );
+
+sub description {
+ 'Late fee (flat)';
+}
+
+sub option_fields {
+ (
+ 'charge' => { label=>'Amount', type=>'money', }, # size=>7, },
+ 'reason' => 'Reason',
+ );
+};
+
+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') );
+
+ die $error if $error;
+
+ '';
+}
+
+1;