merge NG auth, RT#21563
[freeside.git] / httemplate / view / cust_main / packages.html
index 7d79306..546dd89 100755 (executable)
@@ -1,3 +1,29 @@
+<STYLE TYPE="text/css">
+td.package {
+  vertical-align: top;
+  border-width: 0;
+  border-style: solid;
+  border-color: #bbbbff;
+}
+table.package {
+  border: none;
+  padding: 0;
+  border-spacing: 0;
+  width: 100%;
+}
+table.usage {
+  border: 1px solid black;
+  margin: auto;
+  width: 60%;
+  border-spacing: 0px;
+}
+.shared > * {
+  background-color: #ffffaa;
+}
+.row0 { background-color: #eeeeee; }
+.row1 { background-color: #ffffff; }
+
+</STYLE>
 % my $s = 0;
 
 % if ( $curuser->access_right('Qualify service') ) { 
 
   <TR>
     <TD COLSPAN=2>
-% if ( $conf->exists('cust_pkg-group_by_location') and $show_location ) {
+% if ( $conf->exists('cust_pkg-group_by_location') ) {
 <& locations.html,
     'cust_main'     => $cust_main,
     'packages'      => $packages,
 <& packages/section.html,
     'cust_main'     => $cust_main,
     'packages'      => $packages,
-    'show_location' => $show_location,
  &>
 </TABLE>
 % }
@@ -114,10 +139,6 @@ my $curuser = $FS::CurrentUser::CurrentUser;
 
 my( $packages, $num_old_packages ) = get_packages($cust_main, $conf);
 
-
-my $show_location = $conf->exists('cust_pkg-always_show_location') 
-                        || (grep $_->locationnum, @$packages); # ? '1' : '0';
-
 my $countrydefault = scalar($conf->config('countrydefault')) || 'US';
 #subroutines
 
@@ -178,6 +199,10 @@ sub get_packages {
   }
 
   $num_old_packages -= scalar(@packages);
+  
+  # don't include supplemental packages in this list; they'll be found from
+  # their main packages
+  @packages = grep !$_->main_pkgnum, @packages;
 
   ( \@packages, $num_old_packages );
 }