[freeside-commits] branch master updated. c13a7adf63cc830d092bbf4a8e9bda2aa3beee56

Jonathan Prykop jonathan at 420.am
Tue Aug 25 19:25:35 PDT 2015


The branch, master has been updated
       via  c13a7adf63cc830d092bbf4a8e9bda2aa3beee56 (commit)
      from  f4fc0bd2f813272ed1a878dd9f130fe155a6e3ff (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c13a7adf63cc830d092bbf4a8e9bda2aa3beee56
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Tue Aug 25 21:25:15 2015 -0500

    RT#18361: Delay package from billing until services are provisioned [bug fix to javascript]

diff --git a/httemplate/elements/tr-pkg_svc.html b/httemplate/elements/tr-pkg_svc.html
index 1e9c0a3..7ac67b7 100644
--- a/httemplate/elements/tr-pkg_svc.html
+++ b/httemplate/elements/tr-pkg_svc.html
@@ -1,15 +1,14 @@
 <TR>
   <TD CLASS="background" COLSPAN=99>
 
-<% itable('', 4, 1) %><TR><TD VALIGN="top">
-<% $thead %>
-
 <SCRIPT>
 var provision_hold_td = [];
 var provision_hold_input = [];
-provision_hold_td.push(document.getElementById('th_provision_hold'));
 </SCRIPT>
 
+<% itable('', 4, 1) %><TR><TD VALIGN="top">
+<% pkg_svc_thead() %>
+
 %foreach my $part_svc ( @part_svc ) {
 %  my $svcpart = $part_svc->svcpart;
 %  my $pkg_svc = $pkg_svc{$svcpart}
@@ -97,7 +96,7 @@ provision_hold_input.push(document.getElementById('input_provision_hold<% $svcpa
 %       if ( $count == int( $_ * scalar(@part_svc) / $columns ) ) { 
 %  
 
-         </TABLE></TD><TD VALIGN="top"><% $thead %>
+         </TABLE></TD><TD VALIGN="top"><% pkg_svc_thead() %>
 %   }
 %     }
 %     $count++;
@@ -161,15 +160,21 @@ provision_hold_init();
 my %opt = @_;
 my $cgi = $opt{'cgi'};
 
-my $thead =  "\n\n". ntable('#cccccc', 2).
-             '<TR>'.
-             '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Quan.</FONT></TH>'.
-             '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Primary</FONT></TH>'.
-             '<TH BGCOLOR="#dcdcdc">Service</TH>'.
-             '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Hide<BR>from<BR>Invoices</FONT></TH>'.
-             '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Bulk<BR>Charge</FONT></TH>'.
-             '<TH BGCOLOR="#dcdcdc" ID="th_provision_hold"><FONT SIZE=-1>Remove Hold After Provisioning</FONT></TH>'.
-             '</TR>';
+my $thead_count = 0;
+sub pkg_svc_thead {
+  $thead_count += 1;
+  return "\n\n". ntable('#cccccc', 2).
+         '<TR>'.
+         '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Quan.</FONT></TH>'.
+         '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Primary</FONT></TH>'.
+         '<TH BGCOLOR="#dcdcdc">Service</TH>'.
+         '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Hide<BR>from<BR>Invoices</FONT></TH>'.
+         '<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Bulk<BR>Charge</FONT></TH>'.
+         '<TH BGCOLOR="#dcdcdc" ID="th_provision_hold' . $thead_count . '"><FONT SIZE=-1>Remove Hold After Provisioning</FONT></TH>'.
+         '</TR>'.
+         qq!<SCRIPT>provision_hold_td.push(document.getElementById('th_provision_hold$thead_count'))</SCRIPT>!;
+;
+}
 
 my $part_pkg = $opt{'object'};
 my $pkgpart = $part_pkg->pkgpart;

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/tr-pkg_svc.html |   33 +++++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)




More information about the freeside-commits mailing list