From: C.J. Adams-Collier Date: Wed, 17 Sep 2014 01:05:36 +0000 (-0700) Subject: FS RT #28105 - per Ivan, not updating recur_%_cap fields ; simplified SQL a bit and... X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=43da86c4a7fab275a941650abb11173f4f2930aa 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 005d69d05..e4927a389 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; } }