[freeside-commits] freeside/httemplate/view/cust_main billing.html, 1.17, 1.18

Ivan,,, ivan at wavetail.420.am
Wed Jul 1 03:28:51 PDT 2009


Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory wavetail.420.am:/tmp/cvs-serv10174/httemplate/view/cust_main

Modified Files:
	billing.html 
Log Message:
start of settlement CDR processing, RT#5495

Index: billing.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/billing.html,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- billing.html	22 Jun 2009 07:50:18 -0000	1.17
+++ billing.html	1 Jul 2009 10:28:49 -0000	1.18
@@ -216,6 +216,13 @@
   </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 $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>



More information about the freeside-commits mailing list