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,
29 % 'cust_main' => $opt{'cust_main'},
34 <!--pkgnum: <% $cust_pkg->pkgnum %>-->
36 <& package.html, %iopt &>
37 <& status.html, %iopt &>
38 % if ( $show_location ) {
39 <& location.html, %iopt &>
41 <& services.html, %iopt &>
44 % } #foreach $cust_pkg
54 my $conf = new FS::Conf;
56 my $curuser = $FS::CurrentUser::CurrentUser;
58 my $packages = $opt{'packages'};
59 my $show_location = $opt{'show_location'};
61 # Sort order is hardcoded for now, can change this if needed.
63 ( $a->getfield('cancel') <=> $b->getfield('cancel') ) or
64 ( $a->getfield('setup') <=> $b->getfield('setup') ) or
65 ( $a->getfield('pkgnum') <=> $b->getfield('pkgnum') )
68 my $countrydefault = scalar($conf->config('countrydefault')) || 'US';
71 #for services.html and status.html
72 'cust_pkg-display_times' => ($conf->exists('cust_pkg-display_times')
73 || $curuser->option('cust_pkg-display_times')),
75 'cust_pkg-show_autosuspend' => $conf->exists('cust_pkg-show_autosuspend'),
76 #for status.html pkg-balances
77 'pkg-balances' => $conf->exists('pkg-balances'),
78 'money_char' => ( $conf->config('money_char') || '$' ),
81 'countrydefault' => $countrydefault,
82 'statedefault' => ( scalar($conf->config('statedefault'))
83 || ($countrydefault eq 'US' ? 'CA' : '') ),
85 'svc_external-skip_manual' => $conf->exists('svc_external-skip_manual'),
86 'legacy_link' => $conf->exists('legacy_link'),
87 'manage_link' => scalar($conf->config('svc_broadband-manage_link')),
88 'manage_link_text' => scalar($conf->config('svc_broadband-manage_link_text')),
89 'manage_link_loc' => scalar($conf->config('svc_broadband-manage_link_loc')),
90 'manage_link-new_window' => $conf->exists('svc_broadband-manage_link-new_window'),
91 'maestro-status_test' => $conf->exists('maestro-status_test'),
92 'cust_pkg-large_pkg_size' => $conf->config('cust_pkg-large_pkg_size'),
94 # for packages.html Change location link
95 'show_location' => $show_location,