[freeside-commits] freeside/httemplate/edit part_pkg.cgi, 1.58,
1.59 rate.cgi, 1.9, 1.10
Ivan,,,
ivan at wavetail.420.am
Mon Mar 20 11:13:29 PST 2006
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail:/tmp/cvs-serv20016/httemplate/edit
Modified Files:
part_pkg.cgi rate.cgi
Log Message:
add price plan to bill on internal or external CDRs directly, add option to export CDRs to a per-customer downstream file
Index: part_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/part_pkg.cgi,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- part_pkg.cgi 31 Jan 2006 04:26:54 -0000 1.58
+++ part_pkg.cgi 20 Mar 2006 19:13:26 -0000 1.59
@@ -297,16 +297,35 @@
$html .= ' MULTIPLE'
if $href->{$field}{'type'} eq 'select_multiple';
$html .= qq! NAME="$field" onChange="fchanged(this)">!;
- foreach my $record (
- qsearch( $href->{$field}{'select_table'},
- $href->{$field}{'select_hash'} )
- ) {
- my $value = $record->getfield($href->{$field}{'select_key'});
- $html .= qq!<OPTION VALUE="$value"!.
- ( $plandata{$field} =~ /(^|, *)$value *(,|$)/
- ? ' SELECTED'
- : '' ).
- '>'. $record->getfield($href->{$field}{'select_label'})
+
+ if ( $href->{$field}{'select_table'} ) {
+ foreach my $record (
+ qsearch( $href->{$field}{'select_table'},
+ $href->{$field}{'select_hash'} )
+ ) {
+ my $value = $record->getfield($href->{$field}{'select_key'});
+ $html .= qq!<OPTION VALUE="$value"!.
+ ( $plandata{$field} =~ /(^|, *)$value *(,|$)/
+ ? ' SELECTED'
+ : ''
+ ).
+ '>'. $record->getfield($href->{$field}{'select_label'});
+ }
+ } elsif ( $href->{$field}{'select_options'} ) {
+ foreach my $key ( keys %{ $href->{$field}{'select_options'} } ) {
+ my $value = $href->{$field}{'select_options'}{$key};
+ $html .= qq!<OPTION VALUE="$key"!.
+ ( $plandata{$field} =~ /(^|, *)$value *(,|$)/
+ ? ' SELECTED'
+ : ''
+ ).
+ '>'. $value;
+ }
+
+ } else {
+ $html .= '<font color="#ff0000">warning: '.
+ "don't know how to retreive options for $field select field".
+ '</font>';
}
$html .= '</SELECT>';
}
Index: rate.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/rate.cgi,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- rate.cgi 31 Jan 2006 04:26:54 -0000 1.9
+++ rate.cgi 20 Mar 2006 19:13:27 -0000 1.10
@@ -13,7 +13,9 @@
my $p1 = popurl(1);
my %granularity = (
+ '1', => '1 second',
'6' => '6 second',
+ '30' => '30 second', # '1/2 minute',
'60' => 'minute',
);
@@ -60,9 +62,10 @@
qsearch({
'select' => 'DISTINCT ON ( regionnum ) rate_region.*',
'table' => 'rate_region',
- 'addl_from' => 'INNER JOIN rate_prefix USING ( regionnum )',
'hashref' => {},
- 'extra_sql' => "WHERE countrycode != '1'",
+ #'addl_from' => 'INNER JOIN rate_prefix USING ( regionnum )',
+ #'extra_sql' => "WHERE countrycode != '1'",
+
# 'ORDER BY regionname'
# ERROR: SELECT DISTINCT ON expressions must
# match initial ORDER BY expressions
More information about the freeside-commits
mailing list