summaryrefslogtreecommitdiff
path: root/FS/FS/cust_pay_pending.pm
diff options
context:
space:
mode:
authorivan <ivan>2007-11-29 03:38:28 +0000
committerivan <ivan>2007-11-29 03:38:28 +0000
commit562f095ef72c0b610906bc6b80a58a01afcabb12 (patch)
treee1c7e23740f5e490edcf736426eb4eee6e83ecef /FS/FS/cust_pay_pending.pm
parentb7598678573dd5d94b770445057a42896d413918 (diff)
double doh, remove cruft checking nonexistent column and fix the statustext check
Diffstat (limited to 'FS/FS/cust_pay_pending.pm')
-rw-r--r--FS/FS/cust_pay_pending.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/FS/FS/cust_pay_pending.pm b/FS/FS/cust_pay_pending.pm
index c90a208..7d81754 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 ".