From beab57505c5040ae29b8e3431adcffa92983a6f4 Mon Sep 17 00:00:00 2001 From: Ali <010109ali@gmail.com> Date: Wed, 7 Jan 2026 14:22:32 +0400 Subject: [PATCH] bug fixes --- .../property_tax_return/property_tax_return.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 6056a87..687730d 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 @@ -779,17 +779,17 @@ function calculate_509_1(frm) { } }); - // Get value from field 504 (manatla from vergi_hesab_2ci) - let value_504 = 0; + // Get value from field 504.1 (manatla from vergi_hesab_2ci) + let value_504_1 = 0; (frm.doc.vergi_hesab_2ci || []).forEach(row => { - // Точное совпадение: после "504" должна быть точка с пробелом - if (row.göstəricilər && row.göstəricilər.startsWith('504. ')) { - value_504 = flt(row.manatla); + // Точное совпадение: после "504.1" должен быть пробел (не 504.1.1) + if (row.göstəricilər && row.göstəricilər.startsWith('504.1 ')) { + value_504_1 = flt(row.manatla); } }); - // Calculate: ((501.1 + 504) / 2) * 1% - let result = ((value_501_1 + value_504) / 2) * 0.01; + // Calculate: ((501.1 + 504.1) / 2) * 1% + let result = ((value_501_1 + value_504_1) / 2) * 0.01; // Set value to field 509.1 (manatla in vergi_hesab_5ci) (frm.doc.vergi_hesab_5ci || []).forEach(row => {