]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Auftrags-Controller: weitere Links hierhin bei experimentellen Features
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 3 Aug 2018 14:34:36 +0000 (16:34 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 13 Aug 2018 09:37:53 +0000 (11:37 +0200)
12 files changed:
SL/Controller/DeliveryPlan.pm
SL/Controller/DeliveryValueReport.pm
SL/Controller/FinancialControllingReport.pm
SL/Controller/SellPriceInformation.pm
SL/Controller/ShopOrder.pm
SL/Controller/TopQuickSearch/OERecord.pm
SL/FU.pm
bin/mozilla/ct.pl
bin/mozilla/ic.pl
templates/webpages/customer_vendor/get_delivery.html
templates/webpages/mass_invoice_create_print_from_do/list_sales_delivery_orders.html
templates/webpages/requirement_spec_order/list.html

index 6e6eed403ee1eaebaf58eb7999839b5269445fce..95db7ff6a9a4c245ec097685fdc72385e282f9c7 100644 (file)
@@ -369,7 +369,11 @@ sub link_to {
     my $vc     = $object->is_sales ? 'customer' : 'vendor';
     my $id     = $object->id;
 
-    return "oe.pl?action=$action&type=$type&vc=$vc&id=$id";
+    if ($::instance_conf->get_feature_experimental) {
+      return "controller.pl?action=Order/$action&type=$type&id=$id";
+    } else {
+      return "oe.pl?action=$action&type=$type&vc=$vc&id=$id";
+    }
   }
   if ($object->isa('SL::DB::Part')) {
     my $id     = $object->id;
index 0a714d2a20968e4078976546974fa73765ad2339..942b02a23c076e4a1f5fb3995e7c4bb16c7bd731 100644 (file)
@@ -231,7 +231,11 @@ sub link_to {
     my $vc     = $object->is_sales ? 'customer' : 'vendor';
     my $id     = $object->id;
 
-    return "oe.pl?action=$action&type=$type&vc=$vc&id=$id";
+    if ($::instance_conf->get_feature_experimental) {
+      return "controller.pl?action=Order/$action&type=$type&id=$id";
+    } else {
+      return "oe.pl?action=$action&type=$type&vc=$vc&id=$id";
+    }
   }
   if ($object->isa('SL::DB::Part')) {
     my $id     = $object->id;
index 7b392f184c492c7f47f87f786e932562f8ea56a2..31f60f13d170baedb1ebe52a993a5886524ba220 100644 (file)
@@ -278,7 +278,11 @@ sub link_to {
     my $type = $object->type;
     my $id   = $object->id;
 
-    return "oe.pl?action=$action&type=$type&vc=customer&id=$id";
+    if ($::instance_conf->get_feature_experimental) {
+      return "controller.pl?action=Order/$action&type=$type&id=$id";
+    } else {
+      return "oe.pl?action=$action&type=$type&vc=customer&id=$id";
+    }
   }
   if ($object->isa('SL::DB::Customer')) {
     my $id     = $object->id;
index b0e96c3aff64f3081299c252fc1898e37b1dca1e..1385fca5ff7f7257d6cba55110beadad666fca00 100644 (file)
@@ -140,7 +140,11 @@ sub link_to {
     my $vc     = $object->is_sales ? 'customer' : 'vendor';
     my $id     = $object->id;
 
-    return "oe.pl?action=$action&type=$type&vc=$vc&id=$id";
+    if ($::instance_conf->get_feature_experimental) {
+      return "controller.pl?action=Order/$action&type=$type&id=$id";
+    } else {
+      return "oe.pl?action=$action&type=$type&vc=$vc&id=$id";
+    }
   }
   if ($object->isa('SL::DB::Customer')) {
     my $id     = $object->id;
index f88a853bd8b110666bc335dd4d0255df283d157b..1503e6f68e164a579b3a7a6d1525bd4ac9ac5352 100644 (file)
@@ -156,7 +156,8 @@ sub action_transfer {
       $self->shop_order->save;
       $self->shop_order->link_to_record($order);
     }) || die $order->db->error;
-    $self->redirect_to(controller => "oe.pl", action => 'edit', type => 'sales_order', vc => 'customer', id => $order->id);
+    my $order_controller = $::instance_conf->get_feature_experimental ? 'Order' :'oe.pl';
+    $self->redirect_to(controller => $order_controller, action => 'edit', type => 'sales_order', vc => 'customer', id => $order->id);
   }
 }
 
index 8379608d4cdc7dad95eda63beb306ba77516393f..ecbca130067e81ab32fcd8f0ee732897396997dc 100644 (file)
@@ -64,13 +64,22 @@ sub redirect_to_search {
 }
 
 sub redirect_to_object {
-  SL::Controller::Base->new->url_for(
-    controller => 'oe.pl',
-    action     => 'edit',
-    type       => $_[0]->type,
-    vc         => $_[0]->vc,
-    id         => $_[1],
-  );
+  if ($::instance_conf->get_feature_experimental) {
+    SL::Controller::Base->new->url_for(
+      controller => 'Order',
+      action     => 'edit',
+      type       => $_[0]->type,
+      id         => $_[1],
+    );
+  } else {
+    SL::Controller::Base->new->url_for(
+      controller => 'oe.pl',
+      action     => 'edit',
+      type       => $_[0]->type,
+      vc         => $_[0]->vc,
+      id         => $_[1],
+    );
+  }
 }
 
 sub type {
index 83ec776bc0c37ee8bbfe22f55bdc024d2e2d65d2..8f52ae4cd7164b675d81a728e7635c2b6e9c1b3b 100644 (file)
--- a/SL/FU.pm
+++ b/SL/FU.pm
@@ -336,8 +336,14 @@ sub link_details {
     };
 
   } elsif ($params{trans_type} eq 'sales_quotation') {
+    my $script = 'oe.pl';
+    my $action = 'edit';
+    if ($::instance_conf->get_feature_experimental) {
+      $script = 'controller.pl';
+      $action = 'Order/edit';
+    }
     $link = {
-      'url'   => 'oe.pl?action=edit&type=sales_quotation&id=' . $params{trans_id},
+      'url'   => $script . '?action=' . $action . '&type=sales_quotation&id=' . $params{trans_id},
       'title' => $locale->text('Sales quotation') . " $params{trans_info}",
     };
 
@@ -356,8 +362,14 @@ sub link_details {
     };
 
   } elsif ($params{trans_type} eq 'sales_order') {
+    my $script = 'oe.pl';
+    my $action = 'edit';
+    if ($::instance_conf->get_feature_experimental) {
+      $script = 'controller.pl';
+      $action = 'Order/edit';
+    }
     $link = {
-      'url'   => 'oe.pl?action=edit&type=sales_order&id=' . $params{trans_id},
+      'url'   => $script . '?action=' . $action . '&type=sales_order&id=' . $params{trans_id},
       'title' => $locale->text('Sales Order') . " $params{trans_info}",
     };
 
@@ -386,14 +398,26 @@ sub link_details {
     };
 
   } elsif ($params{trans_type} eq 'request_quotation') {
+    my $script = 'oe.pl';
+    my $action = 'edit';
+    if ($::instance_conf->get_feature_experimental) {
+      $script = 'controller.pl';
+      $action = 'Order/edit';
+    }
     $link = {
-      'url'   => 'oe.pl?action=edit&type=request_quotation&id=' . $params{trans_id},
+      'url'   => $script . '?action=' . $action . '&type=request_quotation&id=' . $params{trans_id},
       'title' => $locale->text('Request quotation') . " $params{trans_info}",
     };
 
   } elsif ($params{trans_type} eq 'purchase_order') {
+    my $script = 'oe.pl';
+    my $action = 'edit';
+    if ($::instance_conf->get_feature_experimental) {
+      $script = 'controller.pl';
+      $action = 'Order/edit';
+    }
     $link = {
-      'url'   => 'oe.pl?action=edit&type=purchase_order&id=' . $params{trans_id},
+      'url'   => $script . '?action=' . $action . '&type=purchase_order&id=' . $params{trans_id},
       'title' => $locale->text('Purchase Order') . " $params{trans_info}",
     };
 
index ba2a86affddf3348ce7ceada250fc832ffb56a81..079b24c4afe9cb6f65d06d17c6b3c47884fdf362 100644 (file)
@@ -286,6 +286,12 @@ sub list_names {
     }
 
     my $base_url              = build_std_url("script=$ref->{module}.pl", 'action=edit', 'id=' . E($ref->{invid}), 'callback', @hidden_nondefault);
+    if ($::instance_conf->get_feature_experimental) {
+      if ('oe' eq $ref->{module}) {
+        $base_url             = build_std_url("script=controller.pl", 'action=Order/edit', 'id=' . E($ref->{invid}), 'callback', @hidden_nondefault);
+      }
+    }
+
     $row->{invnumber}->{link} = $base_url;
     $row->{ordnumber}->{link} = $base_url . "&type=${ordertype}";
     $row->{quonumber}->{link} = $base_url . "&type=${quotationtype}";
index 35affe9a000af3616b4dd931761b60f42fe7573b..b0d3887bade69b8b4c273f08a8c2d7a01dc75a81 100644 (file)
@@ -541,8 +541,17 @@ sub generate_report {
       # | ist bestellt  | Von Kunden bestellt |  -> edit_oe_ord_link
       # | Anfrage       | Angebot             |  -> edit_oe_quo_link
 
-      my $edit_oe_ord_link = build_std_url("script=oe.pl", 'action=edit', 'type=' . E($ref->{cv} eq 'vendor' ? 'purchase_order' : 'sales_order'), 'id=' . E($ref->{trans_id}), 'callback');
-      my $edit_oe_quo_link = build_std_url("script=oe.pl", 'action=edit', 'type=' . E($ref->{cv} eq 'vendor' ? 'request_quotation' : 'sales_quotation'), 'id=' . E($ref->{trans_id}), 'callback');
+      my $edit_oe_ord_link = ($::instance_conf->get_feature_experimental)
+                           ? build_std_url("script=controller.pl", 'action=Order/edit',
+                                           'type=' . E($ref->{cv} eq 'vendor' ? 'purchase_order' : 'sales_order'),        'id=' . E($ref->{trans_id}), 'callback')
+                           : build_std_url("script=oe.pl",         'action=edit',
+                                           'type=' . E($ref->{cv} eq 'vendor' ? 'purchase_order' : 'sales_order'),        'id=' . E($ref->{trans_id}), 'callback');
+
+      my $edit_oe_quo_link = ($::instance_conf->get_feature_experimental)
+                           ? build_std_url("script=controller.pl", 'action=Order/edit',
+                                           'type=' . E($ref->{cv} eq 'vendor' ? 'request_quotation' : 'sales_quotation'), 'id=' . E($ref->{trans_id}), 'callback')
+                           : build_std_url("script=oe.pl",         'action=edit',
+                                           'type=' . E($ref->{cv} eq 'vendor' ? 'request_quotation' : 'sales_quotation'), 'id=' . E($ref->{trans_id}), 'callback');
 
       $row->{ordnumber}{link} = $edit_oe_ord_link;
       $row->{quonumber}{link} = $edit_oe_quo_link if (!$ref->{ordnumber});
index 5250110b3c075e674ee695512764e8f279e684dc..debe697dbd1c759fe840fb9928f140a07942e6ff 100644 (file)
             <tr class="listrow[% loop.count % 2 %]">
               <td>[% HTML.escape(row.shiptoname) UNLESS loop.prev.shiptoname == row.shiptoname %]&nbsp;</td>
               <td>[% IF row.id %]<a href='[% row.script %].pl?action=edit&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.invnumber)   || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
-              <td>[% IF row.oe_id %]<a href='oe.pl?action=edit&type=[% IF SELF.is_customer %]sales_order[% ELSE %]purchase_order[% END %]&vc=customer&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber)   || '&nbsp;' %][% IF row.oe_id %]</a>[% END %]</td>
+              [%- IF INSTANCE_CONF.get_feature_experimental -%]
+                <td>[% IF row.oe_id %]<a href='controller.pl?action=Order/edit&type=[% IF SELF.is_customer %]sales_order[% ELSE %]purchase_order[% END %]&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber)   || '&nbsp;' %][% IF row.oe_id %]</a>[% END %]</td>
+              [%- ELSE -%]
+                <td>[% IF row.oe_id %]<a href='oe.pl?action=edit&type=[% IF SELF.is_customer %]sales_order[% ELSE %]purchase_order[% END %]&vc=customer&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber)   || '&nbsp;' %][% IF row.oe_id %]</a>[% END %]</td>
+              [%- END -%]
               <td>[% HTML.escape(row.transdate)   || '&nbsp;' %]</td>
               <td>[% HTML.escape(row.description) || '&nbsp;' %]</td>
               <td>[% HTML.escape(row.qty)         || '&nbsp;' %]</td>
index 5b8a14234465a1ebfcd5eb154c110b647e337229..f4a8c7a22b448afb97796f89eb7cab59364afcf0 100644 (file)
       <td>[% L.checkbox_tag('id[]', value=sales_delivery_order.id, "data-checkall"=1) %]</td>
       <td>[% HTML.escape(sales_delivery_order.transdate_as_date) %]</td>
       <td>[% L.link(SELF.url_for(controller="do.pl", action="edit", type="sales_delivery_order", id=sales_delivery_order.id), sales_delivery_order.donumber) %]</td>
-      <td>[% L.link(SELF.url_for(controller="oe.pl", action="edit", type="sales_order", id=sales_delivery_order.sales_order.id), sales_delivery_order.ordnumber) %]</td>
+      [%- IF INSTANCE_CONF.get_feature_experimental -%]
+        <td>[% L.link(SELF.url_for(controller="controller.pl", action="Order/edit", type="sales_order", id=sales_delivery_order.sales_order.id), sales_delivery_order.ordnumber) %]</td>
+      [%- ELSE -%]
+        <td>[% L.link(SELF.url_for(controller="oe.pl", action="edit", type="sales_order", id=sales_delivery_order.sales_order.id), sales_delivery_order.ordnumber) %]</td>
+      [%- END -%]
       <td>[% HTML.escape(sales_delivery_order.customer.name) %]</td>
      </tr>
      [%- END %]
index 4f8278d19f2b9b320cf8834d22bf483aee5670a7..3ee5f0bbc183c9a4b9c3cbbaee2d9fb90fce9692 100644 (file)
       [% END %]
      </td>
      <td>
-      <a href="oe.pl?action=edit&id=[% HTML.url(rs_order.order_id) %]&type=[% HTML.url(rs_order.order.type) %]">
+      [%- IF INSTANCE_CONF.get_feature_experimental -%]
+        <a href="controller.pl?action=Order/edit&id=[% HTML.url(rs_order.order_id) %]&type=[% HTML.url(rs_order.order.type) %]">
+      [%- ELSE -%]
+        <a href="oe.pl?action=edit&id=[% HTML.url(rs_order.order_id) %]&type=[% HTML.url(rs_order.order.type) %]">
+      [%- END -%]
        [% HTML.escape(rs_order.order.quotation ? rs_order.order.quonumber : rs_order.order.ordnumber) %]
       </a>
      </td>