Revision 45823f3f
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
js/kivi.Order.js | ||
---|---|---|
51 | 51 |
const action = params.action; |
52 | 52 |
const warn_on_duplicates = params.warn_on_duplicates; |
53 | 53 |
const warn_on_reqdate = params.warn_on_reqdate; |
54 |
const back_to_caller = params.back_to_caller;
|
|
54 |
const form_params = params.form_params;
|
|
55 | 55 |
|
56 | 56 |
if (warn_on_duplicates && !ns.check_duplicate_parts()) return; |
57 | 57 |
if (warn_on_reqdate && !ns.check_valid_reqdate()) return; |
... | ... | |
59 | 59 |
var data = $('#order_form').serializeArray(); |
60 | 60 |
data.push({ name: 'action', value: 'Order/' + action }); |
61 | 61 |
|
62 |
if (back_to_caller) data.push({ name: 'back_to_caller', value: '1' }); |
|
63 |
if (params.convert_to_purchase_delivery_order_selected_items_only) data.push({ name: 'convert_to_purchase_delivery_order_selected_items_only', value: '1' }); |
|
62 |
if (form_params) { |
|
63 |
if (Array.isArray(form_params)) { |
|
64 |
form_params.forEach(function(item) { |
|
65 |
data.push(item); |
|
66 |
}); |
|
67 |
} else { |
|
68 |
data.push(form_params); |
|
69 |
} |
|
70 |
} |
|
64 | 71 |
|
65 | 72 |
if (params.data) |
66 | 73 |
data = $.merge(data, params.data); |
... | ... | |
976 | 983 |
|
977 | 984 |
ns.convert_to_purchase_delivery_order = function() { |
978 | 985 |
var params = $("body").data("convert_to_purchase_delivery_order_item_selection_params"); |
979 |
params.convert_to_purchase_delivery_order_selected_items_only = 1; |
|
986 |
params.form_params.convert_to_purchase_delivery_order_selected_items_only = 1;
|
|
980 | 987 |
|
981 | 988 |
var $dlg = $("#convert_to_purchase_delivery_order_item_selection"); |
982 | 989 |
params.data = $dlg.find("tbody input").serializeArray(); |
Auch abrufbar als: Unified diff
Records: js-save Aufrufe angepasst und vereinheitlicht