Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f825d995

Von Bernd Bleßmann vor fast 6 Jahren hinzugefügt

  • ID f825d995db2667be33e98ced722ddf012b484642
  • Vorgänger 471d166b
  • Nachfolger c3db1b36

Auftrags-Controller: nur neue Maske/Links hierhin, wenn experimentelle Features an

- in Menüs Verkauf/Einkauf: Links zu Angebot u. Auftrag)
- in Berichten Angebot/Auftrag und Lieferscheine: Links zu Angeboten und Auträgen
- im Presenter (und damit in der Liste der verknüpfte Belege)
- Todo-Liste

Unterschiede anzeigen:

SL/Presenter/Order.pm
42 42

  
43 43
  my $number_method = $order->quotation ? 'quonumber' : 'ordnumber';
44 44

  
45
  my $text = join '', (
46
    $params{no_link} ? '' : '<a href="oe.pl?action=edit&amp;type=' . $type . '&amp;id=' . escape($order->id) . '">',
47
    escape($order->$number_method),
48
    $params{no_link} ? '' : '</a>',
49
  );
45
  my $link_start = '';
46
  my $link_end   = '';
47
  unless ($params{no_link}) {
48
    my $action  = $::instance_conf->get_feature_experimental
49
                ? 'controller.pl?action=Order/edit'
50
                : 'oe.pl?action=edit';
51
    $link_start = '<a href="' . $action . '&amp;type=' . $type . '&amp;id=' . escape($order->id) . '">';
52
    $link_end   = '</a>';
53
  }
54

  
55
  my $text = join '', ($link_start, escape($order->$number_method), $link_end);
50 56

  
51 57
  is_escaped($text);
52 58
}
bin/mozilla/do.pl
840 840
  my $callback = $form->escape($href);
841 841

  
842 842
  my $edit_url       = build_std_url('action=edit', 'type', 'vc');
843
  my $edit_order_url = build_std_url('script=oe.pl', 'type=' . ($form->{type} eq 'sales_delivery_order' ? 'sales_order' : 'purchase_order'), 'action=edit');
843
  my $edit_order_url = ($::instance_conf->get_feature_experimental)
844
                     ? build_std_url('script=controller.pl', 'action=Order/edit', 'type=' . ($form->{type} eq 'sales_delivery_order' ? 'sales_order' : 'purchase_order'))
845
                     : build_std_url('script=oe.pl',         'action=edit',       'type=' . ($form->{type} eq 'sales_delivery_order' ? 'sales_order' : 'purchase_order'));
844 846

  
845 847
  my $idx            = 1;
846 848

  
bin/mozilla/oe.pl
1008 1008

  
1009 1009
  my @columns = (
1010 1010
    "transdate",               "reqdate",
1011
    "id",                      $ordnumber,             "edit_exp",
1011
    "id",                      $ordnumber,
1012 1012
    "cusordnumber",            "customernumber",
1013 1013
    "name",                    "netamount",
1014 1014
    "tax",                     "amount",
......
1035 1035
  $form->{l_open}              = $form->{l_closed} = "Y" if ($form->{open}      && $form->{closed});
1036 1036
  $form->{l_delivered}         = "Y"                     if ($form->{delivered} && $form->{notdelivered});
1037 1037
  $form->{l_periodic_invoices} = "Y"                     if ($form->{periodic_invoices_active} && $form->{periodic_invoices_inactive});
1038
  $form->{l_edit_exp}          = "Y"                     if $::instance_conf->get_feature_experimental && (any { $form->{type} eq $_ } qw(sales_order purchase_order sales_quotation request_quotation));
1039 1038
  map { $form->{"l_${_}"} = 'Y' } qw(order_probability expected_billing_date expected_netamount) if $form->{l_order_probability_expected_billing_date};
1040 1039

  
1041 1040
  my $attachment_basename;
......
1117 1116
    'expected_billing_date'   => { 'text' => $locale->text('Exp. bill. date'), },
1118 1117
    'expected_netamount'      => { 'text' => $locale->text('Exp. netamount'), },
1119 1118
    'payment_terms'           => { 'text' => $locale->text('Payment Terms'), },
1120
    'edit_exp'                => { 'text' => $locale->text('Edit (experimental)'), },
1121 1119
    %column_defs_cvars,
1122 1120
  );
1123 1121

  
......
1225 1223

  
1226 1224
  my $idx = 1;
1227 1225

  
1228
  my $edit_url = build_std_url('action=edit', 'type', 'vc');
1226
  my $edit_url = ($::instance_conf->get_feature_experimental)
1227
               ? build_std_url('script=controller.pl', 'action=Order/edit', 'type')
1228
               : build_std_url('action=edit', 'type', 'vc');
1229 1229

  
1230 1230
  foreach my $oe (@{ $form->{OE} }) {
1231 1231
    map { $oe->{$_} *= $oe->{exchangerate} } @subtotal_columns;
......
1249 1249

  
1250 1250
    foreach my $column (@columns) {
1251 1251
      next if ($column eq 'ids');
1252
      next if ($column eq 'edit_exp');
1253 1252
      $row->{$column} = {
1254 1253
        'data'  => $oe->{$column},
1255 1254
        'align' => $column_alignment{$column},
......
1265 1264

  
1266 1265
    $row->{$ordnumber}->{link} = $edit_url . "&id=" . E($oe->{id}) . "&callback=${callback}";
1267 1266

  
1268
    $row->{edit_exp}->{data}   = $oe->{$ordnumber};
1269
    $row->{edit_exp}->{link}   = build_std_url('script=controller.pl', 'action=Order/edit', "type=$form->{type}", 'id=' . E($oe->{id}));
1270

  
1271 1267
    my $row_set = [ $row ];
1272 1268

  
1273 1269
    if (($form->{l_subtotal} eq 'Y')
......
2137 2133
  my $content;
2138 2134

  
2139 2135
  if (@{ $quotations }) {
2140
    my $edit_url = build_std_url('script=oe.pl', 'action=edit');
2136
    my $edit_url = ($::instance_conf->get_feature_experimental)
2137
                 ? build_std_url('script=controller.pl', 'action=Order/edit')
2138
                 : build_std_url('script=oe.pl', 'action=edit');
2141 2139

  
2142 2140
    $content     = $form->parse_html_template('oe/report_for_todo_list', { 'QUOTATIONS' => $quotations,
2143 2141
                                                                           'edit_url'   => $edit_url });
menus/user/10-order-controller.yaml
1
- parent: ar
2
  id: ar_add_quotation
3
  access: sales_quotation_edit & (!client/feature_experimental)
4
- parent: ar
5
  id: ar_add_sales_order
6
  access: sales_order_edit & (!client/feature_experimental)
7
- parent: ap
8
  id: ap_add_rfq
9
  access: request_quotation_edit & (!client/feature_experimental)
10
- parent: ap
11
  id: ap_add_purchase_order
12
  access: purchase_order_edit & (!client/feature_experimental)
13

  
1 14
- parent: ar
2 15
  id: ar_add_quotation_experimental
3
  name: Add Quotation (experimental)
16
  name: Add Quotation
4 17
  icon: quotation_add
5 18
  order: 250
6 19
  access: sales_quotation_edit & client/feature_experimental
......
9 22
    type: sales_quotation
10 23
- parent: ar
11 24
  id: ar_add_sales_order_experimental
12
  name: Add Sales Order (experimental)
25
  name: Add Sales Order
13 26
  icon: sales_order_add
14 27
  order: 350
15 28
  access: sales_order_edit & client/feature_experimental
......
19 32

  
20 33
- parent: ap
21 34
  id: ap_add_rfq_experimental
22
  name: Add RFQ (experimental)
35
  name: Add RFQ
23 36
  icon: rfq_add
24 37
  order: 150
25 38
  access: request_quotation_edit & client/feature_experimental
......
28 41
    type: request_quotation
29 42
- parent: ap
30 43
  id: ap_add_purchase_order_experimental
31
  name: Add Purchase Order (experimental)
44
  name: Add Purchase Order
32 45
  icon: purchase_order_add
33 46
  order: 250
34 47
  access: purchase_order_edit & client/feature_experimental

Auch abrufbar als: Unified diff