1 package FS::part_event::Action::writeoff;
4 use base qw( FS::part_event::Action );
6 sub description { 'Write off bad debt with a credit entry.'; }
10 #'charge' => { label=>'Amount', type=>'money', }, # size=>7, },
11 'reasonnum' => { 'label' => 'Reason',
12 'type' => 'select-reason',
13 'reason_class' => 'R',
18 sub default_weight { 65; }
21 my( $self, $cust_object ) = @_;
23 my $cust_main = $self->cust_main($cust_object);
25 my $reasonnum = $self->option('reasonnum');
27 my $error = $cust_main->credit( $cust_main->balance, \$reasonnum );