X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/ffe5434804888bf520dd69832d0f74d89bcf9999..e43cc81c300be73d8a8d9eea0b9999c345f1a8ea:/js/kivi.CustomerVendor.js diff --git a/js/kivi.CustomerVendor.js b/js/kivi.CustomerVendor.js index 2c192872a..e8cd9236d 100644 --- a/js/kivi.CustomerVendor.js +++ b/js/kivi.CustomerVendor.js @@ -67,10 +67,14 @@ namespace('kivi.CustomerVendor', function(ns) { kivi.CustomerVendor.setCustomVariablesFromAJAJ(data.contact_cvars, 'contact_cvars_'); - if ( contactId ) + if ( contactId ) { $('#action_delete_contact').show(); - else + $('#contact_cp_title_select').val(contact['cp_title']); + $('#contact_cp_abteilung_select').val(contact['cp_abteilung']); + } else { $('#action_delete_contact').hide(); + $('#contact_cp_title_select, #contact_cp_abteilung_select').val(''); + } if (data.contact.disable_cp_main === 1) $("#contact_cp_main").prop("disabled", true); else @@ -79,7 +83,6 @@ namespace('kivi.CustomerVendor', function(ns) { params.onFormSet(); }); - $('#contact_cp_title_select, #contact_cp_abteilung_select').val(''); }; var mapSearchStmts = [