summaryrefslogtreecommitdiff
path: root/httemplate/edit/cust_main
diff options
context:
space:
mode:
authorivan <ivan>2009-07-01 10:28:49 +0000
committerivan <ivan>2009-07-01 10:28:49 +0000
commita67fd3bbfeec137ebf494e36eaa920145b8509a1 (patch)
tree8092ca7a5abc3ea1817e2edbd0a2ff3b37c466bc /httemplate/edit/cust_main
parentcb57a42a578be11b85959c295828c995ad97f143 (diff)
start of settlement CDR processing, RT#5495
Diffstat (limited to 'httemplate/edit/cust_main')
-rw-r--r--httemplate/edit/cust_main/billing.html27
1 files changed, 23 insertions, 4 deletions
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html
index f0d9b853a..4c4be23c0 100644
--- a/httemplate/edit/cust_main/billing.html
+++ b/httemplate/edit/cust_main/billing.html
@@ -427,18 +427,31 @@
<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 %>">
-% }
+% }
% if ( $conf->exists('voip-cust_cdr_squelch') ) {
<TR>
<TD COLSPAN="2"><INPUT TYPE="checkbox" NAME="squelch_cdr" VALUE="Y" <% $cust_main->squelch_cdr eq "Y" ? 'CHECKED' : '' %>> Omit CDRs from invoices</TD>
</TR>
% } else {
-
<INPUT TYPE="hidden" NAME="squelch_cdr" VALUE="<% $cust_main->squelch_cdr %>">
-% }
+% }
+
+
+% if ( $show_term || $cust_main->cdr_termination_percentage ) {
+ <TR>
+ <TD ALIGN="right">CDR termination settlement</TD>
+ <TD><INPUT TYPE = "text"
+ NAME = "cdr_termination_percentage"
+ SIZE = 6
+ VALUE = "<% $cust_main->cdr_termination_percentage %>"
+ STYLE = "text-align:right;"
+ ><B>%</B></TD>
+ </TR>
+% } else {
+ <INPUT TYPE="hidden" NAME="cdr_termination_percentage" VALUE="<% $cust_main->cdr_termination_percentage %>">
+% }
</TABLE>
@@ -464,4 +477,10 @@ my @payby = grep /\w/, $conf->config('payby');
@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP ))
unless @payby;
+#false laziness w/view/cust_main/billing.html
+my $term_sql = "SELECT COUNT(*) FROM cust_pkg LEFT JOIN part_pkg USING ( pkgpart ) WHERE custnum = ? AND plan = 'cdr_termination' LIMIT 1";
+my $term_sth = dbh->prepare($term_sql) or die dbh->errstr;
+$term_sth->execute($cust_main->custnum) or die $term_sth->errstr;
+my $show_term = $term_sth->fetchrow_arrayref->[0];
+
</%init>