Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c8e91c4e

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID c8e91c4ee39a8915449a2edfcd6257e45d575baa
  • Vorgänger 4cff1777
  • Nachfolger 1881b66a

Records: js-save Aufrufe angepasst und vereinheitlicht

Unterschiede anzeigen:

SL/Controller/Reclamation.pm
41 41
use SL::DB::Invoice;
42 42
use SL::Model::Record;
43 43
use SL::DB::Order::TypeData qw(:types);
44
use SL::DB::DeliveryOrder::TypeData qw(:types);
44 45
use SL::DB::Reclamation::TypeData qw(:types);
45 46

  
46 47
use List::Util qw(first sum0);
......
1968 1969
      combobox => [
1969 1970
        action => [
1970 1971
          t8('Save'),
1971
          call      => [
1972
            'kivi.Reclamation.save', 'save',
1973
            $::instance_conf->get_reclamation_warn_duplicate_parts,
1974
            $::instance_conf->get_reclamation_warn_no_reqdate,
1975
          ],
1972
          call      => [ 'kivi.Reclamation.save', {
1973
              action             => 'save',
1974
              warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
1975
              warn_on_reqdate    => $::instance_conf->get_reclamation_warn_no_reqdate,
1976
            }],
1976 1977
          checks    => [
1977 1978
            ['kivi.validate_form','#reclamation_form'],
1978 1979
          ],
1979 1980
        ],
1980 1981
        action => [
1981 1982
          t8('Save as new'),
1982
          call      => [
1983
            'kivi.Reclamation.save', 'save_as_new',
1984
            $::instance_conf->get_reclamation_warn_duplicate_parts,
1985
          ],
1983
          call      => [ 'kivi.Reclamation.save', {
1984
              action             => 'save_as_new',
1985
              warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
1986
            }],
1986 1987
          disabled  => !$self->reclamation->id ? t8('This object has not been saved yet.') : undef,
1987 1988
        ],
1988 1989
      ], # end of combobox "Save"
......
1993 1994
        ],
1994 1995
        action => [
1995 1996
          t8('Save and Sales Reclamation'),
1996
          call      => [
1997
            'kivi.Reclamation.save', 'save_and_sales_reclamation',
1998
            $::instance_conf->get_reclamation_warn_duplicate_parts,
1999
            $::instance_conf->get_reclamation_warn_no_reqdate,
2000
          ],
1997
          call      => [ 'kivi.Reclamation.save', {
1998
              action             => 'save_and_new_record',
1999
              warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
2000
              warn_on_reqdate    => $::instance_conf->get_reclamation_warn_no_reqdate,
2001
              form_params        => [
2002
                { name => 'to_type', value => SALES_RECLAMATION_TYPE() },
2003
              ],
2004
            }],
2001 2005
          only_if  => $self->type_data->show_menu('save_and_sales_reclamation'),
2002 2006
        ],
2003 2007
        action => [
2004 2008
          t8('Save and Purchase Reclamation'),
2005
          call      => [ 'kivi.Reclamation.purchase_reclamation_check_for_direct_delivery' ],
2009
          call      => [ 'kivi.Reclamation.purchase_reclamation_check_for_direct_delivery', {
2010
              action             => 'save_and_new_record',
2011
              warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
2012
              warn_on_reqdate    => $::instance_conf->get_reclamation_warn_no_reqdate,
2013
              form_params        => [
2014
                { name => 'to_type', value => PURCHASE_RECLAMATION_TYPE() },
2015
              ],
2016
            }
2017
          ],
2006 2018
          only_if  => $self->type_data->show_menu('save_and_purchase_reclamation'),
2007 2019
        ],
2008 2020
        action => [
2009 2021
          t8('Save and Order'),
2010
          call      => [
2011
            'kivi.Reclamation.save', 'save_and_order',
2012
            $::instance_conf->get_reclamation_warn_duplicate_parts,
2013
            $::instance_conf->get_reclamation_warn_no_reqdate,
2014
          ],
2022
          call      => [ 'kivi.Reclamation.save', {
2023
              action             => 'save_and_new_record',
2024
              warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
2025
              warn_on_reqdate    => $::instance_conf->get_reclamation_warn_no_reqdate,
2026
              form_params        => [
2027
                { name => 'to_type',
2028
                  value => $self->reclamation->is_sales ? SALES_ORDER_TYPE()
2029
                                                        : PURCHASE_ORDER_TYPE() },
2030
              ],
2031
            }],
2015 2032
        ],
2016 2033
        action => [
2017 2034
          t8('Save and RMA Delivery Order'),
2018
          call      => [
2019
            'kivi.Reclamation.save', 'save_and_delivery_order',
2020
            $::instance_conf->get_reclamation_warn_duplicate_parts,
2021
            $::instance_conf->get_reclamation_warn_no_reqdate,
2022
          ],
2035
          call      => [ 'kivi.Reclamation.save', {
2036
              action             => 'save_and_new_record',
2037
              warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
2038
              warn_on_reqdate    => $::instance_conf->get_reclamation_warn_no_reqdate,
2039
              form_params        => [
2040
                { name => 'to_type', value => RMA_DELIVERY_ORDER_TYPE() },
2041
              ],
2042
            }],
2023 2043
          only_if  => $self->type_data->show_menu('save_and_rma_delivery_order'),
2024 2044
        ],
2025 2045
        action => [
2026 2046
          t8('Save and Supplier Delivery Order'),
2027
          call      => [
2028
            'kivi.Reclamation.save', 'save_and_delivery_order',
2029
            $::instance_conf->get_reclamation_warn_duplicate_parts,
2030
            $::instance_conf->get_reclamation_warn_no_reqdate,
2031
          ],
2047
          call      => [ 'kivi.Reclamation.save', {
2048
              action             => 'save_and_new_record',
2049
              warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
2050
              warn_on_reqdate    => $::instance_conf->get_reclamation_warn_no_reqdate,
2051
              form_params        => [
2052
                { name => 'to_type', value => SUPPLIER_DELIVERY_ORDER_TYPE() },
2053
              ],
2054
            }],
2032 2055
          only_if  => $self->type_data->show_menu('save_and_supplier_delivery_order'),
2033 2056
        ],
2034 2057
        action => [
2035 2058
          t8('Save and Credit Note'),
2036
          call      => [
2037
            'kivi.Reclamation.save', 'save_and_credit_note',
2038
            $::instance_conf->get_reclamation_warn_duplicate_parts,
2039
            $::instance_conf->get_reclamation_warn_no_reqdate,
2040
          ],
2059
          call      => [ 'kivi.Reclamation.save', {
2060
              action             => 'save_and_credit_note',
2061
              warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
2062
              warn_on_reqdate    => $::instance_conf->get_reclamation_warn_no_reqdate,
2063
              form_params        => [
2064
                { name => 'to_type', value => 'credit_note' },
2065
              ],
2066
            }],
2041 2067
          only_if  => $self->type_data->show_menu('save_and_credit_note'),
2042 2068
        ],
2043 2069
      ], # end of combobox "Workflow"
......
2048 2074
        ],
2049 2075
        action => [
2050 2076
          t8('Save and preview PDF'),
2051
           call => [
2052
             'kivi.Reclamation.save', 'preview_pdf',
2053
             $::instance_conf->get_reclamation_warn_duplicate_parts,
2054
             $::instance_conf->get_reclamation_warn_no_reqdate,
2055
           ],
2077
          call      => [ 'kivi.Reclamation.save', {
2078
              action             => 'preview_pdf',
2079
              warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
2080
              warn_on_reqdate    => $::instance_conf->get_reclamation_warn_no_reqdate,
2081
            }],
2056 2082
        ],
2057 2083
        action => [
2058 2084
          t8('Save and print'),
......
2065 2091
        action => [
2066 2092
          t8('Save and E-mail'),
2067 2093
          id   => 'save_and_email_action',
2068
          call => [
2069
            'kivi.Reclamation.save', 'save_and_show_email_dialog',
2070
            $::instance_conf->get_reclamation_warn_duplicate_parts,
2071
            $::instance_conf->get_reclamation_warn_no_reqdate,
2072
          ],
2094
          call      => [ 'kivi.Reclamation.save', {
2095
              action             => 'save_and_show_email_dialog',
2096
              warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
2097
              warn_on_reqdate    => $::instance_conf->get_reclamation_warn_no_reqdate,
2098
            }],
2073 2099
          disabled => !$self->reclamation->id ? t8('This object has not been saved yet.') : undef,
2074 2100
        ],
2075 2101
        action => [

Auch abrufbar als: Unified diff