fix: agrega helper esc en accounting.js y placeholder para pagos a proveedor
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled

This commit is contained in:
2026-06-26 00:21:18 +00:00
parent 6b00e45f5d
commit 2ed672c3c3
3 changed files with 9 additions and 3 deletions

View File

@@ -25,6 +25,12 @@ const Accounting = (() => {
function fmt(n) {
return parseFloat(n || 0).toLocaleString('es-MX', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
}
function esc(s) {
if (!s) return '';
const d = document.createElement('div');
d.textContent = s;
return d.innerHTML;
}
// ---- Auth check ----
function checkAuth() {
@@ -236,7 +242,7 @@ const Accounting = (() => {
<td class="td--amount">$${fmt(r.paid || 0)}</td>
<td class="td--amount">$${fmt(r.balance || r.total)}</td>
<td>${statusBadge(status, label)}</td>
<td><button class="btn btn--ghost btn--sm">${r.balance > 0 ? 'Pagar' : 'Ver'}</button></td>
<td><button class="btn btn--ghost btn--sm" onclick="alert('Pago a proveedor aún no está implementado')">${r.balance > 0 ? 'Pagar' : 'Ver'}</button></td>
</tr>`;
}).join('');

View File

@@ -6,7 +6,7 @@
// The fetch handler normalizes static asset URLs (strips ?v= query strings)
// so templates can use cache-busting query params freely.
const CACHE_NAME = 'nexus-pos-v22';
const CACHE_NAME = 'nexus-pos-v23';
const APP_SHELL = [
'/pos/static/css/tokens.css',

View File

@@ -499,7 +499,7 @@
<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/sidebar.js" defer></script>
<script src="/pos/static/js/accounting.js?v=1" defer></script>
<script src="/pos/static/js/accounting.js?v=2" 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>