[freeside-commits] freeside/FS/FS cust_pay.pm,1.60,1.61

Ivan,,, ivan at wavetail.420.am
Tue Mar 4 13:06:46 PST 2008


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv3847

Modified Files:
	cust_pay.pm 
Log Message:
fix cust_pay.otaker population

Index: cust_pay.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pay.pm,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- cust_pay.pm	22 Feb 2008 01:09:31 -0000	1.60
+++ cust_pay.pm	4 Mar 2008 21:06:42 -0000	1.61
@@ -432,8 +432,6 @@
 #           " already exists";
 #  }
 
-  $self->otaker(getotaker);
-
   $self->SUPER::check;
 }
 
@@ -675,8 +673,9 @@
 
   #not the most efficient, but hey, it only has to run once
 
-  my $count_sql =
-    "SELECT COUNT(*) FROM cust_pay WHERE otaker IS NULL OR otaker = ''";
+  my $where = "WHERE otaker IS NULL OR otaker = '' OR otaker = 'ivan' ";
+
+  my $count_sql = "SELECT COUNT(*) FROM cust_pay $where";
 
   my $sth = dbh->prepare($count_sql) or die dbh->errstr;
   $sth->execute or die $sth->errstr;
@@ -691,7 +690,7 @@
     my $cust_pay = qsearchs( {
       'table'     => 'cust_pay',
       'hashref'   => {},
-      'extra_sql' => "WHERE otaker IS NULL OR otaker = ''",
+      'extra_sql' => $where,
       'order_by'  => 'ORDER BY paynum LIMIT 1',
     } );
 



More information about the freeside-commits mailing list