very basic start at adding quantities
[freeside.git] / httemplate / search / cust_pkg.cgi
index 20f1154..6c63ed4 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;
@@ -87,6 +89,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,
                     '',
                     '',
                     '',
@@ -209,29 +213,22 @@ sub time_or_blank {
    };
 }
 
-my $html_init = '';
-for (qw (overlibmws overlibmws_iframe overlibmws_draggable iframecontentmws))
-{
-  $html_init .=
-    qq!<SCRIPT TYPE="text/javascript" SRC="$fsurl/elements/$_.js"></SCRIPT>!;
-}
+my $html_init = include('/elements/init_overlib.html');
 
 my $extra_choices = sub {
   my $query = shift;
-  my $choices = '';
-
-  my $url = qq!overlib( OLiframeContent('!. popurl(2).
-            qq!misc/bulk_change_pkg.cgi?$query', 768, 336, !.
-            qq!'bulk_pkg_change_popup' ), CAPTION, 'Change Packages'!.
-            qq!, STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, !.
-            qq!CLOSECLICK ); return false;!;
-
-  if ($FS::CurrentUser::CurrentUser->access_right('Bulk change customer packages')) {
-    $choices .= qq!<BR><A HREF="javascript:void(0);"!.
-                qq!onClick="$url">Change these packages</A>!;
-  }
 
-  return $choices;
+  return '' unless
+   $FS::CurrentUser::CurrentUser->access_right('Bulk change customer packages');
+    
+  '<BR><BR>'.
+  include( '/elements/popup_link.html',
+             'label'       => 'Change these packages',
+             'action'      => "${p}misc/bulk_change_pkg.cgi?$query",
+             'actionlabel' => 'Change Packages',
+             'width'       => 763,
+             'height'      => 336,
+         );
 };
 
 </%init>