[freeside-commits] freeside/FS/FS/cust_main Billing.pm, 1.18.2.5, 1.18.2.6
Ivan,,,
ivan at wavetail.420.am
Wed Mar 9 18:26:52 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/cust_main
In directory wavetail.420.am:/tmp/cvs-serv26818
Modified Files:
Tag: FREESIDE_2_1_BRANCH
Billing.pm
Log Message:
avoid runcentral's weird proble distributing tax exemptions since it doesn't apply to them anyway, RT#11476
Index: Billing.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main/Billing.pm,v
retrieving revision 1.18.2.5
retrieving revision 1.18.2.6
diff -u -w -d -r1.18.2.5 -r1.18.2.6
--- Billing.pm 7 Mar 2011 01:36:27 -0000 1.18.2.5
+++ Billing.pm 10 Mar 2011 02:26:50 -0000 1.18.2.6
@@ -726,8 +726,16 @@
foreach my $tax ( keys %$taxlisthash ) {
foreach ( @{ $taxlisthash->{$tax} }[1 ... scalar(@{ $taxlisthash->{$tax} })] ) {
next unless ref($_) eq 'FS::cust_bill_pkg';
+
+ my @cust_tax_exempt_pkg = splice( @{ $_->_cust_tax_exempt_pkg } );
+
+ next unless @cust_tax_exempt_pkg; #just avoiding the prob when irrelevant?
+ die "can't distribute tax exemptions: no line item for ". Dumper($_).
+ " in packagemap ". join(',', sort {$a<=>$b} keys %packagemap). "\n"
+ unless $packagemap{$_->pkgnum};
+
push @{ $packagemap{$_->pkgnum}->_cust_tax_exempt_pkg },
- splice( @{ $_->_cust_tax_exempt_pkg } );
+ @cust_tax_exempt_pkg;
}
}
More information about the freeside-commits
mailing list