Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision eb0fa244

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID eb0fa24414d2c4308d3d1bf9d19535aac6d5b7cd
  • Vorgänger 7d50ae35
  • Nachfolger 69aed970

Records: js-save Aufrufe angepasst und vereinheitlicht

Unterschiede anzeigen:

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