]> wagnertech.de Git - mfinanz.git/blobdiff - js/kivi.CustomerVendor.js
JS: CustomerVendor: Kosmetik: Tab entfernt
[mfinanz.git] / js / kivi.CustomerVendor.js
index 6ee499a5438e0f289ad4b17dbe08810df41312d7..2bef3a7715d8562564992ecd5b4ee91be3007e90 100644 (file)
@@ -58,7 +58,7 @@ namespace('kivi.CustomerVendor', function(ns) {
   this.selectContact = function(params) {
     var contactId = $('#contact_cp_id').val();
 
-         var url = 'controller.pl?action=CustomerVendor/ajaj_get_contact&id='+ $('#cv_id').val() +'&db='+ $('#db').val() +'&contact_id='+ contactId;
+    var url = 'controller.pl?action=CustomerVendor/ajaj_get_contact&id='+ $('#cv_id').val() +'&db='+ $('#db').val() +'&contact_id='+ contactId;
 
     $.getJSON(url, function(data) {
       var contact = data.contact;
@@ -71,7 +71,10 @@ namespace('kivi.CustomerVendor', function(ns) {
         $('#action_delete_contact').show();
       else
         $('#action_delete_contact').hide();
-
+      if (data.contact.disable_cp_main === 1)
+        $("#contact_cp_main").prop("disabled", true);
+      else
+        $("#contact_cp_main").prop("disabled", false);
       if ( params.onFormSet )
         params.onFormSet();
     });
@@ -208,6 +211,7 @@ namespace('kivi.CustomerVendor', function(ns) {
   };
 
   this.inline_report = function(target, source, data){
+//    alert("HALLO S " + source + " --T " + target + " tt D " + data);
     $.ajax({
       url:        source,
       success:    function (rsp) {
@@ -271,7 +275,7 @@ namespace('kivi.CustomerVendor', function(ns) {
         'filter.all:substr:multi::ilike': term,
         'filter.obsolete': 0,
         current:  this.$real.val(),
-        type:     this.o.type,
+        type:     this.o.cv_type,
       };
     },
     set_item: function(item) {