summaryrefslogtreecommitdiff
path: root/FS/FS/cust_bill_pkg.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-04-01 13:07:01 -0500
committerMark Wells <mark@freeside.biz>2015-04-01 13:07:01 -0500
commit7badb86e945f91ea4e18c8f52054d30404a43f86 (patch)
treeed2df4fdb3ebdbe722fe5cf84b697d3117c315f3 /FS/FS/cust_bill_pkg.pm
parent76d6fe17d02b77301619065ad43d7300432e977c (diff)
fix post-consolidation linking of tax on tax records, should be the last piece of #34223
Diffstat (limited to 'FS/FS/cust_bill_pkg.pm')
-rw-r--r--FS/FS/cust_bill_pkg.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm
index 156ab5b..d0cec90 100644
--- a/FS/FS/cust_bill_pkg.pm
+++ b/FS/FS/cust_bill_pkg.pm
@@ -207,6 +207,7 @@ sub insert {
{
my $tax_location = $self->get($tax_link_table) || [];
foreach my $link ( @$tax_location ) {
+ $DB::single=1; #XXX
my $pkey = $link->primary_key;
next if $link->get($pkey); # don't try to double-insert
# This cust_bill_pkg can be linked on either side (i.e. it can be the
@@ -238,12 +239,12 @@ sub insert {
return "error inserting cust_bill_pkg_tax_location: $error";
}
} else { # handoff
- my $other;
+ my $other; # the as yet uninserted cust_bill_pkg
$other = $link->billpkgnum ? $link->get('taxable_cust_bill_pkg')
: $link->get('tax_cust_bill_pkg');
- my $link_array = $other->get('cust_bill_pkg_tax_location') || [];
+ my $link_array = $other->get( $tax_link_table ) || [];
push @$link_array, $link;
- $other->set('cust_bill_pkg_tax_location' => $link_array);
+ $other->set( $tax_link_table => $link_array);
}
} #foreach my $link
}