374cf5d6bb3e101e2ae0a73698786acbf342a1f6
[freeside.git] / FS / FS / part_event / Action / Mixin / credit_flat.pm
1 package FS::part_event::Action::Mixin::credit_flat;
2
3 # credit_flat: return a fixed amount for _calc_credit, specified in the 
4 # options
5
6 use strict;
7
8 sub option_fields {
9   (
10     'reasonnum' => { 'label'        => 'Credit reason',
11                      'type'         => 'select-reason',
12                      'reason_class' => 'R',
13                    },
14     'amount'    => { 'label'        => 'Credit amount',
15                      'type'         => 'money',
16                    },
17   );
18 }
19
20 sub _calc_credit {
21   my $self = shift;
22   $self->option('amount');
23 }
24
25 1;