summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/cdr/aapt.pm2
-rw-r--r--httemplate/elements/tr-pkg_svc.html36
-rwxr-xr-xhttemplate/misc/process/void-cust_bill.html2
-rw-r--r--httemplate/misc/void-cust_bill.html2
4 files changed, 25 insertions, 17 deletions
diff --git a/FS/FS/cdr/aapt.pm b/FS/FS/cdr/aapt.pm
index 600a1920f..3c4964317 100644
--- a/FS/FS/cdr/aapt.pm
+++ b/FS/FS/cdr/aapt.pm
@@ -77,7 +77,7 @@ my %UNIT_SCALE = ( #Table 2.1.4
'calltypenum', # usage ID (CUSG)
sub { # ID type
my ($cdr, $data, $conf, $param) = @_;
- if ($data != 1) {
+ if ($data !~ /(1|50)/) {
warn "AAPT: service ID type is not telephone number.\n";
$param->{skiprow} = 1;
}
diff --git a/httemplate/elements/tr-pkg_svc.html b/httemplate/elements/tr-pkg_svc.html
index 1e9c0a38b..de3f95a3a 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++;
@@ -115,6 +114,9 @@ function provision_hold_check () {
for (i = 0; i < provision_hold_td.length; i++) {
provision_hold_td[i].style.display = start_on_hold.checked ? '' : 'none';
}
+ for (i = 0; i < provision_hold_input.length; i++) {
+ provision_hold_input[i].disabled = start_on_hold.checked ? false : true;
+ }
}
}
function provision_hold_init () {
@@ -161,15 +163,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;
diff --git a/httemplate/misc/process/void-cust_bill.html b/httemplate/misc/process/void-cust_bill.html
index accee27fd..7773b0ba9 100755
--- a/httemplate/misc/process/void-cust_bill.html
+++ b/httemplate/misc/process/void-cust_bill.html
@@ -21,6 +21,6 @@ my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
my $custnum = $cust_bill->custnum;
-my $error = $cust_bill->void( $cgi->param('reason') );
+my $error = $cust_bill->void( scalar($cgi->param('reason')) );
</%init>
diff --git a/httemplate/misc/void-cust_bill.html b/httemplate/misc/void-cust_bill.html
index 1608fd051..39b071229 100644
--- a/httemplate/misc/void-cust_bill.html
+++ b/httemplate/misc/void-cust_bill.html
@@ -14,7 +14,7 @@
<% ntable("#cccccc", 2) %>
<TR>
<TD ALIGN="right">Reason</TD>
- <TD><INPUT TYPE="text" NAME="reason" VALUE="<% $cgi->param('reason') |h %>"></TD>
+ <TD><INPUT TYPE="text" NAME="reason" VALUE="<% scalar($cgi->param('reason')) |h %>"></TD>
</TR>
</TABLE>