diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-05-28 02:32:52 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-05-28 02:32:52 -0700 |
commit | b988005162046dcbaa3d4f167f507ba6d6bb80e4 (patch) | |
tree | 46df0ef229f177d288c887bbe473396e53e142cd /httemplate/edit | |
parent | e7ad2eb96136818535381e41c2483bea121084cc (diff) |
rate cost fields, RT#27555
Diffstat (limited to 'httemplate/edit')
-rw-r--r-- | httemplate/edit/elements/rate_detail.html | 13 | ||||
-rwxr-xr-x | httemplate/edit/process/rate_region.cgi | 2 | ||||
-rw-r--r-- | httemplate/edit/rate_detail.html | 8 |
3 files changed, 17 insertions, 6 deletions
diff --git a/httemplate/edit/elements/rate_detail.html b/httemplate/edit/elements/rate_detail.html index 1b597fb4a..cd3efe1e3 100644 --- a/httemplate/edit/elements/rate_detail.html +++ b/httemplate/edit/elements/rate_detail.html @@ -52,6 +52,9 @@ with row headers showing the region name and prefixes. <TABLE CLASS="inv" STYLE="border:none"> <TR><TD><% edit_link($detail) %><% $money_char.$detail->min_charge %> <% $detail->sec_granularity ? ' / minute':' / call' %> +% if ( $detail->min_cost ) { + (<% $money_char.$detail->min_charge %> cost) +% } <% $edit_hint %></A> </TD></TR> <% granularity_detail($detail) %> @@ -92,7 +95,7 @@ sub edit_link { include( '/elements/popup_link_onclick.html', 'action' => "${p}edit/rate_detail.html?$ratedetailnum", 'actionlabel' => 'Edit rate', - 'height' => 420, + 'height' => 460, #default# 'width' => 540, #default# 'color' => '#333399', ) . '">' @@ -110,7 +113,7 @@ sub add_link { ($rate_time ? $rate_time->ratetimenum : ''). ";cdrtypenum=$cdrtypenum", 'actionlabel' => 'Add rate', - 'height' => 420, + 'height' => 460, ).'">'.small('(add)').'</A>' } @@ -157,7 +160,11 @@ sub conn_charge_detail { #return '' unless $rate_detail->conn_charge > 0 || $rate_detail->conn_sec; '<TR><TD>'. small( $money_char. $rate_detail->conn_charge. - ' for '.$conn_secs{$rate_detail->conn_sec} + ( $rate_detail->conn_cost + ? ' ('. $money_char.$rate_detail->conn_cost. ' cost)' + : '' + ). + ' for '. $conn_secs{$rate_detail->conn_sec} ). '</TD></TR>' } diff --git a/httemplate/edit/process/rate_region.cgi b/httemplate/edit/process/rate_region.cgi index d342e605a..87d634a62 100755 --- a/httemplate/edit/process/rate_region.cgi +++ b/httemplate/edit/process/rate_region.cgi @@ -2,7 +2,7 @@ % $cgi->param('error', $error); <% $cgi->redirect(popurl(2). "rate_region.cgi?". $cgi->query_string ) %> %} elsif ( $action eq 'Add' ) { -<% $cgi->redirect(popurl(2). "rate_region.cgi?$regionnum") %> +<% $cgi->redirect(popurl(2). "rate_region.cgi?regionnum=$regionnum") %> %} else { <% $cgi->redirect(popurl(3). "browse/rate_region.html") %> %} diff --git a/httemplate/edit/rate_detail.html b/httemplate/edit/rate_detail.html index 0e406897f..0de6ecc1e 100644 --- a/httemplate/edit/rate_detail.html +++ b/httemplate/edit/rate_detail.html @@ -8,10 +8,12 @@ 'rate_time_name' => 'Time period', 'min_included' => 'Included minutes/calls', 'region_group' => 'Region Group', - 'conn_charge' => 'Connection charge', + 'conn_charge' => 'Retail connection charge', 'conn_sec' => 'For', - 'min_charge' => 'Charge per minute/call', + 'min_charge' => 'Retail charge per minute/call', 'sec_granularity' => 'Granularity', + 'conn_cost' => 'Wholesale connection cost', + 'min_cost' => 'Wholesale cost per minute/call', 'classnum' => 'Usage class', }, 'fields' => [ @@ -29,6 +31,7 @@ }, { field=>'min_included', type=>'text', size=>5 }, { field=>'conn_charge', type=>'money', size=>4 }, + { field=>'conn_cost', type=>'money', size=>4 }, { field =>'conn_sec', type =>'select', options => [ keys %conn_secs ], @@ -36,6 +39,7 @@ disable_empty => 1, }, { field=>'min_charge', type=>'money', size=>4 }, + { field=>'min_cost', type=>'money', size=>4 }, { field =>'sec_granularity', type =>'select', options => [ keys %granularity ], |