add ACL to allow download of browse/ stuff too, when possible. RT#4681
[freeside.git] / httemplate / search / cust_pkg.cgi
index bc2f0cb..bd4a946 100755 (executable)
@@ -6,6 +6,7 @@
                   'count_query' => $count_query,
                   #'redirect'    => $link,
                   'header'      => [ '#',
+                                     'Quan.',
                                      'Package',
                                      'Class',
                                      'Status',
@@ -25,6 +26,7 @@
                                    ],
                   'fields'      => [
                     'pkgnum',
+                    'quantity',
                     sub { #my $part_pkg = $part_pkg{shift->pkgpart};
                           #$part_pkg->pkg; # ' - '. $part_pkg->comment;
                           $_[0]->pkg; # ' - '. $_[0]->comment;
 
                     sub { my $self = shift;
                           my $return = '';
-                          if ($self->getfield('cancel') ||
-                            $self->getfield('suspend')) {
-                              my $reason = $self->last_reason;# too inefficient?
-                              $return = $reason->reason if $reason;
-
+                          foreach my $action ( qw ( cancel susp ) ) {
+                            my $reason = $self->last_reason($action);
+                            $return = $reason->reason if $reason;
+                            last if $return;
                           }
                           $return;
                         },
@@ -87,6 +88,7 @@
                     '',
                     '',
                     '',
+                    '',
                     sub { shift->statuscolor; },
                     '',
                     '',
                     FS::UI::Web::cust_colors(),
                     '',
                   ],
-                  'style' => [ '', '', '', 'b', '', '', '', '', '', '', '', '', '',
+                  'style' => [ '', '', '', '', 'b', '', '', '', '', '', '', '', '', '',
                                FS::UI::Web::cust_styles() ],
-                  'size'  => [ '', '', '', '-1' ],
-                  'align' => 'rlcclrrrrrrrl'. FS::UI::Web::cust_aligns(). 'r',
+                  'size'  => [ '', '', '', '', '-1' ],
+                  'align' => 'rrlcclrrrrrrrl'. FS::UI::Web::cust_aligns(). 'r',
                   'links' => [
                     $link,
                     $link,
+                    $link,
                     '',
                     '',
                     '',