X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pay.pm;h=ba9924f9926cc285d2de9bdc1be63920a069425b;hb=b563ce9b834e4b8c3b2f0508f6c528d8b881e08d;hp=7be11535647e462240a6fd5259a5561f2a0b3f6f;hpb=58d44fbe5eb9ab32e6d87063a4a3b22ddba9a828;p=freeside.git diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index 7be115356..ba9924f99 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -385,15 +385,36 @@ sub unapplied { sprintf("%.2f", $amount ); } -=back +=item cust_main + +Returns the parent customer object (see L). + +=cut + +sub cust_main { + my $self = shift; + qsearchs( 'cust_main', { 'custnum' => $self->custnum } ); +} -=head1 VERSION +=item payinfo_masked -$Id: cust_pay.pm,v 1.25 2003-08-05 00:20:42 khoff Exp $ +Returns a "masked" payinfo field with all but the last four characters replaced +by 'x'es. Useful for displaying credit cards. + +=cut + +sub payinfo_masked { + my $self = shift; + my $payinfo = $self->payinfo; + 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4)); +} + +=back =head1 BUGS -Delete and replace methods. +Delete and replace methods. payinfo_masked false laziness with cust_main.pm +and cust_refund.pm =head1 SEE ALSO