[freeside-commits] branch FREESIDE_3_BRANCH updated. 6793561f9463f93c211917cc6f5bd57ab8d1ca5e
Mark Wells
mark at 420.am
Wed May 21 14:51:22 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via 6793561f9463f93c211917cc6f5bd57ab8d1ca5e (commit)
from c41cfabd265b8a26024187119535f8bf789d0e3d (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 6793561f9463f93c211917cc6f5bd57ab8d1ca5e
Author: Mark Wells <mark at freeside.biz>
Date: Wed May 21 14:50:38 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 bddadbd..d529678 100644
--- a/FS/FS/cust_bill_pkg.pm
+++ b/FS/FS/cust_bill_pkg.pm
@@ -28,6 +28,8 @@ use FS::cust_bill_pkg_tax_rate_location_void;
use FS::cust_tax_exempt_pkg_void;
use FS::part_fee;
+use FS::Cursor;
+
$DEBUG = 0;
$me = '[FS::cust_bill_pkg]';
@@ -1182,8 +1184,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) ".
@@ -1191,11 +1192,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