[freeside-commits] freeside/FS/FS cust_pay.pm,1.50.2.10,1.50.2.11
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-serv3854
Modified Files:
Tag: FREESIDE_1_7_BRANCH
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.50.2.10
retrieving revision 1.50.2.11
diff -u -d -r1.50.2.10 -r1.50.2.11
--- cust_pay.pm 22 Feb 2008 01:09:32 -0000 1.50.2.10
+++ cust_pay.pm 4 Mar 2008 21:06:43 -0000 1.50.2.11
@@ -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