diff options
author | ivan <ivan> | 2008-03-13 09:28:44 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-03-13 09:28:44 +0000 |
commit | 3b4f265c6d5233ca15eb21e8989a165a9ae32073 (patch) | |
tree | c1062d6289739310cfa91e86ad42b77c0d18aa52 /FS | |
parent | 63065c617f83c9da147bf84a368b1d6886d16bf1 (diff) |
yow. very sleep deprived. remove the infinite loop rather than add one.
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_pay.pm | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index 0507276f4..358dfdc3d 100644 --- 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 %seen = (); - while (1) { - my $cust_pay = qsearchs( { + my @cust_pay = qsearch( { '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 ) { |