diff options
Diffstat (limited to 'FS/FS/part_event/Action/Mixin/credit_flat.pm')
-rw-r--r-- | FS/FS/part_event/Action/Mixin/credit_flat.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/FS/FS/part_event/Action/Mixin/credit_flat.pm b/FS/FS/part_event/Action/Mixin/credit_flat.pm new file mode 100644 index 0000000..374cf5d --- /dev/null +++ b/FS/FS/part_event/Action/Mixin/credit_flat.pm @@ -0,0 +1,25 @@ +package FS::part_event::Action::Mixin::credit_flat; + +# credit_flat: return a fixed amount for _calc_credit, specified in the +# options + +use strict; + +sub option_fields { + ( + 'reasonnum' => { 'label' => 'Credit reason', + 'type' => 'select-reason', + 'reason_class' => 'R', + }, + 'amount' => { 'label' => 'Credit amount', + 'type' => 'money', + }, + ); +} + +sub _calc_credit { + my $self = shift; + $self->option('amount'); +} + +1; |