X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_pkg.cgi;h=58422c67d67471af800e8ed5773e428faa477541;hp=d0b572aa42a293cc64fa6af355be93e42da1e19c;hb=6d02e527490b2f0cf080f7b519443caeecd76357;hpb=cf16b23820da69e3c8d0156ae27e21c635bf1ec5 diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index d0b572aa4..58422c67d 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') ) { @@ -28,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 )!; @@ -46,7 +32,7 @@ if ( $cgi->param('showdisabled') ) { my $colspan = $cgi->param('showdisabled') ? 2 : 3; print &table(), < - Package + Package Comment Freq. Plan @@ -56,7 +42,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; @@ -106,8 +92,9 @@ END print ""; } +$colspan = $cgi->param('showdisabled') ? 8 : 9; print <Add a new package definition +