Auftrags-Controller: Hack: Link zum neuen Controller aus Auftragsliste.
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 30 Sep 2015 14:30:08 +0000 (16:30 +0200)
committerG. Richardson <information@kivitendo-premium.de>
Mon, 16 Nov 2015 15:15:58 +0000 (16:15 +0100)
bin/mozilla/oe.pl

index 7b33183..4c92067 100644 (file)
@@ -839,7 +839,7 @@ sub orders {
 
   my @columns = (
     "transdate",               "reqdate",
-    "id",                      $ordnumber,
+    "id",                      $ordnumber,             "edit_new",
     "cusordnumber",            "customernumber",
     "name",                    "netamount",
     "tax",                     "amount",
@@ -866,7 +866,7 @@ sub orders {
   $form->{l_open}              = $form->{l_closed} = "Y" if ($form->{open}      && $form->{closed});
   $form->{l_delivered}         = "Y"                     if ($form->{delivered} && $form->{notdelivered});
   $form->{l_periodic_invoices} = "Y"                     if ($form->{periodic_invoices_active} && $form->{periodic_invoices_inactive});
-
+  $form->{l_edit_new}          = "Y"                     if ($form->{type} eq 'sales_order');
   map { $form->{"l_${_}"} = 'Y' } qw(order_probability expected_billing_date expected_netamount) if $form->{l_order_probability_expected_billing_date};
 
   my $attachment_basename;
@@ -947,6 +947,7 @@ sub orders {
     'expected_billing_date'   => { 'text' => $locale->text('Exp. bill. date'), },
     'expected_netamount'      => { 'text' => $locale->text('Exp. netamount'), },
     'payment_terms'           => { 'text' => $locale->text('Payment Terms'), },
+    'edit_new'                => { 'text' => $locale->text('Edit (new)'), },
     %column_defs_cvars,
   );
 
@@ -1072,6 +1073,7 @@ sub orders {
 
     foreach my $column (@columns) {
       next if ($column eq 'ids');
+      next if ($column eq 'edit_new');
       $row->{$column} = {
         'data'  => $oe->{$column},
         'align' => $column_alignment{$column},
@@ -1087,6 +1089,9 @@ sub orders {
 
     $row->{$ordnumber}->{link} = $edit_url . "&id=" . E($oe->{id}) . "&callback=${callback}";
 
+    $row->{edit_new}->{data}   = $oe->{ordnumber};
+    $row->{edit_new}->{link}   = build_std_url('script=controller.pl', 'action=Order/edit', 'type=sales_order', 'id=' . E($oe->{id}));
+
     my $row_set = [ $row ];
 
     if (($form->{l_subtotal} eq 'Y')