$hashref->{pkg}
- $hashref->{comment} |
-END
- if ( $cgi->param('active') ) {
- print " ";
- print ''.
- $num_active_cust_pkg{$hashref->{'pkgpart'}}.
- 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 <$hashref->{freq}
- $hashref->{plan} |
- $plandata |
-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 "
";
+# ------
+
+my $link = [ $p.'edit/part_pkg.cgi?', 'pkgpart' ];
+
+my @header = ( '#', 'Package', 'Comment' );
+my @fields = ( 'pkgpart', 'pkg', 'comment' );
+my $align = 'rll';
+my @links = ( $link, $link, '' );
+my @style = ( '', '', '' );
+
+unless ( $cgi->param('showdisabled') ) { #its been reversed already
+ push @header, 'Status';
+ push @fields, sub { shift->disabled
+ ? 'DISABLED'
+ : 'Active'
+ };
+ push @links, '';
+ $align .= 'c';
+ push @style, 'b';
}
-$colspan = $cgi->param('showdisabled') ? 8 : 9;
-print <
-