From 2e0faf4aec3ad1ba09f7997cf9c09100eb55af3e Mon Sep 17 00:00:00 2001 From: Michael Chus Date: Wed, 4 Mar 2026 12:27:34 +0300 Subject: [PATCH] Rename vendor price to project price, expand pricing CSV export MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename "Цена вендора" to "Цена проектная" in pricing tab table header and comments - Expand pricing CSV export to include: Lot, P/N вендора, Описание, Кол-во, Цена проектная Co-Authored-By: Claude Sonnet 4.6 --- web/templates/index.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/web/templates/index.html b/web/templates/index.html index 0aa4c10..edd3589 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -211,7 +211,7 @@ Описание Кол-во Estimate - Цена вендора + Цена проектная Склад Конк. @@ -3789,7 +3789,7 @@ function applyPricingCustomPrice(customPrice) { const totalVendorEl = document.getElementById('pricing-total-vendor'); if (customPrice > 0 && estimateTotal > 0) { - // Proportionally redistribute custom price → Цена вендора cells + // Proportionally redistribute custom price → Цена проектная cells let assigned = 0; rows.forEach((tr, i) => { const est = parseFloat(tr.dataset.est) || 0; @@ -3850,18 +3850,22 @@ function exportPricingCSV() { return /[,"\n]/.test(s) ? `"${s}"` : s; }; - const headers = ['Цена вендора']; + const headers = ['Lot', 'P/N вендора', 'Описание', 'Кол-во', 'Цена проектная']; const lines = [headers.map(csvEscape).join(',')]; rows.forEach(tr => { const cells = tr.querySelectorAll('td'); + const lot = cells[0] ? cells[0].textContent.trim() : ''; + const vendorPN = cells[1] ? cells[1].textContent.trim() : ''; + const description = cells[2] ? cells[2].textContent.trim() : ''; + const qty = cells[3] ? cells[3].textContent.trim() : ''; const vendorPrice = cells[5] ? cells[5].textContent.trim() : ''; - lines.push([vendorPrice].map(csvEscape).join(',')); + lines.push([lot, vendorPN, description, qty, vendorPrice].map(csvEscape).join(',')); }); // Totals row const vendorTotal = document.getElementById('pricing-total-vendor').textContent.trim(); - lines.push(['Итого: ' + vendorTotal].map(csvEscape).join(',')); + lines.push(['', '', '', 'Итого:', vendorTotal].map(csvEscape).join(',')); const blob = new Blob(['\uFEFF' + lines.join('\r\n')], {type: 'text/csv;charset=utf-8;'}); const url = URL.createObjectURL(blob);