diff --git a/assets/css/custom.css b/assets/css/custom.css index c01fc01..f9ac8c2 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -396,6 +396,142 @@ body { } } +body.page-pos .product-card { + min-width: 0; +} + +body.page-pos .product-name { + display: grid; + gap: 0.15rem; + line-height: 1.2; +} + +body.page-pos .product-name > div { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +@media (max-width: 1280px) { + body.page-pos .main-content { + padding: 1rem; + } + + body.page-pos .pos-container { + gap: 12px; + } + + body.page-pos .pos-products { + padding-right: 6px; + } + + [dir="rtl"] body.page-pos .pos-products { + padding-right: 0; + padding-left: 6px; + } + + body.page-pos .pos-cart { + flex-basis: 280px; + width: 280px; + min-width: 250px; + max-width: 280px; + } + + body.page-pos .product-grid { + grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); + gap: 10px; + } + + body.page-pos .product-card { + padding: 10px; + border-radius: 8px; + } + + body.page-pos .product-card img, + body.page-pos .product-card > .bg-light { + height: 88px !important; + margin-bottom: 8px !important; + } + + body.page-pos .product-name { + font-size: 0.85rem; + } + + body.page-pos .product-name .small { + font-size: 0.68rem !important; + } + + body.page-pos .product-card .price { + font-size: 0.92rem; + } + + body.page-pos .product-card .badge { + font-size: 0.68rem; + padding: 0.35rem 0.45rem; + } +} + +@media (max-width: 1100px) { + body.page-pos .main-content { + padding: 0.85rem; + } + + body.page-pos .pos-container { + gap: 10px; + } + + body.page-pos .pos-cart { + flex-basis: 250px; + width: 250px; + min-width: 230px; + max-width: 250px; + } + + body.page-pos .product-grid { + grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); + gap: 8px; + } + + body.page-pos .product-card { + padding: 8px; + } + + body.page-pos .product-card img, + body.page-pos .product-card > .bg-light { + height: 76px !important; + margin-bottom: 6px !important; + } + + body.page-pos .product-name { + font-size: 0.78rem; + } + + body.page-pos .product-name .small { + font-size: 0.64rem !important; + } + + body.page-pos .product-card .price { + font-size: 0.86rem; + } + + body.page-pos .product-card .text-decoration-line-through { + font-size: 0.62rem; + } + + body.page-pos .product-card .badge { + font-size: 0.64rem; + padding: 0.3rem 0.4rem; + } + + body.page-pos .pos-cart-action-text { + display: none; + } + + body.page-pos .pos-cart-actions .btn i { + margin: 0 !important; + } +} + [dir="rtl"] .nav-link i { margin-right: 0; margin-left: 8px; diff --git a/customer-display.php b/customer-display.php index 5648641..24fdb6c 100644 --- a/customer-display.php +++ b/customer-display.php @@ -26,152 +26,433 @@ if (empty($slides)) { 'https://images.unsplash.com/photo-1528698827591-e19ccd7bc23d?q=80&w=1920&auto=format&fit=crop' ]; } + +$footerBrand = 'Meezan Accounting System'; +$footerPoweredBy = 'omanapps.cloud'; +$footerWhatsapp = '+96899359472'; +$footerEmail = 'aalabry@gmail.com'; ?> - Customer Display + Customer Display | Meezan Accounting System + + -
- -
- - -
- Welcome +
+
+
+ +
+
+
Customer Display
+
Live order summary for the customer-facing screen
-
+
+ +
+ + Welcome +
+ +
+ +
+ + +
+ diff --git a/index.php b/index.php index 84db7cd..145e9a2 100644 --- a/index.php +++ b/index.php @@ -6241,7 +6241,7 @@ runtime_debug_mark('page:rendering', ['page' => (string)$page]); [dir="rtl"] { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } - + 0): ?>
@@ -7872,7 +7872,7 @@ runtime_debug_mark('page:rendering', ['page' => (string)$page]);
- + @@ -7924,8 +7924,6 @@ runtime_debug_mark('page:rendering', ['page' => (string)$page]);
-
-
@@ -8124,8 +8122,12 @@ runtime_debug_mark('page:rendering', ['page' => (string)$page]); const qty = parseFloat(i.qty) || 0; const vatRate = (i.vatRate !== undefined && i.vatRate !== null) ? i.vatRate : 0; const vatAmount = price * qty * (vatRate / (100 + vatRate)); + const nameAr = String(i.nameAr || i.name_ar || ''); + const nameEn = String(i.nameEn || i.name_en || ''); return { - name: (function(){ let n = ''; if(i.nameAr) n += '
'+i.nameAr+'
'; if(i.nameEn) n += '
'+i.nameEn+'
'; return n || posT('Unknown Item', 'صنف غير معروف'); })(), + name: nameAr || nameEn || posT('Unknown Item', 'صنف غير معروف'), + nameAr: nameAr, + nameEn: nameEn, price: price, qty: qty, vat: vatAmount @@ -9031,6 +9033,30 @@ runtime_debug_mark('page:rendering', ['page' => (string)$page]); } }); + function openCustomerDisplay() { + const features = [ + 'toolbar=no', + 'location=no', + 'status=no', + 'menubar=no', + 'scrollbars=yes', + 'resizable=yes', + 'popup=yes', + 'left=0', + 'top=0', + 'width=' + screen.availWidth, + 'height=' + screen.availHeight + ].join(','); + const customerDisplayWindow = window.open('customer-display.php?v=', 'CustomerDisplay', features); + if (customerDisplayWindow) { + try { + customerDisplayWindow.moveTo(0, 0); + customerDisplayWindow.resizeTo(screen.availWidth, screen.availHeight); + customerDisplayWindow.focus(); + } catch (e) {} + } + } + $(document).ready(function() { $('#posCustomer').select2({ width: '100%',