[freeside-commits] branch master updated. f2aed236d3211d83f06a06b3f15320316550608c

Mark Wells mark at 420.am
Wed Jun 3 13:40:40 PDT 2015


The branch, master has been updated
       via  f2aed236d3211d83f06a06b3f15320316550608c (commit)
       via  4eaa40ac850ad07504efcc34b753b325cf91bfc6 (commit)
      from  51e073d4a71d2fb9b05187a1ee46c1749927305e (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 f2aed236d3211d83f06a06b3f15320316550608c
Author: Mark Wells <mark at freeside.biz>
Date:   Wed Jun 3 11:51:41 2015 -0700

    internal API fix, from #20687

diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 3800e94..91a5677 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -2000,7 +2000,7 @@ sub change {
       return "modifying package: $error";
     } else {
       $dbh->commit if $oldAutoCommit;
-      return '';
+      return $self;
     }
   }
 

commit 4eaa40ac850ad07504efcc34b753b325cf91bfc6
Author: Mark Wells <mark at freeside.biz>
Date:   Tue Jun 2 20:43:05 2015 -0700

    suretax-hostname option, and minor UI fix, #33015

diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 17a7c23..8cd8e27 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -2500,6 +2500,13 @@ and customer address. Include units.',
   },
 
   {
+    'key'         => 'suretax-hostname',
+    'section'     => 'taxation',
+    'description' => 'SureTax server name; defaults to the test server.',
+    'type'        => 'text',
+  },
+
+  {
     'key'         => 'suretax-client_number',
     'section'     => 'taxation',
     'description' => 'SureTax tax service client ID.',
diff --git a/FS/FS/TaxEngine/suretax.pm b/FS/FS/TaxEngine/suretax.pm
index 327a728..8139b1d 100644
--- a/FS/FS/TaxEngine/suretax.pm
+++ b/FS/FS/TaxEngine/suretax.pm
@@ -20,9 +20,6 @@ our %taxproduct_cache;
 
 our $conf;
 
-our $host = 'testapi.taxrating.net';
-# production: 'api.taxrating.net'
-
 FS::UID->install_callback( sub {
     $conf = FS::Conf->new;
     # should we enable conf caching here?
@@ -314,6 +311,9 @@ sub make_taxlines {
   my $request_json = $json->encode($request);
   warn $request_json if $DEBUG > 1;
 
+  my $host = $conf->config('suretax-hostname');
+  $host ||= 'testapi.taxrating.net';
+
   # We are targeting the "V05" interface:
   # - accepts both telecom and general sales transactions
   # - produces results broken down by "invoice" (Freeside line item)
diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi
index f3ee061..61a6337 100755
--- a/httemplate/edit/process/part_pkg.cgi
+++ b/httemplate/edit/process/part_pkg.cgi
@@ -97,8 +97,7 @@ my $args_callback = sub {
         @options;
 
   foreach my $class ( '', split(',', $cgi->param('taxproductnums') ) ) {
-    my $param = 'taxproductnum';
-    $param .= "_$class" if length($class); # gah, "_$class"?
+    my $param = "taxproductnum_$class";
     my $value = $cgi->param($param);
 
     if ( $value == -1 ) {

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

Summary of changes:
 FS/FS/Conf.pm                        |    7 +++++++
 FS/FS/TaxEngine/suretax.pm           |    6 +++---
 FS/FS/cust_pkg.pm                    |    2 +-
 httemplate/edit/process/part_pkg.cgi |    3 +--
 4 files changed, 12 insertions(+), 6 deletions(-)




More information about the freeside-commits mailing list