2 % my $bgcolor1 = '#eeeeee';
3 % my $bgcolor2 = '#ffffff';
7 % #my $width = $show_location ? 'WIDTH="25%"' : 'WIDTH="33%"';
8 <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Package') |h %></TH>
9 <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Status') |h %></TH>
10 % if ( $show_location ) {
11 <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Location') |h %></TH>
13 <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Services') |h %></TH>
16 % #$FS::cust_pkg::DEBUG = 2;
17 % foreach my $cust_pkg (@$packages) {
19 % if ( $bgcolor eq $bgcolor1 ) {
20 % $bgcolor = $bgcolor2;
22 % $bgcolor = $bgcolor1;
26 % 'bgcolor' => $bgcolor,
27 % 'cust_pkg' => $cust_pkg,
28 % 'part_pkg' => $cust_pkg->part_pkg,
33 <!--pkgnum: <% $cust_pkg->pkgnum %>-->
35 <& package.html, %iopt &>
36 <& status.html, %iopt &>
37 % if ( $show_location ) {
38 <& location.html, %iopt &>
40 <& services.html, %iopt &>
43 % } #foreach $cust_pkg
53 my $conf = new FS::Conf;
55 my $curuser = $FS::CurrentUser::CurrentUser;
57 my $packages = $opt{'packages'};
58 my $show_location = $opt{'show_location'};
60 # Sort order is hardcoded for now, can change this if needed.
62 ( $a->getfield('cancel') <=> $b->getfield('cancel') ) or
63 ( $a->getfield('setup') <=> $b->getfield('setup') ) or
64 ( $a->getfield('pkgnum') <=> $b->getfield('pkgnum') )
67 my $countrydefault = scalar($conf->config('countrydefault')) || 'US';
70 #for services.html and status.html
71 'cust_pkg-display_times' => ($conf->exists('cust_pkg-display_times')
72 || $curuser->option('cust_pkg-display_times')),
74 'cust_pkg-show_autosuspend' => $conf->exists('cust_pkg-show_autosuspend'),
75 #for status.html pkg-balances
76 'pkg-balances' => $conf->exists('pkg-balances'),
77 'money_char' => ( $conf->config('money_char') || '$' ),
80 'countrydefault' => $countrydefault,
81 'statedefault' => ( scalar($conf->config('statedefault'))
82 || ($countrydefault eq 'US' ? 'CA' : '') ),
84 'svc_external-skip_manual' => $conf->exists('svc_external-skip_manual'),
85 'legacy_link' => $conf->exists('legacy_link'),
86 'manage_link' => scalar($conf->config('svc_broadband-manage_link')),
87 'manage_link_text' => scalar($conf->config('svc_broadband-manage_link_text')),
88 'manage_link_loc' => scalar($conf->config('svc_broadband-manage_link_loc')),
89 'manage_link-new_window' => $conf->exists('svc_broadband-manage_link-new_window'),
90 'maestro-status_test' => $conf->exists('maestro-status_test'),
91 'cust_pkg-large_pkg_size' => $conf->config('cust_pkg-large_pkg_size'),
93 # for packages.html Change location link
94 'show_location' => $show_location,