my $number_method = $order->quotation ? 'quonumber' : 'ordnumber';
- my $text = join '', (
- $params{no_link} ? '' : '<a href="oe.pl?action=edit&type=' . $type . '&id=' . escape($order->id) . '">',
- escape($order->$number_method),
- $params{no_link} ? '' : '</a>',
- );
+ my $link_start = '';
+ my $link_end = '';
+ unless ($params{no_link}) {
+ my $action = $::instance_conf->get_feature_experimental
+ ? 'controller.pl?action=Order/edit'
+ : 'oe.pl?action=edit';
+ $link_start = '<a href="' . $action . '&type=' . $type . '&id=' . escape($order->id) . '">';
+ $link_end = '</a>';
+ }
+
+ my $text = join '', ($link_start, escape($order->$number_method), $link_end);
is_escaped($text);
}
my $callback = $form->escape($href);
my $edit_url = build_std_url('action=edit', 'type', 'vc');
- my $edit_order_url = build_std_url('script=oe.pl', 'type=' . ($form->{type} eq 'sales_delivery_order' ? 'sales_order' : 'purchase_order'), 'action=edit');
+ my $edit_order_url = ($::instance_conf->get_feature_experimental)
+ ? 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'));
my $idx = 1;
my @columns = (
"transdate", "reqdate",
- "id", $ordnumber, "edit_exp",
+ "id", $ordnumber,
"cusordnumber", "customernumber",
"name", "netamount",
"tax", "amount",
$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_exp} = "Y" if $::instance_conf->get_feature_experimental && (any { $form->{type} eq $_ } qw(sales_order purchase_order sales_quotation request_quotation));
map { $form->{"l_${_}"} = 'Y' } qw(order_probability expected_billing_date expected_netamount) if $form->{l_order_probability_expected_billing_date};
my $attachment_basename;
'expected_billing_date' => { 'text' => $locale->text('Exp. bill. date'), },
'expected_netamount' => { 'text' => $locale->text('Exp. netamount'), },
'payment_terms' => { 'text' => $locale->text('Payment Terms'), },
- 'edit_exp' => { 'text' => $locale->text('Edit (experimental)'), },
%column_defs_cvars,
);
my $idx = 1;
- my $edit_url = build_std_url('action=edit', 'type', 'vc');
+ my $edit_url = ($::instance_conf->get_feature_experimental)
+ ? build_std_url('script=controller.pl', 'action=Order/edit', 'type')
+ : build_std_url('action=edit', 'type', 'vc');
foreach my $oe (@{ $form->{OE} }) {
map { $oe->{$_} *= $oe->{exchangerate} } @subtotal_columns;
foreach my $column (@columns) {
next if ($column eq 'ids');
- next if ($column eq 'edit_exp');
$row->{$column} = {
'data' => $oe->{$column},
'align' => $column_alignment{$column},
$row->{$ordnumber}->{link} = $edit_url . "&id=" . E($oe->{id}) . "&callback=${callback}";
- $row->{edit_exp}->{data} = $oe->{$ordnumber};
- $row->{edit_exp}->{link} = build_std_url('script=controller.pl', 'action=Order/edit', "type=$form->{type}", 'id=' . E($oe->{id}));
-
my $row_set = [ $row ];
if (($form->{l_subtotal} eq 'Y')
my $content;
if (@{ $quotations }) {
- my $edit_url = build_std_url('script=oe.pl', 'action=edit');
+ my $edit_url = ($::instance_conf->get_feature_experimental)
+ ? build_std_url('script=controller.pl', 'action=Order/edit')
+ : build_std_url('script=oe.pl', 'action=edit');
$content = $form->parse_html_template('oe/report_for_todo_list', { 'QUOTATIONS' => $quotations,
'edit_url' => $edit_url });
+- parent: ar
+ id: ar_add_quotation
+ access: sales_quotation_edit & (!client/feature_experimental)
+- parent: ar
+ id: ar_add_sales_order
+ access: sales_order_edit & (!client/feature_experimental)
+- parent: ap
+ id: ap_add_rfq
+ access: request_quotation_edit & (!client/feature_experimental)
+- parent: ap
+ id: ap_add_purchase_order
+ access: purchase_order_edit & (!client/feature_experimental)
+
- parent: ar
id: ar_add_quotation_experimental
- name: Add Quotation (experimental)
+ name: Add Quotation
icon: quotation_add
order: 250
access: sales_quotation_edit & client/feature_experimental
type: sales_quotation
- parent: ar
id: ar_add_sales_order_experimental
- name: Add Sales Order (experimental)
+ name: Add Sales Order
icon: sales_order_add
order: 350
access: sales_order_edit & client/feature_experimental
- parent: ap
id: ap_add_rfq_experimental
- name: Add RFQ (experimental)
+ name: Add RFQ
icon: rfq_add
order: 150
access: request_quotation_edit & client/feature_experimental
type: request_quotation
- parent: ap
id: ap_add_purchase_order_experimental
- name: Add Purchase Order (experimental)
+ name: Add Purchase Order
icon: purchase_order_add
order: 250
access: purchase_order_edit & client/feature_experimental