X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pay.pm;h=ba9924f9926cc285d2de9bdc1be63920a069425b;hb=f1e474e3ea4c658b9a1f84af108f09a65886055c;hp=55f2fc4a3452ba7475f20934c7497756e59cd82a;hpb=0ebeec96313dd7edfca340f01f8fbbbac1f4aa1d;p=freeside.git diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index 55f2fc4a3..ba9924f99 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -354,8 +354,7 @@ sub check { return $error if $error; } - ''; #no error - + $self->SUPER::check; } =item cust_bill_pay @@ -386,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.24 2003-05-19 12:00:44 ivan 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