[freeside-commits] branch FREESIDE_3_BRANCH updated. 5d0439ae95519ac2a076bc1cd9a98351f51b354a

Mitch Jackson mitch at freeside.biz
Sat May 26 14:07:19 PDT 2018


The branch, FREESIDE_3_BRANCH has been updated
       via  5d0439ae95519ac2a076bc1cd9a98351f51b354a (commit)
       via  de07e068a34760e588bbc29708fd5197b7ee9ea1 (commit)
       via  b7da0342d2a1d9a41f4caa5db292c0eae1446077 (commit)
       via  fe271d3f46eca4df69eec8bcdec1ccb6603aff11 (commit)
      from  3e9862885750180d31ec85135a8c4e3d6571875a (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 5d0439ae95519ac2a076bc1cd9a98351f51b354a
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Mon Feb 19 23:07:11 2018 -0600

    RT# 79549 Requre a Rate Plan to use voip_cdr Price Plan

diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm
index 870292647..7947a143d 100644
--- a/FS/FS/part_pkg/voip_cdr.pm
+++ b/FS/FS/part_pkg/voip_cdr.pm
@@ -374,8 +374,8 @@ tie my %accountcode_tollfree_field, 'Tie::IxHash',
   'validate' => sub {
     # Validation function for FS::part_pkg::check_options()
     my $options = shift;
-    return "Please select a rate plan for price plan VoIP/telco CDR rating (standard)"
-      unless $options->{ratenum};
+    return "Please choose a Rate Plan for use with selected Rating Method"
+      if $options->{rating_method} eq 'prefix' &&  !$options->{ratenum};
     return;
   },
 );

commit de07e068a34760e588bbc29708fd5197b7ee9ea1
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Fri Feb 16 18:13:27 2018 -0600

    RT# 79549 Requre a Rate Plan to use voip_cdr Price Plan

diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm
index 5f7c831bc..cad761498 100644
--- a/FS/FS/part_pkg.pm
+++ b/FS/FS/part_pkg.pm
@@ -671,11 +671,17 @@ sub check {
 
 =item check_options
 
-For a passed I<$options> hashref, validates any options that
-have 'validate' subroutines defined in the info hash, 
-then validates the entire hashref if the price plan has 
-its own 'validate' subroutine defined in the info hash 
-(I<$options> values might be altered.)  
+Pass an I<$options> hashref that contains the values to be
+inserted or updated for any FS::part_pkg::MODULE.pm.
+
+For each key in I<$options>, validates the value by calling
+the 'validate' subroutine defined for that option e.g.
+FS::part_pkg::MODULE::plan_info()->{$KEY}->{validate}.  The
+option validation function is only called when the hashkey for
+that option exists in I<$options>.
+
+Then the module validation function is called, from
+FS::part_pkg::MODULE::plan_info()->{validate}
 
 Returns error message, or empty string if valid.
 
@@ -2201,4 +2207,3 @@ schema.html from the base documentation.
 =cut
 
 1;
-
diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm
index 2d8c359cf..870292647 100644
--- a/FS/FS/part_pkg/voip_cdr.pm
+++ b/FS/FS/part_pkg/voip_cdr.pm
@@ -371,6 +371,13 @@ tie my %accountcode_tollfree_field, 'Tie::IxHash',
                      )
                   ],
   'weight' => 41,
+  'validate' => sub {
+    # Validation function for FS::part_pkg::check_options()
+    my $options = shift;
+    return "Please select a rate plan for price plan VoIP/telco CDR rating (standard)"
+      unless $options->{ratenum};
+    return;
+  },
 );
 
 sub price_info {
@@ -754,4 +761,3 @@ sub hide_svc_detail {
 
 
 1;
-

commit b7da0342d2a1d9a41f4caa5db292c0eae1446077
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Tue Apr 24 18:13:39 2018 +0000

    RT# 78665 Fix JSON crash

diff --git a/httemplate/elements/select-tiered.html b/httemplate/elements/select-tiered.html
index 48469dc04..9c7dfcf82 100644
--- a/httemplate/elements/select-tiered.html
+++ b/httemplate/elements/select-tiered.html
@@ -126,6 +126,7 @@ my $tiers = $opt{tiers} or die "no tiers defined";
 
 my $json = JSON::XS->new();
 $json->canonical;
+$json->allow_nonref(1);
 
 my $i;
 for( $i = 0; $i < @$tiers; $i++ ) {

commit fe271d3f46eca4df69eec8bcdec1ccb6603aff11
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Mon Apr 23 01:01:28 2018 +0000

    RT# 78665 Replace JSON::XS with Cpanel::JSON::XS

diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm
index 6d6f7fbb6..43a387227 100644
--- a/FS/FS/UI/Web.pm
+++ b/FS/FS/UI/Web.pm
@@ -739,7 +739,8 @@ use vars qw($DEBUG);
 use Carp;
 use Storable qw(nfreeze);
 use MIME::Base64;
-use JSON::XS;
+#use JSON::XS;        ! maintainers deployed app breaking changes
+use Cpanel::JSON::XS; # safe, compatible drop-in replacement
 use FS::UID qw(getotaker);
 use FS::Record qw(qsearchs);
 use FS::queue;
@@ -893,4 +894,3 @@ sub job_status {
 }
 
 1;
-

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

Summary of changes:
 FS/FS/UI/Web.pm                        |  4 ++--
 FS/FS/part_pkg.pm                      | 17 +++++++++++------
 FS/FS/part_pkg/voip_cdr.pm             |  8 +++++++-
 httemplate/elements/select-tiered.html |  1 +
 4 files changed, 21 insertions(+), 9 deletions(-)




More information about the freeside-commits mailing list