Fix preferred powder selection and expand company settings export

- customer-details.js: encode double quotes in JSON.stringify output as " so onclick attributes parse correctly when powder names contain double quotes
- ToolsController: add company_settings CSV to ExportAllCsv ZIP archive (was missing entirely)
- ToolsController: add ~30 missing fields to GenerateCompanySettingsCsv — AccountingMethod, timeclock settings, all shop capability/blast/coat rate fields, complexity surcharge percents, pricing mode, invoice number prefix, email-from fields, per-event notification flags, payment reminder settings, document accent colors/terms/footer notes, kiosk intake output
- Update GenerateCompanySettingsTemplate to match so import template stays in sync with export

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 21:12:49 -04:00
parent 0b839d0746
commit 35264e6b2a
2 changed files with 101 additions and 2 deletions
@@ -111,8 +111,8 @@ function searchInventoryItems(term) {
if (!dropdown) return;
dropdown.innerHTML = data.length === 0
? '<div class="dropdown-item text-muted small">No results</div>'
: data.map(i => `<button type="button" class="dropdown-item small"
onclick="selectPowder(${i.id}, ${JSON.stringify(i.name + (i.colorName ? ' — ' + i.colorName : ''))})">${i.name}${i.colorName ? ' <span class=\'text-muted\'>' + i.colorName + '</span>' : ''} <span class="badge bg-light text-muted border">${i.sku ?? ''}</span></button>`).join('');
: data.map(i => { const label = JSON.stringify(i.name + (i.colorName ? ' — ' + i.colorName : '')).replace(/"/g, '&quot;'); return `<button type="button" class="dropdown-item small"
onclick="selectPowder(${i.id}, ${label})">${i.name}${i.colorName ? ' <span class=\'text-muted\'>' + i.colorName + '</span>' : ''} <span class="badge bg-light text-muted border">${i.sku ?? ''}</span></button>`; }).join('');
dropdown.style.display = 'block';
} catch { /* silent */ }
}, 300);