fix: agrega helper esc en accounting.js y placeholder para pagos a proveedor
This commit is contained in:
@@ -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('');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user