[freeside-commits] freeside/FS/FS cust_pay_pending.pm, 1.1.2.2, 1.1.2.3

Ivan,,, ivan at wavetail.420.am
Wed Nov 28 19:38:31 PST 2007


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv22041

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	cust_pay_pending.pm 
Log Message:
double doh, remove cruft checking nonexistent column and fix the statustext check

Index: cust_pay_pending.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pay_pending.pm,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -d -r1.1.2.2 -r1.1.2.3
--- cust_pay_pending.pm	29 Nov 2007 02:55:07 -0000	1.1.2.2
+++ cust_pay_pending.pm	29 Nov 2007 03:38:29 -0000	1.1.2.3
@@ -131,14 +131,13 @@
 
   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 @@
   # 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 ".



More information about the freeside-commits mailing list