Compare commits

...

2 Commits

Author SHA1 Message Date
root cc45ed9df7 fix: btn-anterior senha + fonte impressao maior
Build Fechamento de Caixa / build (macos-14, app) (push) Has been cancelled
Build Fechamento de Caixa / build (ubuntu-22.04, deb) (push) Has been cancelled
Build Fechamento de Caixa / build (windows-2022, msi) (push) Has been cancelled
2026-07-02 18:48:33 +00:00
root 378a589572 fix: btn-anterior agora exige senha
Build Fechamento de Caixa / build (macos-14, app) (push) Has been cancelled
Build Fechamento de Caixa / build (ubuntu-22.04, deb) (push) Has been cancelled
Build Fechamento de Caixa / build (windows-2022, msi) (push) Has been cancelled
2026-07-02 18:46:12 +00:00
+13 -20
View File
@@ -2153,6 +2153,7 @@ document.getElementById('btn-limpar').addEventListener('click', () => {
const btnAnterior = document.getElementById('btn-anterior'); const btnAnterior = document.getElementById('btn-anterior');
if (btnAnterior) { if (btnAnterior) {
btnAnterior.addEventListener('click', async () => { btnAnterior.addEventListener('click', async () => {
if (!await askPassword()) return;
const hasTauri = !!(window.__TAURI__ && window.__TAURI__.core); const hasTauri = !!(window.__TAURI__ && window.__TAURI__.core);
let recentList = []; let recentList = [];
@@ -2647,16 +2648,8 @@ window.toggleEditConsulta = async function() {
// Se já está editando, apenas fecha // Se já está editando, apenas fecha
if (window._editModalOpen) { closeEditModal(); return; } if (window._editModalOpen) { closeEditModal(); return; }
// Pede senha admin primeiro — sempre, para proteger edições // Pede senha — sempre, uma vez (aceita fixa ou dinâmica)
const pw = config.admin_password; if (!await askPassword()) return;
if (pw) {
const ok = await askPassword();
if (!ok) return;
} else {
// Sem senha configurada — avisa e abre mesmo assim (primeiro uso)
const ok = await askPassword(); // mostra diálogo vazio para o admin configurar mentalmente
if (!ok) return;
}
openEditModal(full); openEditModal(full);
closeRelatorioModal(); closeRelatorioModal();
@@ -3557,26 +3550,26 @@ window.printRelatorio = function() {
<title>Fechamento de Caixa</title> <title>Fechamento de Caixa</title>
<style> <style>
* { box-sizing: border-box; margin: 0; padding: 0; } * { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Courier New', monospace; font-size: 14px; width: 80mm; margin: 0 auto; padding: 8px; font-weight: bold; print-color-adjust: exact; -webkit-print-color-adjust: exact; } body { font-family: 'Courier New', monospace; font-size: 18px; width: 80mm; margin: 0 auto; padding: 8px; font-weight: bold; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.header { text-align: center; margin-bottom: 8px; } .header { text-align: center; margin-bottom: 8px; }
.header h1 { font-size: 20px; font-weight: bold; } .header h1 { font-size: 24px; font-weight: bold; }
.header h2 { font-size: 15px; font-weight: normal; } .header h2 { font-size: 18px; font-weight: normal; }
hr { border: none; border-top: 2px solid #000; margin: 6px 0; } hr { border: none; border-top: 2px solid #000; margin: 6px 0; }
.section-title { font-weight: bold; font-size: 14px; border-top: 2px solid #000; padding-top: 4px; margin-top: 8px; } .section-title { font-weight: bold; font-size: 17px; border-top: 2px solid #000; padding-top: 4px; margin-top: 8px; }
.row { display: flex; justify-content: space-between; padding: 2px 0; font-size: 13px; font-weight: bold; } .row { display: flex; justify-content: space-between; padding: 2px 0; font-size: 16px; font-weight: bold; }
.row.total-row { font-weight: bold; } .row.total-row { font-weight: bold; }
.cart-table { table-layout: fixed; width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; font-weight: bold; } .cart-table { table-layout: fixed; width: 100%; border-collapse: collapse; font-size: 16px; margin-top: 4px; font-weight: bold; }
.cart-table th { font-weight: bold; border-bottom: 2px solid #000; padding: 2px; width: 25%; } .cart-table th { font-weight: bold; border-bottom: 2px solid #000; padding: 2px; width: 25%; }
.cart-table td { padding: 2px 4px; text-align: right; font-weight: bold; } .cart-table td { padding: 2px 4px; text-align: right; font-weight: bold; }
.cart-table td:first-child { text-align: left; } .cart-table td:first-child { text-align: left; }
.cart-table tr.total-row { font-weight: bold; border-top: 2px solid #000; } .cart-table tr.total-row { font-weight: bold; border-top: 2px solid #000; }
.subtotal { font-size: 13px; margin-top: 4px; } .subtotal { font-size: 16px; margin-top: 4px; }
.subtotal .row { padding: 2px 0; } .subtotal .row { padding: 2px 0; }
.diff-ok { color: #2e7d32; font-weight: bold; } .diff-ok { color: #2e7d32; font-weight: bold; }
.diff-bad { color: #c0272d; font-weight: bold; } .diff-bad { color: #c0272d; font-weight: bold; }
.obs { font-size: 11px; color: #555; margin-top: 6px; white-space: pre-wrap; font-weight: normal; } .obs { font-size: 13px; color: #555; margin-top: 6px; white-space: pre-wrap; font-weight: normal; }
.footer { text-align: center; font-size: 11px; color: #555; margin-top: 8px; } .footer { text-align: center; font-size: 13px; color: #555; margin-top: 8px; }
@media print { body { background: #fff; font-weight: bold !important; } } @media print { body { background: #fff; font-weight: bold !important; font-size: 18px !important; } }
</style> </style>
</head><body> </head><body>
${buildPrintHTML(data)} ${buildPrintHTML(data)}