feat: complete session — catalog, marketplace, WhatsApp, peer-to-peer, install scripts
Major features: - Pixel-Perfect glassmorphism design (landing + POS + public catalog) - OEM/Local catalog toggle with Nexpart taxonomy (14 groups, 108 subgroups, 558 part types) - Marketplace B2B Phase 1 (bodegas, POs, status machine, WA+email notifications) - Peer-to-peer inventory (multi-instance, LAN discovery) - WhatsApp: photo→Vision AI, voice→Whisper, conversational quotations - Smart unified search (VIN/plate/part_number/keyword auto-detect) - Shop Supplies tab (vehicle-independent parts) - Chatbot AI fallback chain (5 models) + response cache - CSV inventory import tool + setup_instance.sh installer - Tablet-responsive CSS + sidebar toggle - Filters, export CSV, employee edit, business data save - Quotation system (WA→POS) with auto-print on confirmation - Live stats on landing page Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -390,7 +390,37 @@ const Accounting = (() => {
|
||||
|
||||
// ---- Exportar placeholder ----
|
||||
function exportarContabilidad() {
|
||||
alert('Exportar: proximamente');
|
||||
// Find the first visible table in the active accounting tab and export as CSV
|
||||
var tables = document.querySelectorAll('table');
|
||||
var table = null;
|
||||
for (var i = 0; i < tables.length; i++) {
|
||||
if (tables[i].offsetParent !== null && tables[i].querySelector('tbody tr')) {
|
||||
table = tables[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!table) {
|
||||
alert('No hay datos para exportar en la vista actual.');
|
||||
return;
|
||||
}
|
||||
var rows = [];
|
||||
var ths = table.querySelectorAll('thead th');
|
||||
if (ths.length) {
|
||||
rows.push(Array.from(ths).map(function(th) { return '"' + th.textContent.trim().replace(/"/g, '""') + '"'; }).join(','));
|
||||
}
|
||||
table.querySelectorAll('tbody tr').forEach(function(tr) {
|
||||
var cells = tr.querySelectorAll('td');
|
||||
rows.push(Array.from(cells).map(function(td) { return '"' + td.textContent.trim().replace(/"/g, '""') + '"'; }).join(','));
|
||||
});
|
||||
if (rows.length <= 1) { alert('Sin datos para exportar.'); return; }
|
||||
var csv = rows.join('\n');
|
||||
var blob = new Blob(['\uFEFF' + csv], { type: 'text/csv;charset=utf-8;' });
|
||||
var url = URL.createObjectURL(blob);
|
||||
var a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = 'contabilidad_nexus_' + new Date().toISOString().slice(0, 10) + '.csv';
|
||||
a.click();
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
|
||||
// ---- Nueva Poliza modal ----
|
||||
|
||||
Reference in New Issue
Block a user