Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision db7d17f2

Von Tamino Steinert vor 1 Tag hinzugefügt

  • ID db7d17f2e3cceb19e83502a46b7336f69a1c7b2f
  • Vorgänger eaf77a00
  • Nachfolger 15a630c6

POS: Neukunden anlegen

Unterschiede anzeigen:

js/kivi.POS.js
95 95
    $.post("controller.pl", data, kivi.eval_json_result);
96 96
  }
97 97

  
98
  ns.set_cash_customer = function() {
99
    var data = $('#order_form').serializeArray();
100
    data.push({ name: 'action', value: 'POS/set_cash_customer' });
101

  
102
    $.post("controller.pl", data, kivi.eval_json_result);
103
  }
104

  
105
  ns.open_new_customer_dialog = function() {
106
    kivi.popup_dialog({
107
      url:    'controller.pl?action=POS/open_new_customer_dialog',
108
      id:     'new_customer_dialog',
109
      load:   function() {
110
        kivi.reinit_widgets();
111
        document.getElementById("new_customer_name").focus();
112
      },
113
      dialog: {
114
        title:  kivi.t8('New Customer'),
115
        width:  400,
116
        height: 300
117
      }
118
    });
119
  }
120

  
121
  ns.create_new_customer = function() {
122
    if (!kivi.Validator.validate_all('#new_customer_form')) return;
123

  
124
    var order_data = $('#order_form').serializeArray();
125
    var new_customer_data = $('#new_customer_form').serializeArray();
126
    var data = order_data.concat(new_customer_data);
127
    data.push({ name: 'action', value: 'POS/create_new_customer' });
128

  
129
    $.post("controller.pl", data, kivi.eval_json_result);
130
    $("#new_customer_dialog").dialog("close")
131
  }
132

  
98 133
  ns.submit = function(params) {
99 134
    if (!kivi.Order.check_cv()) return;
100 135
    if (!ns.check_items()) return;

Auch abrufbar als: Unified diff