% include("/elements/header.html","$action Rate plan", menubar(
'View all rate plans' => "${p}browse/rate.cgi",
))
%>
<% include('/elements/progress-init.html',
'OneTrueForm',
[ 'rate', 'preserve_rate_detail' ], # 'rate', 'min_', 'sec_' ],
'process/rate.cgi',
$p.'browse/rate.cgi',
)
%>
% if($rate->ratenum) {
Rates in this plan
<% include('/edit/elements/rate_detail.html',
'ratenum' => $rate->ratenum
) %>
% }
<% include('/elements/footer.html') %>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
my $rate;
if ( $cgi->keywords ) {
my($query) = $cgi->keywords;
$query =~ /^(\d+)$/;
$rate = qsearchs( 'rate', { 'ratenum' => $1 } );
} else { #adding
$rate = new FS::rate {};
}
my $action = $rate->ratenum ? 'Edit' : 'Add';
%init>