Optimize "Customer has a referring customer" condition, RT#74452
[freeside.git] / httemplate / browse / part_pkg.cgi
index acc3211..f25c00e 100755 (executable)
@@ -562,7 +562,7 @@ if ( $acl_edit_global ) {
                                 'action'      => "${p}edit/bulk-cust_pkg.html?".
                                                  'pkgpart='.$part_pkg->pkgpart,
                                 'actionlabel' => 'Change Packages',
-                                'width'       => 569,
+                                'width'       => 960,
                                 'height'      => 210,
                               ).' ]</FONT>',
                             'align' => 'left',
@@ -601,12 +601,18 @@ if ( $taxclasses ) {
         { 'data'  => &$taxproduct_sub($base_ppt), 'align' => 'right' },
       ];
     }
+    if ( my $units_ppt = $part_pkg->units_taxproduct ) {
+      push @$out, [
+        { 'data'  => emt('Lines'), 'align' => 'left' },
+        { 'data'  => &$taxproduct_sub($units_ppt), 'align' => 'right' },
+      ];
+    }
     for (my $i = 0; $i < scalar @classnums; $i++) {
       my $num = $part_pkg->option('usage_taxproductnum_' . $classnums[$i]);
       next if !$num;
       my $ppt = FS::part_pkg_taxproduct->by_key($num);
       push @$out, [
-        { 'data'  => $classnames[$i] . ': ', 'align' => 'left', },
+        { 'data'  => $classnames[$i], 'align' => 'left', },
         { 'data'  => &$taxproduct_sub($ppt), 'align' => 'right' },
       ];
     }
@@ -790,8 +796,22 @@ if ( $acl_edit_bulk ) {
   $align .= 'c';
   $html_form = qq!<FORM ACTION="${p}edit/bulk-part_pkg.html" METHOD="POST">!;
   $html_foot = include('/search/elements/checkbox-foot.html',
-      submit  => 'edit report classes', # for now it's only report classes
-  ) . '</FORM>';
+                 actions => [
+                   { submit => 'edit report classes', },
+                   { label  => 'change customer packages',
+                     onclick=> include('/elements/popup_link_onclick.html',
+                                 'label'       => 'change',
+                                 'js_action'   => qq{
+                                   '${p}edit/bulk-cust_pkg.html?' + \$('input[name=pkgpart]').serialize()
+                                 },
+                                 'actionlabel' => 'Change customer packages',
+                                 'width'       => 960,
+                                 'height'      => 420,
+                               )
+                   },
+                 ],
+               ).
+               '</FORM>';
 }
 
 my @menubar;