X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_credit.pm;h=8ec255b95e77056540e9a7409382c7cc472e10a1;hp=90f9b59edf0661adc829b274839fe2e90a341697;hb=4a881cc149f6892da35f85b767a1e806f237a05f;hpb=f3212b82d6d54500bbe31c02c8ffa456f018a067 diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm index 90f9b59ed..8ec255b95 100644 --- a/FS/FS/cust_credit.pm +++ b/FS/FS/cust_credit.pm @@ -2,8 +2,10 @@ package FS::cust_credit; use strict; use vars qw( @ISA $conf $unsuspendauto ); +use Date::Format; use FS::UID qw( dbh getotaker ); use FS::Record qw( qsearch qsearchs ); +use FS::Misc qw(send_email); use FS::cust_main; use FS::cust_refund; use FS::cust_credit_bill; @@ -298,6 +300,18 @@ sub credited { sprintf( "%.2f", $amount ); } +=item cust_main + +Returns the customer (see L) for this credit. + +=cut + +sub cust_main { + my $self = shift; + qsearchs( 'cust_main', { 'custnum' => $self->custnum } ); +} + + =back =head1 BUGS