X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pay_void.pm;h=86fbbe5abbe50dd3c8ab152318f9989e34a407c3;hb=1bfbab83c338f6a11ae26c4d197ad775c568ebde;hp=946d69fe1803ae109440b59d661a81e99e0d5931;hpb=0f37b9c32e41fd94a0d5ea2f895a737cf674f310;p=freeside.git diff --git a/FS/FS/cust_pay_void.pm b/FS/FS/cust_pay_void.pm index 946d69fe1..86fbbe5ab 100644 --- a/FS/FS/cust_pay_void.pm +++ b/FS/FS/cust_pay_void.pm @@ -1,6 +1,6 @@ package FS::cust_pay_void; use strict; -use vars qw( @ISA ); +use vars qw( @ISA @encrypted_fields ); use Business::CreditCard; use FS::UID qw(getotaker); use FS::Record qw(qsearchs dbh fields); # qsearch ); @@ -9,8 +9,11 @@ use FS::cust_pay; #use FS::cust_bill_pay; #use FS::cust_pay_refund; #use FS::cust_main; +use FS::cust_pkg; -@ISA = qw( FS::Record ); +@ISA = qw( FS::Record FS::payinfo_Mixin ); + +@encrypted_fields = ('payinfo'); =head1 NAME @@ -38,24 +41,44 @@ are currently supported: =over 4 -=item paynum - primary key (assigned automatically for new payments) +=item paynum + +primary key (assigned automatically for new payments) + +=item custnum + +customer (see L) + +=item paid -=item custnum - customer (see L) +Amount of this payment -=item paid - Amount of this payment +=item _date -=item _date - specified as a UNIX timestamp; see L. Also see +specified as a UNIX timestamp; see L. Also see L and L for conversion functions. -=item payby - `CARD' (credit cards), `CHEK' (electronic check/ACH), +=item payby + +`CARD' (credit cards), `CHEK' (electronic check/ACH), `LECB' (phone bill billing), `BILL' (billing), `CASH' (cash), `WEST' (Western Union), `MCRD' (Manual credit card), or `COMP' (free) -=item payinfo - card number, check #, or comp issuer (4-8 lowercase alphanumerics; think username), respectively +=item payinfo + +card number, check #, or comp issuer (4-8 lowercase alphanumerics; think username), respectively + +=item paybatch + +text field for tracking card processing -=item paybatch - text field for tracking card processing +=item closed -=item closed - books closed flag, empty or `Y' +books closed flag, empty or `Y' + +=item pkgnum + +Desired pkgnum when using experimental package balances. =item void_date @@ -154,6 +177,7 @@ sub check { || $self->ut_number('_date') || $self->ut_textn('paybatch') || $self->ut_enum('closed', [ '', 'Y' ]) + || $self->ut_foreign_keyn('pkgnum', 'cust_pkg', 'pkgnum') || $self->ut_numbern('void_date') || $self->ut_textn('reason') ; @@ -207,19 +231,6 @@ sub cust_main { qsearchs( 'cust_main', { 'custnum' => $self->custnum } ); } -=item payinfo_masked - -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