diff options
author | ivan <ivan> | 2007-11-29 03:38:28 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-11-29 03:38:28 +0000 |
commit | 562f095ef72c0b610906bc6b80a58a01afcabb12 (patch) | |
tree | e1c7e23740f5e490edcf736426eb4eee6e83ecef | |
parent | b7598678573dd5d94b770445057a42896d413918 (diff) |
double doh, remove cruft checking nonexistent column and fix the statustext check
-rw-r--r-- | FS/FS/cust_pay_pending.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/FS/FS/cust_pay_pending.pm b/FS/FS/cust_pay_pending.pm index c90a20899..7d8175459 100644 --- a/FS/FS/cust_pay_pending.pm +++ b/FS/FS/cust_pay_pending.pm @@ -131,14 +131,13 @@ sub check { my $error = $self->ut_numbern('paypendingnum') - || $self->ut_number('pendingnum') || $self->ut_foreign_key('custnum', 'cust_main', 'custnum') || $self->ut_money('paid') || $self->ut_numbern('_date') || $self->ut_textn('payunique') || $self->ut_text('status') #|| $self->ut_textn('statustext') - || $self->ut_anythingn('statustext') + || $self->ut_anything('statustext') #|| $self->ut_money('cust_balance') || $self->ut_foreign_keyn('paynum', 'cust_pay', 'paynum' ) || $self->payinfo_check() #payby/payinfo/paymask/paydate @@ -150,8 +149,10 @@ sub check { # UNIQUE index should catch this too, without race conditions, but this # should give a better error message the other 99.9% of the time... if ( length($self->payunique) ) { - my $cust_pay_pending = - qsearchs('cust_pay_pending', { 'payunique' => $self->payunique } ); + my $cust_pay_pending = qsearchs('cust_pay_pending', { + 'payunique' => $self->payunique, + 'paypendingnum' => { op=>'!=', value=>$self->paypendingnum }, + }); if ( $cust_pay_pending ) { #well, it *could* be a better error message return "duplicate transaction - a payment with unique identifer ". |