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);