[freeside-commits] branch master updated. 3992c4726337c3b257489a2898cf898efc8a6554
Mark Wells
mark at 420.am
Wed May 21 14:51:24 PDT 2014
The branch, master has been updated
via 3992c4726337c3b257489a2898cf898efc8a6554 (commit)
from 58f8f045141e56c38dd47bf7b9f33094236c0d0a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3992c4726337c3b257489a2898cf898efc8a6554
Author: Mark Wells <mark at freeside.biz>
Date: Wed May 21 14:51:13 2014 -0700
cursorize cust_bill_pkg_tax_location upgrade, #940
diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm
index 212c4b6..1955452 100644
--- a/FS/FS/cust_bill_pkg.pm
+++ b/FS/FS/cust_bill_pkg.pm
@@ -26,6 +26,8 @@ use FS::cust_bill_pkg_tax_location_void;
use FS::cust_bill_pkg_tax_rate_location_void;
use FS::cust_tax_exempt_pkg_void;
+use FS::Cursor;
+
$DEBUG = 0;
$me = '[FS::cust_bill_pkg]';
@@ -1158,8 +1160,7 @@ sub upgrade_tax_location {
' WHERE cust_bill_pkg.invnum = cust_bill.invnum'.
' AND exempt_monthly IS NULL';
- my @invnums = map { $_->invnum } qsearch({
- select => 'cust_bill.invnum',
+ my $search = FS::Cursor->new({
table => 'cust_bill',
hashref => {},
extra_sql => "WHERE NOT EXISTS($sub_has_tax_link) ".
@@ -1167,11 +1168,12 @@ sub upgrade_tax_location {
$date_where,
});
- print "Processing ".scalar(@invnums)." invoices...\n";
+#print "Processing ".scalar(@invnums)." invoices...\n";
my $committed;
INVOICE:
- foreach my $invnum (@invnums) {
+ while (my $cust_bill = $search->fetch) {
+ my $invnum = $cust_bill->invnum;
$committed = 0;
print STDERR "Invoice #$invnum\n";
my $pre = '';
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_bill_pkg.pm | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list