Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ba57ae4b

Von Sven Schöling vor etwa 3 Jahren hinzugefügt

  • ID ba57ae4b08fbee5ac1918b97cda7dbc773ea93e1
  • Vorgänger f1632521
  • Nachfolger a7cdadc9

oe: Lieferscheinumwandlungen für Retouren und Beistelllieferscheine

Unterschiede anzeigen:

SL/Controller/Order.pm
631 631
  $self->save_and_redirect_to(
632 632
    controller => 'oe.pl',
633 633
    action     => 'oe_delivery_order_from_order',
634
    new_type   => $::form->{new_type},
634 635
  );
635 636
}
636 637

  
......
1954 1955
          ],
1955 1956
          only_if   => (any { $self->type eq $_ } (sales_order_type(), purchase_order_type()))
1956 1957
        ],
1958
        action => [
1959
          t8('Save and Supplier Delivery Order'),
1960
          call      => [ 'kivi.Order.save', 'save_and_delivery_order', $::instance_conf->get_order_warn_duplicate_parts,
1961
                                                                       $::instance_conf->get_order_warn_no_deliverydate,
1962
                                                                       'supplier_delivery_order'                        ],
1963
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
1964
                         @req_trans_cost_art, @req_cusordnumber,
1965
          ],
1966
          only_if   => (any { $self->type eq $_ } (sales_order_type(), purchase_order_type()))
1967
        ],
1968
        action => [
1969
          t8('Save and RMA Delivery Order'),
1970
          call      => [ 'kivi.Order.save', 'save_and_delivery_order', $::instance_conf->get_order_warn_duplicate_parts,
1971
                                                                       $::instance_conf->get_order_warn_no_deliverydate,
1972
                                                                       'rma_delivery_order'                             ],
1973
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
1974
                         @req_trans_cost_art, @req_cusordnumber,
1975
          ],
1976
          only_if   => (any { $self->type eq $_ } (sales_order_type(), purchase_order_type()))
1977
        ],
1957 1978
        action => [
1958 1979
          t8('Save and Invoice'),
1959 1980
          call      => [ 'kivi.Order.save', 'save_and_invoice', $::instance_conf->get_order_warn_duplicate_parts ],
bin/mozilla/oe.pl
37 37
use POSIX qw(strftime);
38 38

  
39 39
use SL::DB::Order;
40
use SL::DB::DeliveryOrder::TypeData;
40 41
use SL::DO;
41 42
use SL::FU;
42 43
use SL::OE;
......
387 388
          checks   => [ 'kivi.validate_form' ],
388 389
          only_if  => $params{is_sales_ord} || $params{is_pur_ord},
389 390
        ],
391
        action => [
392
          t8('Supplier Delivery Order'),
393
          submit   => [ '#form', { action => "delivery_order", type => "supplier_delivery_order" } ],
394
          disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
395
          checks   => [ 'kivi.validate_form' ],
396
          only_if  => $params{is_sales_ord} || $params{is_pur_ord},
397
        ],
398
        action => [
399
          t8('RMA Delivery Order'),
400
          submit   => [ '#form', { action => "delivery_order", type => "rma_delivery_order" } ],
401
          disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
402
          checks   => [ 'kivi.validate_form' ],
403
          only_if  => $params{is_sales_ord} || $params{is_pur_ord},
404
        ],
390 405
        action => [
391 406
          t8('Invoice'),
392 407
          submit   => [ '#form', { action => "invoice" } ],
......
2008 2023

  
2009 2024
  $form->mtime_ischanged('oe');
2010 2025

  
2011
  if ($form->{type} =~ /^sales/) {
2012
    $main::auth->assert('sales_delivery_order_edit');
2026
  if (SL::DB::DeliveryOrder::TypeData::is_valid_type($form->{type})) {
2027
    $::auth->assert(SL::DB::DeliveryOrder::TypeData::get($form->{type}, "right"));
2028

  
2029
    $form->{vc}    = SL::DB::DeliveryOrder::TypeData::get3($form->{type}, "properties", "customervendor");
2030

  
2031
  } elsif ($form->{type} =~ /^sales/) {
2032
    $main::auth->assert('sales_delivery_order');
2013 2033

  
2014 2034
    $form->{vc}    = 'customer';
2015 2035
    $form->{type}  = 'sales_delivery_order';
......
2077 2097
  # fake last empty row
2078 2098
  $::form->{rowcount}++;
2079 2099

  
2100
  # hack: if a type transition is wanted, handle it here
2101
  if ($::form->{new_type}) {
2102
     $::form->{type} = $::form->{new_type};
2103
  }
2104

  
2080 2105
  _update_ship();
2081 2106
}
2082 2107

  
js/kivi.Order.js
45 45
    }
46 46
  };
47 47

  
48
  ns.save = function(action, warn_on_duplicates, warn_on_reqdate) {
48
  ns.save = function(action, warn_on_duplicates, warn_on_reqdate, type) {
49 49
    if (!ns.check_cv()) return;
50 50
    if (warn_on_duplicates && !ns.check_duplicate_parts()) return;
51 51
    if (warn_on_reqdate    && !ns.check_valid_reqdate())   return;
52 52

  
53 53
    var data = $('#order_form').serializeArray();
54 54
    data.push({ name: 'action', value: 'Order/' + action });
55
    data.push({ name: 'new_type', value: type });
55 56

  
56 57
    $.post("controller.pl", data, kivi.eval_json_result);
57 58
  };
locale/de/all
2721 2721
  'RFQ Date'                    => 'Anfragedatum',
2722 2722
  'RFQ Number'                  => 'Anfragenummer',
2723 2723
  'RFQs'                        => 'Preisanfragen',
2724
  'RMA Delivery Orders'         => 'RMA Lieferscheine',
2724
  'RMA Delivery Order'          => 'Retouren-Lieferschein',
2725
  'RMA Delivery Orders'         => 'Retouren-Lieferscheine',
2725 2726
  'ROP'                         => 'Mindestlagerbestand',
2726 2727
  'Ranges of numbers'           => 'Nummernkreise',
2727 2728
  'Re-numbering all sections and function blocks in the order they are currently shown cannot be undone.' => 'Das Neu-Nummerieren aller Abschnitte und Funktionsblöcke kann nicht rückgängig gemacht werden.',
......
2945 2946
  'Save and Purchase Order'     => 'Speichern und Lieferantenauftrag',
2946 2947
  'Save and Quotation'          => 'Speichern und Angebot',
2947 2948
  'Save and RFQ'                => 'Speichern und Lieferantenanfrage',
2949
  'Save and RMA Delivery Order' => 'Speichern und Retouren-Lieferschein',
2948 2950
  'Save and Sales Order'        => 'Speichern und Kundenauftrag',
2951
  'Save and Supplier Delivery Order' => 'Speichern und Beistell-Lieferschein',
2949 2952
  'Save and close'              => 'Speichern und schließen',
2950 2953
  'Save and execute'            => 'Speichern und ausführen',
2951 2954
  'Save and keep open'          => 'Speichern und geöffnet lassen',
......
3280 3283
  'Sun'                         => 'So',
3281 3284
  'Sunday'                      => 'Sonntag',
3282 3285
  'Superuser name'              => 'Datenbankadministrator',
3286
  'Supplier Delivery Order'     => 'Beistell-Lieferschein',
3283 3287
  'Supplier Delivery Orders'    => 'Beistell-Lieferscheine',
3284 3288
  'Supplies'                    => 'Lieferungen',
3285 3289
  'Surname'                     => 'Nachname',

Auch abrufbar als: Unified diff