diff --git a/admin/order_view.php b/admin/order_view.php index 910dee5..bcd2c4c 100644 --- a/admin/order_view.php +++ b/admin/order_view.php @@ -359,7 +359,7 @@ function printThermalReceipt() { const left = (screen.width - width) / 2; const top = (screen.height - height) / 2; - const win = window.open('', 'Receipt', `width=${width},height=${height},top=${top},left=${left}`); + const win = window.open('', '_blank', `width=${width},height=${height},top=${top},left=${left}`); if (!win) { alert('Please allow popups for this website to print thermal receipts.'); @@ -456,7 +456,7 @@ function printThermalReceipt() { .rtl { direction: rtl; unicode-bidi: embed; } @media print { body { width: 80mm; padding: 5mm; } - @page { margin: 0; } + @page { size: 80mm auto; margin: 0; } } diff --git a/assets/js/main.js b/assets/js/main.js index 51e3e17..62f7201 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -864,7 +864,7 @@ document.addEventListener('DOMContentLoaded', () => { const left = (screen.width - width) / 2; const top = (screen.height - height) / 2; - const win = window.open('', 'Receipt', `width=${width},height=${height},top=${top},left=${left}`); + const win = window.open('', '_blank', `width=${width},height=${height},top=${top},left=${left}`); if (!win) { alert('Please allow popups for this website to print receipts.'); @@ -965,8 +965,8 @@ document.addEventListener('DOMContentLoaded', () => { .order-info-row { display: flex; justify-content: space-between; margin-bottom: 2px; } .rtl { direction: rtl; unicode-bidi: embed; } @media print { - body { width: 80mm; padding: 5mm; } - @page { margin: 0; } + @page { size: 80mm auto; margin: 0; } + body { width: 80mm; margin: 0; padding: 5mm; } } @@ -1127,4 +1127,4 @@ document.addEventListener('DOMContentLoaded', () => { }); }); } -}); \ No newline at end of file +}); diff --git a/pos.php b/pos.php index 2a667a9..be6cc9a 100644 --- a/pos.php +++ b/pos.php @@ -98,155 +98,135 @@ if (!$loyalty_settings) { .search-dropdown { position: absolute; width: 100%; z-index: 1000; max-height: 200px; overflow-y: auto; display: none; } .payment-btn { height: 70px; font-size: 1.05rem; font-weight: bold; } .btn-lg { font-size: 1.1rem; padding: 0.75rem 1rem; } - .btn-sm { font-size: 0.85rem; } - .navbar-brand { font-size: 1.15rem; } - .card-title { font-size: 0.9rem; } + + /* Print Styles */ + @media print { + .no-print { display: none !important; } + .print-only { display: block !important; } + body { overflow: visible !important; height: auto !important; } + } + .print-only { display: none; } - - + -
-
- - -
-
Categories
- - - + + +
+ + +
+
+ + +
+ +
+ + +
- -
- -
- + +
+ +
+
+ + + + +
- -
-
- -
-
-
- - -
-
-
- -
- -
-
-
- ... -
- - - - - - -
- -
- SALE -
- - - -
- - Stock: - -
-
-
-
+ +
+
+ + +
)'> +
+ + <?= htmlspecialchars($product['name']) ?> + +
+ +
+ +
+
+
@@ -377,162 +357,165 @@ if (!$loyalty_settings) {
- -
+ +
+ +
- -