]> wagnertech.de Git - mfinanz.git/blobdiff - js/kivi.Part.js
Changelog (Bei DB Verwendungszweck)
[mfinanz.git] / js / kivi.Part.js
index 3828cfdec3fb8d46bf8fcb856efda27213b51504..0b0185bf3327ea70ef6b55ebf3151fc1c8789c1a 100644 (file)
@@ -245,6 +245,7 @@ namespace('kivi.Part', function(ns) {
 
     var data = $('#makemodel_table :input').serializeArray();
     data.push({ name: 'action', value: 'Part/add_makemodel_row' });
 
     var data = $('#makemodel_table :input').serializeArray();
     data.push({ name: 'action', value: 'Part/add_makemodel_row' });
+    $('#add_makemodel').data('customer_vendor_picker').clear();
 
     $.post("controller.pl", data, kivi.eval_json_result);
   };
 
     $.post("controller.pl", data, kivi.eval_json_result);
   };
@@ -269,10 +270,11 @@ namespace('kivi.Part', function(ns) {
   };
 
   ns.add_customerprice_row = function() {
   };
 
   ns.add_customerprice_row = function() {
-    if ($('#add_customerpriceid').val() === '') return;
+    if ($('#add_customerprice').val() === '') return;
 
     var data = $('#customerprice_table :input').serializeArray();
     data.push({ name: 'action', value: 'Part/add_customerprice_row' });
 
     var data = $('#customerprice_table :input').serializeArray();
     data.push({ name: 'action', value: 'Part/add_customerprice_row' });
+    $('#add_customerprice').data('customer_vendor_picker').clear();
 
     $.post("controller.pl", data, kivi.eval_json_result);
   };
 
     $.post("controller.pl", data, kivi.eval_json_result);
   };
@@ -333,13 +335,18 @@ namespace('kivi.Part', function(ns) {
     ajax_data: function(term) {
       var data = {
         'filter.all:substr:multi::ilike': term,
     ajax_data: function(term) {
       var data = {
         'filter.all:substr:multi::ilike': term,
-        'filter.obsolete': 0,
         current:  this.$real.val(),
       };
 
       if (this.o.part_type)
         data['filter.part_type'] = this.o.part_type.split(',');
 
         current:  this.$real.val(),
       };
 
       if (this.o.part_type)
         data['filter.part_type'] = this.o.part_type.split(',');
 
+      if (this.o.status) {
+        if (this.o.status == 'active')   data['filter.obsolete'] = 0;
+        if (this.o.status == 'obsolete') data['filter.obsolete'] = 1;
+      } else
+        data['filter.obsolete'] = 0;
+
       if (this.o.classification_id)
         data['filter.classification_id'] = this.o.classification_id.split(',');
 
       if (this.o.classification_id)
         data['filter.classification_id'] = this.o.classification_id.split(',');