X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_pay_batch.pm;h=1a530467c359c3c40ac7d7eb4dfe84231b60605b;hp=0576cbefcfc95836427852fb74c876c78af5c61d;hb=58d44fbe5eb9ab32e6d87063a4a3b22ddba9a828;hpb=b6449417b8af1065a6e58f5cab11d63b33cbd2f9 diff --git a/FS/FS/cust_pay_batch.pm b/FS/FS/cust_pay_batch.pm index 0576cbefc..1a530467c 100644 --- a/FS/FS/cust_pay_batch.pm +++ b/FS/FS/cust_pay_batch.pm @@ -35,7 +35,7 @@ following fields are currently supported: =over 4 -=item trancode - 77 for charges +=item paybatchnum - primary key (automatically assigned) =item cardnum @@ -117,7 +117,8 @@ sub check { my $self = shift; my $error = - $self->ut_numbern('trancode') + $self->ut_numbern('paybatchnum') + || $self->ut_numbern('trancode') #depriciated || $self->ut_number('cardnum') || $self->ut_money('amount') || $self->ut_number('invnum') @@ -125,7 +126,7 @@ sub check { || $self->ut_text('address1') || $self->ut_textn('address2') || $self->ut_text('city') - || $self->ut_text('state') + || $self->ut_textn('state') ; return $error if $error; @@ -172,23 +173,26 @@ sub check { $self->payname($1); } - $self->zip =~ /^\s*(\w[\w\-\s]{3,8}\w)\s*$/ - or return "Illegal zip: ". $self->zip; - $self->zip($1); + #$self->zip =~ /^\s*(\w[\w\-\s]{3,8}\w)\s*$/ + # or return "Illegal zip: ". $self->zip; + #$self->zip($1); $self->country =~ /^(\w\w)$/ or return "Illegal country: ". $self->country; $self->country($1); + $error = $self->ut_zip('zip', $self->country); + return $error if $error; + #check invnum, custnum, ? - ''; #no error + $self->SUPER::check; } =back =head1 VERSION -$Id: cust_pay_batch.pm,v 1.2 2000-06-17 21:48:05 ivan Exp $ +$Id: cust_pay_batch.pm,v 1.7 2003-08-05 00:20:42 khoff Exp $ =head1 BUGS