From: Jonathan Prykop <jonathan@freeside.biz>
Date: Sat, 19 Sep 2015 23:11:54 +0000 (-0500)
Subject: RT#35197: Apply changes button in Edit rate plan screen clears the global default... 
X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=15278bb4dcfaf4bdb79c7f8781320e24ef8f1e7d

RT#35197: Apply changes button in Edit rate plan screen clears the global default [removed preserve_rate_detail, always true]
---

diff --git a/FS/FS/rate.pm b/FS/FS/rate.pm
index 03dde041b..d26d11697 100644
--- a/FS/FS/rate.pm
+++ b/FS/FS/rate.pm
@@ -469,11 +469,8 @@ sub process {
     warn "$rate replacing $old (". $param->{'ratenum'}. ")\n" if $DEBUG;
 
     my @param = ( 'job'=>$job );
-    if ($param->{'preserve_rate_detail'}) {
-      $rate->default_detailnum($old->default_detailnum);
-    } else {
-      push @param, 'rate_detail'=>\@rate_detail;
-    }
+    
+    $rate->default_detailnum($old->default_detailnum);
 
     $error = $rate->replace( $old, @param );
 
diff --git a/httemplate/edit/rate.cgi b/httemplate/edit/rate.cgi
index 183ea8a42..1b052d62d 100644
--- a/httemplate/edit/rate.cgi
+++ b/httemplate/edit/rate.cgi
@@ -5,7 +5,7 @@
 
 <% include('/elements/progress-init.html',
               'OneTrueForm',
-              [ 'rate', 'agentnum', 'preserve_rate_detail' ], # 'rate', 'min_', 'sec_' ],
+              [ 'rate', 'agentnum' ],
               'process/rate.cgi',
               $p.'browse/rate.cgi',
            )
@@ -27,8 +27,6 @@
 </TABLE>
 <BR>
 
-<INPUT TYPE="hidden" NAME="preserve_rate_detail" VALUE="1">
-
 <INPUT NAME="submit" TYPE="button" VALUE="<% 
   $rate->ratenum ? "Apply changes" : "Add rate plan"
 %>" onClick="document.OneTrueForm.submit.disabled=true; process();">