X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Frate.cgi;h=79bebadee99a7e85ebcc39e23888b8b779d697ac;hp=ea59a0c5bc462312f308fa57ca43dd115ac5d3ff;hb=c49cfd25a8f92c7a2f44b51d72506a21f6b8d09f;hpb=d2a42bce5c5557966cc0f0966e4b9d14fff576a0 diff --git a/httemplate/browse/rate.cgi b/httemplate/browse/rate.cgi index ea59a0c5b..79bebadee 100644 --- a/httemplate/browse/rate.cgi +++ b/httemplate/browse/rate.cgi @@ -8,9 +8,9 @@ 'order_by' => 'ORDER BY ratenum', }, 'count_query' => $count_query, - 'header' => [ '#', 'Rate plan', 'Rates' ], - 'fields' => [ 'ratenum', 'ratename', $rates_sub ], - 'links' => [ $link, $link, '' ], + 'header' => \@header, + 'fields' => \@fields, + 'links' => \@links, 'agent_virt' => 1, 'agent_pos' => 1, 'agent_null_right' => 'Configuration', #'Edit global CDR rates', @@ -76,4 +76,18 @@ if ( $curuser->access_right('Configuration') ) { #, 'Edit global CDR rates') ) { ; } +my @header = (); +my @fields = (); +my @links = (); + +if ( FS::Record->scalar_sql('SELECT 1 FROM rate WHERE agent_rateid IS NOT NULL LIMIT 1') ) { + push @header, 'Legacy #'; + push @fields, 'agent_rateid'; + push @links, $link; +} + +push @header, 'Rate plan', 'Rates'; +push @fields, 'ratename', $rates_sub; +push @links, $link, ''; +