Revision eb0fa244
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
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); |
... | ... | |
1953 | 1954 |
combobox => [ |
1954 | 1955 |
action => [ |
1955 | 1956 |
t8('Save'), |
1956 |
call => [ |
|
1957 |
'kivi.Reclamation.save', 'save',
|
|
1958 |
$::instance_conf->get_reclamation_warn_duplicate_parts, |
|
1959 |
$::instance_conf->get_reclamation_warn_no_reqdate, |
|
1960 |
], |
|
1957 |
call => [ 'kivi.Reclamation.save', {
|
|
1958 |
action => 'save',
|
|
1959 |
warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
|
|
1960 |
warn_on_reqdate => $::instance_conf->get_reclamation_warn_no_reqdate,
|
|
1961 |
}],
|
|
1961 | 1962 |
checks => [ |
1962 | 1963 |
['kivi.validate_form','#reclamation_form'], |
1963 | 1964 |
], |
1964 | 1965 |
], |
1965 | 1966 |
action => [ |
1966 | 1967 |
t8('Save as new'), |
1967 |
call => [ |
|
1968 |
'kivi.Reclamation.save', 'save_as_new',
|
|
1969 |
$::instance_conf->get_reclamation_warn_duplicate_parts, |
|
1970 |
], |
|
1968 |
call => [ 'kivi.Reclamation.save', {
|
|
1969 |
action => 'save_as_new',
|
|
1970 |
warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
|
|
1971 |
}],
|
|
1971 | 1972 |
disabled => !$self->reclamation->id ? t8('This object has not been saved yet.') : undef, |
1972 | 1973 |
], |
1973 | 1974 |
], # end of combobox "Save" |
... | ... | |
1978 | 1979 |
], |
1979 | 1980 |
action => [ |
1980 | 1981 |
t8('Save and Sales Reclamation'), |
1981 |
call => [ |
|
1982 |
'kivi.Reclamation.save', 'save_and_sales_reclamation', |
|
1983 |
$::instance_conf->get_reclamation_warn_duplicate_parts, |
|
1984 |
$::instance_conf->get_reclamation_warn_no_reqdate, |
|
1985 |
], |
|
1982 |
call => [ 'kivi.Reclamation.save', { |
|
1983 |
action => 'save_and_new_record', |
|
1984 |
warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts, |
|
1985 |
warn_on_reqdate => $::instance_conf->get_reclamation_warn_no_reqdate, |
|
1986 |
form_params => [ |
|
1987 |
{ name => 'to_type', value => SALES_RECLAMATION_TYPE() }, |
|
1988 |
], |
|
1989 |
}], |
|
1986 | 1990 |
only_if => $self->type_data->show_menu('save_and_sales_reclamation'), |
1987 | 1991 |
], |
1988 | 1992 |
action => [ |
1989 | 1993 |
t8('Save and Purchase Reclamation'), |
1990 |
call => [ 'kivi.Reclamation.purchase_reclamation_check_for_direct_delivery' ], |
|
1994 |
call => [ 'kivi.Reclamation.purchase_reclamation_check_for_direct_delivery', { |
|
1995 |
action => 'save_and_new_record', |
|
1996 |
warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts, |
|
1997 |
warn_on_reqdate => $::instance_conf->get_reclamation_warn_no_reqdate, |
|
1998 |
form_params => [ |
|
1999 |
{ name => 'to_type', value => PURCHASE_RECLAMATION_TYPE() }, |
|
2000 |
], |
|
2001 |
} |
|
2002 |
], |
|
1991 | 2003 |
only_if => $self->type_data->show_menu('save_and_purchase_reclamation'), |
1992 | 2004 |
], |
1993 | 2005 |
action => [ |
1994 | 2006 |
t8('Save and Order'), |
1995 |
call => [ |
|
1996 |
'kivi.Reclamation.save', 'save_and_order', |
|
1997 |
$::instance_conf->get_reclamation_warn_duplicate_parts, |
|
1998 |
$::instance_conf->get_reclamation_warn_no_reqdate, |
|
1999 |
], |
|
2007 |
call => [ 'kivi.Reclamation.save', { |
|
2008 |
action => 'save_and_new_record', |
|
2009 |
warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts, |
|
2010 |
warn_on_reqdate => $::instance_conf->get_reclamation_warn_no_reqdate, |
|
2011 |
form_params => [ |
|
2012 |
{ name => 'to_type', |
|
2013 |
value => $self->reclamation->is_sales ? SALES_ORDER_TYPE() |
|
2014 |
: PURCHASE_ORDER_TYPE() }, |
|
2015 |
], |
|
2016 |
}], |
|
2000 | 2017 |
], |
2001 | 2018 |
action => [ |
2002 | 2019 |
t8('Save and RMA Delivery Order'), |
2003 |
call => [ |
|
2004 |
'kivi.Reclamation.save', 'save_and_delivery_order', |
|
2005 |
$::instance_conf->get_reclamation_warn_duplicate_parts, |
|
2006 |
$::instance_conf->get_reclamation_warn_no_reqdate, |
|
2007 |
], |
|
2020 |
call => [ 'kivi.Reclamation.save', { |
|
2021 |
action => 'save_and_new_record', |
|
2022 |
warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts, |
|
2023 |
warn_on_reqdate => $::instance_conf->get_reclamation_warn_no_reqdate, |
|
2024 |
form_params => [ |
|
2025 |
{ name => 'to_type', value => RMA_DELIVERY_ORDER_TYPE() }, |
|
2026 |
], |
|
2027 |
}], |
|
2008 | 2028 |
only_if => $self->type_data->show_menu('save_and_rma_delivery_order'), |
2009 | 2029 |
], |
2010 | 2030 |
action => [ |
2011 | 2031 |
t8('Save and Supplier Delivery Order'), |
2012 |
call => [ |
|
2013 |
'kivi.Reclamation.save', 'save_and_delivery_order', |
|
2014 |
$::instance_conf->get_reclamation_warn_duplicate_parts, |
|
2015 |
$::instance_conf->get_reclamation_warn_no_reqdate, |
|
2016 |
], |
|
2032 |
call => [ 'kivi.Reclamation.save', { |
|
2033 |
action => 'save_and_new_record', |
|
2034 |
warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts, |
|
2035 |
warn_on_reqdate => $::instance_conf->get_reclamation_warn_no_reqdate, |
|
2036 |
form_params => [ |
|
2037 |
{ name => 'to_type', value => SUPPLIER_DELIVERY_ORDER_TYPE() }, |
|
2038 |
], |
|
2039 |
}], |
|
2017 | 2040 |
only_if => $self->type_data->show_menu('save_and_supplier_delivery_order'), |
2018 | 2041 |
], |
2019 | 2042 |
action => [ |
2020 | 2043 |
t8('Save and Credit Note'), |
2021 |
call => [ |
|
2022 |
'kivi.Reclamation.save', 'save_and_credit_note', |
|
2023 |
$::instance_conf->get_reclamation_warn_duplicate_parts, |
|
2024 |
$::instance_conf->get_reclamation_warn_no_reqdate, |
|
2025 |
], |
|
2044 |
call => [ 'kivi.Reclamation.save', { |
|
2045 |
action => 'save_and_credit_note', |
|
2046 |
warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts, |
|
2047 |
warn_on_reqdate => $::instance_conf->get_reclamation_warn_no_reqdate, |
|
2048 |
form_params => [ |
|
2049 |
{ name => 'to_type', value => 'credit_note' }, |
|
2050 |
], |
|
2051 |
}], |
|
2026 | 2052 |
only_if => $self->type_data->show_menu('save_and_credit_note'), |
2027 | 2053 |
], |
2028 | 2054 |
], # end of combobox "Workflow" |
... | ... | |
2033 | 2059 |
], |
2034 | 2060 |
action => [ |
2035 | 2061 |
t8('Save and preview PDF'), |
2036 |
call => [
|
|
2037 |
'kivi.Reclamation.save', 'preview_pdf',
|
|
2038 |
$::instance_conf->get_reclamation_warn_duplicate_parts, |
|
2039 |
$::instance_conf->get_reclamation_warn_no_reqdate, |
|
2040 |
], |
|
2062 |
call => [ 'kivi.Reclamation.save', {
|
|
2063 |
action => 'preview_pdf',
|
|
2064 |
warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
|
|
2065 |
warn_on_reqdate => $::instance_conf->get_reclamation_warn_no_reqdate,
|
|
2066 |
}],
|
|
2041 | 2067 |
], |
2042 | 2068 |
action => [ |
2043 | 2069 |
t8('Save and print'), |
... | ... | |
2050 | 2076 |
action => [ |
2051 | 2077 |
t8('Save and E-mail'), |
2052 | 2078 |
id => 'save_and_email_action', |
2053 |
call => [
|
|
2054 |
'kivi.Reclamation.save', 'save_and_show_email_dialog',
|
|
2055 |
$::instance_conf->get_reclamation_warn_duplicate_parts, |
|
2056 |
$::instance_conf->get_reclamation_warn_no_reqdate, |
|
2057 |
], |
|
2079 |
call => [ 'kivi.Reclamation.save', {
|
|
2080 |
action => 'save_and_show_email_dialog',
|
|
2081 |
warn_on_duplicates => $::instance_conf->get_reclamation_warn_duplicate_parts,
|
|
2082 |
warn_on_reqdate => $::instance_conf->get_reclamation_warn_no_reqdate,
|
|
2083 |
}],
|
|
2058 | 2084 |
disabled => !$self->reclamation->id ? t8('This object has not been saved yet.') : undef, |
2059 | 2085 |
], |
2060 | 2086 |
action => [ |
Auch abrufbar als: Unified diff
Records: js-save Aufrufe angepasst und vereinheitlicht