fix(pos): print tickets via iframe with measured height and configurable paper width
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-07-02 23:11:55 +00:00
parent 31b533f9f9
commit 1ff4d80277
4 changed files with 76 additions and 13 deletions

View File

@@ -909,6 +909,7 @@
box-sizing: border-box;
}
.ticket-80 { width: 80mm; max-width: 80mm; }
.ticket-58 { width: 48mm; max-width: 48mm; }
.ticket .store-name { font-size: 14px; font-weight: bold; text-align: center; margin-bottom: 2px; }
.ticket .store-tagline { font-size: 9px; text-align: center; color: #555; margin-bottom: 4px; }
.ticket .store-info { font-size: 9px; text-align: center; color: #333; margin-bottom: 6px; line-height: 1.3; }
@@ -933,11 +934,16 @@
.ticket-line { page-break-inside: avoid; }
@media print {
@page { margin: 0; size: 80mm auto; }
body * { display: none !important; }
.ticket-print-area, .ticket-print-area * { display: block !important; }
.ticket-print-area { position: fixed; top: 0; left: 0; width: 80mm; }
.ticket, .ticket-80 { width: 80mm !important; max-width: 80mm !important; border: none !important; box-shadow: none !important; padding: 3mm !important; font-size: 9pt !important; }
@page { margin: 0; size: 72mm auto; }
html, body { height: auto !important; overflow: visible !important; }
body > * { display: none !important; }
.ticket-print-area,
.ticket-print-area * { display: block !important; }
.ticket-print-area {
position: static !important; width: 72mm !important; margin: 0 !important; padding: 0 !important;
}
.ticket, .ticket-80 { width: 72mm !important; max-width: 72mm !important; border: none !important; box-shadow: none !important; padding: 3mm !important; font-size: 9pt !important; }
.ticket-58 { width: 48mm !important; max-width: 48mm !important; }
.ticket * { word-break: break-word !important; }
.ticket .item-line-wide { display: grid !important; grid-template-columns: auto 1fr auto auto !important; gap: 2mm !important; font-size: 8pt !important; }
.ticket .ticket-row, .ticket .folio-line, .ticket .total-line { display: flex !important; }