X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main_county.pm;h=fb80809e0506d8083d7632840229baf884893c95;hb=c1bc17318fff6d7636601ef8de7fbce3734a785a;hp=db6be751dd20403373883e3482b0bbbb786ba6d2;hpb=7a618d4493ab7a87f6eabfd1ce3630a6b3436c2f;p=freeside.git diff --git a/FS/FS/cust_main_county.pm b/FS/FS/cust_main_county.pm index db6be751d..fb80809e0 100644 --- a/FS/FS/cust_main_county.pm +++ b/FS/FS/cust_main_county.pm @@ -498,6 +498,8 @@ sub taxline { 'taxnum' => $self->taxnum, 'taxtype' => ref($self), 'cents' => $this_tax_cents, + 'pkgnum' => $cust_bill_pkg->pkgnum, + 'locationnum' => $cust_bill_pkg->cust_pkg->tax_locationnum, 'taxable_cust_bill_pkg' => $cust_bill_pkg, 'tax_cust_bill_pkg' => $tax_item, }); @@ -510,8 +512,10 @@ sub taxline { # now round and distribute my $extra_cents = sprintf('%.2f', $taxable_cents * $self->tax / 100) * 100 - $tax_cents; + # make sure we have an integer + $extra_cents = sprintf('%.0f', $extra_cents); if ( $extra_cents < 0 ) { - die "nonsense extra_cents value $extra_cents"; # because seriously, wtf + die "nonsense extra_cents value $extra_cents"; } $tax_cents += $extra_cents; my $i = 0;