RT#38217 Send email when logging conditions are met [default template & dump-email_to...
[freeside.git] / FS / FS / part_event / Action / cust_bill_fee.pm
1 package FS::part_event::Action::cust_bill_fee;
2
3 use strict;
4 use base qw( FS::part_event::Action::Mixin::fee );
5
6 sub description { 'Charge a fee based on this invoice'; }
7
8 sub eventtable_hashref {
9     { 'cust_bill' => 1 };
10 }
11
12 sub option_fields {
13   (
14     __PACKAGE__->SUPER::option_fields,
15     'nextbill'  => { label    => 'Hold fee until the customer\'s next bill',
16                      type     => 'checkbox',
17                      value    => 'Y'
18                    },
19   )
20 }
21
22 # it makes sense for this to be optional for previous-invoice fees
23 sub hold_until_bill {
24   my $self = shift;
25   $self->option('nextbill');
26 }
27
28 1;