From: fomichev Date: Wed, 25 Jun 2025 07:13:21 +0000 (+0300) Subject: Убрал округление X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=f4300798a18acbf79af7253920564272d42e28b9;p=erp24_rep%2Fyii-erp24%2F.git Убрал округление --- diff --git a/erp24/web/js/category-plan/index.js b/erp24/web/js/category-plan/index.js index d0c24865..65f57972 100644 --- a/erp24/web/js/category-plan/index.js +++ b/erp24/web/js/category-plan/index.js @@ -102,19 +102,19 @@ function editProcent(zis, num) { switch (num) { case 1: { const pct = +p1Cell.querySelector('input').value; - const newVal = Math.round(pct / 100 * +p1Cell.dataset.offline); + const newVal = (pct / 100 * +p1Cell.dataset.offline).toFixed(2); tr.querySelector(`td[data-offline-type="${type}"] input[name="offline"]`).value = newVal; break; } case 2: { const pct = +p2Cell.querySelector('input').value; - const newVal = Math.round(pct / 100 * +p2Cell.dataset.online); + const newVal = (pct / 100 * +p2Cell.dataset.online).toFixed(2); tr.querySelector(`td[data-online-type="${type}"] input[name="internet_shop"]`).value = newVal; break; } case 3: { const pct = +p3Cell.querySelector('input').value; - const newVal = Math.round(pct / 100 * +p3Cell.dataset.writeoffs); + const newVal = (pct / 100 * +p3Cell.dataset.writeoffs).toFixed(2); tr.querySelector(`td[data-writeoffs-type="${type}"] input[name="write_offs"]`).value = newVal; break; }