[freeside-commits] branch master updated. 43da86c4a7fab275a941650abb11173f4f2930aa

Carl J. Adams-Collier cjac at 420.am
Tue Sep 16 18:06:00 PDT 2014


The branch, master has been updated
       via  43da86c4a7fab275a941650abb11173f4f2930aa (commit)
      from  fb385e8010a75583e7994433e2733cb9c2d2c486 (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 43da86c4a7fab275a941650abb11173f4f2930aa
Author: C.J. Adams-Collier <cjac at colliertech.org>
Date:   Tue Sep 16 18:05:36 2014 -0700

    FS RT #28105 - per Ivan, not updating recur_%_cap fields ; simplified SQL a bit and reduced query count by 3

diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm
index 005d69d..e4927a3 100644
--- a/FS/FS/part_pkg.pm
+++ b/FS/FS/part_pkg.pm
@@ -1818,23 +1818,16 @@ sub _upgrade_data { # class method
 	die $error if $error;
       }
 
-      foreach my $optionname( qw(
-				  recur_hourly_%
-				  recur_input_%
-				  recur_output_%
-				  recur_total_%
-			       ) ){
-	foreach my $opt (qsearch('part_pkg_option',
-				 { 'optionname'  => { op => 'LIKE',
-						      value => $optionname,
-						    },
-				   pkgpart => $pkgpart,
-				 })){
-	  $opt->optionvalue($opt->optionvalue * 1024);
-
-	  my $error = $opt->replace;
-	  die $error if $error;
-	}
+      foreach my $opt (qsearch('part_pkg_option',
+			       { 'optionname'  => { op => 'LIKE',
+						    value => 'recur_%_charge',
+						  },
+				 pkgpart => $pkgpart,
+			       })){
+	$opt->optionvalue($opt->optionvalue * 1024);
+
+	my $error = $opt->replace;
+	die $error if $error;
       }
 
     }

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

Summary of changes:
 FS/FS/part_pkg.pm |   27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)




More information about the freeside-commits mailing list