[freeside-commits] freeside/httemplate/browse part_pkg.cgi, 1.35,
1.36
Ivan,,,
ivan at wavetail.420.am
Fri Nov 24 02:34:36 PST 2006
Update of /home/cvs/cvsroot/freeside/httemplate/browse
In directory wavetail:/tmp/cvs-serv8084
Modified Files:
part_pkg.cgi
Log Message:
link to and label one-time charges correctly
Index: part_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/part_pkg.cgi,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- part_pkg.cgi 23 Aug 2006 22:25:37 -0000 1.35
+++ part_pkg.cgi 24 Nov 2006 10:34:33 -0000 1.36
@@ -94,28 +94,43 @@
%#if ( $cgi->param('active') ) {
% push @header, 'Customer<BR>packages';
% my %col = (
-% 'active' => '00CC00',
-% 'suspended' => 'FF9900',
-% 'cancelled' => 'FF0000',
+% 'active' => '00CC00',
+% 'suspended' => 'FF9900',
+% 'cancelled' => 'FF0000',
+% #'one-time charge' => '000000',
+% 'charge' => '000000',
% );
% my $cust_pkg_link = $p. 'search/cust_pkg.cgi?pkgpart=';
% push @fields, sub { my $part_pkg = shift;
% [
% map {
+% my $magic = $_;
+% my $label = $_;
+% if ( $magic eq 'active' && $part_pkg->freq == 0 ) {
+% $magic = 'inactive';
+% #$label = 'one-time charge',
+% $label = 'charge',
+% }
+%
% [
% {
-% 'data' => '<B><FONT COLOR="#'. $col{$_}. '">'.
+% 'data' => '<B><FONT COLOR="#'. $col{$label}. '">'.
% $part_pkg->get("num_$_").
% '</FONT></B>',
% 'align' => 'right',
% },
% {
-% 'data' => $_,
+% 'data' => $label.
+% ( $part_pkg->get("num_$_") != 1
+% && $label =~ /charge$/
+% ? 's'
+% : ''
+% ),
% 'align' => 'left',
% 'link' => ( $part_pkg->get("num_$_")
% ? $cust_pkg_link.
% $part_pkg->pkgpart.
-% ";magic=$_"
+% ";magic=$magic"
% : ''
% ),
% },
More information about the freeside-commits
mailing list