Autosave: 20260423-030915
This commit is contained in:
parent
c5a18a8ed1
commit
ac740c5a25
@ -1,13 +1,32 @@
|
||||
:root {
|
||||
--sidebar-width: 250px;
|
||||
--sidebar-width: 260px;
|
||||
--primary-color: #4f46e5;
|
||||
--primary-hover: #4338ca;
|
||||
--surface-color: #ffffff;
|
||||
--bg-color: #f8fafc;
|
||||
--text-main: #0f172a;
|
||||
--text-muted: #64748b;
|
||||
--border-color: #e2e8f0;
|
||||
--radius-sm: 0.5rem;
|
||||
--radius-md: 0.75rem;
|
||||
--radius-lg: 1rem;
|
||||
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
||||
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
||||
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
background-color: #f4f6f9;
|
||||
font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-main);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
#sidebar-wrapper {
|
||||
min-height: 100vh;
|
||||
height: 100vh;
|
||||
@ -23,41 +42,75 @@ body {
|
||||
scrollbar-gutter: stable;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
|
||||
background: #343a40; /* Dark theme sidebar */
|
||||
background: #1e293b;
|
||||
}
|
||||
|
||||
[dir="rtl"] #sidebar-wrapper {
|
||||
margin-left: 0;
|
||||
margin-right: calc(-1 * var(--sidebar-width));
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#sidebar-wrapper::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
width: 6px;
|
||||
}
|
||||
#sidebar-wrapper::-webkit-scrollbar-track {
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
background: transparent;
|
||||
}
|
||||
#sidebar-wrapper::-webkit-scrollbar-thumb {
|
||||
background: rgba(255, 255, 255, 0.28);
|
||||
border-radius: 999px;
|
||||
border: 2px solid rgba(52, 58, 64, 0.9);
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 10px;
|
||||
}
|
||||
#sidebar-wrapper::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(255, 255, 255, 0.42);
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
#sidebar-navigation {
|
||||
padding-bottom: 1rem !important;
|
||||
|
||||
.sidebar-heading {
|
||||
padding: 1.5rem 1.25rem;
|
||||
font-size: 1.25rem;
|
||||
color: #fff;
|
||||
background: rgba(0,0,0,0.1);
|
||||
border-bottom: 1px solid rgba(255,255,255,0.05);
|
||||
}
|
||||
|
||||
.list-group-item {
|
||||
border: none;
|
||||
padding: 0.85rem 1.25rem;
|
||||
background-color: transparent;
|
||||
color: #cbd5e1;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s;
|
||||
margin: 0.2rem 0.75rem;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
.list-group-item:hover, .list-group-item.active {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
color: #fff;
|
||||
}
|
||||
.list-group-item i {
|
||||
margin-right: 12px;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
[dir="rtl"] .list-group-item i {
|
||||
margin-right: 0;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
#wrapper.toggled #sidebar-wrapper {
|
||||
margin-left: 0;
|
||||
}
|
||||
[dir="rtl"] #wrapper.toggled #sidebar-wrapper {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#page-content-wrapper {
|
||||
min-width: 100vw;
|
||||
transition: margin .25s ease-out;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
#sidebar-wrapper {
|
||||
margin-left: 0;
|
||||
@ -88,64 +141,188 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-heading {
|
||||
padding: 1rem 1.25rem;
|
||||
font-size: 1.25rem;
|
||||
color: #fff;
|
||||
background: #212529;
|
||||
}
|
||||
.list-group-item {
|
||||
border: none;
|
||||
padding: 0.85rem 1.25rem;
|
||||
background-color: transparent;
|
||||
color: #c2c7d0;
|
||||
font-weight: 500;
|
||||
}
|
||||
.list-group-item:hover, .list-group-item.active {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
color: #fff;
|
||||
}
|
||||
.list-group-item i {
|
||||
margin-right: 10px;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
[dir="rtl"] .list-group-item i {
|
||||
margin-right: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/* Navbar */
|
||||
.top-navbar {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
|
||||
background-color: var(--surface-color);
|
||||
box-shadow: var(--shadow-sm);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.card {
|
||||
box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
|
||||
margin-bottom: 1rem;
|
||||
border: 0;
|
||||
border-radius: 0.25rem;
|
||||
/* Cards & Surface */
|
||||
.surface-card, .card {
|
||||
background: var(--surface-color);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: var(--shadow-sm);
|
||||
margin-bottom: 1.5rem;
|
||||
transition: box-shadow 0.2s;
|
||||
|
||||
}
|
||||
.surface-card:hover, .card:hover {
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
.surface-card.p-0, .card.p-0 {
|
||||
padding: 0;
|
||||
}
|
||||
.card-header {
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid rgba(0,0,0,.125);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
font-weight: 600;
|
||||
padding: 1.25rem 1.5rem;
|
||||
}
|
||||
.card-body, .surface-card-body {
|
||||
|
||||
}
|
||||
|
||||
/* Typography & Headers */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 600;
|
||||
color: var(--text-main);
|
||||
}
|
||||
h1 { font-size: 1.75rem; }
|
||||
h2 { font-size: 1.5rem; }
|
||||
|
||||
/* Tables (Grids / Lists) */
|
||||
.table {
|
||||
width: 100%;
|
||||
margin-bottom: 0;
|
||||
color: var(--text-main);
|
||||
vertical-align: middle;
|
||||
}
|
||||
.table th {
|
||||
font-weight: 600;
|
||||
color: #495057;
|
||||
background-color: #f8f9fa;
|
||||
color: var(--text-muted);
|
||||
background-color: #f8fafc;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
text-transform: uppercase;
|
||||
font-size: 0.8rem;
|
||||
letter-spacing: 0.05em;
|
||||
padding: 1rem 1.25rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.table td {
|
||||
padding: 1rem 1.25rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
vertical-align: middle;
|
||||
}
|
||||
.table-hover tbody tr:hover {
|
||||
background-color: #f1f5f9;
|
||||
}
|
||||
.table-responsive {
|
||||
border-radius: var(--radius-lg);
|
||||
border: 1px solid var(--border-color);
|
||||
overflow: hidden;
|
||||
background: var(--surface-color);
|
||||
box-shadow: var(--shadow-sm);
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
.table-responsive .table {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.table-responsive .table th {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
/* Modal styles */
|
||||
/* Forms & Inputs */
|
||||
.form-control, .form-select {
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 0.6rem 1rem;
|
||||
font-size: 0.95rem;
|
||||
transition: all 0.2s;
|
||||
background-color: #f8fafc;
|
||||
}
|
||||
.form-control:focus, .form-select:focus {
|
||||
background-color: #fff;
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.2);
|
||||
}
|
||||
.form-label {
|
||||
font-weight: 500;
|
||||
font-size: 0.9rem;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
.input-group-text {
|
||||
background-color: #f8fafc;
|
||||
border-color: var(--border-color);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn {
|
||||
border-radius: var(--radius-md);
|
||||
padding: 0.6rem 1.25rem;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
.btn-primary:hover {
|
||||
background-color: var(--primary-hover);
|
||||
border-color: var(--primary-hover);
|
||||
}
|
||||
.btn-sm {
|
||||
padding: 0.4rem 0.8rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
/* Modals */
|
||||
.modal-content {
|
||||
border-radius: var(--radius-lg);
|
||||
border: none;
|
||||
box-shadow: var(--shadow-lg);
|
||||
}
|
||||
.modal-header {
|
||||
background-color: #f8f9fa;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
background-color: var(--surface-color);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
padding: 1.25rem 1.5rem;
|
||||
position: relative;
|
||||
}
|
||||
.modal-body {
|
||||
|
||||
}
|
||||
.modal-footer {
|
||||
border-top: 1px solid #dee2e6;
|
||||
background-color: #f8f9fa;
|
||||
border-top: 1px solid var(--border-color);
|
||||
background-color: #f8fafc;
|
||||
padding: 1.25rem 1.5rem;
|
||||
border-bottom-left-radius: var(--radius-lg);
|
||||
border-bottom-right-radius: var(--radius-lg);
|
||||
}
|
||||
.modal-header .btn-close {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 1.25rem;
|
||||
}
|
||||
[dir="rtl"] .modal-header .btn-close {
|
||||
left: 1.5rem;
|
||||
right: auto;
|
||||
}
|
||||
[dir="ltr"] .modal-header .btn-close {
|
||||
right: 1.5rem;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
/* Helpers */
|
||||
.glassmorphism {
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
.filter-shell {
|
||||
background: var(--surface-color);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-lg);
|
||||
|
||||
margin-bottom: 1.5rem;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
body.auth-body {
|
||||
@ -153,42 +330,14 @@ body.auth-body {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
background-color: #e9ecef;
|
||||
}
|
||||
|
||||
/* Sidebar Sub-menu */
|
||||
[data-bs-toggle="collapse"][aria-expanded="true"] .toggle-icon {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
/* Fix for btn-close in modal-header */
|
||||
.modal-header {
|
||||
position: relative;
|
||||
}
|
||||
.modal-header .btn-close {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
}
|
||||
[dir="rtl"] .modal-header .btn-close {
|
||||
left: 1rem;
|
||||
}
|
||||
[dir="ltr"] .modal-header .btn-close {
|
||||
right: 1rem;
|
||||
background-color: #f1f5f9;
|
||||
}
|
||||
|
||||
/* Fix form-select arrow position in RTL mode */
|
||||
[dir="rtl"] .form-select {
|
||||
background-position: left 0.75rem center;
|
||||
padding-right: 0.75rem;
|
||||
padding-left: 2.25rem;
|
||||
}
|
||||
[dir="rtl"] .form-select-sm {
|
||||
padding-right: 0.5rem;
|
||||
padding-left: 2rem;
|
||||
}
|
||||
[dir="rtl"] .form-select-lg {
|
||||
padding-right: 1rem;
|
||||
padding-left: 3rem;
|
||||
padding-left: 2.25rem;
|
||||
}
|
||||
|
||||
/* Print specific styles */
|
||||
@ -206,21 +355,38 @@ body.auth-body {
|
||||
font-size: 11pt;
|
||||
background-color: #fff;
|
||||
}
|
||||
.table {
|
||||
font-size: 10pt;
|
||||
margin-bottom: 1rem;
|
||||
.surface-card, .card {
|
||||
box-shadow: none !important;
|
||||
border: none !important;
|
||||
margin-bottom: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.table-responsive {
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.table th, .table td {
|
||||
padding: 0.3rem;
|
||||
}
|
||||
.fs-5 {
|
||||
font-size: 1rem !important;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
.surface-card {
|
||||
box-shadow: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
}
|
||||
details summary { list-style: none; cursor: pointer; }
|
||||
details summary::-webkit-details-marker { display: none; }
|
||||
|
||||
|
||||
.eid-advanced-panel {
|
||||
border-top: 1px dashed var(--border-color);
|
||||
margin-top: 0.85rem;
|
||||
padding-top: 0.85rem;
|
||||
}
|
||||
|
||||
|
||||
.card .table-responsive, .surface-card .table-responsive {
|
||||
box-shadow: none; border: none; border-radius: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.surface-card { padding: 1.5rem; }
|
||||
|
||||
.table-sm th, .table-sm td {
|
||||
padding: 0.5rem 0.75rem !important;
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ $items = $queryStmt->fetchAll();
|
||||
require __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
|
||||
<section class="surface-card mb-4">
|
||||
<section class="mb-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h3 class="h5 mb-2"><i class="bi bi-tags me-2"></i><?= h($pageTitle) ?></h3>
|
||||
@ -73,16 +73,16 @@ require __DIR__ . '/includes/header.php';
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="surface-card">
|
||||
<div class="table-responsive shadow-sm" style="border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05);">
|
||||
<table class="table table-hover align-middle mb-0 text-center" style="background-color: #fff;">
|
||||
<thead style="background: linear-gradient(90deg, #0d6efd, #0dcaf0);">
|
||||
<section>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 text-center">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent">ID</th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الاسم (عربي)', 'Name (AR)')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الاسم (إنجليزي)', 'Name (EN)')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الوصف', 'Description')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
<th>ID</th>
|
||||
<th><?= h(tr('الاسم (عربي)', 'Name (AR)')) ?></th>
|
||||
<th><?= h(tr('الاسم (إنجليزي)', 'Name (EN)')) ?></th>
|
||||
<th><?= h(tr('الوصف', 'Description')) ?></th>
|
||||
<th><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-top-0">
|
||||
|
||||
@ -70,7 +70,7 @@ $items = $queryStmt->fetchAll();
|
||||
require __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
|
||||
<section class="surface-card mb-4">
|
||||
<section class="mb-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h3 class="h5 mb-2"><i class="bi bi-people-fill me-2"></i><?= h($pageTitle) ?></h3>
|
||||
@ -89,17 +89,17 @@ require __DIR__ . '/includes/header.php';
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="surface-card">
|
||||
<div class="table-responsive shadow-sm" style="border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05);">
|
||||
<table class="table table-hover align-middle mb-0 text-center" style="background-color: #fff;">
|
||||
<thead style="background: linear-gradient(90deg, #0d6efd, #0dcaf0);">
|
||||
<section>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 text-center">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent">ID</th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الاسم', 'Name')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الهاتف', 'Phone')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('البريد', 'Email')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('العنوان', 'Address')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
<th>ID</th>
|
||||
<th><?= h(tr('الاسم', 'Name')) ?></th>
|
||||
<th><?= h(tr('الهاتف', 'Phone')) ?></th>
|
||||
<th><?= h(tr('البريد', 'Email')) ?></th>
|
||||
<th><?= h(tr('العنوان', 'Address')) ?></th>
|
||||
<th><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-top-0">
|
||||
|
||||
224
eid_orders.php
224
eid_orders.php
@ -32,7 +32,7 @@ if (!in_array($dir, ['asc', 'desc'], true)) {
|
||||
$dir = 'asc';
|
||||
}
|
||||
$page = max(1, (int) ($_GET['p'] ?? 1));
|
||||
$limit = 15;
|
||||
$limit = 50;
|
||||
$offset = ($page - 1) * $limit;
|
||||
$allowedBranches = $user && $user['role'] !== 'owner' ? get_user_branches($user) : [];
|
||||
$deliveryOptions = eid_delivery_status_options();
|
||||
@ -196,125 +196,20 @@ $sortIcon = static function (string $column) use ($sort, $dir): string {
|
||||
|
||||
require __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
<section class="surface-card mb-4">
|
||||
<section class="mb-4">
|
||||
<div class="d-flex flex-wrap justify-content-between align-items-center gap-3 mb-3">
|
||||
<div>
|
||||
<h1 class="h4 mb-1"><i class="bi bi-stars me-2"></i><?= h(tr('طلبات العيد', 'Eid Orders')) ?></h1>
|
||||
</div>
|
||||
<div class="d-flex gap-2 flex-wrap">
|
||||
<span class="badge text-bg-success-subtle border border-success-subtle text-success-emphasis px-3 py-2"><?= h(tr('المرحلة الحالية: إنشاء الطلبات', 'Current phase: order creation')) ?></span>
|
||||
<a class="btn btn-dark" href="<?= h(url_for('eid_sale.php')) ?>"><i class="bi bi-plus-circle me-1"></i><?= h(tr('طلب عيد جديد', 'New Eid Order')) ?></a>
|
||||
<a class="btn btn-outline-dark" href="<?= h(url_for('eid_print.php', $queryState())) ?>"><i class="bi bi-printer me-1"></i><?= h(tr('طباعة ملخص التجهيز', 'Print prep summary')) ?></a>
|
||||
<a class="btn btn-outline-secondary" href="<?= h(url_for('sales.php', ['status' => 'order'])) ?>"><i class="bi bi-journal-text me-1"></i><?= h(tr('عرض الطلبات العادية', 'View regular orders')) ?></a>
|
||||
<a class="btn btn-sm btn-dark" href="<?= h(url_for('eid_sale.php')) ?>"><i class="bi bi-plus-circle me-1"></i><?= h(tr('طلب عيد جديد', 'New Eid Order')) ?></a>
|
||||
<a class="btn btn-sm btn-outline-dark" href="<?= h(url_for('eid_print.php', $queryState())) ?>"><i class="bi bi-printer me-1"></i><?= h(tr('طباعة ملخص التجهيز', 'Print prep summary')) ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $hasAdvancedFilters = $mode !== null || $paymentStatus !== ''; ?>
|
||||
<style>
|
||||
.eid-filter-shell {
|
||||
border: 1px solid rgba(15, 23, 42, 0.08);
|
||||
border-radius: 1rem;
|
||||
background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
|
||||
padding: 1rem;
|
||||
}
|
||||
.eid-filter-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .75rem;
|
||||
align-items: end;
|
||||
}
|
||||
.eid-filter-item {
|
||||
flex: 1 1 180px;
|
||||
min-width: 0;
|
||||
}
|
||||
.eid-filter-item--search {
|
||||
flex: 2.2 1 320px;
|
||||
}
|
||||
.eid-filter-item--date {
|
||||
flex: 1.6 1 280px;
|
||||
}
|
||||
.eid-filter-actions {
|
||||
flex: 0 1 auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .5rem;
|
||||
align-items: end;
|
||||
}
|
||||
.eid-date-range {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
||||
gap: .5rem;
|
||||
}
|
||||
.eid-advanced-toggle summary {
|
||||
list-style: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.eid-advanced-toggle summary::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
.eid-advanced-panel {
|
||||
border-top: 1px dashed rgba(15, 23, 42, 0.12);
|
||||
margin-top: .85rem;
|
||||
padding-top: .85rem;
|
||||
}
|
||||
.eid-grid-card {
|
||||
border: 1px solid rgba(15, 23, 42, 0.08);
|
||||
border-radius: 1rem;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.05);
|
||||
}
|
||||
.eid-grid-toolbar {
|
||||
background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.92));
|
||||
}
|
||||
.eid-table thead th {
|
||||
white-space: nowrap;
|
||||
font-size: .82rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .03em;
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
.eid-sort-link {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: .35rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
.eid-sort-link:hover {
|
||||
color: var(--bs-dark);
|
||||
}
|
||||
.eid-order-id {
|
||||
font-variant-numeric: tabular-nums;
|
||||
letter-spacing: .02em;
|
||||
}
|
||||
.eid-customer-cell,
|
||||
.eid-items-cell {
|
||||
min-width: 190px;
|
||||
}
|
||||
.eid-items-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .35rem;
|
||||
}
|
||||
.eid-items-list .badge {
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
@media (max-width: 767.98px) {
|
||||
.eid-filter-actions {
|
||||
width: 100%;
|
||||
}
|
||||
.eid-filter-actions .btn {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
.eid-date-range {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<form class="eid-filter-shell mb-4" method="GET" action="eid_orders.php">
|
||||
|
||||
<form class="mb-4" method="GET" action="eid_orders.php">
|
||||
<div class="d-flex justify-content-end align-items-center mb-3">
|
||||
<details class="eid-advanced-toggle" <?= $hasAdvancedFilters ? 'open' : '' ?>>
|
||||
<summary class="btn btn-sm btn-outline-secondary">
|
||||
@ -324,7 +219,7 @@ require __DIR__ . '/includes/header.php';
|
||||
<div class="row g-2">
|
||||
<div class="col-12 col-md-6">
|
||||
<label class="form-label mb-1" for="eid-mode"><?= h(tr('القناة', 'Channel')) ?></label>
|
||||
<select id="eid-mode" class="form-select" name="mode">
|
||||
<select id="eid-mode" class="form-select form-select-sm" name="mode">
|
||||
<option value=""><?= h(tr('الكل', 'All')) ?></option>
|
||||
<option value="normal" <?= $mode === 'normal' ? 'selected' : '' ?>><?= h(tr('فاتورة', 'Invoice')) ?></option>
|
||||
<option value="pos" <?= $mode === 'pos' ? 'selected' : '' ?>>POS</option>
|
||||
@ -332,7 +227,7 @@ require __DIR__ . '/includes/header.php';
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<label class="form-label mb-1" for="eid-payment-status"><?= h(tr('حالة الدفع', 'Payment')) ?></label>
|
||||
<select id="eid-payment-status" class="form-select" name="payment_status">
|
||||
<select id="eid-payment-status" class="form-select form-select-sm" name="payment_status">
|
||||
<option value=""><?= h(tr('كل الحالات', 'All statuses')) ?></option>
|
||||
<option value="paid" <?= $paymentStatus === 'paid' ? 'selected' : '' ?>><?= h(tr('مدفوع', 'Paid')) ?></option>
|
||||
<option value="partial" <?= $paymentStatus === 'partial' ? 'selected' : '' ?>><?= h(tr('جزئي', 'Partial')) ?></option>
|
||||
@ -342,17 +237,16 @@ require __DIR__ . '/includes/header.php';
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="eid-filter-row">
|
||||
<div class="eid-filter-item eid-filter-item--search">
|
||||
<div class="row g-3 align-items-end">
|
||||
<div class="col-12 col-md-3">
|
||||
<label class="form-label mb-1" for="eid-search"><?= h(tr('بحث سريع', 'Quick search')) ?></label>
|
||||
<input id="eid-search" type="text" class="form-control" name="q" value="<?= h($search) ?>" placeholder="<?= h(tr('فاتورة، عميل، كاشير، أو ملاحظة', 'Invoice, customer, cashier, or note')) ?>">
|
||||
<input id="eid-search" type="text" class="form-control form-control-sm" name="q" value="<?= h($search) ?>" placeholder="<?= h(tr('بحث...', 'Search...')) ?>">
|
||||
</div>
|
||||
<div class="eid-filter-item">
|
||||
<div class="col-12 col-md-2">
|
||||
<label class="form-label mb-1" for="eid-branch"><?= h(tr('الفرع', 'Branch')) ?></label>
|
||||
<select id="eid-branch" class="form-select" name="branch">
|
||||
<select id="eid-branch" class="form-select form-select-sm" name="branch">
|
||||
<option value=""><?= h(tr('كل الفروع', 'All branches')) ?></option>
|
||||
<?php foreach (branches() as $branchCode => $branchLabel): ?>
|
||||
<?php if ($user['role'] !== 'owner' && !in_array($branchCode, $allowedBranches, true)) { continue; } ?>
|
||||
@ -360,52 +254,53 @@ require __DIR__ . '/includes/header.php';
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="eid-filter-item">
|
||||
<div class="col-12 col-md-2">
|
||||
<label class="form-label mb-1" for="eid-delivery-status"><?= h(tr('التجهيز', 'Prep')) ?></label>
|
||||
<select id="eid-delivery-status" class="form-select" name="delivery_status">
|
||||
<select id="eid-delivery-status" class="form-select form-select-sm" name="delivery_status">
|
||||
<option value=""><?= h(tr('كل الحالات', 'All statuses')) ?></option>
|
||||
<?php foreach ($deliveryOptions as $value => $label): ?>
|
||||
<option value="<?= h($value) ?>" <?= $deliveryStatus === $value ? 'selected' : '' ?>><?= h($label) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="eid-filter-item eid-filter-item--date">
|
||||
<div class="col-12 col-md-3">
|
||||
<label class="form-label mb-1"><?= h(tr('فترة التسليم', 'Delivery window')) ?></label>
|
||||
<div class="eid-date-range">
|
||||
<input id="eid-date-from" type="date" class="form-control" name="date_from" value="<?= h($dateFrom) ?>" aria-label="<?= h(tr('من تاريخ', 'From date')) ?>">
|
||||
<input id="eid-date-to" type="date" class="form-control" name="date_to" value="<?= h($dateTo) ?>" aria-label="<?= h(tr('إلى تاريخ', 'To date')) ?>">
|
||||
<div class="d-flex gap-2">
|
||||
|
||||
<input id="eid-date-from" type="date" class="form-control form-control-sm" name="date_from" value="<?= h($dateFrom) ?>" aria-label="<?= h(tr('من تاريخ', 'From date')) ?>">
|
||||
<input id="eid-date-to" type="date" class="form-control form-control-sm" name="date_to" value="<?= h($dateTo) ?>" aria-label="<?= h(tr('إلى تاريخ', 'To date')) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="eid-filter-actions">
|
||||
<button type="submit" class="btn btn-dark"><i class="bi bi-funnel me-1"></i><?= h(tr('تطبيق', 'Apply')) ?></button>
|
||||
<a class="btn btn-outline-secondary" href="<?= h(url_for('eid_orders.php')) ?>"><?= h(tr('إعادة ضبط', 'Reset')) ?></a>
|
||||
<div class="col-12 col-md-2 d-flex gap-2">
|
||||
<button type="submit" class="btn btn-sm btn-dark w-50"><i class="bi bi-funnel me-1"></i><?= h(tr('تطبيق', 'Apply')) ?></button>
|
||||
<a class="btn btn-sm btn-outline-secondary w-50" href="<?= h(url_for('eid_orders.php')) ?>"><?= h(tr('إعادة ضبط', 'Reset')) ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="row g-3 mb-4">
|
||||
<div class="col-12 col-md-6 col-xl-3">
|
||||
<div class="surface-card h-100 border">
|
||||
<div class="small text-muted mb-2"><?= h(tr('إجمالي الطلبات', 'Total orders')) ?></div>
|
||||
<div class="display-6 fw-bold"><?= (int) ($summary['total_orders'] ?? 0) ?></div>
|
||||
<div class="row g-2 mb-3">
|
||||
<div class="col-6 col-md-3">
|
||||
<div class="card border-0 p-2">
|
||||
<div class="small text-muted mb-1"><?= h(tr('إجمالي الطلبات', 'Total orders')) ?></div>
|
||||
<div class="fs-5 fw-bold"><?= (int) ($summary['total_orders'] ?? 0) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-xl-3">
|
||||
<div class="surface-card h-100 border">
|
||||
<div class="small text-muted mb-2"><?= h(tr('عدد القطع', 'Total items')) ?></div>
|
||||
<div class="display-6 fw-bold"><?= (int) ($summary['total_items'] ?? 0) ?></div>
|
||||
<div class="col-6 col-md-3">
|
||||
<div class="card border-0 p-2">
|
||||
<div class="small text-muted mb-1"><?= h(tr('عدد القطع', 'Total items')) ?></div>
|
||||
<div class="fs-5 fw-bold"><?= (int) ($summary['total_items'] ?? 0) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-xl-3">
|
||||
<div class="surface-card h-100 border">
|
||||
<div class="small text-muted mb-2"><?= h(tr('قيد التجهيز', 'Pending prep')) ?></div>
|
||||
<div class="display-6 fw-bold"><?= (int) ($summary['prep_orders'] ?? 0) ?></div>
|
||||
<div class="col-6 col-md-3">
|
||||
<div class="card border-0 p-2">
|
||||
<div class="small text-muted mb-1"><?= h(tr('قيد التجهيز', 'Pending prep')) ?></div>
|
||||
<div class="fs-5 fw-bold"><?= (int) ($summary['prep_orders'] ?? 0) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-xl-3">
|
||||
<div class="surface-card h-100 border">
|
||||
<div class="small text-muted mb-2"><?= h(tr('إجمالي القيمة', 'Total value')) ?></div>
|
||||
<div class="display-6 fw-bold"><?= h(number_format((float) ($summary['total_amount'] ?? 0), 3)) ?></div>
|
||||
<div class="col-6 col-md-3">
|
||||
<div class="card border-0 p-2">
|
||||
<div class="small text-muted mb-1"><?= h(tr('إجمالي القيمة', 'Total value')) ?></div>
|
||||
<div class="fs-5 fw-bold"><?= h(number_format((float) ($summary['total_amount'] ?? 0), 3)) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -420,58 +315,58 @@ require __DIR__ . '/includes/header.php';
|
||||
<a class="btn btn-dark mt-3" href="<?= h(url_for('eid_sale.php')) ?>"><i class="bi bi-plus-circle me-1"></i><?= h(tr('إنشاء طلب عيد', 'Create Eid Order')) ?></a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="eid-grid-card bg-white mb-3">
|
||||
<div class="eid-grid-toolbar px-3 px-lg-4 py-3 border-bottom d-flex justify-content-end">
|
||||
<span class="badge rounded-pill text-bg-light border px-3 py-2">
|
||||
<?= h((int) ($summary['total_orders'] ?? 0)) ?> <?= h(tr('طلب', 'orders')) ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="d-flex justify-content-end mb-2">
|
||||
<span class="badge rounded-pill text-bg-light border px-2 py-1 text-muted fw-normal">
|
||||
<?= h((int) ($summary['total_orders'] ?? 0)) ?> <?= h(tr('طلب', 'orders')) ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 eid-table">
|
||||
<table class="table table-sm table-hover align-middle mb-0">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>
|
||||
<a class="eid-sort-link" href="<?= h($sortUrl('receipt_no')) ?>">
|
||||
<a class="text-decoration-none text-dark fw-semibold d-inline-flex align-items-center gap-1" href="<?= h($sortUrl('receipt_no')) ?>">
|
||||
<?= h(tr('الفاتورة', 'Invoice')) ?>
|
||||
<i class="bi <?= h($sortIcon('receipt_no')) ?>"></i>
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<a class="eid-sort-link" href="<?= h($sortUrl('customer')) ?>">
|
||||
<a class="text-decoration-none text-dark fw-semibold d-inline-flex align-items-center gap-1" href="<?= h($sortUrl('customer')) ?>">
|
||||
<?= h(tr('العميل', 'Customer')) ?>
|
||||
<i class="bi <?= h($sortIcon('customer')) ?>"></i>
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<a class="eid-sort-link" href="<?= h($sortUrl('delivery_date')) ?>">
|
||||
<a class="text-decoration-none text-dark fw-semibold d-inline-flex align-items-center gap-1" href="<?= h($sortUrl('delivery_date')) ?>">
|
||||
<?= h(tr('تسليم', 'Delivery')) ?>
|
||||
<i class="bi <?= h($sortIcon('delivery_date')) ?>"></i>
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<a class="eid-sort-link" href="<?= h($sortUrl('delivery_status')) ?>">
|
||||
<a class="text-decoration-none text-dark fw-semibold d-inline-flex align-items-center gap-1" href="<?= h($sortUrl('delivery_status')) ?>">
|
||||
<?= h(tr('حالة التجهيز', 'Prep status')) ?>
|
||||
<i class="bi <?= h($sortIcon('delivery_status')) ?>"></i>
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<a class="eid-sort-link" href="<?= h($sortUrl('branch')) ?>">
|
||||
<a class="text-decoration-none text-dark fw-semibold d-inline-flex align-items-center gap-1" href="<?= h($sortUrl('branch')) ?>">
|
||||
<?= h(tr('الفرع', 'Branch')) ?>
|
||||
<i class="bi <?= h($sortIcon('branch')) ?>"></i>
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<a class="eid-sort-link" href="<?= h($sortUrl('item_count')) ?>">
|
||||
<a class="text-decoration-none text-dark fw-semibold d-inline-flex align-items-center gap-1" href="<?= h($sortUrl('item_count')) ?>">
|
||||
<?= h(tr('الأصناف', 'Items')) ?>
|
||||
<i class="bi <?= h($sortIcon('item_count')) ?>"></i>
|
||||
</a>
|
||||
</th>
|
||||
<th class="text-end">
|
||||
<a class="eid-sort-link justify-content-end" href="<?= h($sortUrl('total_amount')) ?>">
|
||||
<a class="text-decoration-none text-dark fw-semibold d-inline-flex align-items-center gap-1 justify-content-end" href="<?= h($sortUrl('total_amount')) ?>">
|
||||
<?= h(tr('الإجمالي', 'Total')) ?>
|
||||
<i class="bi <?= h($sortIcon('total_amount')) ?>"></i>
|
||||
</a>
|
||||
</th>
|
||||
<th><?= h(tr('الدفع', 'Payment')) ?></th>
|
||||
<th class="text-end"><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -480,22 +375,22 @@ require __DIR__ . '/includes/header.php';
|
||||
<?php $effectiveDelivery = $order['delivery_date'] ?: date('Y-m-d', strtotime((string) $order['sale_date'])); ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="fw-semibold eid-order-id"><?= h($order['receipt_no']) ?></div>
|
||||
<div class="fw-semibold"><?= h($order['receipt_no']) ?></div>
|
||||
</td>
|
||||
<td class="eid-customer-cell">
|
||||
<td>
|
||||
<div class="fw-semibold"><?= h((string) ($order['customer_name'] ?: tr('عميل نقدي', 'Walk-in customer'))) ?></div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="fw-semibold"><?= h(date('Y-m-d', strtotime((string) $effectiveDelivery))) ?></div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge <?= h(eid_delivery_status_badge_class((string) ($order['delivery_status'] ?? 'pending'))) ?> px-3 py-2"><?= h(eid_delivery_status_label((string) ($order['delivery_status'] ?? 'pending'))) ?></span>
|
||||
<span class="badge <?= h(eid_delivery_status_badge_class((string) ($order['delivery_status'] ?? 'pending'))) ?> px-2 py-1"><?= h(eid_delivery_status_label((string) ($order['delivery_status'] ?? 'pending'))) ?></span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge rounded-pill text-bg-light border"><?= h(branch_label((string) $order['branch_code'])) ?></span>
|
||||
</td>
|
||||
<td class="eid-items-cell">
|
||||
<span class="badge rounded-pill text-bg-light border px-3 py-2 fw-semibold">
|
||||
<td>
|
||||
<span class="badge rounded-pill text-bg-light border px-2 py-1 fw-semibold">
|
||||
<?= (int) ($order['item_count'] ?? 0) ?> <?= h(tr('صنف', 'items')) ?>
|
||||
</span>
|
||||
</td>
|
||||
@ -511,7 +406,6 @@ require __DIR__ . '/includes/header.php';
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($totalPages > 1): ?>
|
||||
<nav class="mt-4" aria-label="<?= h(tr('صفحات طلبات العيد', 'Eid order pages')) ?>">
|
||||
|
||||
249
eid_print.php
249
eid_print.php
@ -170,32 +170,26 @@ require __DIR__ . '/includes/header.php';
|
||||
box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
|
||||
}
|
||||
.eid-print-card .table th { white-space: nowrap; }
|
||||
.eid-kpi {
|
||||
border: 1px solid #e9eef8;
|
||||
border-radius: 14px;
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
|
||||
padding: 1rem 1.1rem;
|
||||
height: 100%;
|
||||
}
|
||||
.eid-kpi-label { color: #6b7280; font-size: 0.92rem; margin-bottom: 0.35rem; }
|
||||
.eid-kpi-value { font-size: 2rem; font-weight: 700; color: #111827; }
|
||||
.eid-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
border: 1px solid #dbe3ef;
|
||||
border-radius: 999px;
|
||||
padding: 0.4rem 0.8rem;
|
||||
background: #f8fafc;
|
||||
color: #334155;
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body { background: #fff !important; }
|
||||
.main-sidebar, .main-header, .footer-section, .d-print-none, .alert-dismissible .btn-close { display: none !important; }
|
||||
@page {
|
||||
size: portrait;
|
||||
margin: 1cm;
|
||||
}
|
||||
body { background: #fff !important; color: #000 !important; font-size: 12pt !important; }
|
||||
.main-sidebar, .main-header, .footer-section, footer, .d-print-none, .alert-dismissible .btn-close { display: none !important; }
|
||||
.main-content { margin: 0 !important; padding: 0 !important; }
|
||||
.eid-print-card { box-shadow: none; border: none; }
|
||||
.table th { background: #f3f4f6 !important; -webkit-print-color-adjust: exact; color: #111 !important; }
|
||||
|
||||
.eid-print-shell { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
|
||||
.eid-print-card { box-shadow: none !important; border: none !important; padding: 0 !important; margin: 0 !important; border-radius: 0 !important; }
|
||||
|
||||
.table { width: 100% !important; border-collapse: collapse !important; }
|
||||
.table th, .table td {
|
||||
border: 1px solid #000 !important;
|
||||
padding: 6px !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
.table th { background: transparent !important; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -203,192 +197,53 @@ require __DIR__ . '/includes/header.php';
|
||||
<section class="eid-print-card p-4 p-lg-5 mb-4">
|
||||
<div class="d-flex justify-content-between align-items-start gap-3 flex-wrap mb-4 d-print-none">
|
||||
<div>
|
||||
<h1 class="h3 mb-1"><i class="bi bi-printer me-2"></i><?= h(tr('ملخص تجهيزات طلبات العيد', 'Eid Order Prep Summary')) ?></h1>
|
||||
<p class="text-muted mb-0"><?= h(tr('تقرير قابل للطباعة يوضح الأصناف المطلوبة وعدد الطلبات التي تحتوي كل صنف.', 'Printable report showing required items and how many orders contain each item.')) ?></p>
|
||||
<h1 class="h3 mb-1"><i class="bi bi-printer me-2"></i><?= h(tr("ملخص تجهيزات طلبات العيد", "Eid Order Prep Summary")) ?></h1>
|
||||
<p class="text-muted mb-0"><?= h(tr("تقرير قابل للطباعة يوضح الأصناف المطلوبة وعدد الطلبات التي تحتوي كل صنف.", "Printable report showing required items and how many orders contain each item.")) ?></p>
|
||||
</div>
|
||||
<div class="d-flex gap-2 flex-wrap">
|
||||
<a class="btn btn-outline-secondary" href="<?= h(url_for('eid_orders.php', $filterParams)) ?>"><i class="bi bi-arrow-<?= current_lang() === 'ar' ? 'right' : 'left' ?> me-1"></i><?= h(tr('رجوع لطلبات العيد', 'Back to Eid Orders')) ?></a>
|
||||
<button type="button" class="btn btn-dark" onclick="window.print()"><i class="bi bi-printer me-1"></i><?= h(tr('طباعة', 'Print')) ?></button>
|
||||
<a class="btn btn-outline-secondary" href="<?= h(url_for("eid_orders.php", $filterParams)) ?>"><i class="bi bi-arrow-<?= current_lang() === "ar" ? "right" : "left" ?> me-1"></i><?= h(tr("رجوع لطلبات العيد", "Back to Eid Orders")) ?></a>
|
||||
<button type="button" class="btn btn-dark" onclick="window.print()"><i class="bi bi-printer me-1"></i><?= h(tr("طباعة", "Print")) ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="row g-3 align-items-end mb-4 d-print-none" method="GET" action="eid_print.php">
|
||||
<div class="col-12 col-md-3">
|
||||
<label class="form-label" for="print-search"><?= h(tr('بحث', 'Search')) ?></label>
|
||||
<input id="print-search" type="text" class="form-control" name="q" value="<?= h($search) ?>" placeholder="<?= h(tr('رقم الفاتورة أو العميل أو ملاحظة', 'Invoice, customer, or note')) ?>">
|
||||
</div>
|
||||
<div class="col-6 col-md-2">
|
||||
<label class="form-label" for="print-branch"><?= h(tr('الفرع', 'Branch')) ?></label>
|
||||
<select id="print-branch" class="form-select" name="branch">
|
||||
<option value=""><?= h(tr('كل الفروع', 'All branches')) ?></option>
|
||||
<?php foreach (branches() as $branchCode => $branchLabel): ?>
|
||||
<?php if ($user['role'] !== 'owner' && !in_array($branchCode, $allowedBranches, true)) { continue; } ?>
|
||||
<option value="<?= h($branchCode) ?>" <?= $branch === $branchCode ? 'selected' : '' ?>><?= h($branchLabel) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6 col-md-2">
|
||||
<label class="form-label" for="print-mode"><?= h(tr('القناة', 'Channel')) ?></label>
|
||||
<select id="print-mode" class="form-select" name="mode">
|
||||
<option value=""><?= h(tr('الكل', 'All')) ?></option>
|
||||
<option value="normal" <?= $mode === 'normal' ? 'selected' : '' ?>><?= h(tr('فاتورة', 'Invoice')) ?></option>
|
||||
<option value="pos" <?= $mode === 'pos' ? 'selected' : '' ?>>POS</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6 col-md-2">
|
||||
<label class="form-label" for="print-payment-status"><?= h(tr('حالة الدفع', 'Payment')) ?></label>
|
||||
<select id="print-payment-status" class="form-select" name="payment_status">
|
||||
<option value=""><?= h(tr('كل الحالات', 'All statuses')) ?></option>
|
||||
<option value="paid" <?= $paymentStatus === 'paid' ? 'selected' : '' ?>><?= h(tr('مدفوع', 'Paid')) ?></option>
|
||||
<option value="partial" <?= $paymentStatus === 'partial' ? 'selected' : '' ?>><?= h(tr('جزئي', 'Partial')) ?></option>
|
||||
<option value="unpaid" <?= $paymentStatus === 'unpaid' ? 'selected' : '' ?>><?= h(tr('غير مدفوع', 'Unpaid')) ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6 col-md-3">
|
||||
<label class="form-label" for="print-delivery-status"><?= h(tr('حالة التجهيز', 'Prep status')) ?></label>
|
||||
<select id="print-delivery-status" class="form-select" name="delivery_status">
|
||||
<option value=""><?= h(tr('كل الحالات', 'All statuses')) ?></option>
|
||||
<?php foreach ($deliveryOptions as $value => $label): ?>
|
||||
<option value="<?= h($value) ?>" <?= $deliveryStatus === $value ? 'selected' : '' ?>><?= h($label) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6 col-md-2">
|
||||
<label class="form-label" for="print-date-from"><?= h(tr('من تاريخ', 'From date')) ?></label>
|
||||
<input id="print-date-from" type="date" class="form-control" name="date_from" value="<?= h($dateFrom) ?>">
|
||||
</div>
|
||||
<div class="col-6 col-md-2">
|
||||
<label class="form-label" for="print-date-to"><?= h(tr('إلى تاريخ', 'To date')) ?></label>
|
||||
<input id="print-date-to" type="date" class="form-control" name="date_to" value="<?= h($dateTo) ?>">
|
||||
</div>
|
||||
<div class="col-12 col-md-3 d-flex gap-2">
|
||||
<button type="submit" class="btn btn-dark flex-fill"><i class="bi bi-funnel me-1"></i><?= h(tr('تحديث الملخص', 'Update summary')) ?></button>
|
||||
<a class="btn btn-outline-secondary" href="<?= h(url_for('eid_print.php')) ?>"><?= h(tr('إعادة ضبط', 'Reset')) ?></a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="d-none d-print-block mb-4">
|
||||
<div class="text-center mb-3">
|
||||
<h2 class="h4 mb-1"><?= h(tr('ملخص تجهيزات طلبات العيد', 'Eid Order Prep Summary')) ?></h2>
|
||||
<div class="text-muted"><?= h(tr('تاريخ الطباعة', 'Printed at')) ?>: <?= h($generatedAt) ?></div>
|
||||
</div>
|
||||
<div class="d-flex flex-wrap gap-2 justify-content-center">
|
||||
<span class="eid-chip"><?= h(tr('عدد الطلبات', 'Orders')) ?>: <?= (int) $summary['total_orders'] ?></span>
|
||||
<span class="eid-chip"><?= h(tr('الأصناف المميزة', 'Unique items')) ?>: <?= (int) $summary['unique_items'] ?></span>
|
||||
<span class="eid-chip"><?= h(tr('إجمالي الكمية', 'Total quantity')) ?>: <?= h(number_format((float) $summary['total_quantity'], 0)) ?></span>
|
||||
</div>
|
||||
<div class="text-center mb-4">
|
||||
<h2 class="h4 mb-1"><?= h(tr("ملخص تجهيزات طلبات العيد", "Eid Order Prep Summary")) ?></h2>
|
||||
<div class="text-muted"><?= h(tr("تاريخ الطباعة", "Printed at")) ?>: <?= h($generatedAt) ?></div>
|
||||
<?php if ($dateFrom !== "" || $dateTo !== ""): ?>
|
||||
<div class="text-muted mt-1"><?= h(tr("الفترة", "Period")) ?>: <?= h($dateFrom !== "" ? $dateFrom : "…") ?> → <?= h($dateTo !== "" ? $dateTo : "…") ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($dbError): ?>
|
||||
<div class="alert alert-danger"><?= h($dbError) ?></div>
|
||||
<?php else: ?>
|
||||
<div class="d-flex flex-wrap gap-2 mb-4">
|
||||
<span class="eid-chip"><i class="bi bi-calendar-range"></i><?= h($dateFrom !== '' || $dateTo !== '' ? (($dateFrom !== '' ? $dateFrom : '…') . ' → ' . ($dateTo !== '' ? $dateTo : '…')) : tr('كل التواريخ', 'All dates')) ?></span>
|
||||
<span class="eid-chip"><i class="bi bi-shop"></i><?= h($branch ? (branches()[$branch] ?? $branch) : tr('كل الفروع', 'All branches')) ?></span>
|
||||
<span class="eid-chip"><i class="bi bi-stars"></i><?= h($deliveryStatus !== '' && isset($deliveryOptions[$deliveryStatus]) ? $deliveryOptions[$deliveryStatus] : tr('كل حالات التجهيز', 'All prep statuses')) ?></span>
|
||||
<span class="eid-chip"><i class="bi bi-credit-card"></i><?= h($paymentStatus !== '' ? match ($paymentStatus) { 'paid' => tr('مدفوع', 'Paid'), 'partial' => tr('جزئي', 'Partial'), 'unpaid' => tr('غير مدفوع', 'Unpaid'), default => $paymentStatus } : tr('كل حالات الدفع', 'All payment statuses')) ?></span>
|
||||
</div>
|
||||
|
||||
<section class="row g-3 mb-4">
|
||||
<div class="col-12 col-md-6 col-xl-3"><div class="eid-kpi"><div class="eid-kpi-label"><?= h(tr('إجمالي الطلبات', 'Total orders')) ?></div><div class="eid-kpi-value"><?= (int) $summary['total_orders'] ?></div></div></div>
|
||||
<div class="col-12 col-md-6 col-xl-3"><div class="eid-kpi"><div class="eid-kpi-label"><?= h(tr('الأصناف المميزة', 'Unique items')) ?></div><div class="eid-kpi-value"><?= (int) $summary['unique_items'] ?></div></div></div>
|
||||
<div class="col-12 col-md-6 col-xl-3"><div class="eid-kpi"><div class="eid-kpi-label"><?= h(tr('إجمالي الكمية', 'Total quantity')) ?></div><div class="eid-kpi-value"><?= h(number_format((float) $summary['total_quantity'], 0)) ?></div></div></div>
|
||||
<div class="col-12 col-md-6 col-xl-3"><div class="eid-kpi"><div class="eid-kpi-label"><?= h(tr('إجمالي القيمة', 'Total value')) ?></div><div class="eid-kpi-value"><?= h(number_format((float) $summary['total_amount'], 3)) ?></div></div></div>
|
||||
</section>
|
||||
|
||||
<section class="mb-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h2 class="h5 mb-1"><?= h(tr('ملخص الأصناف', 'Item Summary')) ?></h2>
|
||||
<div class="text-muted small"><?= h(tr('عدد الطلبات لكل صنف مع الكمية الإجمالية المطلوبة للتجهيز.', 'Order count per item with total quantity required for preparation.')) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($itemRows === []): ?>
|
||||
<div class="alert alert-secondary mb-0"><?= h(tr('لا توجد بيانات ضمن هذه الفلاتر.', 'No data found for the selected filters.')) ?></div>
|
||||
<?php else: ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle">
|
||||
<thead class="table-light">
|
||||
<?php if ($itemRows === []): ?>
|
||||
<div class="alert alert-secondary text-center"><?= h(tr("لا توجد بيانات للطباعة.", "No data to print.")) ?></div>
|
||||
<?php else: ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered align-middle text-center">
|
||||
<thead >
|
||||
<tr>
|
||||
<th style="width: 60px;">#</th>
|
||||
<th style="text-align: right !important;"><?= h(tr("الصنف", "Item")) ?></th>
|
||||
<th style="width: 150px;"><?= h(tr("عدد الطلبات", "Orders count")) ?></th>
|
||||
<th style="width: 150px;"><?= h(tr("الكمية المطلوبة", "Quantity wanted")) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($itemRows as $index => $row): ?>
|
||||
<tr>
|
||||
<th><?= h(tr('الصنف', 'Item')) ?></th>
|
||||
<th><?= h(tr('SKU', 'SKU')) ?></th>
|
||||
<th class="text-center"><?= h(tr('عدد الطلبات', 'Orders count')) ?></th>
|
||||
<th class="text-end"><?= h(tr('إجمالي الكمية', 'Total quantity')) ?></th>
|
||||
<td><?= $index + 1 ?></td>
|
||||
<td class="fw-bold" style="text-align: right !important;"><?= h($row["name"]) ?></td>
|
||||
<td><?= (int) $row["order_count"] ?></td>
|
||||
<td class="fw-bold"><?= h(rtrim(rtrim(number_format((float) $row["qty"], 3, ".", ""), "0"), ".")) ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($itemRows as $row): ?>
|
||||
<tr>
|
||||
<td class="fw-semibold"><?= h($row['name']) ?></td>
|
||||
<td class="text-muted small"><?= h($row['sku'] !== '' ? $row['sku'] : '—') ?></td>
|
||||
<td class="text-center fw-semibold"><?= (int) $row['order_count'] ?></td>
|
||||
<td class="text-end fw-semibold"><?= h(rtrim(rtrim(number_format((float) $row['qty'], 3, '.', ''), '0'), '.')) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h2 class="h5 mb-1"><?= h(tr('الطلبات المشمولة', 'Included Orders')) ?></h2>
|
||||
<div class="text-muted small"><?= h(tr('قائمة الطلبات الداخلة في هذا الملخص مع الأصناف داخل كل طلب.', 'Orders included in this summary with the items inside each order.')) ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php if ($orders === []): ?>
|
||||
<div class="alert alert-secondary mb-0"><?= h(tr('لا توجد طلبات عيد ضمن هذا النطاق.', 'There are no Eid orders in this range.')) ?></div>
|
||||
<?php else: ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm align-middle">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th><?= h(tr('الفاتورة', 'Invoice')) ?></th>
|
||||
<th><?= h(tr('العميل', 'Customer')) ?></th>
|
||||
<th><?= h(tr('الفرع', 'Branch')) ?></th>
|
||||
<th><?= h(tr('تاريخ الاستلام', 'Delivery date')) ?></th>
|
||||
<th><?= h(tr('حالة التجهيز', 'Prep status')) ?></th>
|
||||
<th><?= h(tr('الأصناف', 'Items')) ?></th>
|
||||
<th class="text-end"><?= h(tr('الإجمالي', 'Total')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($orders as $order): ?>
|
||||
<tr>
|
||||
<td class="fw-semibold"><?= h($order['receipt_no'] ?? ('#' . (int) $order['id'])) ?></td>
|
||||
<td><?= h($order['customer_name'] ?: tr('عميل نقدي', 'Walk-in customer')) ?></td>
|
||||
<td><?= h(branches()[$order['branch_code']] ?? $order['branch_code']) ?></td>
|
||||
<td><?= h($order['delivery_date'] ?: substr((string) ($order['sale_date'] ?? ''), 0, 10)) ?></td>
|
||||
<td><span class="badge rounded-pill text-bg-light border"><?= h(eid_delivery_status_label((string) ($order['delivery_status'] ?? 'pending'))) ?></span></td>
|
||||
<td>
|
||||
<div class="small">
|
||||
<?php foreach (($order['items'] ?? []) as $item): ?>
|
||||
<?php
|
||||
$itemName = trim((string) ($item['name_ar'] ?? ''));
|
||||
if ($itemName === '') {
|
||||
$itemName = trim((string) ($item['name_en'] ?? ''));
|
||||
}
|
||||
if ($itemName === '') {
|
||||
$itemName = trim((string) ($item['sku'] ?? ''));
|
||||
}
|
||||
?>
|
||||
<div><?= h($itemName) ?> <span class="text-muted">× <?= h(rtrim(rtrim(number_format((float) ($item['qty'] ?? 0), 3, '.', ''), '0'), '.')) ?></span></div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-end fw-semibold"><?= h(number_format((float) ($order['total_amount'] ?? 0), 3)) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
</div>
|
||||
<?php require __DIR__ . '/includes/footer.php'; ?>
|
||||
<?php require __DIR__ . "/includes/footer.php"; ?>
|
||||
@ -61,7 +61,7 @@ $items = $queryStmt->fetchAll();
|
||||
require __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
|
||||
<section class="surface-card mb-4">
|
||||
<section class="mb-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h3 class="h5 mb-2"><i class="bi bi-tags me-2"></i><?= h($pageTitle) ?></h3>
|
||||
@ -80,15 +80,15 @@ require __DIR__ . '/includes/header.php';
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="surface-card">
|
||||
<div class="table-responsive shadow-sm" style="border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05);">
|
||||
<table class="table table-hover align-middle mb-0 text-center" style="background-color: #fff;">
|
||||
<thead style="background: linear-gradient(90deg, #0d6efd, #0dcaf0);">
|
||||
<section>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 text-center">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent">ID</th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الاسم (عربي)', 'Name (AR)')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الاسم (إنجليزي)', 'Name (EN)')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
<th>ID</th>
|
||||
<th><?= h(tr('الاسم (عربي)', 'Name (AR)')) ?></th>
|
||||
<th><?= h(tr('الاسم (إنجليزي)', 'Name (EN)')) ?></th>
|
||||
<th><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-top-0">
|
||||
|
||||
22
expenses.php
22
expenses.php
@ -105,7 +105,7 @@ $items = $queryStmt->fetchAll();
|
||||
require __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
|
||||
<section class="surface-card mb-4">
|
||||
<section class="mb-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h3 class="h5 mb-2"><i class="bi bi-wallet2 me-2"></i><?= h($pageTitle) ?></h3>
|
||||
@ -126,17 +126,17 @@ require __DIR__ . '/includes/header.php';
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="surface-card">
|
||||
<div class="table-responsive shadow-sm" style="border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05);">
|
||||
<table class="table table-hover align-middle mb-0 text-center" style="background-color: #fff;">
|
||||
<thead style="background: linear-gradient(90deg, #0d6efd, #0dcaf0);">
|
||||
<section>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 text-center">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('التاريخ', 'Date')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('التصنيف', 'Category')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('المبلغ', 'Amount')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الفرع', 'Branch')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الوصف', 'Description')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
<th><?= h(tr('التاريخ', 'Date')) ?></th>
|
||||
<th><?= h(tr('التصنيف', 'Category')) ?></th>
|
||||
<th><?= h(tr('المبلغ', 'Amount')) ?></th>
|
||||
<th><?= h(tr('الفرع', 'Branch')) ?></th>
|
||||
<th><?= h(tr('الوصف', 'Description')) ?></th>
|
||||
<th><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-top-0">
|
||||
|
||||
18
index.php
18
index.php
@ -51,7 +51,7 @@ require __DIR__ . '/includes/header.php';
|
||||
<!-- Metrics Row -->
|
||||
<div class="row g-4 mb-4">
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
<div class="card text-white bg-primary h-100 shadow-sm border-0" style="border-radius: 12px; background: linear-gradient(135deg, #0d6efd 0%, #0043a8 100%);">
|
||||
<div class="card text-white bg-primary h-100" style=" background: linear-gradient(135deg, #0d6efd 0%, #0043a8 100%);">
|
||||
<div class="card-body d-flex flex-column justify-content-between">
|
||||
<div class="d-flex justify-content-between align-items-start mb-3">
|
||||
<h6 class="text-white-50 text-uppercase mb-0 fw-bold"><?= h(tr('مبيعات اليوم', 'Today sales')) ?></h6>
|
||||
@ -63,7 +63,7 @@ require __DIR__ . '/includes/header.php';
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
<div class="card text-white bg-success h-100 shadow-sm border-0" style="border-radius: 12px; background: linear-gradient(135deg, #198754 0%, #0f5132 100%);">
|
||||
<div class="card text-white bg-success h-100" style=" background: linear-gradient(135deg, #198754 0%, #0f5132 100%);">
|
||||
<div class="card-body d-flex flex-column justify-content-between">
|
||||
<div class="d-flex justify-content-between align-items-start mb-3">
|
||||
<h6 class="text-white-50 text-uppercase mb-0 fw-bold"><?= h(tr('إيراد اليوم', 'Today revenue')) ?></h6>
|
||||
@ -75,7 +75,7 @@ require __DIR__ . '/includes/header.php';
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
<div class="card text-white bg-info h-100 shadow-sm border-0" style="border-radius: 12px; background: linear-gradient(135deg, #0dcaf0 0%, #087990 100%);">
|
||||
<div class="card text-white bg-info h-100" style=" background: linear-gradient(135deg, #0dcaf0 0%, #087990 100%);">
|
||||
<div class="card-body d-flex flex-column justify-content-between">
|
||||
<div class="d-flex justify-content-between align-items-start mb-3">
|
||||
<h6 class="text-white-50 text-uppercase mb-0 fw-bold">POS</h6>
|
||||
@ -87,7 +87,7 @@ require __DIR__ . '/includes/header.php';
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 col-xl-3">
|
||||
<div class="card text-white bg-warning h-100 shadow-sm border-0" style="border-radius: 12px; background: linear-gradient(135deg, #ffc107 0%, #b38600 100%);">
|
||||
<div class="card text-white bg-warning h-100" style=" background: linear-gradient(135deg, #ffc107 0%, #b38600 100%);">
|
||||
<div class="card-body d-flex flex-column justify-content-between">
|
||||
<div class="d-flex justify-content-between align-items-start mb-3">
|
||||
<h6 class="text-white-50 text-uppercase mb-0 fw-bold"><?= h(tr('فاتورة', 'Invoice')) ?></h6>
|
||||
@ -102,7 +102,7 @@ require __DIR__ . '/includes/header.php';
|
||||
<!-- Charts Row -->
|
||||
<div class="row g-4 mb-4">
|
||||
<div class="col-xl-6">
|
||||
<div class="card h-100 shadow-sm border-0" style="border-radius: 12px;">
|
||||
<div class="card h-100">
|
||||
<div class="card-header bg-white py-3 border-0 d-flex justify-content-between align-items-center">
|
||||
<h5 class="mb-0 fw-semibold"><i class="bi bi-bar-chart-line me-2 text-primary"></i><?= h(tr('أفضل الأصناف مبيعاً', 'Top Selling Products')) ?></h5>
|
||||
</div>
|
||||
@ -121,7 +121,7 @@ require __DIR__ . '/includes/header.php';
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-6">
|
||||
<div class="card h-100 shadow-sm border-0" style="border-radius: 12px;">
|
||||
<div class="card h-100">
|
||||
<div class="card-header bg-white py-3 border-0 d-flex justify-content-between align-items-center">
|
||||
<h5 class="mb-0 fw-semibold"><i class="bi bi-pie-chart me-2 text-success"></i><?= h(tr('المبيعات حسب الفرع', 'Sales by Branch')) ?></h5>
|
||||
</div>
|
||||
@ -144,7 +144,7 @@ require __DIR__ . '/includes/header.php';
|
||||
<div class="row g-4 mb-4">
|
||||
<!-- Recent Sales -->
|
||||
<div class="col-xl-8">
|
||||
<div class="card shadow-sm border-0 h-100" style="border-radius: 12px;">
|
||||
<div class="card h-100">
|
||||
<div class="card-header bg-white d-flex justify-content-between align-items-center py-3 border-0">
|
||||
<h5 class="mb-0 fw-semibold"><i class="bi bi-clock-history me-2 text-info"></i><?= h(tr('آخر المبيعات', 'Latest sales')) ?></h5>
|
||||
<a class="btn btn-sm btn-outline-primary rounded-pill px-3" href="<?= h(url_for('sales.php')) ?>"><?= h(tr('عرض الكل', 'View all')) ?></a>
|
||||
@ -201,7 +201,7 @@ require __DIR__ . '/includes/header.php';
|
||||
|
||||
<!-- Quick Actions / Status -->
|
||||
<div class="col-xl-4">
|
||||
<div class="card shadow-sm border-0 h-100" style="border-radius: 12px;">
|
||||
<div class="card h-100">
|
||||
<div class="card-header bg-white py-3 border-0">
|
||||
<h5 class="mb-0 fw-semibold"><i class="bi bi-lightning-charge me-2 text-warning"></i><?= h(tr('إجراءات سريعة', 'Quick Actions')) ?></h5>
|
||||
</div>
|
||||
@ -249,7 +249,7 @@ require __DIR__ . '/includes/header.php';
|
||||
<!-- Monthly Sales Chart Row -->
|
||||
<div class="row g-4 mb-4">
|
||||
<div class="col-12">
|
||||
<div class="card shadow-sm border-0" style="border-radius: 12px;">
|
||||
<div class="card">
|
||||
<div class="card-header bg-white py-3 border-0 d-flex justify-content-between align-items-center">
|
||||
<h5 class="mb-0 fw-semibold"><i class="bi bi-graph-up me-2 text-primary"></i><?= h(tr('مبيعات الأشهر', 'Monthly Sales')) ?></h5>
|
||||
</div>
|
||||
|
||||
57
patch.py
Normal file
57
patch.py
Normal file
@ -0,0 +1,57 @@
|
||||
import sys
|
||||
|
||||
with open()eid_orders.php', 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
search1 = """ <tr>
|
||||
<td>
|
||||
<div class="fw-semibold"><?= h($order['receipt_no']) ?></div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="fw-semibold"><?= h((string) ($order['customer_name'] ?: tr('عميل نقدن', 'Walk-in customer'))) ?></div>
|
||||
</td>"""
|
||||
|
||||
replace1 = """ <?php
|
||||
$cNameRaw = (string) ($order['customer_name'] ?: tr('عميل نہدق', 'Walk-in customer'));
|
||||
$cName = $cNameRaw;
|
||||
$cPhone = '';
|
||||
if (strpos($cNameRaw, ' - ') !== false) {
|
||||
$parts = explode(' - ', $cNameRaw, 2);
|
||||
$cName = trim($parts[0]);
|
||||
$rawPhone = trim($parts[1]);
|
||||
if (preg_match('/^968\s*/', $rawPhone)) {
|
||||
$cPhone = preg_replace('/^968\s*/', '968 ', $rawPhone);
|
||||
} elseif (is_numeric(str_replace(' ', '', $rawPhone))) {
|
||||
$cPhone = '968 ' . $rawPhone;
|
||||
} else {
|
||||
$cName = $cNameRaw;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="fw-semibold"><?= h($order['receipt_no']) ?></div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="fw-semibold"><?= h(${cName}) ?></div>
|
||||
<?php if ($cPhone !== ''): ?>
|
||||
<div class="small text-muted" dir="ltr"><?= h($cPhone) ?></div>
|
||||
<?php endif; ?>
|
||||
</td>"""
|
||||
|
||||
search2 = """ <td class="text-end fw-semibold"><?= h(number_format((float) ($order['total_amount'] ?? 0), 3)) ?></td>
|
||||
<td>
|
||||
<div class="d-flex justify-content-end gap-2">"""
|
||||
|
||||
replace2 = """ <td class="text-end fw-semibold"><?= h(number_format((float) ($order['total_amount'] ?? 0), 3)) ?></td>
|
||||
<td>
|
||||
<span class="badge <?= h(payment_status_badge_class((string) ($order['payment_status'] ?? 'paid'))) ?> px-2 py-1"><?= h(payment_status_label((string) ($order['payment_status'] ?? 'paid'))) ?></span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="d-flex justify-content-end gap-2">"""
|
||||
|
||||
content = content.replace(search1, replace1)
|
||||
content = content.replace(search2, replace2)
|
||||
|
||||
with open()eid_orders.php', 'w') as f:
|
||||
f.write(content)
|
||||
@ -41,7 +41,7 @@ $purchaseRows = $stmt->fetchAll();
|
||||
|
||||
require __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
<section class="surface-card mb-4">
|
||||
<section class="mb-4">
|
||||
<div class="row g-4 align-items-center mb-3">
|
||||
<div class="col-lg-8">
|
||||
<h3 class="h5 mb-2"><i class="bi bi-bag-plus me-2"></i><?= h(tr('قائمة المشتريات', 'Purchase List')) ?></h3>
|
||||
@ -62,20 +62,20 @@ require __DIR__ . '/includes/header.php';
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="surface-card">
|
||||
<div class="table-responsive shadow-sm" style="border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05);">
|
||||
<table class="table table-hover align-middle mb-0 text-center" style="background-color: #fff;">
|
||||
<thead style="background: linear-gradient(90deg, #0d6efd, #0dcaf0);">
|
||||
<section>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 text-center">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('المورد', 'Supplier')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('المرجع', 'Reference')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الفرع', 'Branch')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('المجموع', 'Subtotal')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الضريبة', 'VAT')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الإجمالي', 'Total Amount')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الحالة', 'Status')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('التاريخ', 'Date')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
<th><?= h(tr('المورد', 'Supplier')) ?></th>
|
||||
<th><?= h(tr('المرجع', 'Reference')) ?></th>
|
||||
<th><?= h(tr('الفرع', 'Branch')) ?></th>
|
||||
<th><?= h(tr('المجموع', 'Subtotal')) ?></th>
|
||||
<th><?= h(tr('الضريبة', 'VAT')) ?></th>
|
||||
<th><?= h(tr('الإجمالي', 'Total Amount')) ?></th>
|
||||
<th><?= h(tr('الحالة', 'Status')) ?></th>
|
||||
<th><?= h(tr('التاريخ', 'Date')) ?></th>
|
||||
<th><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-top-0">
|
||||
|
||||
22
reports.php
22
reports.php
@ -228,7 +228,7 @@ require __DIR__ . '/includes/header.php';
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="surface-card">
|
||||
<div class="card border-0 p-4 mb-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3 d-print-none">
|
||||
<h3 class="h5 mb-0"><?= h(tr('نتائج التقرير', 'Report Results')) ?></h3>
|
||||
<button class="btn btn-outline-secondary btn-sm" onclick="window.print()"><i class="bi bi-printer"></i> <?= h(tr('طباعة', 'Print')) ?></button>
|
||||
@ -392,7 +392,7 @@ require __DIR__ . '/includes/header.php';
|
||||
</div>
|
||||
|
||||
<!-- Results Table -->
|
||||
<div class="surface-card">
|
||||
<div class="card border-0 p-4 mb-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3 d-print-none">
|
||||
<h3 class="h5 mb-0"><?= h(tr('نتائج التقرير', 'Report Results')) ?></h3>
|
||||
<button class="btn btn-outline-secondary btn-sm" onclick="window.print()"><i class="bi bi-printer"></i> <?= h(tr('طباعة رسمية', 'Formal Print')) ?></button>
|
||||
@ -498,7 +498,7 @@ require __DIR__ . '/includes/header.php';
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="surface-card">
|
||||
<div class="card border-0 p-4 mb-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3 d-print-none">
|
||||
<h3 class="h5 mb-0"><?= h(tr('طلبات حجز بانتظار الدفع', 'Reservation orders pending payment')) ?></h3>
|
||||
<button class="btn btn-outline-secondary btn-sm" onclick="window.print()"><i class="bi bi-printer"></i> <?= h(tr('طباعة', 'Print')) ?></button>
|
||||
@ -548,7 +548,7 @@ require __DIR__ . '/includes/header.php';
|
||||
</div>
|
||||
|
||||
<!-- Online Orders Section -->
|
||||
<div class="surface-card mt-4 mb-4">
|
||||
<div class="card border-0 p-4 mt-4 mb-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3 d-print-none">
|
||||
<h3 class="h5 mb-0"><i class="bi bi-globe me-2 text-primary"></i><?= h(tr('طلبات المتجر الإلكتروني (نشطة)', 'Active Online Store Orders')) ?></h3>
|
||||
<a class="btn btn-outline-primary btn-sm" href="online_orders.php"><i class="bi bi-box-arrow-up-right"></i> <?= h(tr('إدارة الطلبات', 'Manage Orders')) ?></a>
|
||||
@ -643,7 +643,7 @@ require __DIR__ . '/includes/header.php';
|
||||
<div class="row g-4 mb-4">
|
||||
<!-- Total Card -->
|
||||
<div class="col-12">
|
||||
<div class="surface-card text-center py-4 bg-primary text-white rounded shadow-sm">
|
||||
<div class="card border-0 p-4 text-center py-4 bg-primary text-white rounded shadow-sm">
|
||||
<h3 class="h5 mb-2"><?= h(tr('إجمالي المبيعات', 'Total Sales')) ?></h3>
|
||||
<div class="fs-1 fw-bold"><?= h(currency($dailyTotals['total'])) ?></div>
|
||||
</div>
|
||||
@ -651,7 +651,7 @@ require __DIR__ . '/includes/header.php';
|
||||
|
||||
<!-- By Seller -->
|
||||
<div class="col-md-4">
|
||||
<div class="surface-card h-100 shadow-sm">
|
||||
<div class="card border-0 p-4 h-100 shadow-sm">
|
||||
<h3 class="h5 mb-3 border-bottom pb-2"><i class="bi bi-person me-2 text-primary"></i><?= h(tr('حسب الموظف', 'By Seller')) ?></h3>
|
||||
<ul class="list-group list-group-flush">
|
||||
<?php foreach($dailyTotals['seller'] as $seller => $amount): ?>
|
||||
@ -666,7 +666,7 @@ require __DIR__ . '/includes/header.php';
|
||||
|
||||
<!-- By Outlet -->
|
||||
<div class="col-md-4">
|
||||
<div class="surface-card h-100 shadow-sm">
|
||||
<div class="card border-0 p-4 h-100 shadow-sm">
|
||||
<h3 class="h5 mb-3 border-bottom pb-2"><i class="bi bi-shop me-2 text-primary"></i><?= h(tr('حسب الفرع', 'By Outlet')) ?></h3>
|
||||
<ul class="list-group list-group-flush">
|
||||
<?php foreach($dailyTotals['outlet'] as $outlet => $amount): ?>
|
||||
@ -681,7 +681,7 @@ require __DIR__ . '/includes/header.php';
|
||||
|
||||
<!-- By Payment -->
|
||||
<div class="col-md-4">
|
||||
<div class="surface-card h-100 shadow-sm">
|
||||
<div class="card border-0 p-4 h-100 shadow-sm">
|
||||
<h3 class="h5 mb-3 border-bottom pb-2"><i class="bi bi-credit-card me-2 text-primary"></i><?= h(tr('حسب طريقة الدفع', 'By Payment')) ?></h3>
|
||||
<ul class="list-group list-group-flush">
|
||||
<?php
|
||||
@ -750,7 +750,7 @@ require __DIR__ . '/includes/header.php';
|
||||
|
||||
<!-- Trend Chart -->
|
||||
<div class="col-lg-12">
|
||||
<div class="surface-card h-100">
|
||||
<div class="card border-0 p-4 h-100">
|
||||
<h3 class="h5 mb-3"><i class="bi bi-graph-up-arrow me-2 text-primary"></i><?= h(tr('أداء المبيعات الشهري', 'Monthly Sales Performance')) ?></h3>
|
||||
<?php if (!$report['monthly_totals']): ?>
|
||||
<div class="empty-state compact"><h4><?= h(tr('لا توجد بيانات', 'No data')) ?></h4></div>
|
||||
@ -798,7 +798,7 @@ require __DIR__ . '/includes/header.php';
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<div class="surface-card h-100">
|
||||
<div class="card border-0 p-4 h-100">
|
||||
<h3 class="h5 mb-4"><i class="bi bi-shop me-2 text-primary"></i><?= h(tr('المبيعات حسب الفرع', 'Sales by branch')) ?></h3>
|
||||
<?php if (!$report['branch_totals']): ?>
|
||||
<div class="empty-state compact"><h4><?= h(tr('لا توجد بيانات', 'No data')) ?></h4><p><?= h(tr('أضف عملية بيع أولاً لبدء التقارير.', 'Add a first sale to activate reports.')) ?></p></div>
|
||||
@ -827,7 +827,7 @@ require __DIR__ . '/includes/header.php';
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<div class="surface-card h-100">
|
||||
<div class="card border-0 p-4 h-100">
|
||||
<h3 class="h5 mb-4"><i class="bi bi-credit-card me-2 text-primary"></i><?= h(tr('المبيعات حسب الدفع', 'Sales by payment')) ?></h3>
|
||||
<?php if (!$report['payment_totals']): ?>
|
||||
<div class="empty-state compact"><h4><?= h(tr('بانتظار البيانات', 'Waiting for data')) ?></h4><p><?= h(tr('عند تسجيل عمليات بيع ستظهر هنا طرق الدفع.', 'Payment mix will appear here once sales are logged.')) ?></p></div>
|
||||
|
||||
34
sales.php
34
sales.php
@ -104,7 +104,7 @@ try {
|
||||
|
||||
require __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
<section class="surface-card mb-4">
|
||||
<section class="mb-4">
|
||||
<div class="d-flex flex-wrap justify-content-between align-items-center gap-3 mb-3">
|
||||
<div>
|
||||
<h3 class="h5 mb-1"><i class="bi bi-journal-text me-2"></i><?= h($statusFilter === 'order' ? tr('قائمة الطلبات', 'Orders list') : tr('سجل الفواتير', 'Invoice ledger')) ?></h3>
|
||||
@ -147,23 +147,23 @@ require __DIR__ . '/includes/header.php';
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="table-responsive shadow-sm" style="border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05);">
|
||||
<table class="table table-hover align-middle mb-0 text-center" style="background-color: #fff;">
|
||||
<thead style="background: linear-gradient(90deg, #0d6efd, #0dcaf0);">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 text-center">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الإيصال', 'Receipt')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الفرع', 'Branch')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('النوع', 'Type')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الكاشير', 'Cashier')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('العميل', 'Customer')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('المجموع', 'Subtotal')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الضريبة', 'VAT')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الإجمالي', 'Total')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('المدفوع', 'Paid')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('المتبقي', 'Due')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الحالة', 'Status')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('التاريخ', 'Date')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
<th><?= h(tr('الإيصال', 'Receipt')) ?></th>
|
||||
<th><?= h(tr('الفرع', 'Branch')) ?></th>
|
||||
<th><?= h(tr('النوع', 'Type')) ?></th>
|
||||
<th><?= h(tr('الكاشير', 'Cashier')) ?></th>
|
||||
<th><?= h(tr('العميل', 'Customer')) ?></th>
|
||||
<th><?= h(tr('المجموع', 'Subtotal')) ?></th>
|
||||
<th><?= h(tr('الضريبة', 'VAT')) ?></th>
|
||||
<th><?= h(tr('الإجمالي', 'Total')) ?></th>
|
||||
<th><?= h(tr('المدفوع', 'Paid')) ?></th>
|
||||
<th><?= h(tr('المتبقي', 'Due')) ?></th>
|
||||
<th><?= h(tr('الحالة', 'Status')) ?></th>
|
||||
<th><?= h(tr('التاريخ', 'Date')) ?></th>
|
||||
<th><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-top-0">
|
||||
|
||||
32
stock.php
32
stock.php
@ -253,7 +253,7 @@ $stockRows = array_slice($filteredStock, $offset, $limit, true);
|
||||
require __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
|
||||
<section class="surface-card mb-4">
|
||||
<section class="mb-4">
|
||||
<div class="row g-4 align-items-center mb-3">
|
||||
<div class="col-lg-5">
|
||||
<h3 class="h5 mb-1"><i class="bi bi-box-seam me-2"></i><?= h(tr('قائمة الأصناف والمخزون', 'Items & Stock List')) ?></h3>
|
||||
@ -321,27 +321,27 @@ require __DIR__ . '/includes/header.php';
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="surface-card">
|
||||
<section>
|
||||
<?php if ($dbError): ?>
|
||||
<div class="alert alert-warning"><?= h($dbError) ?></div>
|
||||
<?php else: ?>
|
||||
<div class="table-responsive shadow-sm" style="border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05);">
|
||||
<table class="table table-hover align-middle mb-0 text-center" style="background-color: #fff;">
|
||||
<thead style="background: linear-gradient(90deg, #0d6efd, #0dcaf0);">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 text-center">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th width="40" class="text-white border-0 py-3 fw-semibold bg-transparent">
|
||||
<th width="40">
|
||||
<input class="form-check-input" type="checkbox" id="selectAllCheckbox" onclick="toggleAllCheckboxes(this)">
|
||||
</th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent">SKU</th>
|
||||
<th width="70" class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('صورة', 'Pic')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent text-end pe-4"><?= h(tr('الصنف', 'Product')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('السعر', 'Price')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('التكلفة', 'Cost')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('افتتاحي', 'Opening')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('مباع', 'Sold')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('متاح', 'Available')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('التنبيه', 'Signal')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent text-end pe-4"><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
<th>SKU</th>
|
||||
<th width="70"><?= h(tr('صورة', 'Pic')) ?></th>
|
||||
<th class="text-end pe-4"><?= h(tr('الصنف', 'Product')) ?></th>
|
||||
<th><?= h(tr('السعر', 'Price')) ?></th>
|
||||
<th><?= h(tr('التكلفة', 'Cost')) ?></th>
|
||||
<th><?= h(tr('افتتاحي', 'Opening')) ?></th>
|
||||
<th><?= h(tr('مباع', 'Sold')) ?></th>
|
||||
<th><?= h(tr('متاح', 'Available')) ?></th>
|
||||
<th><?= h(tr('التنبيه', 'Signal')) ?></th>
|
||||
<th class="text-end pe-4"><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-top-0">
|
||||
|
||||
@ -55,7 +55,7 @@ $items = $queryStmt->fetchAll();
|
||||
require __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
|
||||
<section class="surface-card mb-4">
|
||||
<section class="mb-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h3 class="h5 mb-2"><i class="bi bi-truck me-2"></i><?= h($pageTitle) ?></h3>
|
||||
@ -74,17 +74,17 @@ require __DIR__ . '/includes/header.php';
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="surface-card">
|
||||
<div class="table-responsive shadow-sm" style="border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05);">
|
||||
<table class="table table-hover align-middle mb-0 text-center" style="background-color: #fff;">
|
||||
<thead style="background: linear-gradient(90deg, #0d6efd, #0dcaf0);">
|
||||
<section>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 text-center">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent">ID</th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الاسم', 'Name')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('المسؤول', 'Contact Person')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الهاتف', 'Phone')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('البريد', 'Email')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
<th>ID</th>
|
||||
<th><?= h(tr('الاسم', 'Name')) ?></th>
|
||||
<th><?= h(tr('المسؤول', 'Contact Person')) ?></th>
|
||||
<th><?= h(tr('الهاتف', 'Phone')) ?></th>
|
||||
<th><?= h(tr('البريد', 'Email')) ?></th>
|
||||
<th><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-top-0">
|
||||
|
||||
18
units.php
18
units.php
@ -54,7 +54,7 @@ $items = $queryStmt->fetchAll();
|
||||
require __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
|
||||
<section class="surface-card mb-4">
|
||||
<section class="mb-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h3 class="h5 mb-2"><i class="bi bi-rulers me-2"></i><?= h($pageTitle) ?></h3>
|
||||
@ -73,15 +73,15 @@ require __DIR__ . '/includes/header.php';
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="surface-card">
|
||||
<div class="table-responsive shadow-sm" style="border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05);">
|
||||
<table class="table table-hover align-middle mb-0 text-center" style="background-color: #fff;">
|
||||
<thead style="background: linear-gradient(90deg, #0d6efd, #0dcaf0);">
|
||||
<section>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 text-center">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent">ID</th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الاسم (عربي)', 'Name (AR)')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الاسم (إنجليزي)', 'Name (EN)')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
<th>ID</th>
|
||||
<th><?= h(tr('الاسم (عربي)', 'Name (AR)')) ?></th>
|
||||
<th><?= h(tr('الاسم (إنجليزي)', 'Name (EN)')) ?></th>
|
||||
<th><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-top-0">
|
||||
|
||||
20
users.php
20
users.php
@ -106,7 +106,7 @@ $availableBranches = branches();
|
||||
|
||||
require __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
<section class="surface-card mb-4">
|
||||
<section class="mb-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h3 class="h5 mb-2"><i class="bi bi-people me-2"></i><?= h(tr('الوصول حسب الدور', 'Role-based access')) ?></h3>
|
||||
@ -134,16 +134,16 @@ require __DIR__ . '/includes/header.php';
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<section class="surface-card">
|
||||
<div class="table-responsive shadow-sm" style="border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05);">
|
||||
<table class="table table-hover align-middle mb-0 text-center" style="background-color: #fff;">
|
||||
<thead style="background: linear-gradient(90deg, #0d6efd, #0dcaf0);">
|
||||
<section>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 text-center">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('المستخدم', 'User')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الدور', 'Role')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('الفرع', 'Branch')) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr("صلاحيات مخصصة", "Custom Permissions")) ?></th>
|
||||
<th class="text-white border-0 py-3 fw-semibold bg-transparent"><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
<th><?= h(tr('المستخدم', 'User')) ?></th>
|
||||
<th><?= h(tr('الدور', 'Role')) ?></th>
|
||||
<th><?= h(tr('الفرع', 'Branch')) ?></th>
|
||||
<th><?= h(tr("صلاحيات مخصصة", "Custom Permissions")) ?></th>
|
||||
<th><?= h(tr('إجراءات', 'Actions')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-top-0">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user