From 639fe989459a399d9a2b2a6702ce6bf11dc784dd Mon Sep 17 00:00:00 2001 From: Mikhail Chusavitin Date: Mon, 24 Aug 2026 18:36:14 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=BA=D0=BE=D0=BB=D0=B8=D1=87=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=B2=D0=BE=20=D0=B8=D1=81=D1=87=D0=B5=D0=B7=D0=B0?= =?UTF-8?q?=D0=BB=D0=BE=20=D0=BF=D1=80=D0=B8=20=D0=B2=D0=B2=D0=BE=D0=B4?= =?UTF-8?q?=D0=B5=20=D0=B2=20=D0=BC=D1=83=D0=BB=D1=8C=D1=82=D0=B8=D1=81?= =?UTF-8?q?=D0=B5=D0=BB=D0=B5=D0=BA=D1=82-=D1=82=D0=B0=D0=B1=D0=BB=D0=B8?= =?UTF-8?q?=D1=86=D0=B0=D1=85=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D1=83?= =?UTF-8?q?=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Партиальный DOM-патч в updateMultiQuantity() писал сумму в ячейку «Кол-во» (td:nth-child(5)) вместо «Стоимость» (td:nth-child(6)), затирая input с количеством. Заодно ужесточили поиск строки: вместо нестрогого querySelector по подстроке onchange-атрибута — точный поиск по data-lot-name. --- web/templates/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/templates/index.html b/web/templates/index.html index 6e6eb2d..464bc28 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -1597,7 +1597,7 @@ function renderMultiSelectTab(components) { const total = getDisplayPrice(item) * item.quantity; html += ` - + ${qualityDotHtml(comp?.price_quality)}
@@ -1708,7 +1708,7 @@ function renderMultiSelectTabWithSections(sections) { const total = getDisplayPrice(item) * item.quantity; html += ` - + ${qualityDotHtml(comp?.price_quality)}
@@ -2229,9 +2229,9 @@ function updateMultiQuantity(lotName, value) { updateCartUI(); triggerAutoSave(); // Update total in the row - const row = document.querySelector(`input[onchange*="${lotName}"]`)?.closest('tr'); + const row = document.querySelector(`tr[data-lot-name="${CSS.escape(lotName)}"]`); if (row) { - const totalCell = row.querySelector('td:nth-child(5)'); + const totalCell = row.querySelector('td:nth-child(6)'); if (totalCell) { totalCell.textContent = formatMoney(getDisplayPrice(item) * item.quantity); }