X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_event.pm;h=f631987aac9981362c7832a7725d1a66e7b814a4;hb=5939c0f1ae7bea08adde82f6d3578e6c5ac31248;hp=146a30e024ff32f92c80a224e53c1108be86eae0;hpb=e78d63847de9fbcb78d22188a25b77b7678f1cee;p=freeside.git diff --git a/FS/FS/cust_bill_event.pm b/FS/FS/cust_bill_event.pm index 146a30e02..f631987aa 100644 --- a/FS/FS/cust_bill_event.pm +++ b/FS/FS/cust_bill_event.pm @@ -132,6 +132,32 @@ sub part_bill_event { qsearchs( 'part_bill_event', { 'eventpart' => $self->eventpart } ); } +=item cust_bill + +Returns the invoice (see L) for this completed invoice event. + +=cut + +sub cust_bill { + my $self = shift; + qsearchs( 'cust_bill', { 'invnum' => $self->invnum } ); +} + +=item retry + +Changes the status of this event from B to B, allowing it to be +retried. + +=cut + +sub retry { + my $self = shift; + return '' unless $self->status eq 'done'; + my $old = ref($self)->new( { $self->hash } ); + $self->status('failed'); + $self->replace($old); +} + =back =head1 BUGS