Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5c9cb1905b | |||
| a2d3dcc366 | |||
| 12e3d081a7 | |||
| ad967bf0a1 | |||
| d39cc7518b |
+37
-37
@@ -1370,17 +1370,17 @@ function buildConfirmHTML(data) {
|
||||
const al = cartAli_arr[i] || 0;
|
||||
const px = cartPix_arr[i] || 0;
|
||||
cartTableRows += `<tr>
|
||||
<td>${cr > 0 ? fmt(cr) : '-'}</td>
|
||||
<td>${db > 0 ? fmt(db) : '-'}</td>
|
||||
<td>${al > 0 ? fmt(al) : '-'}</td>
|
||||
<td>${px > 0 ? fmt(px) : '-'}</td>
|
||||
<td>${cr > 0 ? fmt(cr).replace('R$ ','') : '-'}</td>
|
||||
<td>${db > 0 ? fmt(db).replace('R$ ','') : '-'}</td>
|
||||
<td>${al > 0 ? fmt(al).replace('R$ ','') : '-'}</td>
|
||||
<td>${px > 0 ? fmt(px).replace('R$ ','') : '-'}</td>
|
||||
</tr>`;
|
||||
}
|
||||
cartTableRows += `<tr class="total-row">
|
||||
<td>${cartCred > 0 ? fmt(cartCred) : '-'}</td>
|
||||
<td>${cartDeb > 0 ? fmt(cartDeb) : '-'}</td>
|
||||
<td>${cartAli > 0 ? fmt(cartAli) : '-'}</td>
|
||||
<td>${cartPix > 0 ? fmt(cartPix) : '-'}</td>
|
||||
<td>${cartCred > 0 ? fmt(cartCred).replace('R$ ','') : '-'}</td>
|
||||
<td>${cartDeb > 0 ? fmt(cartDeb).replace('R$ ','') : '-'}</td>
|
||||
<td>${cartAli > 0 ? fmt(cartAli).replace('R$ ','') : '-'}</td>
|
||||
<td>${cartPix > 0 ? fmt(cartPix).replace('R$ ','') : '-'}</td>
|
||||
</tr>`;
|
||||
|
||||
let html = `<!DOCTYPE html>
|
||||
@@ -1397,12 +1397,12 @@ function buildConfirmHTML(data) {
|
||||
.section-title { font-weight: bold !important; font-size: 18px; border-top: 2px solid #000; padding-top: 4px; margin-top: 8px; }
|
||||
.row { display: flex; justify-content: space-between; padding: 2px 0; font-size: 18px; font-weight: bold !important; }
|
||||
.row.total-row { font-weight: bold !important; }
|
||||
.cart-table { table-layout: fixed; width: 100%; border-collapse: collapse; font-size: 18px; margin-top: 4px; font-weight: bold !important; }
|
||||
.cart-table th { font-weight: bold !important; border-bottom: 2px solid #000; padding: 3px; font-size: 18px; width: 25%; }
|
||||
.cart-table td { padding: 3px 5px; text-align: right; font-weight: bold !important; font-size: 18px; }
|
||||
.cart-table { table-layout: fixed; width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; font-weight: bold !important; }
|
||||
.cart-table th { font-weight: bold !important; border-bottom: 2px solid #000; padding: 2px 3px; font-size: 12px; width: 25%; }
|
||||
.cart-table td { padding: 2px 3px; text-align: right; font-weight: bold !important; font-size: 12px; }
|
||||
.cart-table td:first-child { text-align: left; }
|
||||
.cart-table tr.total-row { font-weight: bold !important; border-top: 2px solid #000; }
|
||||
.subtotal { font-size: 18px; margin-top: 4px; }
|
||||
.subtotal { font-size: 12px; margin-top: 4px; }
|
||||
.subtotal .row { padding: 1px 0; font-weight: bold !important; }
|
||||
.diff-ok { color: #2e7d32; font-weight: bold !important; }
|
||||
.diff-bad { color: #c0272d; font-weight: bold !important; }
|
||||
@@ -1447,7 +1447,7 @@ ${cancelamentos_arr.map(c => `<div class="row"><span>${c.numero ? `Nº ${c.numer
|
||||
<table class="cart-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>CRÉDITO</th><th>DÉBITO</th><th>ALIMENT.</th><th>PIX</th>
|
||||
<th>CRÉD</th><th>DÉBIT</th><th>ALIM</th><th>PIX</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -1585,18 +1585,18 @@ function buildPrintHTML(data) {
|
||||
const al = cartAli_arr[i] || 0;
|
||||
const px = cartPix_arr[i] || 0;
|
||||
cartTableRows += `<tr>
|
||||
<td>${cr > 0 ? fmt(cr) : '-'}</td>
|
||||
<td>${db > 0 ? fmt(db) : '-'}</td>
|
||||
<td>${al > 0 ? fmt(al) : '-'}</td>
|
||||
<td>${px > 0 ? fmt(px) : '-'}</td>
|
||||
<td>${cr > 0 ? fmt(cr).replace('R$ ','') : '-'}</td>
|
||||
<td>${db > 0 ? fmt(db).replace('R$ ','') : '-'}</td>
|
||||
<td>${al > 0 ? fmt(al).replace('R$ ','') : '-'}</td>
|
||||
<td>${px > 0 ? fmt(px).replace('R$ ','') : '-'}</td>
|
||||
</tr>`;
|
||||
}
|
||||
// Totals row
|
||||
cartTableRows += `<tr class="total-row">
|
||||
<td>${cartCred > 0 ? fmt(cartCred) : '-'}</td>
|
||||
<td>${cartDeb > 0 ? fmt(cartDeb) : '-'}</td>
|
||||
<td>${cartAli > 0 ? fmt(cartAli) : '-'}</td>
|
||||
<td>${cartPix > 0 ? fmt(cartPix) : '-'}</td>
|
||||
<td>${cartCred > 0 ? fmt(cartCred).replace('R$ ','') : '-'}</td>
|
||||
<td>${cartDeb > 0 ? fmt(cartDeb).replace('R$ ','') : '-'}</td>
|
||||
<td>${cartAli > 0 ? fmt(cartAli).replace('R$ ','') : '-'}</td>
|
||||
<td>${cartPix > 0 ? fmt(cartPix).replace('R$ ','') : '-'}</td>
|
||||
</tr>`;
|
||||
|
||||
const sysTotal = data.sys_total || 0;
|
||||
@@ -1617,12 +1617,12 @@ function buildPrintHTML(data) {
|
||||
.section-title { font-weight: bold !important; font-size: 18px; border-top: 2px solid #000; padding-top: 4px; margin-top: 8px; }
|
||||
.row { display: flex; justify-content: space-between; padding: 2px 0; font-size: 18px; font-weight: bold !important; }
|
||||
.row.total-row { font-weight: bold !important; }
|
||||
.cart-table { table-layout: fixed; width: 100%; border-collapse: collapse; font-size: 18px; margin-top: 4px; font-weight: bold !important; }
|
||||
.cart-table th { font-weight: bold !important; border-bottom: 2px solid #000; padding: 3px; font-size: 18px; width: 25%; }
|
||||
.cart-table td { padding: 3px 5px; text-align: right; font-weight: bold !important; font-size: 18px; }
|
||||
.cart-table { table-layout: fixed; width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; font-weight: bold !important; }
|
||||
.cart-table th { font-weight: bold !important; border-bottom: 2px solid #000; padding: 2px 3px; font-size: 12px; width: 25%; }
|
||||
.cart-table td { padding: 2px 3px; text-align: right; font-weight: bold !important; font-size: 12px; }
|
||||
.cart-table td:first-child { text-align: left; }
|
||||
.cart-table tr.total-row { font-weight: bold !important; border-top: 2px solid #000; }
|
||||
.subtotal { font-size: 18px; margin-top: 4px; }
|
||||
.subtotal { font-size: 12px; margin-top: 4px; }
|
||||
.subtotal .row { padding: 1px 0; font-weight: bold !important; }
|
||||
.diff-ok { color: #2e7d32; font-weight: bold !important; }
|
||||
.diff-bad { color: #c0272d; font-weight: bold !important; }
|
||||
@@ -1668,7 +1668,7 @@ ${cancLines.map(l => `<div class="row"><span>${l.label}</span><span>${fmt(l.valo
|
||||
<table class="cart-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>CRÉDITO</th><th>DÉBITO</th><th>ALIMENT.</th><th>PIX</th>
|
||||
<th>CRÉD</th><th>DÉBIT</th><th>ALIM</th><th>PIX</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -1798,21 +1798,21 @@ function openPrintPreview(data, mode) {
|
||||
|
||||
const previewStyle = `
|
||||
<style>
|
||||
body { width: 80mm; margin: 0 auto; font-family: 'Courier New', monospace; font-size: 18px; background: #fff; padding: 10px; font-weight: bold; }
|
||||
body { width: 80mm; margin: 0 auto; font-family: 'Courier New', monospace; font-size: 6px; background: #fff; padding: 10px; font-weight: bold; }
|
||||
.header { text-align: center; margin-bottom: 8px; }
|
||||
.header h1 { font-size: 24px; font-weight: bold; }
|
||||
.header h2 { font-size: 18px; font-weight: bold; }
|
||||
.header h1 { font-size: 18px; font-weight: bold; }
|
||||
.header h2 { font-size: 6px; font-weight: bold; }
|
||||
hr { border: none; border-top: 1px dashed #000; margin: 6px 0; }
|
||||
.section-title { font-weight: bold; font-size: 18px; border-top: 1px dashed #000; padding-top: 4px; margin-top: 6px; }
|
||||
.row { display: flex; justify-content: space-between; padding: 2px 0; font-size: 18px; font-weight: bold; }
|
||||
table { width: 100%; border-collapse: collapse; font-size: 18px; font-weight: bold; }
|
||||
.section-title { font-weight: bold; font-size: 6px; border-top: 1px dashed #000; padding-top: 4px; margin-top: 6px; }
|
||||
.row { display: flex; justify-content: space-between; padding: 2px 0; font-size: 6px; font-weight: bold; }
|
||||
table { width: 100%; border-collapse: collapse; font-size: 6px; font-weight: bold; }
|
||||
td { padding: 2px 4px; vertical-align: top; font-weight: bold; }
|
||||
td:nth-child(2) { text-align: right; }
|
||||
td:nth-child(3) { text-align: right; color: #555; font-size: 16px; }
|
||||
.grand-total { font-size: 24px; font-weight: bold; text-align: center; padding: 6px; border: 2px solid #000; margin: 8px 0; }
|
||||
.obs { font-size: 16px; color: #555; margin-top: 6px; white-space: pre-wrap; font-weight: normal; }
|
||||
.footer { text-align: center; font-size: 14px; color: #555; margin-top: 8px; font-weight: normal; }
|
||||
@media print { body { background: #fff; font-size: 18px !important; font-weight: bold !important; } }
|
||||
td:nth-child(3) { text-align: right; color: #555; font-size: 5px; }
|
||||
.grand-total { font-size: 18px; font-weight: bold; text-align: center; padding: 6px; border: 2px solid #000; margin: 8px 0; }
|
||||
.obs { font-size: 5px; color: #555; margin-top: 6px; white-space: pre-wrap; font-weight: normal; }
|
||||
.footer { text-align: center; font-size: 5px; color: #555; margin-top: 8px; font-weight: normal; }
|
||||
@media print { body { background: #fff; font-size: 6px !important; font-weight: bold !important; } }
|
||||
</style>
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user