summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-02-26 19:16:18 -0800
committerIvan Kohler <ivan@freeside.biz>2014-02-26 19:16:18 -0800
commit5b7ba710939e35f0ed1031e7e0abfbb21ab1bfa0 (patch)
tree14977d33254b9e451d46ebddf429918a6e424c07 /FS
parent63827f50be90b3774c7d312f9ac049e69111e3d3 (diff)
fix applying a credit against an invoice which has had its tax config removed, RT#23949
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_credit_bill_pkg.pm13
1 files changed, 9 insertions, 4 deletions
diff --git a/FS/FS/cust_credit_bill_pkg.pm b/FS/FS/cust_credit_bill_pkg.pm
index 657a88904..7b723f984 100644
--- a/FS/FS/cust_credit_bill_pkg.pm
+++ b/FS/FS/cust_credit_bill_pkg.pm
@@ -171,11 +171,16 @@ sub insert {
'amount' => sprintf('%.2f', 0-$amount),
};
- my $error = $cust_tax_exempt_pkg->insert;
- if ( $error ) {
- $dbh->rollback if $oldAutoCommit;
- return "error inserting cust_tax_exempt_pkg: $error";
+ if ( $cust_tax_exempt_pkg->cust_main_county ) {
+
+ my $error = $cust_tax_exempt_pkg->insert;
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return "error inserting cust_tax_exempt_pkg: $error";
+ }
+
}
+
} #foreach $exemption
}