summaryrefslogtreecommitdiff
path: root/FS/FS/cust_credit.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-02-24 15:45:44 -0800
committerMark Wells <mark@freeside.biz>2014-02-24 15:45:44 -0800
commitcc3a43f7d4386297a8babebfdd49646f836db127 (patch)
treee30830dc586eebc311325810f281ebf900600e8a /FS/FS/cust_credit.pm
parent04220e7ef18314883ad1cec05c552f13d8d5f7e4 (diff)
non-package fees, fixes for tax calculation and sales reports, #25899
Diffstat (limited to 'FS/FS/cust_credit.pm')
-rw-r--r--FS/FS/cust_credit.pm15
1 files changed, 5 insertions, 10 deletions
diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm
index 7ae6c97..1890845 100644
--- a/FS/FS/cust_credit.pm
+++ b/FS/FS/cust_credit.pm
@@ -910,14 +910,9 @@ sub credit_lineitems {
# recalculate taxes with new amounts
$taxlisthash{$invnum} ||= {};
- my $part_pkg = $cust_bill_pkg->part_pkg;
- $cust_main->_handle_taxes( $part_pkg,
- $taxlisthash{$invnum},
- $cust_bill_pkg,
- $cust_bill_pkg->cust_pkg,
- $cust_bill_pkg->cust_bill->_date, #invoice time
- $cust_bill_pkg->cust_pkg->pkgpart,
- );
+ my $part_pkg = $cust_bill_pkg->part_pkg
+ if $cust_bill_pkg->pkgpart_override;
+ $cust_main->_handle_taxes( $taxlisthash{$invnum}, $cust_bill_pkg );
}
###
@@ -1013,12 +1008,12 @@ sub credit_lineitems {
# we still have to deal with the possibility that the tax links don't
# cover the whole amount of tax because of an incomplete upgrade...
- if ($amount > 0) {
+ if ($amount > 0.005) {
$cust_credit_bill{$invnum} += $amount;
push @{ $cust_credit_bill_pkg{$invnum} },
new FS::cust_credit_bill_pkg {
'billpkgnum' => $tax_item->billpkgnum,
- 'amount' => $amount,
+ 'amount' => sprintf('%.2f', $amount),
'setuprecur' => 'setup',
};