[freeside-commits] freeside/httemplate/edit/elements rate_detail.html, 1.1, 1.2
Mark Wells
mark at wavetail.420.am
Fri Feb 25 15:46:09 PST 2011
Update of /home/cvs/cvsroot/freeside/httemplate/edit/elements
In directory wavetail.420.am:/tmp/cvs-serv16257/edit/elements
Modified Files:
rate_detail.html
Log Message:
missing changes from cdr_type
Index: rate_detail.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/elements/rate_detail.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- rate_detail.html 22 Jul 2010 19:42:55 -0000 1.1
+++ rate_detail.html 25 Feb 2011 23:46:07 -0000 1.2
@@ -35,14 +35,14 @@
% $region = $r;
% foreach ($r->regionname, $r->prefixes_short) {
<TD>
- <A HREF="<% $p.'edit/rate_region.cgi?'.$r->regionnum %>"><% $_ %></A>
+ <A HREF="<% $p.'edit/rate_region.cgi?regionnum='.$r->regionnum %>"><% $_ %></A>
</TD>
% }
% }
% elsif ( !$opt{'ratenum'} ) {
% $rate = $r;
<TD>
- <A HREF="<% $p.'edit/rate.cgi?'.$r->ratenum %>"><% $r->ratename %></A>
+ <A HREF="<% $p.'edit/rate.cgi?ratenum='.$r->ratenum %>"><% $r->ratename %></A>
</TD>
% }
% foreach my $rate_time (@rate_time, '') {
@@ -57,11 +57,12 @@
<% granularity_detail($detail) %>
<% min_included_detail($detail) %>
<% conn_charge_detail($detail) %>
- <TR><TD><% $rate_time ? delete_link($detail) : '' %></TD></TR>
+ <TR><TD><% ( $rate_time || $cdrtypenum ) ? delete_link($detail) : '' %>
+ </TD></TR>
</TABLE>
% }
% else { #!$detail
- <% add_link($rate, $region, $rate_time) %>
+ <% add_link($rate, $region, $rate_time, $cdrtypenum) %>
% }
% $col++;
</TD>
@@ -98,16 +99,16 @@
}
sub add_link {
- my ($rate, $region, $rate_time) = @_;
+ my ($rate, $region, $rate_time, $cdrtypenum) = @_;
'<A HREF="javascript:void(0);" onclick="'.
include( '/elements/popup_link_onclick.html',
'action' => "${p}edit/rate_detail.html?ratenum=".
$rate->ratenum.
';dest_regionnum='.
$region->regionnum.
- ($rate_time ?
- ';ratetimenum='.$rate_time->ratetimenum :
- ''),
+ ';ratetimenum='.
+ ($rate_time ? $rate_time->ratetimenum : '').
+ ";cdrtypenum=$cdrtypenum",
'actionlabel' => 'Add rate',
'height' => 420,
).'">'.small('(add)').'</A>'
@@ -172,6 +173,7 @@
my %opt = @_;
my $ratenum = $opt{'ratenum'} || '';
my $regionnum = $opt{'regionnum'} || '';
+my $cdrtypenum = $opt{'cdrtypenum'} || '';
# either of these, if the $opt isn't passed, will be set to the
# correct object when generating each row.
@@ -214,6 +216,7 @@
push @details, [ map { qsearchs('rate_detail',
{ 'ratenum' => $ratenum,
'dest_regionnum' => $region->regionnum,
+ 'cdrtypenum' => $cdrtypenum,
'ratetimenum' => $_ } ) or ''
} @rtns
];
@@ -227,6 +230,7 @@
push @details, [ map { qsearchs('rate_detail',
{ 'ratenum' => $rate->ratenum,
'dest_regionnum' => $regionnum,
+ 'cdrtypenum' => $cdrtypenum,
'ratetimenum' => $_ } ) or ''
} @rtns
];
More information about the freeside-commits
mailing list