diff --git a/taxes_az/taxes_az/doctype/property_tax_return/property_tax_return.js b/taxes_az/taxes_az/doctype/property_tax_return/property_tax_return.js index 7d4d153..132a1b4 100644 --- a/taxes_az/taxes_az/doctype/property_tax_return/property_tax_return.js +++ b/taxes_az/taxes_az/doctype/property_tax_return/property_tax_return.js @@ -793,7 +793,8 @@ function calculate_509_2(frm) { } (frm.doc.vergi_hesab_1ci_1 || []).forEach(row => { - if (row.göstəricilər && row.göstəricilər.startsWith('503.1')) { + // Точное совпадение: после "503.1" должен быть пробел, а не точка (чтобы не совпадало с 503.1.1) + if (row.göstəricilər && row.göstəricilər.startsWith('503.1 ')) { console.log(' ✓ Найдена строка 503.1:', row); console.log(' Значение manatla (до flt):', row.manatla); value_503_1 = flt(row.manatla); @@ -817,7 +818,8 @@ function calculate_509_2(frm) { } (frm.doc.vergi_hesab_2ci || []).forEach(row => { - if (row.göstəricilər && row.göstəricilər.startsWith('504.1')) { + // Точное совпадение: после "504.1" должен быть пробел, а не точка (чтобы не совпадало с 504.1.1) + if (row.göstəricilər && row.göstəricilər.startsWith('504.1 ')) { console.log(' ✓ Найдена строка 504.1:', row); console.log(' Значение manatla (до flt):', row.manatla); value_504_1 = flt(row.manatla); @@ -860,7 +862,8 @@ function calculate_509_2(frm) { let found_509_2 = false; (frm.doc.vergi_hesab_5ci || []).forEach(row => { - if (row.göstəricilər && row.göstəricilər.startsWith('509.2')) { + // Точное совпадение: после "509.2" должен быть пробел + if (row.göstəricilər && row.göstəricilər.startsWith('509.2 ')) { console.log(' ✓ Найдена строка 509.2:', row); console.log(' Текущее значение manatla:', row.manatla); console.log(' Устанавливаем новое значение:', result);