From 02ae3eb0e7e2371721956975dc9785fdb9993450 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 24 Nov 2006 10:34:33 +0000 Subject: [PATCH] link to and label one-time charges correctly --- httemplate/browse/part_pkg.cgi | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index f2364b152..b572f8ab5 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -94,28 +94,43 @@ %#if ( $cgi->param('active') ) { % push @header, 'Customer
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' => ''. +% 'data' => ''. % $part_pkg->get("num_$_"). % '', % '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" % : '' % ), % }, -- 2.11.0