[freeside-commits] freeside/httemplate/edit rate_detail.html, 1.1, 1.2 rate_region.cgi, 1.8, 1.9
Jeff Finucane,420,,
jeff at wavetail.420.am
Wed Mar 26 08:43:11 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv4192/httemplate/edit
Modified Files:
rate_detail.html rate_region.cgi
Log Message:
fixup per call billing
Index: rate_region.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/rate_region.cgi,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- rate_region.cgi 13 Feb 2008 23:42:00 -0000 1.8
+++ rate_region.cgi 26 Mar 2008 15:43:08 -0000 1.9
@@ -132,13 +132,7 @@
my $p1 = popurl(1);
-tie my %granularity, 'Tie::IxHash',
- '1', => '1 second',
- '6' => '6 second',
- '30' => '30 second', # '1/2 minute',
- '60' => 'minute',
- '0' => 'call',
-;
+tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
my @rate_prefix = $rate_region->rate_prefix;
my $countrycode = '';
Index: rate_detail.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/rate_detail.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- rate_detail.html 10 Jan 2008 21:52:28 -0000 1.1
+++ rate_detail.html 26 Mar 2008 15:43:06 -0000 1.2
@@ -19,7 +19,7 @@
{ field=>'min_charge', type=>'money', size=>4 },
{ field =>'sec_granularity',
type =>'select',
- options => [qw( 1 6 30 60 )],
+ options => [ keys %granularity ],
labels => \%granularity,
disable_empty => 1,
},
@@ -29,12 +29,7 @@
%>
<%once>
-tie my %granularity, 'Tie::IxHash',
- '1', => '1 second',
- '6' => '6 second',
- '30' => '30 second', # '1/2 minute',
- '60' => 'minute',
-;
+tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
</%once>
@@ -46,7 +41,8 @@
#slightly inefficient, i suppose an edit+error callback would be better
my $name = 'rate';
-if ( $cgi->keywords =~ /^(\d+)$/
+my ($keywords) = $cgi->keywords;
+if ( $keywords =~ /^(\d+)$/
|| $cgi->param('ratedetailnum') =~ /^(\d+)$/ ) {
my $rate_detail = qsearchs('rate_detail', { 'ratedetailnum' => $1 } )
or die "unknown ratedetailnum $1";
More information about the freeside-commits
mailing list