summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorivan <ivan>2006-03-20 19:13:27 +0000
committerivan <ivan>2006-03-20 19:13:27 +0000
commitff24bc786a5fd479f2252260e0da580a736f97be (patch)
tree6d3496500bebd4f17f754ab79478c53dea1b5daf /httemplate/edit
parent96fde39e747fdc5c618b5a92ec354384931cf317 (diff)
add price plan to bill on internal or external CDRs directly, add option to export CDRs to a per-customer downstream file
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/cust_main/billing.html10
-rwxr-xr-xhttemplate/edit/part_pkg.cgi39
-rw-r--r--httemplate/edit/rate.cgi7
3 files changed, 43 insertions, 13 deletions
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html
index 96f777baa..790f41f00 100644
--- a/httemplate/edit/cust_main/billing.html
+++ b/httemplate/edit/cust_main/billing.html
@@ -348,7 +348,7 @@ if ( $payby_default eq 'HIDE' ) {
);
-
+ #this should use FS::payby
my %allopt = (
'CARD' => 'Credit card',
'CHEK' => 'Electronic check',
@@ -433,6 +433,14 @@ if ( $payby_default eq 'HIDE' ) {
<TD WIDTH="408"><INPUT TYPE="text" NAME="invoicing_list" VALUE="<%= join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) %>"></TD>
</TR>
+ <% if ( $conf->exists('voip-cust_cdr_spools') ) { %>
+ <TR>
+ <TD COLSPAN="2"><INPUT TYPE="checkbox" NAME="spool_cdr" VALUE="Y" <%= $cust_main->spool_cdr eq "Y" ? 'CHECKED' : '' %>> Spool CDRs</TD>
+ </TR>
+ <% } else { %>
+ <INPUT TYPE="hidden" NAME="spool_cdr" VALUE="<%= $cust_main->spool_cdr %>">
+ <% } %>
+
</TABLE>
</FORM>
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index 61e4086be..158c6e2ff 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -297,16 +297,35 @@ my $widget = new HTML::Widgets::SelectLayers(
$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>';
}
diff --git a/httemplate/edit/rate.cgi b/httemplate/edit/rate.cgi
index f8f67f6c4..9aa4e7291 100644
--- a/httemplate/edit/rate.cgi
+++ b/httemplate/edit/rate.cgi
@@ -13,7 +13,9 @@ my $action = $rate->ratenum ? 'Edit' : 'Add';
my $p1 = popurl(1);
my %granularity = (
+ '1', => '1 second',
'6' => '6 second',
+ '30' => '30 second', # '1/2 minute',
'60' => 'minute',
);
@@ -60,9 +62,10 @@ Rate plan
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