[freeside-commits] branch master updated. 341adb07d0f22f7386b0d1055aa5d6d6120198ca

Jonathan Prykop jonathan at 420.am
Wed Mar 16 22:28:05 PDT 2016


The branch, master has been updated
       via  341adb07d0f22f7386b0d1055aa5d6d6120198ca (commit)
       via  2352989dbc91f1f4e75c5d08da8a98177279ad93 (commit)
       via  3f3ff0e70a1650ac5afdbd3d3a3d4ae036c656d2 (commit)
      from  b3cc20aeca25e4351c6ec3b795a951e6124f6376 (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 341adb07d0f22f7386b0d1055aa5d6d6120198ca
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Thu Mar 17 00:27:14 2016 -0500

    RT#28648: Unsuspend when past due balance is paid [cleanup NO BACKPORT]

diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index ff6e169..a472120 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -2737,7 +2737,6 @@ sub tables_hashref {
         'change_custnum',      'int', 'NULL', '', '', '',
         'main_pkgnum',         'int', 'NULL', '', '', '',
         'pkglinknum',          'int', 'NULL', '', '', '',
-        'manual_flag',        'char', 'NULL',  1, '', '', 
         'no_auto',            'char', 'NULL',  1, '', '', 
         'quantity',            'int', 'NULL', '', '', '',
         'agent_pkgid',     'varchar', 'NULL', $char_d, '', '',
diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm
index 4356c59..2b3634a 100644
--- a/FS/FS/cust_main/Packages.pm
+++ b/FS/FS/cust_main/Packages.pm
@@ -557,22 +557,6 @@ sub suspended_pkgs {
   grep { $_->susp } $self->ncancelled_pkgs;
 }
 
-### This appears to be unused, will be going away
-#
-#=item unflagged_suspended_pkgs
-#
-#Returns all unflagged suspended packages (see L<FS::cust_pkg>) for this
-#customer (thouse packages without the `manual_flag' set).
-#
-#=cut
-
-sub unflagged_suspended_pkgs {
-  my $self = shift;
-  return $self->suspended_pkgs
-    unless dbdef->table('cust_pkg')->column('manual_flag');
-  grep { ! $_->manual_flag } $self->suspended_pkgs;
-}
-
 =item unsuspended_pkgs
 
 Returns all unsuspended (and uncancelled) packages (see L<FS::cust_pkg>) for
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 6a10b71..85234cf 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -753,13 +753,6 @@ sub check {
 
   $self->usernum($FS::CurrentUser::CurrentUser->usernum) unless $self->usernum;
 
-  if ( $self->dbdef_table->column('manual_flag') ) {
-    $self->manual_flag('') if $self->manual_flag eq ' ';
-    $self->manual_flag =~ /^([01]?)$/
-      or return "Illegal manual_flag ". $self->manual_flag;
-    $self->manual_flag($1);
-  }
-
   $self->SUPER::check;
 }
 
@@ -1153,7 +1146,7 @@ sub uncancel {
       setup
       susp adjourn resume expire start_date contract_end dundate
       change_date change_pkgpart change_locationnum
-      manual_flag no_auto separate_bill quantity agent_pkgid 
+      no_auto separate_bill quantity agent_pkgid 
       recur_show_zero setup_show_zero
     ),
   };

commit 2352989dbc91f1f4e75c5d08da8a98177279ad93
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Thu Mar 17 00:21:01 2016 -0500

    RT#28648: Unsuspend when past due balance is paid [more cleanup for backport]

diff --git a/FS/FS/cust_main_Mixin.pm b/FS/FS/cust_main_Mixin.pm
index 9b4ae3a..9a2a9d7 100644
--- a/FS/FS/cust_main_Mixin.pm
+++ b/FS/FS/cust_main_Mixin.pm
@@ -682,8 +682,6 @@ sub unsuspend_balance {
   }
   my $balance = $cust_main->balance || 0;
   if ($balance <= $maxbalance) {
-    # or should this be 
-    # my @errors = grep { ($_->get('setup')) && $_->unsuspend } $cust_main->unflagged_suspended_pkgs;
     my @errors = $cust_main->unsuspend;
     # side-fx with nested transactions?  upstack rolls back?
     warn "WARNING:Errors unsuspending customer ". $cust_main->custnum. ": ".

commit 3f3ff0e70a1650ac5afdbd3d3a3d4ae036c656d2
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Thu Mar 17 00:16:35 2016 -0500

    RT#28648: Unsuspend when past due balance is paid [cleanup for backport]

diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm
index 1f38310..bfb218f 100644
--- a/FS/FS/Upgrade.pm
+++ b/FS/FS/Upgrade.pm
@@ -171,6 +171,11 @@ If you need to continue using the old Form 477 report, turn on the
     $conf->set('password-generated-characters', $pw_set);
   }
 
+  if ($conf->exists('unsuspendauto') && !$conf->config('unsuspend_balance')) {
+    $conf->set('unsuspend_balance','Zero');
+    $conf->delete('unsuspendauto');
+  }
+
   enable_banned_pay_pad() unless length($conf->config('banned_pay-pad'));
 
 }
diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm
index ef8d1a4..4356c59 100644
--- a/FS/FS/cust_main/Packages.pm
+++ b/FS/FS/cust_main/Packages.pm
@@ -557,12 +557,14 @@ sub suspended_pkgs {
   grep { $_->susp } $self->ncancelled_pkgs;
 }
 
-=item unflagged_suspended_pkgs
-
-Returns all unflagged suspended packages (see L<FS::cust_pkg>) for this
-customer (thouse packages without the `manual_flag' set).
-
-=cut
+### This appears to be unused, will be going away
+#
+#=item unflagged_suspended_pkgs
+#
+#Returns all unflagged suspended packages (see L<FS::cust_pkg>) for this
+#customer (thouse packages without the `manual_flag' set).
+#
+#=cut
 
 sub unflagged_suspended_pkgs {
   my $self = shift;
diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm
index 86e7968..331a156 100644
--- a/FS/FS/cust_pay.pm
+++ b/FS/FS/cust_pay.pm
@@ -1205,15 +1205,6 @@ sub _upgrade_data {  #class method
       process_upgrade_paybatch();
     }
   }
-
-  # unsuspendauto upgrade
-  # could just as easily go in cust_credit, or even cust_bill or cust_main
-  # but here works
-  if ($conf->exists('unsuspendauto') && !$conf->config('unsuspend_balance')) {
-    $conf->set('unsuspend_balance','Zero');
-    $conf->delete('unsuspendauto');
-  }
-
 }
 
 sub process_upgrade_paybatch {
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 02e0e1e..6a10b71 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -189,11 +189,6 @@ date
 
 order taker (see L<FS::access_user>)
 
-=item manual_flag
-
-If this field is set to 1, disables the automatic
-unsuspension of this package when using the B<unsuspendauto> config option.
-
 =item quantity
 
 If not set, defaults to 1

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

Summary of changes:
 FS/FS/Schema.pm             |    1 -
 FS/FS/Upgrade.pm            |    5 +++++
 FS/FS/cust_main/Packages.pm |   14 --------------
 FS/FS/cust_main_Mixin.pm    |    2 --
 FS/FS/cust_pay.pm           |    9 ---------
 FS/FS/cust_pkg.pm           |   14 +-------------
 6 files changed, 6 insertions(+), 39 deletions(-)




More information about the freeside-commits mailing list