Merge branch 'master' of git.freeside.biz:/home/git/freeside
authorMark Wells <mark@freeside.biz>
Sun, 20 Sep 2015 20:01:21 +0000 (10:01 -1000)
committerMark Wells <mark@freeside.biz>
Sun, 20 Sep 2015 20:01:21 +0000 (10:01 -1000)
FS/FS/rate.pm
httemplate/edit/rate.cgi
httemplate/elements/select-tower_sector.html
httemplate/view/cust_main/billing.html

index 03dde04..d26d116 100644 (file)
@@ -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 );
 
index 183ea8a..1b052d6 100644 (file)
@@ -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();">
index 458bcdd..76ff252 100644 (file)
@@ -2,6 +2,8 @@
 <& /elements/select-table.html,
     table       => 'tower_sector',
     name_col    => 'description',
+    addl_from   => 'JOIN tower USING (towernum)',
+    extra_sql   => q(WHERE disabled = '' OR disabled IS NULL),
     order_by    => 'ORDER BY towernum,sectorname',
     empty_label => ' ',
     @_ 
index f7ea68a..0c9f74a 100644 (file)
@@ -44,7 +44,7 @@
 %       'hashref'   => { 'custnum' => $cust_main->custnum, },
 %       'extra_sql' => 'AND ( cancel IS NULL OR cancel = 0 )
 %                       AND freq = '. dbh->quote($freq),
-%       'order_by'  => 'ORDER BY pkgnum', # to ensure old pkgs come before change_to_pkg
+%       'order_by'  => 'ORDER BY COALESCE(start_date,0), pkgnum', # to ensure old pkgs come before change_to_pkg
 %     }) or next;
 % 
 %     my $freq_pretty = $cust_pkg[0]->part_pkg->freq_pretty;