[freeside-commits] branch FREESIDE_4_BRANCH updated. 263ace9f4ee5762e3897bbb747ab162e6b7d88f7

Ivan ivan at 420.am
Sat Aug 19 14:57:11 PDT 2017


The branch, FREESIDE_4_BRANCH has been updated
       via  263ace9f4ee5762e3897bbb747ab162e6b7d88f7 (commit)
       via  6214c126bbbbec094f100e387df18ece55bbb8bb (commit)
       via  9b265da1ffcf8f34ec194407054dcf6046d690e5 (commit)
      from  6943275936a1a21a60ad3fa0cad44418ed18f07f (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 263ace9f4ee5762e3897bbb747ab162e6b7d88f7
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Aug 19 14:56:49 2017 -0700

    fix cancel message verb for suspensions, RT#29087

diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html
index 3c18622..96cf641 100755
--- a/httemplate/misc/cancel_pkg.html
+++ b/httemplate/misc/cancel_pkg.html
@@ -197,25 +197,27 @@ my $cust_pkg = qsearchs('cust_pkg', {'pkgnum' => $pkgnum})
 
 my $part_pkg = $cust_pkg->part_pkg;
 
-my @unprovision_warning;
-{
-    my @services_w_export;
-    for ( $cust_pkg->cust_svc ) {
-        push( @services_w_export, ($_->label)[0] . ': ' . ($_->label)[1], )
-          if $_->part_svc->export_svc;
-    }
-    if ( @services_w_export ) {
-        push( @unprovision_warning, 'NOTE: This package has '
-          . @services_w_export . ' ' . PL( "service", @services_w_export )
-          . ' that will be unprovisioned', );
-        if ( @services_w_export < 10 ) {
-            $unprovision_warning[0] .= ':';
-            push( @unprovision_warning, @services_w_export, );
-        }
-        else {
-            $unprovision_warning[0] .= '.';
-        }
+my @unprovision_warning = ();
+unless ( $method =~ /^(resume|uncancel)$/ ) {
+  my @services_w_export = map { my @l = $_->label; $l[0]. ': '. $l[1]; }
+                            grep $_->part_svc->export_svc,
+                              $cust_pkg->cust_svc;
+  if ( @services_w_export ) {
+
+    my $actioned = ($method =~ /^(suspend|adjourn)$/) ? 'suspended'
+                                                      : 'unprovisioned';
+    push @unprovision_warning,
+      'NOTE: This package has '. @services_w_export. ' '.
+      PL( 'service', @services_w_export ). " that will be $actioned";
+
+    if ( @services_w_export < 10 ) {
+      $unprovision_warning[0] .= ':';
+      push @unprovision_warning, @services_w_export;
+    } else {
+      $unprovision_warning[0] .= '.';
     }
+
+  }
 }
 
 $date ||= $cust_pkg->get($method);

commit 6214c126bbbbec094f100e387df18ece55bbb8bb
Author: Justin DeVuyst <justin at devuyst.com>
Date:   Wed Mar 8 17:29:48 2017 -0500

    Put each svc listing on its own line.  See RT#29087.

diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html
index 7af106d..3c18622 100755
--- a/httemplate/misc/cancel_pkg.html
+++ b/httemplate/misc/cancel_pkg.html
@@ -9,7 +9,11 @@
 <BR>
 <% emt(ucfirst($method)." [_1]", $part_pkg->pkg_comment(cust_pkg=>$cust_pkg) ) %>
 <BR>
-<font color="red"><% $unprovision_warning |h %></font>
+<font color="red">
+% for ( @unprovision_warning ) {
+<% $_ |h %><BR>
+% }
+</font>
 <table style="background-color: #cccccc; border-spacing: 2; width: 100%">
 
 % my $date_init = 0;
@@ -193,7 +197,7 @@ my $cust_pkg = qsearchs('cust_pkg', {'pkgnum' => $pkgnum})
 
 my $part_pkg = $cust_pkg->part_pkg;
 
-my $unprovision_warning = '';
+my @unprovision_warning;
 {
     my @services_w_export;
     for ( $cust_pkg->cust_svc ) {
@@ -201,12 +205,16 @@ my $unprovision_warning = '';
           if $_->part_svc->export_svc;
     }
     if ( @services_w_export ) {
-        $unprovision_warning = 'NOTE: This package has ' . @services_w_export
-          . ' ' . PL( "service", @services_w_export )
-          . ' that will be unprovisioned';
-        $unprovision_warning .= ' (' . join( ', ', @services_w_export, ) . ')'
-          if @services_w_export < 10;
-        $unprovision_warning .= '.';
+        push( @unprovision_warning, 'NOTE: This package has '
+          . @services_w_export . ' ' . PL( "service", @services_w_export )
+          . ' that will be unprovisioned', );
+        if ( @services_w_export < 10 ) {
+            $unprovision_warning[0] .= ':';
+            push( @unprovision_warning, @services_w_export, );
+        }
+        else {
+            $unprovision_warning[0] .= '.';
+        }
     }
 }
 

commit 9b265da1ffcf8f34ec194407054dcf6046d690e5
Author: Justin DeVuyst <justin at devuyst.com>
Date:   Fri Mar 3 19:24:14 2017 -0500

    Add warning of svc unprovisioning on pkg cancel.  See RT#29087.

diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html
index d3ca996..7af106d 100755
--- a/httemplate/misc/cancel_pkg.html
+++ b/httemplate/misc/cancel_pkg.html
@@ -8,6 +8,8 @@
 
 <BR>
 <% emt(ucfirst($method)." [_1]", $part_pkg->pkg_comment(cust_pkg=>$cust_pkg) ) %>
+<BR>
+<font color="red"><% $unprovision_warning |h %></font>
 <table style="background-color: #cccccc; border-spacing: 2; width: 100%">
 
 % my $date_init = 0;
@@ -191,6 +193,23 @@ my $cust_pkg = qsearchs('cust_pkg', {'pkgnum' => $pkgnum})
 
 my $part_pkg = $cust_pkg->part_pkg;
 
+my $unprovision_warning = '';
+{
+    my @services_w_export;
+    for ( $cust_pkg->cust_svc ) {
+        push( @services_w_export, ($_->label)[0] . ': ' . ($_->label)[1], )
+          if $_->part_svc->export_svc;
+    }
+    if ( @services_w_export ) {
+        $unprovision_warning = 'NOTE: This package has ' . @services_w_export
+          . ' ' . PL( "service", @services_w_export )
+          . ' that will be unprovisioned';
+        $unprovision_warning .= ' (' . join( ', ', @services_w_export, ) . ')'
+          if @services_w_export < 10;
+        $unprovision_warning .= '.';
+    }
+}
+
 $date ||= $cust_pkg->get($method);
 $date ||= time;
 

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

Summary of changes:
 httemplate/misc/cancel_pkg.html |   29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)




More information about the freeside-commits mailing list