-
-% if ( @$packages ) {
-
-<% include('/elements/table-grid.html') %>
-% my $bgcolor1 = '#eeeeee';
-% my $bgcolor2 = '#ffffff';
-% my $bgcolor = '';
-
-<TR>
- <TH CLASS="grid" BGCOLOR="#cccccc">Package</TH>
- <TH CLASS="grid" BGCOLOR="#cccccc">Status</TH>
-% if ( $show_location ) {
- <TH CLASS="grid" BGCOLOR="#cccccc">Location</TH>
-% }
- <TH CLASS="grid" BGCOLOR="#cccccc">Services</TH>
-</TR>
-
-% #$FS::cust_pkg::DEBUG = 2;
-% foreach my $cust_pkg (@$packages) {
-%
-% if ( $bgcolor eq $bgcolor1 ) {
-% $bgcolor = $bgcolor2;
-% } else {
-% $bgcolor = $bgcolor1;
-% }
-%
-% my %iopt = (
-% 'bgcolor' => $bgcolor,
-% 'cust_pkg' => $cust_pkg,
-% 'part_pkg' => $cust_pkg->part_pkg,
-% %conf_opt,
-% );
-%
-
- <!--pkgnum: <% $cust_pkg->pkgnum %>-->
- <TR>
- <% include('packages/package.html', %iopt) %>
- <% include('packages/status.html', %iopt) %>
-% if ( $show_location ) {
- <% include('packages/location.html', %iopt) %>
-% }
- <% include('packages/services.html', %iopt) %>
- </TR>
-
+% if ( $conf->exists('cust_pkg-group_by_location') and $show_location ) {
+<& locations.html,
+ 'cust_main' => $cust_main,
+ 'packages' => $packages,
+ &>