X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpay_batch.pm;h=bde8fdbf705f61bca9536f45625454b95b7c1a22;hb=80e675c7305768010f8b08ef2ebdfb936432e84d;hp=90b4eb8eb0bdc790827c0b55c848785376e9c203;hpb=ef665115c4e69001b9c0fc9d0677eb47939d6b82;p=freeside.git diff --git a/FS/FS/pay_batch.pm b/FS/FS/pay_batch.pm index 90b4eb8eb..bde8fdbf7 100644 --- a/FS/FS/pay_batch.pm +++ b/FS/FS/pay_batch.pm @@ -5,8 +5,9 @@ use vars qw( @ISA $DEBUG %import_info %export_info $conf ); use Time::Local; use Text::CSV_XS; use FS::Record qw( dbh qsearch qsearchs ); -use FS::cust_pay; use FS::Conf; +use FS::cust_pay; +use FS::agent; use Date::Parse qw(str2time); use Business::CreditCard qw(cardtype); @@ -40,6 +41,8 @@ from FS::Record. The following fields are currently supported: =item batchnum - primary key +=item agentnum - optional agent number for agent batches + =item payby - CARD or CHEK =item status - O (Open), I (In-transit), or R (Resolved) @@ -112,6 +115,7 @@ sub check { $self->ut_numbern('batchnum') || $self->ut_enum('payby', [ 'CARD', 'CHEK' ]) || $self->ut_enum('status', [ 'O', 'I', 'R' ]) + || $self->ut_foreign_keyn('agentnum', 'agent', 'agentnum') ; return $error if $error;