From: Alexander Smirnov Date: Wed, 31 Jul 2024 05:50:00 +0000 (+0000) Subject: [ERP-81] Удаление лишних скрытых инпутов перед экспортом таблицы X-Git-Tag: 1.4~57^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=4cd70d1c362f0b7047c916f932df94ced8248087;p=erp24_rep%2Fyii-erp24%2F.git [ERP-81] Удаление лишних скрытых инпутов перед экспортом таблицы --- diff --git a/erp24/modul/shipment/shipment.php b/erp24/modul/shipment/shipment.php index f883dee8..bd0424ff 100644 --- a/erp24/modul/shipment/shipment.php +++ b/erp24/modul/shipment/shipment.php @@ -299,7 +299,11 @@ function htmlTableToExcel() { const type = 'xlsx'; var data = document.getElementById('shipmentTable'); $.each(data.querySelectorAll('input'), (ind, x) => { - x.parentNode.textContent = x.value; + if (x.type === 'hidden') { + x.parentNode.removeChild(x); + } else { + x.parentNode.textContent = x.value; + } }); var excelFile = XLSX.utils.table_to_book(data, {sheet: 'sheet1'}); XLSX.write(excelFile, { bookType: type, bookSST: true, type: 'base64' });