[freeside-commits] branch master updated. e64b3d81da1d0a7026631e893f708c675a0cfa83

Ivan ivan at 420.am
Wed Feb 26 19:16:18 PST 2014


The branch, master has been updated
       via  e64b3d81da1d0a7026631e893f708c675a0cfa83 (commit)
      from  edb76c8cd4f4066e32f64ab92909a0f95d85ae23 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e64b3d81da1d0a7026631e893f708c675a0cfa83
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Feb 26 19:16:16 2014 -0800

    fix applying a credit against an invoice which has had its tax config removed, RT#23949

diff --git a/FS/FS/cust_credit_bill_pkg.pm b/FS/FS/cust_credit_bill_pkg.pm
index be9cd70..1f741b2 100644
--- a/FS/FS/cust_credit_bill_pkg.pm
+++ b/FS/FS/cust_credit_bill_pkg.pm
@@ -166,11 +166,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
   }
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_credit_bill_pkg.pm |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list