% $bgcolor = $bgcolor1;
% }
%
-% my %hash = $cust_pkg->hash;
-% my %part_pkg = map { /^part_pkg_(.+)$/ or die; ( $1 => $hash{$_} ); }
-% grep { /^part_pkg_/ } keys %hash;
-% $cust_pkg->{'_pkgpart'} = new FS::part_pkg \%part_pkg;
-%
% my %iopt = (
% 'bgcolor' => $bgcolor,
% 'cust_pkg' => $cust_pkg,
} );
my $num_old_packages = scalar(@packages);
+ foreach my $cust_pkg ( @packages ) {
+ my %hash = $cust_pkg->hash;
+ my %part_pkg = map { /^part_pkg_(.+)$/ or die; ( $1 => $hash{$_} ); }
+ grep { /^part_pkg_/ } keys %hash;
+ $cust_pkg->{'_pkgpart'} = new FS::part_pkg \%part_pkg;
+ }
+
unless ( $cgi->param('showoldpackages') ) {
my $years = $conf->config('cust_main-packages-years') || 2;
my $seconds = 31556926; #60*60*24*365.2422 is close enough