Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1c08aa6f

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID 1c08aa6fefc89260c5213fc499f9a6cf8a752abc
  • Vorgänger 07610dd3
  • Nachfolger e992513a

Workflow Auftrag → Lieferschein auf neuen Controller umgestellt

Unterschiede anzeigen:

js/kivi.Order.js
965 965
    window.open("controller.pl?action=CustomerVendor/edit&db=" + encodeURIComponent(db) + "&id=" + encodeURIComponent($(id_selector).val()), '_blank');
966 966
  };
967 967

  
968
  ns.convert_to_purchase_delivery_order_select_items = function(params) {
968
  ns.show_purchase_delivery_order_select_items = function(params) {
969 969
    var data = $('#order_form').serializeArray();
970 970
    data.push({ name: 'action', value: 'Order/show_conversion_to_purchase_delivery_order_item_selection' });
971 971

  
......
981 981
    });
982 982
  };
983 983

  
984
  ns.convert_to_purchase_delivery_order = function() {
985
    var params = $("body").data("convert_to_purchase_delivery_order_item_selection_params");
986
    params.form_params.convert_to_purchase_delivery_order_selected_items_only = 1;
984
  ns.convert_to_purchase_delivery_order_item_selection = function() {
985
    let params = $("body").data("convert_to_purchase_delivery_order_item_selection_params");
987 986

  
988
    var $dlg    = $("#convert_to_purchase_delivery_order_item_selection");
989
    params.data = $dlg.find("tbody input").serializeArray();
987
    let $dialog = $("#convert_to_purchase_delivery_order_item_selection");
988
    let selected_items = $dialog.find("tbody input.item_selection_checkall").serializeArray();
989
    params.data = selected_items;
990 990

  
991
    $dlg.dialog('close');
992
    $dlg.remove();
991
    additional_param = { name: 'only_selected_items', value: 1 };
992
    if (params.form_params) {
993
      if (Array.isArray(params.form_params)) {
994
        params.form_params.push(additional_param);
995
      } else {
996
        params.form_params = [params.form_params];
997
        params.form_params.push(additional_param);
998
      }
999
    } else {
1000
      params.form_params = [additional_param];
1001
    }
1002

  
1003
    $dialog.dialog('close');
1004
    $dialog.remove();
993 1005

  
994 1006
    kivi.Order.save(params);
995 1007
  };

Auch abrufbar als: Unified diff