projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
29398 Add start date to zintel
[freeside.git]
/
FS
/
FS
/
cust_bill_pkg.pm
diff --git
a/FS/FS/cust_bill_pkg.pm
b/FS/FS/cust_bill_pkg.pm
index
bddadbd
..
d529678
100644
(file)
--- 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::cust_tax_exempt_pkg_void;
use FS::part_fee;
+use FS::Cursor;
+
$DEBUG = 0;
$me = '[FS::cust_bill_pkg]';
$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';
' 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) ".
table => 'cust_bill',
hashref => {},
extra_sql => "WHERE NOT EXISTS($sub_has_tax_link) ".
@@
-1191,11
+1192,12
@@
sub upgrade_tax_location {
$date_where,
});
$date_where,
});
-
print "Processing ".scalar(@invnums)." invoices...\n";
+
#
print "Processing ".scalar(@invnums)." invoices...\n";
my $committed;
INVOICE:
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 = '';
$committed = 0;
print STDERR "Invoice #$invnum\n";
my $pre = '';