fix(audit): corrige errores criticos y mayores, mejora UX/accesibilidad y optimiza rendimiento
- Arregla @require_auth, permisos, race conditions, locks de caja/stock - Elimina N+1 en layaway, flotilla, dashboard y global_invoice - Asegura folios atomicos para CFDI, ordenes de servicio y polizas - Protege client_secret de MercadoLibre en backend - Conecta botones/filtros de config, customers, accounting e invoicing - Mejora accesibilidad (labels/aria-label) y estados de carga/vacio - Limpia accounting.js obsoleto y consolida accounting.v9.js - Actualiza cache busting a v32 y Service Worker a v32 - Documenta todo en docs/AUDIT_Y_MEJORAS_2026-06-15.md Tests: 35 passed
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<link rel="stylesheet" href="/pos/static/css/chat.css" />
|
||||
<link rel="stylesheet" href="/pos/static/css/tokens.css" />
|
||||
<link rel="stylesheet" href="/pos/static/css/common.css" />
|
||||
<link rel="stylesheet" href="/pos/static/css/pos-ui.css?v=2" />
|
||||
<link rel="stylesheet" href="/pos/static/css/pos-ui.css?v=32" />
|
||||
<link rel="stylesheet" href="/pos/static/css/sidebar.css" />
|
||||
<link rel="stylesheet" href="/pos/static/css/pos-glass.css" />
|
||||
<link rel="manifest" href="/pos/static/pwa/manifest.json" />
|
||||
@@ -339,25 +339,14 @@
|
||||
<circle cx="11" cy="11" r="8"/>
|
||||
<line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
||||
</svg>
|
||||
<input type="text" placeholder="Buscar folio, RFC, cliente…" />
|
||||
<input id="facturas-search" type="text" placeholder="Buscar folio, RFC, cliente…" oninput="Invoicing.filterFacturas()" aria-label="Buscar facturas" />
|
||||
</div>
|
||||
|
||||
<div class="date-range">
|
||||
<svg viewBox="0 0 24 24">
|
||||
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"/>
|
||||
<line x1="16" y1="2" x2="16" y2="6"/>
|
||||
<line x1="8" y1="2" x2="8" y2="6"/>
|
||||
<line x1="3" y1="10" x2="21" y2="10"/>
|
||||
</svg>
|
||||
01 Mar 2026 — 31 Mar 2026
|
||||
</div>
|
||||
|
||||
<select class="select-filter" aria-label="Filtrar por estatus">
|
||||
<select id="facturas-status-filter" class="select-filter" aria-label="Filtrar por estatus" onchange="Invoicing.loadFacturas()">
|
||||
<option value="">Todas</option>
|
||||
<option value="timbrada">Timbradas</option>
|
||||
<option value="pendiente">Pendientes</option>
|
||||
<option value="cancelada">Canceladas</option>
|
||||
<option value="ppd">PPD</option>
|
||||
<option value="stamped">Timbradas</option>
|
||||
<option value="pending">Pendientes</option>
|
||||
<option value="cancelled">Canceladas</option>
|
||||
</select>
|
||||
|
||||
<div class="toolbar__spacer"></div>
|
||||
@@ -372,7 +361,7 @@
|
||||
Factura Global
|
||||
</button>
|
||||
|
||||
<button class="btn btn--ghost">
|
||||
<button id="facturas-export-csv" class="btn btn--ghost" onclick="Invoicing.exportFacturasCSV()">
|
||||
<svg viewBox="0 0 24 24">
|
||||
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
|
||||
<polyline points="7 10 12 15 17 10"/>
|
||||
@@ -422,10 +411,10 @@
|
||||
<circle cx="11" cy="11" r="8"/>
|
||||
<line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
||||
</svg>
|
||||
<input type="text" placeholder="Buscar nota de crédito…" />
|
||||
<input type="text" placeholder="Buscar nota de crédito…" aria-label="Buscar notas de credito" />
|
||||
</div>
|
||||
<div class="toolbar__spacer"></div>
|
||||
<button class="btn btn--ghost">
|
||||
<button id="notas-export-csv" class="btn btn--ghost" onclick="Invoicing.exportNotasCSV()">
|
||||
<svg viewBox="0 0 24 24">
|
||||
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
|
||||
<polyline points="7 10 12 15 17 10"/>
|
||||
@@ -433,7 +422,7 @@
|
||||
</svg>
|
||||
Exportar
|
||||
</button>
|
||||
<button class="btn btn--primary">
|
||||
<button id="notas-new" class="btn btn--primary" onclick="Invoicing.newCreditNote()">
|
||||
<svg viewBox="0 0 24 24">
|
||||
<line x1="12" y1="5" x2="12" y2="19"/>
|
||||
<line x1="5" y1="12" x2="19" y2="12"/>
|
||||
@@ -478,9 +467,9 @@
|
||||
<circle cx="11" cy="11" r="8"/>
|
||||
<line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
||||
</svg>
|
||||
<input type="text" placeholder="Buscar complemento de pago…" />
|
||||
<input type="text" placeholder="Buscar complemento de pago…" aria-label="Buscar complementos de pago" />
|
||||
</div>
|
||||
<select class="select-filter" aria-label="Método de pago">
|
||||
<select id="complementos-method-filter" class="select-filter" aria-label="Método de pago" onchange="Invoicing.loadComplementos()">
|
||||
<option value="">Todos los métodos</option>
|
||||
<option value="03">03 Transferencia electrónica</option>
|
||||
<option value="04">04 Tarjeta de crédito</option>
|
||||
@@ -489,7 +478,7 @@
|
||||
<option value="99">99 Por definir</option>
|
||||
</select>
|
||||
<div class="toolbar__spacer"></div>
|
||||
<button class="btn btn--primary">
|
||||
<button id="complementos-new" class="btn btn--primary" onclick="Invoicing.newPaymentComplement()">
|
||||
<svg viewBox="0 0 24 24">
|
||||
<line x1="12" y1="5" x2="12" y2="19"/>
|
||||
<line x1="5" y1="12" x2="19" y2="12"/>
|
||||
@@ -519,17 +508,7 @@
|
||||
|
||||
<div class="table-footer">
|
||||
<span></span>
|
||||
<div class="pagination">
|
||||
<button class="page-btn" aria-label="Anterior">
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"/></svg>
|
||||
</button>
|
||||
<button class="page-btn is-active">1</button>
|
||||
<button class="page-btn">2</button>
|
||||
<button class="page-btn">3</button>
|
||||
<button class="page-btn" aria-label="Siguiente">
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="pagination" id="complementos-pagination"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /panel-complementos -->
|
||||
@@ -1087,10 +1066,10 @@
|
||||
|
||||
<script src="/pos/static/js/i18n.js" defer></script>
|
||||
<script src="/pos/static/js/app-init.js" defer></script>
|
||||
<script src="/pos/static/js/splash-loader.js?v=1" defer></script>
|
||||
<script src="/pos/static/js/pos-utils.js?v=2" defer></script>
|
||||
<script src="/pos/static/js/splash-loader.js?v=32" defer></script>
|
||||
<script src="/pos/static/js/pos-utils.js?v=32" defer></script>
|
||||
<script src="/pos/static/js/sidebar.js" defer></script>
|
||||
<script src="/pos/static/js/invoicing.js?v=3" defer></script>
|
||||
<script src="/pos/static/js/invoicing.js?v=32" defer></script>
|
||||
<script src="/pos/static/js/sync-engine.js" defer></script>
|
||||
<script>if('serviceWorker' in navigator){navigator.serviceWorker.register('/pos/sw.js',{scope:'/pos/'});}</script>
|
||||
<script src="/pos/static/js/pwa-install.js" defer></script>
|
||||
|
||||
Reference in New Issue
Block a user