|
|
|
|
@ -60,7 +60,7 @@ $(document).ready(function() { |
|
|
|
|
function changeDataInInputs(data) { |
|
|
|
|
|
|
|
|
|
if (data.type === "LEGAL"|| data.type === "INDIVIDUAL" ) { |
|
|
|
|
//console.log(data);
|
|
|
|
|
console.log(data); |
|
|
|
|
if (data.name) { |
|
|
|
|
clientName.val(join([data.opf && data.opf.short || "", data.name.short || data.name.full], " ")); |
|
|
|
|
clientNameShort.val(data.name.short); |
|
|
|
|
@ -83,6 +83,12 @@ $(document).ready(function() { |
|
|
|
|
contactName.val(getShortPersonName(data.name.full)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// fill self contact name for individual entrepreneur
|
|
|
|
|
if (data.type === "INDIVIDUAL" && data.name && data.name.full) { |
|
|
|
|
var resultName = ''; |
|
|
|
|
clientNameShort.val(getShortPersonNameWithOpf(data.name.full, data.opf.short)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
clientInn.val(data.inn); |
|
|
|
|
clientKpp.val(data.kpp); |
|
|
|
|
clientOqrn.val(data.ogrn); |
|
|
|
|
|