X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pay.pm;h=e1e6df2a266a5d4912a48a3ab102ebb5e6aa7035;hb=07560581aedba753147fcb3f6a5e7c30bdc2f77f;hp=201b427aa2fd4a8d8b5dc77366d67ea8b3cd3b76;hpb=961ed0b05abcd9c9180d4c91ef4dd75cca4e3eb2;p=freeside.git diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index 201b427aa..e1e6df2a2 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -17,6 +17,7 @@ use FS::cust_bill; use FS::cust_bill_pay; use FS::cust_pay_refund; use FS::cust_main; +use FS::cust_pkg; use FS::cust_pay_void; @ISA = qw( FS::payinfo_transaction_Mixin FS::cust_main_Mixin FS::Record ); @@ -62,28 +63,54 @@ currently supported: =over 4 -=item paynum - primary key (assigned automatically for new payments) +=item paynum -=item custnum - customer (see L) +primary key (assigned automatically for new payments) -=item _date - specified as a UNIX timestamp; see L. Also see +=item custnum + +customer (see L) + +=item _date + +specified as a UNIX timestamp; see L. Also see L and L for conversion functions. -=item paid - Amount of this payment +=item paid + +Amount of this payment + +=item otaker + +order taker (assigned automatically, see L) + +=item payby + +Payment Type (See L for valid payby values) + +=item payinfo + +Payment Information (See L for data format) + +=item paymask + +Masked payinfo (See L for how this works) + +=item paybatch -=item otaker - order taker (assigned automatically, see L) +text field for tracking card processing or other batch grouping -=item payby - Payment Type (See L for valid payby values) +=item payunique -=item payinfo - Payment Information (See L for data format) +Optional unique identifer to prevent duplicate transactions. -=item paymask - Masked payinfo (See L for how this works) +=item closed -=item paybatch - text field for tracking card processing or other batch grouping +books closed flag, empty or `Y' -=item payunique - Optional unique identifer to prevent duplicate transactions. +=item pkgnum -=item closed - books closed flag, empty or `Y' +Desired pkgnum when using experimental package balances. =back @@ -345,7 +372,8 @@ sub delete { return $error; } - if ( $conf->config('deletepayments') ne '' ) { + if ( $conf->exists('deletepayments') + && $conf->config('deletepayments') ne '' ) { my $cust_main = $self->cust_main; @@ -416,6 +444,7 @@ sub check { || $self->ut_textn('paybatch') || $self->ut_textn('payunique') || $self->ut_enum('closed', [ '', 'Y' ]) + || $self->ut_foreign_keyn('pkgnum', 'cust_pkg', 'pkgnum') || $self->payinfo_check() ; return $error if $error;