From: Alexander Smirnov Date: Fri, 17 Jan 2025 07:54:08 +0000 (+0300) Subject: [erp-272] выборка не от документа а от tr X-Git-Tag: 1.7~66^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=7b06e8ea9f8bafbf09bd7ce59b7c5d75ef9394ca;p=erp24_rep%2Fyii-erp24%2F.git [erp-272] выборка не от документа а от tr --- diff --git a/erp24/web/js/sales-write-offs-plan/index.js b/erp24/web/js/sales-write-offs-plan/index.js index c2015936..2315d197 100644 --- a/erp24/web/js/sales-write-offs-plan/index.js +++ b/erp24/web/js/sales-write-offs-plan/index.js @@ -50,27 +50,27 @@ function editField(zis) { if (succ) { total_sales_plan.value = +offline_sales_plan.value + (+online_sales_shop_plan.value) + (+online_sales_marketplace_plan.value); //////////////////////////////////////////////// - const p1 = document.querySelector('.p1'); + const p1 = tr.querySelector('.p1'); const p1Value = total_sales_fact.value > 0 ? total_sales_plan.value / total_sales_fact.value : 0; p1.innerHTML = new Intl.NumberFormat().format(Number((p1Value * 100).toFixed(0))); p1.style.color = colorScheme1(p1Value); - const p2 = document.querySelector('.p2'); + const p2 = tr.querySelector('.p2'); const p2Value = total_sales_plan.value > 0 ? write_offs_plan.value / total_sales_plan.value : 0; p2.innerHTML = new Intl.NumberFormat().format(Number((p2Value * 100).toFixed(1))); p2.style.color = colorScheme2(p2Value); - const p3 = document.querySelector('.p3'); + const p3 = tr.querySelector('.p3'); const p3Value = total_sales_fact.value > 0 ? offline_sales_plan.value / total_sales_fact.value : 0; p3.innerHTML = new Intl.NumberFormat().format(Number((p3Value * 100).toFixed(0))); p3.style.color = colorScheme1(p3Value); - const p4 = document.querySelector('.p4'); + const p4 = tr.querySelector('.p4'); const p4Value = total_sales_fact.value > 0 ? online_sales_shop_plan.value / total_sales_fact.value : 0; p4.innerHTML = new Intl.NumberFormat().format(Number((p4Value * 100).toFixed(0))); p4.style.color = colorScheme1(p4Value); - const p5 = document.querySelector('.p5'); + const p5 = tr.querySelector('.p5'); const p5Value = total_sales_fact.value > 0 ? online_sales_marketplace_plan.value / total_sales_fact.value : 0; p5.innerHTML = new Intl.NumberFormat().format(Number((p5Value * 100).toFixed(0))); p5.style.color = colorScheme1(p5Value);