From 51984ac3d3da3006809c6866fdecd4ad83610731 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 30 Jul 2001 07:36:04 +0000 Subject: templates!!! --- httemplate/browse/part_pkg.cgi | 114 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100755 httemplate/browse/part_pkg.cgi (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi new file mode 100755 index 000000000..1d51f8145 --- /dev/null +++ b/httemplate/browse/part_pkg.cgi @@ -0,0 +1,114 @@ +<% +#!/usr/bin/perl -Tw +# +# $Id: part_pkg.cgi,v 1.1 2001-07-30 07:36:03 ivan Exp $ +# +# ivan@sisd.com 97-dec-5,9 +# +# Changes to allow page to work at a relative position in server +# bmccane@maxbaud.net 98-apr-3 +# +# lose background, FS::CGI ivan@sisd.com 98-sep-2 +# +# $Log: part_pkg.cgi,v $ +# Revision 1.1 2001-07-30 07:36:03 ivan +# templates!!! +# +# Revision 1.8 1999/04/09 04:22:34 ivan +# also table() +# +# Revision 1.7 1999/04/09 03:52:55 ivan +# explicit & for table/itable/ntable +# +# Revision 1.6 1999/01/19 05:13:27 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 09:41:17 ivan +# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl +# (good idea anyway) +# +# Revision 1.4 1998/12/17 05:25:19 ivan +# fix visual and other bugs +# +# Revision 1.3 1998/11/21 07:23:45 ivan +# visual +# +# Revision 1.2 1998/11/21 07:00:32 ivan +# visual +# + +use strict; +use vars qw( $cgi $p $part_pkg ); +use CGI; +use CGI::Carp qw(fatalsToBrowser); +use FS::UID qw(cgisuidsetup swapuid); +use FS::Record qw(qsearch qsearchs); +use FS::CGI qw(header menubar popurl table); +use FS::part_pkg; +use FS::pkg_svc; +use FS::part_svc; + +$cgi = new CGI; + +&cgisuidsetup($cgi); + +$p = popurl(2); + +print $cgi->header( '-expires' => 'now' ), header("Package Part Listing",menubar( + 'Main Menu' => $p, +)), "One or more services are grouped together into a package and given", + " pricing information. Customers purchase packages, not services.

", + &table(), < + + Package + Comment + Setup Fee + Freq. + Recur. Fee + Service + Quan. + +END + +foreach $part_pkg ( sort { + $a->getfield('pkgpart') <=> $b->getfield('pkgpart') +} qsearch('part_pkg',{}) ) { + my($hashref)=$part_pkg->hashref; + my(@pkg_svc)=grep $_->getfield('quantity'), + qsearch('pkg_svc',{'pkgpart'=> $hashref->{pkgpart} }); + my($rowspan)=scalar(@pkg_svc); + print < + + $hashref->{pkgpart} + + $hashref->{pkg} + $hashref->{comment} + $hashref->{setup} + $hashref->{freq} + $hashref->{recur} +END + + my($pkg_svc); + my($n)=""; + foreach $pkg_svc ( @pkg_svc ) { + my($svcpart)=$pkg_svc->getfield('svcpart'); + my($part_svc) = qsearchs('part_svc',{'svcpart'=> $svcpart }); + print $n,qq!!, + $part_svc->getfield('svc'),"", + $pkg_svc->getfield('quantity'),"\n"; + $n=""; + } + + print ""; +} + +print <Add new package + + + +END +%> -- cgit v1.2.1 From 3d671921441ba8422650b54435a1959ad1d4c71d Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 21 Aug 2001 02:31:57 +0000 Subject: remove $Log$ messages. whew. --- httemplate/browse/part_pkg.cgi | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 1d51f8145..ef6a44620 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -1,42 +1,5 @@ <% -#!/usr/bin/perl -Tw -# -# $Id: part_pkg.cgi,v 1.1 2001-07-30 07:36:03 ivan Exp $ -# -# ivan@sisd.com 97-dec-5,9 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: part_pkg.cgi,v $ -# Revision 1.1 2001-07-30 07:36:03 ivan -# templates!!! -# -# Revision 1.8 1999/04/09 04:22:34 ivan -# also table() -# -# Revision 1.7 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.6 1999/01/19 05:13:27 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.5 1999/01/18 09:41:17 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.4 1998/12/17 05:25:19 ivan -# fix visual and other bugs -# -# Revision 1.3 1998/11/21 07:23:45 ivan -# visual -# -# Revision 1.2 1998/11/21 07:00:32 ivan -# visual -# +# use strict; use vars qw( $cgi $p $part_pkg ); -- cgit v1.2.1 From 6ef34dda51afba96d8dc6c4dd72427c3d4003945 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 21 Aug 2001 09:34:13 +0000 Subject: no more &swapuid --- httemplate/browse/part_pkg.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index ef6a44620..b6e47b171 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -1,11 +1,11 @@ <% -# +# use strict; use vars qw( $cgi $p $part_pkg ); use CGI; use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup swapuid); +use FS::UID qw(cgisuidsetup); use FS::Record qw(qsearch qsearchs); use FS::CGI qw(header menubar popurl table); use FS::part_pkg; -- cgit v1.2.1 From 1e4aa8069f25e1b4101da20bb9e0d3f60357ea52 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 4 Sep 2001 14:44:07 +0000 Subject: new admin documentation, quick one-pkg order --- httemplate/browse/part_pkg.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index b6e47b171..1538a7127 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; use vars qw( $cgi $p $part_pkg ); @@ -18,7 +18,7 @@ $cgi = new CGI; $p = popurl(2); -print $cgi->header( '-expires' => 'now' ), header("Package Part Listing",menubar( +print $cgi->header( '-expires' => 'now' ), header("Package Definition Listing",menubar( 'Main Menu' => $p, )), "One or more services are grouped together into a package and given", " pricing information. Customers purchase packages, not services.

", @@ -69,7 +69,7 @@ END } print <Add new package + Add a new package definition -- cgit v1.2.1 From a6d3e4dc73803cffad96fd4b6270b2fb5f4b0568 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 15 Oct 2001 10:42:29 +0000 Subject: price plans web gui 1st pass, oh my --- httemplate/browse/part_pkg.cgi | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 1538a7127..e20ba2404 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; use vars qw( $cgi $p $part_pkg ); @@ -27,9 +27,9 @@ print $cgi->header( '-expires' => 'now' ), header("Package Definition Listing",m Package Comment - Setup Fee Freq. - Recur. Fee + Plan + Data Service Quan. @@ -42,6 +42,16 @@ foreach $part_pkg ( sort { my(@pkg_svc)=grep $_->getfield('quantity'), qsearch('pkg_svc',{'pkgpart'=> $hashref->{pkgpart} }); my($rowspan)=scalar(@pkg_svc); + my $plandata; + if ( $hashref->{plan} ) { + $plandata = $hashref->{plandata}; + $plandata =~ s/^(\w+)=/$1 /mg; + $plandata =~ s/\n/
/g; + } else { + $hashref->{plan} = "(legacy)"; + $plandata = "Setup ". $hashref->{setup}. + "
Recur ". $hashref->{recur}; + } print < @@ -49,9 +59,9 @@ foreach $part_pkg ( sort { $hashref->{pkg} $hashref->{comment} - $hashref->{setup} $hashref->{freq} - $hashref->{recur} + $hashref->{plan} + $plandata END my($pkg_svc); -- cgit v1.2.1 From 60c837e0aaf454dfa0b0c0283dc36928782d1b6c Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 20 Oct 2001 12:18:00 +0000 Subject: setup and recurring fee tax exempt flags, UI to edit rework part_pkg editing UI some more --- httemplate/browse/part_pkg.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index e20ba2404..30f994872 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; use vars qw( $cgi $p $part_pkg ); @@ -21,9 +21,9 @@ $p = popurl(2); print $cgi->header( '-expires' => 'now' ), header("Package Definition Listing",menubar( 'Main Menu' => $p, )), "One or more services are grouped together into a package and given", - " pricing information. Customers purchase packages, not services.

", + " pricing information. Customers purchase packages", + " rather than purchase services directly.

", &table(), < Package Comment -- cgit v1.2.1 From 91387f8f489e561deaf1de052d80ef800a4970a3 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 26 Oct 2001 10:24:56 +0000 Subject: cache foo *sigh* --- httemplate/browse/part_pkg.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 30f994872..9a699d5ef 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; use vars qw( $cgi $p $part_pkg ); @@ -18,7 +18,7 @@ $cgi = new CGI; $p = popurl(2); -print $cgi->header( '-expires' => 'now' ), header("Package Definition Listing",menubar( +print $cgi->header( @FS::CGI::header ), header("Package Definition Listing",menubar( 'Main Menu' => $p, )), "One or more services are grouped together into a package and given", " pricing information. Customers purchase packages", -- cgit v1.2.1 From c14a267229fc0d6f2d2afdebab3bd34d825df2ef Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 30 Oct 2001 14:54:07 +0000 Subject: get rid of header foo in individual templates --- httemplate/browse/part_pkg.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 9a699d5ef..e0d25f67d 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; use vars qw( $cgi $p $part_pkg ); @@ -18,7 +18,7 @@ $cgi = new CGI; $p = popurl(2); -print $cgi->header( @FS::CGI::header ), header("Package Definition Listing",menubar( +print header("Package Definition Listing",menubar( 'Main Menu' => $p, )), "One or more services are grouped together into a package and given", " pricing information. Customers purchase packages", -- cgit v1.2.1 From cf16b23820da69e3c8d0156ae27e21c635bf1ec5 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 27 Dec 2001 09:26:14 +0000 Subject: service and package disable! --- httemplate/browse/part_pkg.cgi | 46 +++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index e0d25f67d..d0b572aa4 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; use vars qw( $cgi $p $part_pkg ); @@ -18,12 +18,33 @@ $cgi = new CGI; $p = popurl(2); +my %search; +if ( $cgi->param('showdisabled') ) { + %search = (); +} else { + %search = ( 'disabled' => '' ); +} + +my @part_pkg = qsearch('part_pkg', \%search ); +my $total = scalar(@part_pkg); + print header("Package Definition Listing",menubar( 'Main Menu' => $p, -)), "One or more services are grouped together into a package and given", - " pricing information. Customers purchase packages", - " rather than purchase services directly.

", - &table(), <
". + "$total packages "; + +if ( $cgi->param('showdisabled') ) { + $cgi->param('showdisabled', 0); + print qq!( hide disabled packages )!; +} else { + $cgi->param('showdisabled', 1); + print qq!( show disabled packages )!; +} + +my $colspan = $cgi->param('showdisabled') ? 2 : 3; +print &table(), < Package Comment @@ -37,7 +58,7 @@ END foreach $part_pkg ( sort { $a->getfield('pkgpart') <=> $b->getfield('pkgpart') -} qsearch('part_pkg',{}) ) { +} @part_pkg ) { my($hashref)=$part_pkg->hashref; my(@pkg_svc)=grep $_->getfield('quantity'), qsearch('pkg_svc',{'pkgpart'=> $hashref->{pkgpart} }); @@ -54,9 +75,16 @@ foreach $part_pkg ( sort { } print < - - $hashref->{pkgpart} - + $hashref->{pkgpart} +END + + unless ( $cgi->param('showdisabled') ) { + print ""; + print "DISABLED" if $hashref->{disabled}; + print ''; + } + + print <$hashref->{pkg} $hashref->{comment} $hashref->{freq} -- cgit v1.2.1 From 1fd6d8cf5d7854860ef4fd10ed89828e0c04ec39 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 30 Jan 2002 14:18:09 +0000 Subject: remove use Module; and $cgi = new CGI; &cgisuidsetup(); from all templates. should work better under Mason. --- httemplate/browse/part_pkg.cgi | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index d0b572aa4..22d139c99 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -1,22 +1,5 @@ + <% -# - -use strict; -use vars qw( $cgi $p $part_pkg ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header menubar popurl table); -use FS::part_pkg; -use FS::pkg_svc; -use FS::part_svc; - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -$p = popurl(2); my %search; if ( $cgi->param('showdisabled') ) { @@ -56,7 +39,7 @@ print &table(), < END -foreach $part_pkg ( sort { +foreach my $part_pkg ( sort { $a->getfield('pkgpart') <=> $b->getfield('pkgpart') } @part_pkg ) { my($hashref)=$part_pkg->hashref; -- cgit v1.2.1 From 22a35047ecdffff80110e06cc08fc84f9ddba9b0 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 10 Feb 2002 13:21:31 +0000 Subject: removed from all files to fix any redirects, whew Mason handler.pl overrides CGI::redirect fixed strict; problems in edit/part_pkg.cgi & edit/process/part_pkg.cgi --- httemplate/browse/part_pkg.cgi | 1 - 1 file changed, 1 deletion(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 22d139c99..03326d039 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -1,4 +1,3 @@ - <% my %search; -- cgit v1.2.1 From a4c96748eb6eab29a70f3a944c6520283a635c78 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 10 Feb 2002 16:05:22 +0000 Subject: *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. --- httemplate/browse/part_pkg.cgi | 1 + 1 file changed, 1 insertion(+) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 03326d039..0af64e737 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -1,3 +1,4 @@ + <% my %search; -- cgit v1.2.1 From 6caffaefb96e25c68866825e2211816355a656aa Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 23 Feb 2002 07:32:11 +0000 Subject: UI nit fixes - misaligned columns when viewing disabled services/packages --- httemplate/browse/part_pkg.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 0af64e737..707972ed7 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -29,7 +29,7 @@ if ( $cgi->param('showdisabled') ) { my $colspan = $cgi->param('showdisabled') ? 2 : 3; print &table(), < - Package + Package Comment Freq. Plan @@ -90,7 +90,7 @@ END } print <Add a new package definition + param('showdisabled') ? 8 : 9 %>>Add a new package definition -- cgit v1.2.1 From 71b05bcca672ea01074000eecd1b6cb93ee6c8f7 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 23 Feb 2002 07:35:00 +0000 Subject: i really should just start moving things to templates --- httemplate/browse/part_pkg.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 707972ed7..d5cfeeada 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -90,7 +90,7 @@ END } print <param('showdisabled') ? 8 : 9 %>>Add a new package definition + param('showdisabled') ? 8 : 9 }>Add a new package definition -- cgit v1.2.1 From 4617a171f36be96750db388334b614e6e5643104 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 23 Feb 2002 07:48:34 +0000 Subject: it's too late. --- httemplate/browse/part_pkg.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index d5cfeeada..c20811491 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -89,8 +89,9 @@ END print ""; } +$colspan = $cgi->param('showdisabled') ? 8 : 9; print <param('showdisabled') ? 8 : 9 }>Add a new package definition + Add a new package definition -- cgit v1.2.1 From 0e8861ca6b3b04b99ea9477e8c1555561b21c929 Mon Sep 17 00:00:00 2001 From: khoff Date: Sat, 8 Jun 2002 07:48:37 +0000 Subject: Default svcpart support for part_pkg. Fixes 'bug' with new customer and online signup. --- httemplate/browse/part_pkg.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index c20811491..fd269bef1 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -81,7 +81,8 @@ END my($svcpart)=$pkg_svc->getfield('svcpart'); my($part_svc) = qsearchs('part_svc',{'svcpart'=> $svcpart }); print $n,qq!!, - $part_svc->getfield('svc'),"", + $part_svc->getfield('svc'),"", + (($hashref->{def_svcpart} == $svcpart) ? "*" : ""), $pkg_svc->getfield('quantity'),"\n"; $n=""; } @@ -93,6 +94,7 @@ $colspan = $cgi->param('showdisabled') ? 8 : 9; print <Add a new package definition +  * - Default service END -- cgit v1.2.1 From 3162b06a6d3be9ddf4daea2c29cd94516ac40f68 Mon Sep 17 00:00:00 2001 From: khoff Date: Mon, 10 Jun 2002 01:39:51 +0000 Subject: Rollback part_pkg.def_svcpart changes. --- httemplate/browse/part_pkg.cgi | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index fd269bef1..c20811491 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -81,8 +81,7 @@ END my($svcpart)=$pkg_svc->getfield('svcpart'); my($part_svc) = qsearchs('part_svc',{'svcpart'=> $svcpart }); print $n,qq!!, - $part_svc->getfield('svc'),"", - (($hashref->{def_svcpart} == $svcpart) ? "*" : ""), + $part_svc->getfield('svc'),"", $pkg_svc->getfield('quantity'),"\n"; $n=""; } @@ -94,7 +93,6 @@ $colspan = $cgi->param('showdisabled') ? 8 : 9; print <Add a new package definition -  * - Default service END -- cgit v1.2.1 From 6d02e527490b2f0cf080f7b519443caeecd76357 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 4 Jul 2002 10:35:43 +0000 Subject: move "add" links to the top --- httemplate/browse/part_pkg.cgi | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index c20811491..58422c67d 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -11,13 +11,16 @@ if ( $cgi->param('showdisabled') ) { my @part_pkg = qsearch('part_pkg', \%search ); my $total = scalar(@part_pkg); -print header("Package Definition Listing",menubar( - 'Main Menu' => $p, -)). "One or more services are grouped together into a package and given". - " pricing information. Customers purchase packages". - " rather than purchase services directly.

". - "$total packages "; +%> +<%= header("Package Definition Listing",menubar( 'Main Menu' => $p )) %> +One or more services are grouped together into a package and given pricing +information. Customers purchase packages rather than purchase services +directly.

+Add a new package definition +

+<%= $total %> packages +<% if ( $cgi->param('showdisabled') ) { $cgi->param('showdisabled', 0); print qq!( hide disabled packages )!; @@ -91,7 +94,7 @@ END $colspan = $cgi->param('showdisabled') ? 8 : 9; print <Add a new package definition + -- cgit v1.2.1 From 7c319f1608fd3459c992eda7743696fc745fccf1 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 12 Jul 2003 11:09:33 +0000 Subject: - better description of payment search - some clarification of services/packages vs. service/package definitions in browse/part_{svc,pkg}.cgi - package definition report by # of active customer packages (with links to customer package listing) --- httemplate/browse/part_pkg.cgi | 60 +++++++++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 9 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 58422c67d..7b9436cee 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -11,15 +11,35 @@ if ( $cgi->param('showdisabled') ) { my @part_pkg = qsearch('part_pkg', \%search ); my $total = scalar(@part_pkg); +my $sortby; +my %num_active_cust_pkg; +if ( $cgi->param('active') ) { + my $active_sth = dbh->prepare( + 'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'. + ' AND ( cancel IS NULL OR cancel = 0 )'. + ' AND ( susp IS NULL OR susp = 0 )' + ) or die dbh->errstr; + foreach my $part_pkg ( @part_pkg ) { + $active_sth->execute($part_pkg->pkgpart) or die $active_sth->errstr; + $num_active_cust_pkg{$part_pkg->pkgpart} = + $active_sth->fetchrow_arrayref->[0]; + } + $sortby = \*active_cust_pkg_sort; +} else { + $sortby = \*pkgpart_sort; +} + %> <%= header("Package Definition Listing",menubar( 'Main Menu' => $p )) %> -One or more services are grouped together into a package and given pricing -information. Customers purchase packages rather than purchase services -directly.

-Add a new package definition -

+<% unless ( $cgi->param('active') ) { %> + One or more service definitions are grouped together into a package + definition and given pricing information. Customers purchase packages + rather than purchase services directly.

+ Add a new package definition +

+<% } %> -<%= $total %> packages +<%= $total %> package definitions <% if ( $cgi->param('showdisabled') ) { $cgi->param('showdisabled', 0); @@ -34,6 +54,10 @@ print &table(), < Package Comment +END +print ' Customer
packages
' + if $cgi->param('active'); +print <Freq. Plan Data @@ -42,9 +66,7 @@ print &table(), < END -foreach my $part_pkg ( sort { - $a->getfield('pkgpart') <=> $b->getfield('pkgpart') -} @part_pkg ) { +foreach my $part_pkg ( sort $sortby @part_pkg ) { my($hashref)=$part_pkg->hashref; my(@pkg_svc)=grep $_->getfield('quantity'), qsearch('pkg_svc',{'pkgpart'=> $hashref->{pkgpart} }); @@ -73,6 +95,16 @@ END print <$hashref->{pkg} $hashref->{comment} +END + if ( $cgi->param('active') ) { + print " "; + print ''. + $num_active_cust_pkg{$hashref->{'pkgpart'}}. + qq! active!; + # suspended/cancelled + print ''; + } + print <$hashref->{freq} $hashref->{plan} $plandata @@ -99,4 +131,14 @@ print < END + + +sub pkgpart_sort { + $a->pkgpart <=> $b->pkgpart; +} + +sub active_cust_pkg_sort { + $num_active_cust_pkg{$b->pkgpart} <=> $num_active_cust_pkg{$a->pkgpart}; +} + %> -- cgit v1.2.1 From 117a674a7e37ff2f4f90fcf34710dfad288ac8a9 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 5 Aug 2003 21:00:43 +0000 Subject: doh, revert stuff that shouldn't have been checked in --- httemplate/browse/part_pkg.cgi | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 7b9436cee..2a167e8d6 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -24,7 +24,9 @@ if ( $cgi->param('active') ) { $num_active_cust_pkg{$part_pkg->pkgpart} = $active_sth->fetchrow_arrayref->[0]; } - $sortby = \*active_cust_pkg_sort; + $sortby = sub { + $num_active_cust_pkg{$b->pkgpart} <=> $num_active_cust_pkg{$a->pkgpart}; + }; } else { $sortby = \*pkgpart_sort; } @@ -132,13 +134,8 @@ print < END - sub pkgpart_sort { $a->pkgpart <=> $b->pkgpart; } -sub active_cust_pkg_sort { - $num_active_cust_pkg{$b->pkgpart} <=> $num_active_cust_pkg{$a->pkgpart}; -} - %> -- cgit v1.2.1 From e8b6246f82305ee4e315ef4920ea5c356e77fd96 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 3 Nov 2003 05:21:54 +0000 Subject: also show suspended and canceled counts on active package browse --- httemplate/browse/part_pkg.cgi | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 2a167e8d6..044ba462e 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -12,7 +12,8 @@ my @part_pkg = qsearch('part_pkg', \%search ); my $total = scalar(@part_pkg); my $sortby; -my %num_active_cust_pkg; +my %num_active_cust_pkg = (); +my( $suspended_sth, $canceled_sth ) = ( '', '' ); if ( $cgi->param('active') ) { my $active_sth = dbh->prepare( 'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'. @@ -27,6 +28,18 @@ if ( $cgi->param('active') ) { $sortby = sub { $num_active_cust_pkg{$b->pkgpart} <=> $num_active_cust_pkg{$a->pkgpart}; }; + + $suspended_sth = dbh->prepare( + 'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'. + ' AND ( cancel IS NULL OR cancel = 0 )'. + ' AND susp IS NOT NULL AND susp > 0' + ) or die dbh->errstr; + + $canceled_sth = dbh->prepare( + 'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'. + ' AND cancel IS NOT NULL AND cancel > 0' + ) or die dbh->errstr; + } else { $sortby = \*pkgpart_sort; } @@ -102,8 +115,19 @@ END print " "; print ''. $num_active_cust_pkg{$hashref->{'pkgpart'}}. - qq! active!; - # suspended/cancelled + qq! active
!; + + $suspended_sth->execute( $part_pkg->pkgpart ) or die $suspended_sth->errstr; + my $num_suspended = $suspended_sth->fetchrow_arrayref->[0]; + print ''. $num_suspended. + qq! suspended
!; + + $canceled_sth->execute( $part_pkg->pkgpart ) or die $canceled_sth->errstr; + my $num_canceled = $canceled_sth->fetchrow_arrayref->[0]; + print ''. $num_canceled. + qq! canceled!; + + print ''; } print < Date: Mon, 3 Nov 2003 05:25:29 +0000 Subject: tyops --- httemplate/browse/part_pkg.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 044ba462e..9dc8860fb 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -119,12 +119,12 @@ END $suspended_sth->execute( $part_pkg->pkgpart ) or die $suspended_sth->errstr; my $num_suspended = $suspended_sth->fetchrow_arrayref->[0]; - print ''. $num_suspended. + print ''. $num_suspended. qq! suspended
!; $canceled_sth->execute( $part_pkg->pkgpart ) or die $canceled_sth->errstr; my $num_canceled = $canceled_sth->fetchrow_arrayref->[0]; - print ''. $num_canceled. + print ''. $num_canceled. qq! canceled!; -- cgit v1.2.1 From d9c51bdc266798d01247e0ff72f6d64aefb91a2e Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 3 Nov 2003 05:57:28 +0000 Subject: add suspended/canceled browse, fix the old suspended browse --- httemplate/browse/part_pkg.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 9dc8860fb..efaa59e00 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -32,12 +32,12 @@ if ( $cgi->param('active') ) { $suspended_sth = dbh->prepare( 'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'. ' AND ( cancel IS NULL OR cancel = 0 )'. - ' AND susp IS NOT NULL AND susp > 0' + ' AND susp IS NOT NULL AND susp != 0' ) or die dbh->errstr; $canceled_sth = dbh->prepare( 'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'. - ' AND cancel IS NOT NULL AND cancel > 0' + ' AND cancel IS NOT NULL AND cancel != 0' ) or die dbh->errstr; } else { -- cgit v1.2.1 From c7e637f35948396ca2bf760160f2a1a3081e0484 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 31 Jan 2004 06:33:40 +0000 Subject: add pkg_svc.primary_svc flag to enable an explicit first package flag --- httemplate/browse/part_pkg.cgi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index efaa59e00..180f18263 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -78,8 +78,10 @@ print <Data Service Quan. - END +print 'Primary' + if dbdef->table('pkg_svc')->column('primary_svc'); +print ''; foreach my $part_pkg ( sort $sortby @part_pkg ) { my($hashref)=$part_pkg->hashref; @@ -143,7 +145,13 @@ END my($part_svc) = qsearchs('part_svc',{'svcpart'=> $svcpart }); print $n,qq!!, $part_svc->getfield('svc'),"", - $pkg_svc->getfield('quantity'),"\n"; + $pkg_svc->getfield('quantity'),""; + if ( dbdef->table('pkg_svc')->column('primary_svc') ) { + print ''; + print 'PRIMARY' if $pkg_svc->primary_svc =~ /^Y/i; + print ''; + } + print "\n"; $n=""; } -- cgit v1.2.1 From a01faeb3a6b823c97535782f072c455298a4ffc7 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 21 Oct 2004 08:33:31 +0000 Subject: if enabled, show taxclass on package definition browse --- httemplate/browse/part_pkg.cgi | 131 ++++++++++++++++++++--------------------- 1 file changed, 65 insertions(+), 66 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 180f18263..65cf2431e 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -41,9 +41,12 @@ if ( $cgi->param('active') ) { ) or die dbh->errstr; } else { - $sortby = \*pkgpart_sort; + $sortby = sub { $a->pkgpart <=> $b->pkgpart; }; } +my $conf = new FS::Conf; +my $taxclasses = $conf->exists('enable_taxclasses'); + %> <%= header("Package Definition Listing",menubar( 'Main Menu' => $p )) %> <% unless ( $cgi->param('active') ) { %> @@ -55,34 +58,36 @@ if ( $cgi->param('active') ) { <% } %> <%= $total %> package definitions -<% -if ( $cgi->param('showdisabled') ) { - $cgi->param('showdisabled', 0); - print qq!( hide disabled packages )!; -} else { - $cgi->param('showdisabled', 1); - print qq!( show disabled packages )!; -} +<% if ( $cgi->param('showdisabled') ) { $cgi->param('showdisabled', 0); %> + ( hide disabled packages ) +<% } else { $cgi->param('showdisabled', 1); %> + ( show disabled packages )!; +<% } %> -my $colspan = $cgi->param('showdisabled') ? 2 : 3; -print &table(), <param('showdisabled') ? 2 : 3; %> + +<%= &table() %> - Package + >Package Comment -END -print ' Customer
packages
' - if $cgi->param('active'); -print <param('active') ) { %> + Customer
packages
+<% } %> Freq. +<% if ( $taxclasses ) { %> + Taxclass +<% } %> Plan Data Service Quan. -END -print 'Primary' - if dbdef->table('pkg_svc')->column('primary_svc'); -print ''; +<% if ( dbdef->table('pkg_svc')->column('primary_svc') ) { %> + Primary +<% } %> + + +<% foreach my $part_pkg ( sort $sortby @part_pkg ) { my($hashref)=$part_pkg->hashref; my(@pkg_svc)=grep $_->getfield('quantity'), @@ -98,46 +103,49 @@ foreach my $part_pkg ( sort $sortby @part_pkg ) { $plandata = "Setup ". $hashref->{setup}. "
Recur ". $hashref->{recur}; } - print < - $hashref->{pkgpart} -END - - unless ( $cgi->param('showdisabled') ) { - print ""; - print "DISABLED" if $hashref->{disabled}; - print ''; - } + ><%= $hashref->{pkgpart} %> + +<% unless ( $cgi->param('showdisabled') ) { %> + > + <% if ( $hashref->{disabled} ) { %> + DISABLED + <% } %> + +<% } %> - print <$hashref->{pkg} - $hashref->{comment} -END - if ( $cgi->param('active') ) { - print " "; - print ''. - $num_active_cust_pkg{$hashref->{'pkgpart'}}. - qq! active
!; + ><%= $hashref->{pkg} %> + ><%= $hashref->{comment} %> + +<% if ( $cgi->param('active') ) { %> + > + <%= $num_active_cust_pkg{$hashref->{'pkgpart'}} %> active
+ + <% $suspended_sth->execute( $part_pkg->pkgpart ) + or die $suspended_sth->errstr; + my $num_suspended = $suspended_sth->fetchrow_arrayref->[0]; + %> + <%= $num_suspended %> suspended
+ + <% $canceled_sth->execute( $part_pkg->pkgpart ) + or die $canceled_sth->errstr; + my $num_canceled = $canceled_sth->fetchrow_arrayref->[0]; + %> + <%= $num_canceled %> canceled + +<% } %> - $suspended_sth->execute( $part_pkg->pkgpart ) or die $suspended_sth->errstr; - my $num_suspended = $suspended_sth->fetchrow_arrayref->[0]; - print ''. $num_suspended. - qq! suspended
!; + ><%= $hashref->{freq} %> - $canceled_sth->execute( $part_pkg->pkgpart ) or die $canceled_sth->errstr; - my $num_canceled = $canceled_sth->fetchrow_arrayref->[0]; - print ''. $num_canceled. - qq! canceled!; +<% if ( $taxclasses ) { %> + ><%= $hashref->{taxclass} || ' ' %> +<% } %> + ><%= $hashref->{plan} %> + ><%= $plandata %> - print ''; - } - print <$hashref->{freq} - $hashref->{plan} - $plandata -END - +<% my($pkg_svc); my($n)=""; foreach $pkg_svc ( @pkg_svc ) { @@ -154,20 +162,11 @@ END print "\n"; $n=""; } +%> - print ""; -} - -$colspan = $cgi->param('showdisabled') ? 8 : 9; -print < +<% } %> -END - -sub pkgpart_sort { - $a->pkgpart <=> $b->pkgpart; -} - -%> -- cgit v1.2.1 From f55e1a91f7b9b0238791cdbf873f91a8c5a584a7 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 21 Oct 2004 08:54:42 +0000 Subject: remove tiny formatting glitch --- httemplate/browse/part_pkg.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 65cf2431e..be67338e1 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -61,7 +61,7 @@ my $taxclasses = $conf->exists('enable_taxclasses'); <% if ( $cgi->param('showdisabled') ) { $cgi->param('showdisabled', 0); %> ( hide disabled packages ) <% } else { $cgi->param('showdisabled', 1); %> - ( show disabled packages )!; + ( show disabled packages ) <% } %> <% my $colspan = $cgi->param('showdisabled') ? 2 : 3; %> -- cgit v1.2.1 From 6fe8172b11d0369d0b1274d6825ec0c57afe8001 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 26 Oct 2004 11:26:35 +0000 Subject: modular price plans! --- httemplate/browse/part_pkg.cgi | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index be67338e1..48b0ab2b3 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -89,60 +89,59 @@ my $taxclasses = $conf->exists('enable_taxclasses'); <% foreach my $part_pkg ( sort $sortby @part_pkg ) { - my($hashref)=$part_pkg->hashref; my(@pkg_svc)=grep $_->getfield('quantity'), - qsearch('pkg_svc',{'pkgpart'=> $hashref->{pkgpart} }); + qsearch( 'pkg_svc', { 'pkgpart' => $part_pkg->pkgpart } ); my($rowspan)=scalar(@pkg_svc); my $plandata; - if ( $hashref->{plan} ) { - $plandata = $hashref->{plandata}; + if ( $part_pkg->plan ) { + $plandata = $part_pkg->plandata; $plandata =~ s/^(\w+)=/$1 /mg; $plandata =~ s/\n/
/g; } else { - $hashref->{plan} = "(legacy)"; - $plandata = "Setup ". $hashref->{setup}. - "
Recur ". $hashref->{recur}; + $part_pkg->plan('(legacy)'); + $plandata = "Setup ". $part_pkg->setup. + "
Recur ". $part_pkg->recur; } %> - ><%= $hashref->{pkgpart} %> + ><%= $part_pkg->pkgpart %> <% unless ( $cgi->param('showdisabled') ) { %> > - <% if ( $hashref->{disabled} ) { %> + <% if ( $part_pkg->disabled ) { %> DISABLED <% } %> <% } %> - ><%= $hashref->{pkg} %> - ><%= $hashref->{comment} %> + ><%= $part_pkg->pkg %> + ><%= $part_pkg->comment %> <% if ( $cgi->param('active') ) { %> > - <%= $num_active_cust_pkg{$hashref->{'pkgpart'}} %> active
+ <%= $num_active_cust_pkg{$part_pkg->pkgpart} %> active
<% $suspended_sth->execute( $part_pkg->pkgpart ) or die $suspended_sth->errstr; my $num_suspended = $suspended_sth->fetchrow_arrayref->[0]; %> - <%= $num_suspended %> suspended
+ <%= $num_suspended %> suspended
<% $canceled_sth->execute( $part_pkg->pkgpart ) or die $canceled_sth->errstr; my $num_canceled = $canceled_sth->fetchrow_arrayref->[0]; %> - <%= $num_canceled %> canceled + <%= $num_canceled %> canceled <% } %> - ><%= $hashref->{freq} %> + ><%= $part_pkg->freq_pretty %> <% if ( $taxclasses ) { %> - ><%= $hashref->{taxclass} || ' ' %> + ><%= $part_pkg->taxclass || ' ' %> <% } %> - ><%= $hashref->{plan} %> + ><%= $part_pkg->plan %> ><%= $plandata %> <% -- cgit v1.2.1 From 9788b10d423bb3e4c16989b08bcce6f1a78f3d89 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 9 Jun 2005 20:26:08 +0000 Subject: tiny refactor patch from rjbs: It changes the service listing to use $part_pkg->pkg_svc instead of a qsearch, which means that the listing will still work if pkg_svc has been subclassed. --- httemplate/browse/part_pkg.cgi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 48b0ab2b3..ffa0d87c2 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -89,8 +89,7 @@ my $taxclasses = $conf->exists('enable_taxclasses'); <% foreach my $part_pkg ( sort $sortby @part_pkg ) { - my(@pkg_svc)=grep $_->getfield('quantity'), - qsearch( 'pkg_svc', { 'pkgpart' => $part_pkg->pkgpart } ); + my @pkg_svc = $part_pkg->pkg_svc; my($rowspan)=scalar(@pkg_svc); my $plandata; if ( $part_pkg->plan ) { -- cgit v1.2.1 From 5061c5bba69d3658968f1b0c0b9aff7fd5336e26 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 12 Jul 2005 09:31:21 +0000 Subject: More of the same: these patches make it safer to subclass FS::part_pkg's pkg_svc method by eliminating qsearches on table pkg_svc. --- httemplate/browse/part_pkg.cgi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index ffa0d87c2..8d5b55451 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -144,9 +144,8 @@ foreach my $part_pkg ( sort $sortby @part_pkg ) { ><%= $plandata %> <% - my($pkg_svc); my($n)=""; - foreach $pkg_svc ( @pkg_svc ) { + foreach my $pkg_svc ( @pkg_svc ) { my($svcpart)=$pkg_svc->getfield('svcpart'); my($part_svc) = qsearchs('part_svc',{'svcpart'=> $svcpart }); print $n,qq!!, -- cgit v1.2.1