my $db = $self->is_vendor() ? 'vendor' : 'customer';
my $action = 'add';
- if ($::instance_conf->get_feature_experimental && 'oe.pl' eq $script) {
+ if ($::instance_conf->get_feature_experimental_order && 'oe.pl' eq $script) {
$script = 'controller.pl';
$action = 'Order/' . $action;
}
my $vc = $object->is_sales ? 'customer' : 'vendor';
my $id = $object->id;
- if ($::instance_conf->get_feature_experimental) {
+ if ($::instance_conf->get_feature_experimental_order) {
return "controller.pl?action=Order/$action&type=$type&id=$id";
} else {
return "oe.pl?action=$action&type=$type&vc=$vc&id=$id";
my $vc = $object->is_sales ? 'customer' : 'vendor';
my $id = $object->id;
- if ($::instance_conf->get_feature_experimental) {
+ if ($::instance_conf->get_feature_experimental_order) {
return "controller.pl?action=Order/$action&type=$type&id=$id";
} else {
return "oe.pl?action=$action&type=$type&vc=$vc&id=$id";
my $type = $object->type;
my $id = $object->id;
- if ($::instance_conf->get_feature_experimental) {
+ if ($::instance_conf->get_feature_experimental_order) {
return "controller.pl?action=Order/$action&type=$type&id=$id";
} else {
return "oe.pl?action=$action&type=$type&vc=customer&id=$id";
my $vc = $object->is_sales ? 'customer' : 'vendor';
my $id = $object->id;
- if ($::instance_conf->get_feature_experimental) {
+ if ($::instance_conf->get_feature_experimental_order) {
return "controller.pl?action=Order/$action&type=$type&id=$id";
} else {
return "oe.pl?action=$action&type=$type&vc=$vc&id=$id";
$self->shop_order->save;
$self->shop_order->link_to_record($order);
}) || die $order->db->error;
- my $order_controller = $::instance_conf->get_feature_experimental ? 'Order' :'oe.pl';
+ my $order_controller = $::instance_conf->get_feature_experimental_order ? 'Order' :'oe.pl';
$self->redirect_to(controller => $order_controller, action => 'edit', type => 'sales_order', vc => 'customer', id => $order->id);
}
}
}
sub redirect_to_object {
- if ($::instance_conf->get_feature_experimental) {
+ if ($::instance_conf->get_feature_experimental_order) {
SL::Controller::Base->new->url_for(
controller => 'Order',
action => 'edit',
feature_datev => { type => 'boolean', default => 'true', not_null => 1 },
feature_erfolgsrechnung => { type => 'boolean', default => 'false', not_null => 1 },
feature_eurechnung => { type => 'boolean', default => 'true', not_null => 1 },
- feature_experimental => { type => 'boolean', default => 'true', not_null => 1 },
+ feature_experimental_assortment => { type => 'boolean', default => 'true', not_null => 1 },
+ feature_experimental_order => { type => 'boolean', default => 'true', not_null => 1 },
feature_ustva => { type => 'boolean', default => 'true', not_null => 1 },
fxgain_accno_id => { type => 'integer' },
fxloss_accno_id => { type => 'integer' },
} elsif ($params{trans_type} eq 'sales_quotation') {
my $script = 'oe.pl';
my $action = 'edit';
- if ($::instance_conf->get_feature_experimental) {
+ if ($::instance_conf->get_feature_experimental_order) {
$script = 'controller.pl';
$action = 'Order/edit';
}
} elsif ($params{trans_type} eq 'sales_order') {
my $script = 'oe.pl';
my $action = 'edit';
- if ($::instance_conf->get_feature_experimental) {
+ if ($::instance_conf->get_feature_experimental_order) {
$script = 'controller.pl';
$action = 'Order/edit';
}
} elsif ($params{trans_type} eq 'request_quotation') {
my $script = 'oe.pl';
my $action = 'edit';
- if ($::instance_conf->get_feature_experimental) {
+ if ($::instance_conf->get_feature_experimental_order) {
$script = 'controller.pl';
$action = 'Order/edit';
}
} elsif ($params{trans_type} eq 'purchase_order') {
my $script = 'oe.pl';
my $action = 'edit';
- if ($::instance_conf->get_feature_experimental) {
+ if ($::instance_conf->get_feature_experimental_order) {
$script = 'controller.pl';
$action = 'Order/edit';
}
Returns the configuration for "vertreter"
-=item C<get_feature_experimental>
+=item C<get_feature_experimental_assortment>
-Returns the configuration for experimental features
+Returns the configuration for experimental feature "assortment"
+
+=item C<get_feature_experimental_order>
+
+Returns the configuration for experimental feature "order"
=item C<get_parts_show_image>
my $link_start = '';
my $link_end = '';
unless ($params{no_link}) {
- my $action = $::instance_conf->get_feature_experimental
+ my $action = $::instance_conf->get_feature_experimental_order
? 'controller.pl?action=Order/edit'
: 'oe.pl?action=edit';
$link_start = '<a href="' . $action . '&type=' . $type . '&id=' . escape($order->id) . '">';
}
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 ($::instance_conf->get_feature_experimental_order) {
if ('oe' eq $ref->{module}) {
$base_url = build_std_url("script=controller.pl", 'action=Order/edit', 'id=' . E($ref->{invid}), 'callback', @hidden_nondefault);
}
my $callback = $form->escape($href);
my $edit_url = build_std_url('action=edit', 'type', 'vc');
- my $edit_order_url = ($::instance_conf->get_feature_experimental)
+ my $edit_order_url = ($::instance_conf->get_feature_experimental_order)
? build_std_url('script=controller.pl', 'action=Order/edit', 'type=' . ($form->{type} eq 'sales_delivery_order' ? 'sales_order' : 'purchase_order'))
: build_std_url('script=oe.pl', 'action=edit', 'type=' . ($form->{type} eq 'sales_delivery_order' ? 'sales_order' : 'purchase_order'));
# | ist bestellt | Von Kunden bestellt | -> edit_oe_ord_link
# | Anfrage | Angebot | -> edit_oe_quo_link
- my $edit_oe_ord_link = ($::instance_conf->get_feature_experimental)
+ my $edit_oe_ord_link = ($::instance_conf->get_feature_experimental_order)
? 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)
+ my $edit_oe_quo_link = ($::instance_conf->get_feature_experimental_order)
? 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',
_order();
- if ($::instance_conf->get_feature_experimental) {
+ if ($::instance_conf->get_feature_experimental_order) {
my $order = _make_record();
$order->globalproject_id(undef) if !$order->globalproject_id;
$order->payment_id(undef) if !$order->payment_id;
my $idx = 1;
- my $edit_url = ($::instance_conf->get_feature_experimental)
+ my $edit_url = ($::instance_conf->get_feature_experimental_order)
? build_std_url('script=controller.pl', 'action=Order/edit', 'type')
: build_std_url('action=edit', 'type', 'vc');
my $content;
if (@{ $quotations }) {
- my $edit_url = ($::instance_conf->get_feature_experimental)
+ my $edit_url = ($::instance_conf->get_feature_experimental_order)
? build_std_url('script=controller.pl', 'action=Order/edit')
: build_std_url('script=oe.pl', 'action=edit');
'Employees' => 'Benutzer',
'Empty selection for warehouse will not be added, even if the old bin is still visible (use back and forth to edit again).' => 'Leere Lager-Auswahl wird ignoriert, selbst wenn noch ein Lagerplatz ausgewählt ist. Alle Daten können durch zurück und vorwärts korrigiert werden.',
'Empty transaction!' => 'Buchung ist leer!',
- 'Enable experimental features' => 'Experimentelle Features einschalten',
'Enabled Quick Searched' => 'Aktivierte Schnellsuchen',
'Enabled modules' => 'Aktivierte Module',
'End date' => 'Enddatum',
'Expense Account' => 'Aufwandskonto',
'Expense/Asset' => 'Aufwand/Anlagen',
'Experimental Features' => 'Experimentelle Features',
- 'Experimental features are:' => 'Experimentelle Features sind:',
'Export' => 'Export',
'Export Buchungsdaten' => 'Export Buchungsdaten',
'Export Number' => 'Exportnummer',
'Employees' => '',
'Empty selection for warehouse will not be added, even if the old bin is still visible (use back and forth to edit again).' => '',
'Empty transaction!' => '',
- 'Enable experimental features' => '',
'Enabled Quick Searched' => '',
'Enabled modules' => '',
'End date' => '',
'Expense Account' => '',
'Expense/Asset' => '',
'Experimental Features' => '',
- 'Experimental features are:' => '',
'Export' => '',
'Export Buchungsdaten' => '',
'Export Number' => '',
- parent: ar
id: ar_add_quotation
- access: sales_quotation_edit & (!client/feature_experimental)
+ access: sales_quotation_edit & (!client/feature_experimental_order)
- parent: ar
id: ar_add_sales_order
- access: sales_order_edit & (!client/feature_experimental)
+ access: sales_order_edit & (!client/feature_experimental_order)
- parent: ap
id: ap_add_rfq
- access: request_quotation_edit & (!client/feature_experimental)
+ access: request_quotation_edit & (!client/feature_experimental_order)
- parent: ap
id: ap_add_purchase_order
- access: purchase_order_edit & (!client/feature_experimental)
+ access: purchase_order_edit & (!client/feature_experimental_order)
- parent: ar
id: ar_add_quotation_experimental
name: Add Quotation
icon: quotation_add
order: 250
- access: sales_quotation_edit & client/feature_experimental
+ access: sales_quotation_edit & client/feature_experimental_order
params:
action: Order/add
type: sales_quotation
name: Add Sales Order
icon: sales_order_add
order: 350
- access: sales_order_edit & client/feature_experimental
+ access: sales_order_edit & client/feature_experimental_order
params:
action: Order/add
type: sales_order
name: Add RFQ
icon: rfq_add
order: 150
- access: request_quotation_edit & client/feature_experimental
+ access: request_quotation_edit & client/feature_experimental_order
params:
action: Order/add
type: request_quotation
name: Add Purchase Order
icon: purchase_order_add
order: 250
- access: purchase_order_edit & client/feature_experimental
+ access: purchase_order_edit & client/feature_experimental_order
params:
action: Order/add
type: purchase_order
--- /dev/null
+-- @tag: defaults_add_feature_experimental2
+-- @description: experimentelle Features mit einzelnen Optionen
+-- @depends: defaults_add_feature_experimental
+
+ALTER TABLE defaults RENAME COLUMN feature_experimental TO feature_experimental_order;
+ALTER TABLE defaults ADD COLUMN feature_experimental_assortment BOOLEAN NOT NULL DEFAULT TRUE;
+
+UPDATE defaults SET feature_experimental_assortment = feature_experimental_order;
$node{access} = '(no_such_right & sales_order_edit | (no_such_right & sales_order_edit))';
ok(!$menu->parse_access_string(\%node), 'parenthesis 2');
-$node{access} = 'sales_quotation_edit & client/feature_experimental';
+$node{access} = 'sales_quotation_edit & client/feature_experimental_order';
ok($menu->parse_access_string(\%node), 'client');
$node{access} = '!no_such_right';
$node{access} = '(no_such_right & sales_order_edit | (!no_such_right | !sales_order_edit))';
ok($menu->parse_access_string(\%node), 'parenthesis with negation 2');
-$node{access} = 'sales_quotation_edit & !client/feature_experimental';
+$node{access} = 'sales_quotation_edit & !client/feature_experimental_order';
ok(!$menu->parse_access_string(\%node), 'client negation');
done_testing;
</tr>
<tr><td class="listheading" colspan="4">[% LxERP.t8("Experimental Features") %]</td></tr>
<tr>
- <td align="right">[% LxERP.t8('Enable experimental features') %]</td>
- <td>[% L.yes_no_tag('defaults.feature_experimental', SELF.defaults.feature_experimental) %]</td>
- <td>[% LxERP.t8('Experimental features are:') %] [% LxERP.t8('new order controller') %], [% LxERP.t8('Assortment') %]</td>
+ <td align="right">[% LxERP.t8('new order controller') %]</td>
+ <td>[% L.yes_no_tag('defaults.feature_experimental_order', SELF.defaults.feature_experimental_order) %]</td>
+ </tr>
+ <tr>
+ <td align="right">[% LxERP.t8('Assortment') %]</td>
+ <td>[% L.yes_no_tag('defaults.feature_experimental_assortment', SELF.defaults.feature_experimental_assortment) %]</td>
</tr>
<tr><td class="listheading" colspan="4">[% LxERP.t8("Shipped Quantity Algorithm") %]</td></tr>
<tr>
<td align="right" nowrap>[% LxERP.t8('Last Sales Delivery Order Number') %]</td>
<td>[% L.input_tag("defaults.sdonumber", SELF.defaults.sdonumber, size="15") %]</td>
- [%- IF INSTANCE_CONF.get_feature_experimental %]
+ [%- IF INSTANCE_CONF.get_feature_experimental_assortment %]
<td align="right" nowrap>[% LxERP.t8('Last Assortment Number') %]</td>
<td>[% L.input_tag("defaults.assortmentnumber", SELF.defaults.assortmentnumber, size="15") %]</td>
[%- END -%]
<tr class="listrow[% loop.count % 2 %]">
<td>[% HTML.escape(row.shiptoname) UNLESS loop.prev.shiptoname == row.shiptoname %] </td>
<td>[% IF row.id %]<a href='[% row.script %].pl?action=edit&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.invnumber) || ' ' %][% IF row.id %]</a>[% END %]</td>
- [%- IF INSTANCE_CONF.get_feature_experimental -%]
+ [%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<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) || ' ' %][% 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) || ' ' %][% IF row.oe_id %]</a>[% END %]</td>
<tr class="listrow[% loop.count % 2 %]">
<td>[% IF row.quotation %]
[% IF FORM.db == 'customer' %][% 'Sales quotation' | $T8 %][% ELSE %][% 'RFQ' | $T8 %][% END %]</td>
- [%- IF INSTANCE_CONF.get_feature_experimental -%]
+ [%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<td>[% IF row.id %]<a href='controller.pl?action=Order/edit&type=[% IF FORM.db == "customer" %]sales_quotation[% ELSE %]request_quotation[% END %]&id=[% HTML.escape(row.id) %]'>
[% END %][% HTML.escape(row.quonumber) || ' ' %][% IF row.id %]</a>[% END %]</td>
[%- ELSE -%]
[%- END -%]
[% ELSE %]
[% IF FORM.db == 'customer' %][% 'Sales Order' | $T8 %][% ELSE %][% 'Purchase Order' | $T8 %][% END %]</td>
- [%- IF INSTANCE_CONF.get_feature_experimental -%]
+ [%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<td>[% IF row.id %]<a href='controller.pl?action=Order/edit&type=[% IF FORM.db == "customer" %]sales_order[% ELSE %]purchase_order[% END %]&id=[% HTML.escape(row.id) %]'>
[% END %][% HTML.escape(row.ordnumber) || ' ' %][% IF row.id %]</a>[% END %]</td>
[%- ELSE -%]
[%- FOREACH row = orders %]
<tr class="listrow[% loop.count % 2 %]">
- [%- IF INSTANCE_CONF.get_feature_experimental -%]
+ [%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<td>[% IF row.id %]<a href='controller.pl?action=Order/edit&type=[% IF FORM.db == "customer" %]sales_order[% ELSE %]purchase_order[% END %]&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.ordnumber) || ' ' %][% IF row.id %]</a>[% END %]</td>
[%- ELSE -%]
<td>[% IF row.id %]<a href='oe.pl?action=edit&type=[% IF FORM.db == "customer" %]sales_order[% ELSE %]purchase_order[% END %]&vc=[% FORM.db %]&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber) || ' ' %][% IF row.id %]</a>[% END %]</td>
[%- FOREACH row = orders %]
<tr class="listrow[% loop.count % 2 %]">
- [%- IF INSTANCE_CONF.get_feature_experimental -%]
+ [%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<td>[% IF row.id %]<a href='controller.pl?action=Order/edit&type=[% IF FORM.db == "customer" %]sales_quotation[% ELSE %]request_quotation[% END %]&id=[% HTML.escape(row.id) %]'>
[% END %][% HTML.escape(row.quonumber) || ' ' %][% IF row.id %]</a>[% END %]</td>
[%- ELSE -%]
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.part, value='part', label=LxERP.t8('Part')) %]
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.service, value='service', label=LxERP.t8('Service')) %]
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.assembly, value='assembly', label=LxERP.t8('Assembly')) %]
- [%- IF INSTANCE_CONF.get_feature_experimental %]
+ [%- IF INSTANCE_CONF.get_feature_experimental_assortment %]
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.assortment, value='assortment', label=LxERP.t8('Assortment')) %]
[% END %]
</td>
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.part, value='part', label=LxERP.t8('Part')) %]
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.service, value='service', label=LxERP.t8('Service')) %]
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.assembly, value='assembly', label=LxERP.t8('Assembly')) %]
- [%- IF INSTANCE_CONF.get_feature_experimental %]
+ [%- IF INSTANCE_CONF.get_feature_experimental_assortment %]
[% L.checkbox_tag('filter.part.part_type[]', checked=filter.part.part_type_.assortment, value='assortment', label=LxERP.t8('Assortment')) %]
[% END %]
</td>
<td>[%- 'Service (typeabbreviation)' | $T8 %]</td>
<td>[%- 'Service' | $T8 %]</td>
</tr>
- [%- IF INSTANCE_CONF.get_feature_experimental %]
+ [%- IF INSTANCE_CONF.get_feature_experimental_assortment %]
<tr class="listrow1">
<td>[%- 'Assortment (typeabbreviation)' | $T8 %]</td>
<td>[%- 'Assortment' | $T8 %]</td>
<input name="l_assembly" id="l_assembly" class="checkbox" type="checkbox" value="Y" checked>
<label for="l_assembly">[% 'Assembly' | $T8 %]</label>
</td>
- [%- IF INSTANCE_CONF.get_feature_experimental %]
+ [%- IF INSTANCE_CONF.get_feature_experimental_assortment %]
<td>
<input name="l_assortment" id="l_assortment" class="checkbox" type="checkbox" value="Y" checked>
<label for="l_assortment">[% 'Assortment' | $T8 %]</label>
<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>
- [%- IF INSTANCE_CONF.get_feature_experimental -%]
+ [%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<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>
<td>
- [%- IF INSTANCE_CONF.get_feature_experimental -%]
+ [%- IF INSTANCE_CONF.get_feature_experimental_order -%]
<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) %]">