update index

This commit is contained in:
Flatlogic Bot 2026-05-08 17:40:59 +00:00
parent 20018551a1
commit 7c9d532070
3 changed files with 899 additions and 201 deletions

View File

@ -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;

File diff suppressed because it is too large Load Diff

View File

@ -6241,7 +6241,7 @@ runtime_debug_mark('page:rendering', ['page' => (string)$page]);
[dir="rtl"] { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
</style>
</head>
<body class="theme-<?= htmlspecialchars($_SESSION['theme'] ?? 'default') ?>">
<body class="theme-<?= htmlspecialchars($_SESSION['theme'] ?? 'default') ?> page-<?= htmlspecialchars($page) ?>">
<?php if (!$is_activated && $trial_days > 0): ?>
<div class="alert alert-warning text-center mb-0 rounded-0 d-print-none py-2" style="position: sticky; top: 0; z-index: 2000; font-size: 0.85rem;">
@ -7872,7 +7872,7 @@ runtime_debug_mark('page:rendering', ['page' => (string)$page]);
<div class="p-3 border-bottom d-flex justify-content-between align-items-center pos-cart-header">
<h6 class="m-0 fw-bold"><i class="bi bi-cart3 me-2"></i><?= $lang === 'ar' ? 'السلة' : 'Cart' ?></h6>
<div class="d-flex gap-2 pos-cart-actions">
<button class="btn btn-sm btn-outline-info" onclick="window.open('customer-display.php?v=<?= time() ?>', 'CustomerDisplay', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' + screen.availWidth + ',height=' + screen.availHeight + ',left=0,top=0')" title="<?= $lang === 'ar' ? 'شاشة العميل' : 'Customer Display' ?>"><i class="bi bi-display me-1"></i><span class="pos-cart-action-text"><?= $lang === 'ar' ? 'شاشة العميل' : 'Customer Screen' ?></span></button>
<button class="btn btn-sm btn-outline-info" onclick="openCustomerDisplay()" title="<?= $lang === 'ar' ? 'شاشة العميل' : 'Customer Display' ?>"><i class="bi bi-display me-1"></i><span class="pos-cart-action-text"><?= $lang === 'ar' ? 'شاشة العميل' : 'Customer Screen' ?></span></button>
<?php if ($active_session): ?>
<button class="btn btn-sm btn-outline-dark" data-bs-toggle="modal" data-bs-target="#closeRegisterModal" title="<?= $lang === 'ar' ? 'إغلاق الخزينة' : 'Close Register' ?>"><i class="bi bi-x-circle me-1"></i><span class="pos-cart-action-text" data-en="Close" data-ar="إغلاق"><?= $lang === 'ar' ? 'إغلاق' : 'Close' ?></span></button>
<?php endif; ?>
@ -7924,8 +7924,6 @@ runtime_debug_mark('page:rendering', ['page' => (string)$page]);
<span class="input-group-text"><?= __('currency') ?></span>
<input type="number" id="manualDiscountAmount" class="form-control" value="0.000" min="0" step="0.001" oninput="cart.onManualDiscountChange()">
</div>
<div class="smaller text-muted mt-1" data-en="Fixed amount discount applied to the cart total." data-ar="يتم تطبيق خصم ثابت على إجمالي السلة."><?= $lang === 'ar' ? 'يتم تطبيق خصم ثابت على إجمالي السلة.' : 'Fixed amount discount applied to the cart total.' ?></div>
<div class="smaller text-muted mt-1" id="manualDiscountLimitInfo"></div>
</div>
<?php endif; ?>
<div>
@ -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 += '<div>'+i.nameAr+'</div>'; if(i.nameEn) n += '<div>'+i.nameEn+'</div>'; 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=<?= time() ?>', '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%',