summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/edit/REAL_cust_pkg.cgi162
-rwxr-xr-xhttemplate/view/cust_main/packages.html280
2 files changed, 294 insertions, 148 deletions
diff --git a/httemplate/edit/REAL_cust_pkg.cgi b/httemplate/edit/REAL_cust_pkg.cgi
index 2f6be7cad..78dd0fafa 100755
--- a/httemplate/edit/REAL_cust_pkg.cgi
+++ b/httemplate/edit/REAL_cust_pkg.cgi
@@ -1,6 +1,4 @@
-<!-- mason kludge -->
<%
-# <!-- $Id: REAL_cust_pkg.cgi,v 1.9 2005-02-27 11:05:35 ivan Exp $ -->
my $error ='';
my $pkgnum = '';
@@ -33,17 +31,20 @@ if ( $error ) {
}
#my $custnum = $cust_pkg->getfield('custnum');
-print header('Package Edit'); #, menubar(
+%>
+
+<%= header('Customer package - Edit dates') %>
+<%
+#, menubar(
# "View this customer (#$custnum)" => popurl(2). "view/cust_main.cgi?$custnum",
# 'Main Menu' => popurl(2)
#));
-
%>
- <LINK REL="stylesheet" TYPE="text/css" HREF="../elements/calendar-win2k-2.css" TITLE="win2k-2">
- <SCRIPT TYPE="text/javascript" SRC="../elements/calendar_stripped.js"></SCRIPT>
- <SCRIPT TYPE="text/javascript" SRC="../elements/calendar-en.js"></SCRIPT>
- <SCRIPT TYPE="text/javascript" SRC="../elements/calendar-setup.js"></SCRIPT>
+<LINK REL="stylesheet" TYPE="text/css" HREF="../elements/calendar-win2k-2.css" TITLE="win2k-2">
+<SCRIPT TYPE="text/javascript" SRC="../elements/calendar_stripped.js"></SCRIPT>
+<SCRIPT TYPE="text/javascript" SRC="../elements/calendar-en.js"></SCRIPT>
+<SCRIPT TYPE="text/javascript" SRC="../elements/calendar-setup.js"></SCRIPT>
<%
@@ -57,67 +58,106 @@ my($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment'));
my($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill'));
my $otaker = $cust_pkg->getfield('otaker');
-print '<FORM NAME="formname" ACTION="process/REAL_cust_pkg.cgi" METHOD="POST">', qq!<INPUT TYPE="hidden" NAME="pkgnum" VALUE="$pkgnum">!;
+%>
+
+<FORM NAME="formname" ACTION="process/REAL_cust_pkg.cgi" METHOD="POST">
+<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<%= $pkgnum %>">
+
+<% if ( $error ) { %>
+ <FONT SIZE="+1" COLOR="#ff0000">Error: <%= $error %></FONT>
+<% } %>
-print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: $error</FONT>!
- if $error;
+<%
#my $format = "%c %z (%Z)";
my $format = "%m/%d/%Y %T %z (%Z)";
-print ntable("#cccccc",2),
- '<TR><TD ALIGN="right">Package number</TD><TD BGCOLOR="#ffffff">',
- $pkgnum, '</TD></TR>',
- '<TR><TD ALIGN="right">Package</TD><TD BGCOLOR="#ffffff">',
- $pkg, '</TD></TR>',
- '<TR><TD ALIGN="right">Comment</TD><TD BGCOLOR="#ffffff">',
- $comment, '</TD></TR>',
- '<TR><TD ALIGN="right">Order taker</TD><TD BGCOLOR="#ffffff">',
- $otaker, '</TD></TR>',
- '<TR><TD ALIGN="right">Setup date</TD><TD>'.
- '<INPUT TYPE="text" NAME="setup" SIZE=32 ID="setup_text" VALUE="',
- ( $setup ? time2str($format, $setup) : "" ), '">'.
- ' <IMG SRC="../images/calendar.png" ID="setup_button" STYLE="cursor: pointer" TITLE="Select date">'.
- '</TD></TR>';
-
-print '<TR><TD ALIGN="right">Last bill date</TD><TD>',
- '<INPUT TYPE="text" NAME="last_bill" SIZE=32 ID="last_bill_text" VALUE="',
- ( $cust_pkg->last_bill
- ? time2str($format, $cust_pkg->last_bill)
- : "" ),
- '">'.
- ' <IMG SRC="../images/calendar.png" ID="last_bill_button" STYLE="cursor: pointer" TITLE="Select date">'.
- '</TD></TR>'
- if $cust_pkg->dbdef_table->column('last_bill');
-
-print '<TR><TD ALIGN="right">Next bill date</TD><TD>',
- '<INPUT TYPE="text" NAME="bill" SIZE=32 ID="bill_text" VALUE="',
- ( $bill ? time2str($format, $bill) : "" ), '">'.
- ' <IMG SRC="../images/calendar.png" ID="bill_button" STYLE="cursor: pointer" TITLE="Select date">'.
- '</TD></TR>';
-
-print '<TR><TD ALIGN="right">Suspension date</TD><TD BGCOLOR="#ffffff">',
- time2str($format, $susp), '</TD></TR>'
- if $susp;
-
-#print '<TR><TD ALIGN="right">Expiration date</TD><TD BGCOLOR="#ffffff">',
-# time2str("%D",$expire), '</TD></TR>'
-# if $expire;
-print '<TR><TD ALIGN="right">Expiration date'.
- '</TD><TD>',
- '<INPUT TYPE="text" NAME="expire" SIZE=32 ID="expire_text" VALUE="',
- ( $expire ? time2str($format, $expire) : "" ), '">'.
- ' <IMG SRC="../images/calendar.png" ID="expire_button" STYLE="cursor: pointer" TITLE="Select date">'.
- '<BR><FONT SIZE=-1>(will <b>cancel</b> this package'.
- ' when the date is reached)</FONT>'.
- '</TD></TR>';
-
-print '<TR><TD ALIGN="right">Cancellation date</TD><TD BGCOLOR="#ffffff">',
- time2str($format, $cancel), '</TD></TR>'
- if $cancel;
+#false laziness w/view/cust_main/packages.html
+#my( $billed_or_prepaid,
+my( $last_bill_or_renewed, $next_bill_or_prepaid_until );
+unless ( $part_pkg->is_prepaid ) {
+ #$billed_or_prepaid = 'billed';
+ $last_bill_or_renewed = 'Last bill';
+ $next_bill_or_prepaid_until = 'Next bill';
+} else {
+ #$billed_or_prepaid = 'prepaid';
+ $last_bill_or_renewed = 'Renewed';
+ $next_bill_or_prepaid_until = 'Prepaid until';
+}
%>
+
+<%= ntable("#cccccc",2) %>
+
+ <TR>
+ <TD ALIGN="right">Package number</TD>
+ <TD BGCOLOR="#ffffff"><%= $pkgnum %></TD>
+ </TR>
+
+ <TR>
+ <TD ALIGN="right">Package</TD>
+ <TD BGCOLOR="#ffffff"><%= $pkg %></TD>
+ </TR>
+
+ <TR>
+ <TD ALIGN="right">Comment</TD>
+ <TD BGCOLOR="#ffffff"><%= $comment %></TD>
+ </TR>
+
+ <TR>
+ <TD ALIGN="right">Order taker</TD>
+ <TD BGCOLOR="#ffffff"><%= $otaker %></TD>
+ </TR>
+
+ <TR>
+ <TD ALIGN="right">Setup date</TD>
+ <TD>
+ <INPUT TYPE="text" NAME="setup" SIZE=32 ID="setup_text" VALUE="<%= ( $setup ? time2str($format, $setup) : "" ) %>">
+ <IMG SRC="../images/calendar.png" ID="setup_button" STYLE="cursor: pointer" TITLE="Select date">
+ </TD>
+ </TR>
+
+ <TR>
+ <TD ALIGN="right"><%= $last_bill_or_renewed %> date</TD>
+ <TD>
+ <INPUT TYPE="text" NAME="last_bill" SIZE=32 ID="last_bill_text" VALUE="<%= ( $cust_pkg->last_bill ? time2str($format, $cust_pkg->last_bill) : "" ) %>">
+ <IMG SRC="../images/calendar.png" ID="last_bill_button" STYLE="cursor: pointer" TITLE="Select date">
+ </TD>
+ </TR>
+
+ <TR>
+ <TD ALIGN="right"><%= $next_bill_or_prepaid_until %> date</TD>
+ <TD>
+ <INPUT TYPE="text" NAME="bill" SIZE=32 ID="bill_text" VALUE="<%= ( $bill ? time2str($format, $bill) : "" ) %>">
+ <IMG SRC="../images/calendar.png" ID="bill_button" STYLE="cursor: pointer" TITLE="Select date">
+ </TD>
+ </TR>
+
+ <% if ( $susp ) { %>
+ <TR>
+ <TD ALIGN="right">Suspension date</TD>
+ <TD BGCOLOR="#ffffff"><%= time2str($format, $susp) %></TD>
+ </TR>
+ <% } %>
+
+ <TR>
+ <TD ALIGN="right">Expiration date</TD>
+ <TD>
+ <INPUT TYPE="text" NAME="expire" SIZE=32 ID="expire_text" VALUE="<%= ( $expire ? time2str($format, $expire) : "" ) %>">
+ <IMG SRC="../images/calendar.png" ID="expire_button" STYLE="cursor: pointer" TITLE="Select date">
+ <BR><FONT SIZE=-1>(will <b>cancel</b> this package when the date is reached)</FONT>
+ </TD>
+ </TR>
+
+ <% if ( $cancel ) { %>
+ <TR>
+ <TD ALIGN="right">Cancellation date</TD>
+ <TD BGCOLOR="#ffffff"><%= time2str($format, $cancel) %></TD>
+ </TR>
+ <% } %>
+
</TABLE>
+
<SCRIPT TYPE="text/javascript">
<%
my @cal = qw( setup bill expire );
diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html
index 068a8276f..ece1b62bb 100755
--- a/httemplate/view/cust_main/packages.html
+++ b/httemplate/view/cust_main/packages.html
@@ -5,6 +5,10 @@
my $packages = get_packages($cust_main, $conf);
%>
+<STYLE TYPE="text/css">
+.package .provision { font-weight: bold }
+</STYLE>
+
<A NAME="cust_pkg"><FONT SIZE="+2">Packages</FONT></A>
<%= include('order_pkg.html', $cust_main ) %>
@@ -71,12 +75,10 @@ foreach my $pkg (sort pkgsort_pkgnum_cancel @$packages) {
(&nbsp;<%=pkg_dates_link($pkg)%>&nbsp;|&nbsp;<%=pkg_customize_link($pkg,$cust_main->custnum)%>&nbsp;)
<% } %>
</TD>
-<%
- #foreach (qw(setup last_bill next_bill susp expire cancel)) {
- # print qq! <TD ROWSPAN=$rowspan>! . pkg_datestr($pkg,$_,$conf) . qq!</TD>\n!;
- #}
- print "<TD ROWSPAN=$rowspan>". &itable('');
+ <TD ROWSPAN=<%=$rowspan%>>
+ <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
+<%
sub myfreq {
my $part_pkg = shift;
my $freq = $part_pkg->freq_pretty;
@@ -84,92 +86,190 @@ foreach my $pkg (sort pkgsort_pkgnum_cancel @$packages) {
$freq;
}
- if ( $pkg->{cancel} ) { #status: cancelled
-
- print '<TR><TD><FONT COLOR="#ff0000"><B>Cancelled&nbsp;</B></FONT></TD>'.
- '<TD>'. pkg_datestr($pkg,'cancel',$conf). '</TD></TR>';
- unless ( $pkg->{setup} ) {
- print '<TR><TD COLSPAN=2>Never billed</TD></TR>';
- } else {
- print "<TR><TD>Setup&nbsp;</TD><TD>".
- pkg_datestr($pkg, 'setup',$conf). '</TD></TR>';
- print "<TR><TD>Last&nbsp;bill&nbsp;</TD><TD>".
- pkg_datestr($pkg, 'last_bill',$conf). '</TD></TR>'
- if $pkg->{'last_bill'};
- print "<TR><TD>Suspended&nbsp;</TD><TD>".
- pkg_datestr($pkg, 'susp',$conf). '</TD></TR>'
- if $pkg->{'susp'};
- }
+ #this should use cust_pkg->status and cust_pkg->statuscolor eventually
+
+ my $colspan = $conf->exists('cust_pkg-display_times') ? 8 : 4;
+ my $width = $conf->exists('cust_pkg-display_times') ? '38%' : '56%';
+ #false laziness w/edit/REAL_cust_pkg.cgi
+ my( $billed_or_prepaid, $last_bill_or_renewed, $next_bill_or_prepaid_until );
+ unless ( $pkg->{'part_pkg'}->is_prepaid ) {
+ $billed_or_prepaid = 'billed';
+ $last_bill_or_renewed = 'Last&nbsp;bill';
+ $next_bill_or_prepaid_until = 'Next&nbsp;bill';
} else {
+ $billed_or_prepaid = 'prepaid';
+ $last_bill_or_renewed = 'Renewed';
+ $next_bill_or_prepaid_until = 'Prepaid&nbsp;until';
+ }
- if ( $pkg->{susp} ) { #status: suspended
- print '<TR><TD><FONT COLOR="#FF9900"><B>Suspended</B>&nbsp;</FONT></TD>'.
- '<TD>'. pkg_datestr($pkg,'susp',$conf). '</TD></TR>';
- unless ( $pkg->{setup} ) {
- print '<TR><TD COLSPAN=2>Never billed</TD></TR>';
- } else {
- print "<TR><TD>Setup&nbsp;</TD><TD>".
- pkg_datestr($pkg, 'setup',$conf). '</TD></TR>';
- }
- print "<TR><TD>Last&nbsp;bill&nbsp;</TD><TD>".
- pkg_datestr($pkg, 'last_bill',$conf). '</TD></TR>'
- if $pkg->{'last_bill'};
- # next bill ??
- print "<TR><TD>Expires&nbsp;</TD><TD>".
- pkg_datestr($pkg, 'expire',$conf). '</TD></TR>'
- if $pkg->{'expire'};
- print '<TR><TD COLSPAN=2>(&nbsp;'. pkg_unsuspend_link($pkg).
- '&nbsp;|&nbsp;'. pkg_cancel_link($pkg). '&nbsp;)</TD></TR>';
-
- } else { #status: active
-
- unless ( $pkg->{setup} ) { #not setup
-
- print '<TR><TD COLSPAN=2>Not&nbsp;yet&nbsp;billed&nbsp;(';
- unless ( $pkg->{freq} ) {
- print 'one-time&nbsp;charge)</TD></TR>';
- print '<TR><TD COLSPAN=2>(&nbsp;'. pkg_cancel_link($pkg).
- '&nbsp;)</TD</TR>';
- } else {
- print 'billed&nbsp;'. myfreq($pkg->{part_pkg}). ')</TD></TR>';
- }
-
- } else { #setup
-
- unless ( $pkg->{freq} ) {
- print "<TR><TD COLSPAN=2>One-time&nbsp;charge</TD></TR>".
- '<TR><TD>Billed&nbsp;</TD><TD>'.
- pkg_datestr($pkg,'setup',$conf). '</TD></TR>';
- } else {
- print '<TR><TD COLSPAN=2><FONT COLOR="#00CC00"><B>Active</B></FONT>'.
- ',&nbsp;billed&nbsp;'. myfreq($pkg->{part_pkg}). '</TD></TR>'.
- '<TR><TD>Setup&nbsp;</TD><TD>'.
- pkg_datestr($pkg, 'setup',$conf). '</TD></TR>';
- }
-
- }
-
- print "<TR><TD>Last&nbsp;bill&nbsp;</TD><TD>".
- pkg_datestr($pkg, 'last_bill',$conf). '</TD></TR>'
- if $pkg->{'last_bill'};
- print "<TR><TD>Next&nbsp;bill&nbsp;</TD><TD>".
- pkg_datestr($pkg, 'next_bill',$conf). '</TD></TR>'
- if $pkg->{'next_bill'};
- print "<TR><TD>Expires&nbsp;</TD><TD>".
- pkg_datestr($pkg, 'expire',$conf). '</TD></TR>'
- if $pkg->{'expire'};
- if ( $pkg->{freq} ) {
- print '<TR><TD COLSPAN=2>(&nbsp;'. pkg_suspend_link($pkg).
- '&nbsp;|&nbsp;'. pkg_cancel_link($pkg). '&nbsp;)</TD></TR>';
- }
+%>
- }
+<% if ( $pkg->{cancel} ) { %> <!-- #status: cancelled -->
- }
+ <TR>
+ <TD WIDTH="<%=$width%>" ALIGN="right"><FONT COLOR="#ff0000"><B>Cancelled&nbsp;</B></FONT></TD>
+ <%= pkg_datestr($pkg,'cancel',$conf) %>
+ </TR>
+
+ <% unless ( $pkg->{setup} ) { %>
+
+ <TR>
+ <TD COLSPAN=<%=$colspan%>>Never billed</TD>
+ </TR>
+
+ <% } else { %>
+
+ <TR>
+ <TD WIDTH="<%=$width%>" ALIGN="right">Setup&nbsp;</TD>
+ <%= pkg_datestr($pkg, 'setup',$conf) %>
+ </TR>
+
+ <% if ( $pkg->{'last_bill'} ) { %>
+ <TR>
+ <TD WIDTH="<%=$width%>" ALIGN="right"><%= $last_bill_or_renewed %>&nbsp;</TD>
+ <%= pkg_datestr($pkg, 'last_bill',$conf) %>
+ </TR>
+ <% } %>
+
+ <% if ( $pkg->{'susp'} ) { %>
+ <TR>
+ <TD WIDTH="<%=$width%>" ALIGN="right">Suspended&nbsp;</TD>
+ <%= pkg_datestr($pkg, 'susp',$conf) %>
+ </TR>
+ <% } %>
+
+ <% } %>
+
+<% } else { %>
+
+ <% if ( $pkg->{susp} ) { %> <!-- #status: suspended -->
+
+ <TR>
+ <TD WIDTH="<%=$width%>" ALIGN="right"><FONT COLOR="#FF9900"><B>Suspended</B>&nbsp;</FONT></TD>
+ <%= pkg_datestr($pkg,'susp',$conf) %>
+ </TR>
+
+ <% unless ( $pkg->{setup} ) { %>
+
+ <TR>
+ <TD COLSPAN=<%=$colspan%>>Never billed</TD>
+ </TR>
+
+ <% } else { %>
+
+ <TR>
+ <TD WIDTH="<%=$width%>" ALIGN="right">Setup&nbsp;</TD>
+ <%= pkg_datestr($pkg, 'setup',$conf) %>
+ </TR>
+
+ <% } %>
+
+ <% if ( $pkg->{'last_bill'} ) { %>
+ <TR>
+ <TD WIDTH="<%=$width%>" ALIGN="right"><%= $last_bill_or_renewed %>&nbsp;</TD>
+ <%= pkg_datestr($pkg, 'last_bill',$conf) %>
+ </TR>
+ <% } %>
+
+ <!-- # next bill ?? -->
+
+ <% if ( $pkg->{'expire'} ) { %>
+ <TR>
+ <TD WIDTH="<%=$width%>" ALIGN="right">Expires&nbsp;</TD>
+ <%= pkg_datestr($pkg, 'expire',$conf) %>
+ </TR>
+ <% } %>
- print "</TABLE></TD>\n";
+ <TR>
+ <TD COLSPAN=<%=$colspan%>>(&nbsp;<%= pkg_unsuspend_link($pkg) %>&nbsp;|&nbsp;<%= pkg_cancel_link($pkg) %>&nbsp;)</TD>
+ </TR>
+ <% } else { %> <!-- #status: active -->
+
+ <% unless ( $pkg->{setup} ) { %> <!-- #not setup -->
+
+ <% unless ( $pkg->{'freq'} ) { %>
+
+ <TR>
+ <TD COLSPAN=<%=$colspan%>>Not&nbsp;yet&nbsp;billed&nbsp;(one-time&nbsp;charge)</TD>
+ </TR>
+
+ <TR>
+ <TD COLSPAN=<%=$colspan%>>(&nbsp;<%= pkg_cancel_link($pkg) %>&nbsp;)</TD>
+ </TR>
+
+ <% } else { %>
+
+ <TR>
+ <TD COLSPAN=<%=$colspan%>>Not&nbsp;yet&nbsp;billed&nbsp;(<%= $billed_or_prepaid %>&nbsp;<%= myfreq($pkg->{part_pkg}) %>)</TD>
+ </TR>
+
+ <% } %>
+
+ <% } else { %> <!-- #setup -->
+
+ <% unless ( $pkg->{freq} ) { %>
+
+ <TR>
+ <TD COLSPAN=<%=$colspan%>>One-time&nbsp;charge</TD>
+ </TR>
+
+ <TR>
+ <TD WIDTH="<%=$width%>" ALIGN="right">Billed&nbsp;</TD>
+ <%= pkg_datestr($pkg,'setup',$conf) %>
+ </TR>
+
+ <% } else { %>
+
+ <TR>
+ <TD COLSPAN=<%=$colspan%>><FONT COLOR="#00CC00"><B>Active</B></FONT>,&nbsp;<%= $billed_or_prepaid %>&nbsp;<%= myfreq($pkg->{part_pkg}) %></TD>
+ </TR>
+
+ <TR>
+ <TD WIDTH="<%=$width%>" ALIGN="right">Setup&nbsp;</TD>
+ <%= pkg_datestr($pkg, 'setup',$conf) %>
+ </TR>
+
+ <% } %>
+
+ <% } %>
+
+ <% if ( $pkg->{'last_bill'} ) { %>
+ <TR>
+ <TD WIDTH="<%=$width%>" ALIGN="right"><%= $last_bill_or_renewed %>&nbsp;</TD>
+ <%= pkg_datestr($pkg, 'last_bill',$conf) %>
+ </TR>
+ <% } %>
+
+ <% if ( $pkg->{'next_bill'} ) { %>
+ <TR>
+ <TD WIDTH="<%=$width%>" ALIGN="right"><%= $next_bill_or_prepaid_until %>&nbsp;</TD>
+ <%= pkg_datestr($pkg, 'next_bill',$conf) %>
+ </TR>
+ <% } %>
+
+ <% if ( $pkg->{'expire'} ) { %>
+ <TR>
+ <TD WIDTH="<%=$width%>" ALIGN="right">Expires&nbsp;</TD>
+ <%= pkg_datestr($pkg, 'expire',$conf) %>
+ </TR>
+ <% } %>
+
+ <% if ( $pkg->{freq} ) { %>
+ <TR>
+ <TD COLSPAN=<%=$colspan%>>(&nbsp;<%= pkg_suspend_link($pkg) %>&nbsp;|&nbsp;<%= pkg_cancel_link($pkg) %>&nbsp;)</TD>
+ </TR>
+ <% } %>
+
+ <% } %>
+
+<% } %>
+
+</TABLE>
+</TD>
+
+<%
if ($rowspan == 0) { print qq!</TR>\n!; next; }
my $cnt = 0;
@@ -342,9 +442,15 @@ sub pkgsort_pkgnum_cancel {
sub pkg_datestr {
my($pkg, $field, $conf) = @_ or return '';
return '&nbsp;' unless $pkg->{$field};
- my $format = $conf->exists('pkg_showtimes')
- ? '<B>%D</B>&nbsp;<FONT SIZE=-3>%l:%M:%S%P&nbsp;%z</FONT>'
- : '<B>%b&nbsp;%o,&nbsp;%Y</B>';
+ my $format = '<TD align="left"><B>%b</B></TD>'.
+ '<TD align="right"><B>&nbsp;%o,</B></TD>'.
+ '<TD align="right"><B>&nbsp;%Y</B></TD>';
+ #$format .= '&nbsp;<FONT SIZE=-3>%l:%M:%S%P&nbsp;%z</FONT>'
+ $format .= '<TD ALIGN="right"><B>&nbsp;%l</TD>'.
+ '<TD ALIGN="center"><B>:</B></TD>'.
+ '<TD ALIGN="left"><B>%M</B></TD>'.
+ '<TD ALIGN="left"><B>&nbsp;%P</B></TD>'
+ if $conf->exists('cust_pkg-display_times');
( my $strip = time2str($format, $pkg->{$field}) ) =~ s/ (\d)/$1/g;
$strip;
}