projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
63065c6
)
yow. very sleep deprived. remove the infinite loop rather than add one.
author
ivan
<ivan>
Thu, 13 Mar 2008 09:28:44 +0000
(09:28 +0000)
committer
ivan
<ivan>
Thu, 13 Mar 2008 09:28:44 +0000
(09:28 +0000)
FS/FS/cust_pay.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_pay.pm
b/FS/FS/cust_pay.pm
index
0507276
..
358dfdc
100644
(file)
--- a/
FS/FS/cust_pay.pm
+++ b/
FS/FS/cust_pay.pm
@@
-687,19
+687,15
@@
sub _upgrade_data { #class method
my $count = 0;
my $lastprog = 0;
my $count = 0;
my $lastprog = 0;
- my %seen = ();
- while (1) {
-
my $cust_pay = qsearchs
( {
+
my @cust_pay = qsearch
( {
'table' => 'cust_pay',
'hashref' => {},
'extra_sql' => $where,
'table' => 'cust_pay',
'hashref' => {},
'extra_sql' => $where,
- 'order_by' => 'ORDER BY paynum LIMIT 1',
- } );
-
- return unless $cust_pay;
+ 'order_by' => 'ORDER BY paynum',
+ } );
- next if $seen{$cust_pay->paynum}++;
+ foreach my $cust_pay (@cust_pay) {
my $h_cust_pay = $cust_pay->h_search('insert');
if ( $h_cust_pay ) {
my $h_cust_pay = $cust_pay->h_search('insert');
if ( $h_cust_pay ) {