summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main/billing.html
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/view/cust_main/billing.html
parentcb57a42a578be11b85959c295828c995ad97f143 (diff)
start of settlement CDR processing, RT#5495
Diffstat (limited to 'httemplate/view/cust_main/billing.html')
-rw-r--r--httemplate/view/cust_main/billing.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html
index e02c04868..049461dbd 100644
--- a/httemplate/view/cust_main/billing.html
+++ b/httemplate/view/cust_main/billing.html
@@ -216,6 +216,13 @@ Billing information
</TR>
% }
+% if ( $show_term || $cust_main->cdr_termination_percentage ) {
+ <TR>
+ <TD ALIGN="right">CDR termination settlement</TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->cdr_termination_percentage %><% $cust_main->cdr_termination_percentage =~ /\d/ ? '%' : '' %></TD>
+ </TR>
+% }
+
</TABLE></TD></TR></TABLE>
<%once>
@@ -230,4 +237,10 @@ my @invoicing_list = $cust_main->invoicing_list;
my $conf = new FS::Conf;
my $money_char = $conf->config('money_char') || '$';
+#false laziness w/edit/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>