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 );
<% include('/elements/progress-init.html',
'OneTrueForm',
- [ 'rate', 'agentnum', 'preserve_rate_detail' ], # 'rate', 'min_', 'sec_' ],
+ [ 'rate', 'agentnum' ],
'process/rate.cgi',
$p.'browse/rate.cgi',
)
</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();">
<& /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 => ' ',
@_
% '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;