diff --git a/assets/css/custom.css b/assets/css/custom.css index 78260e6..03275d0 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -8,7 +8,7 @@ --text-muted: #64748b; --border: #e2e8f0; --radius: 4px; - --sidebar-width: 250px; + --sidebar-width: 210px; } body.theme-dark { @@ -83,15 +83,15 @@ body { [dir="rtl"] .sidebar { right: 0; } .sidebar-header { - padding: 1.5rem; - font-size: 1.25rem; + padding: 1rem; + font-size: 1.15rem; font-weight: 700; border-bottom: 1px solid var(--primary-light); } .nav-link { color: #cbd5e1; - padding: 0.75rem 1.5rem; + padding: 0.6rem 1rem; display: flex; align-items: center; text-decoration: none; @@ -105,7 +105,7 @@ body { .nav-link i { width: 20px; - margin-right: 10px; + margin-right: 8px; } .nav-section-title { @@ -237,7 +237,7 @@ body { [dir="rtl"] .nav-link i { margin-right: 0; - margin-left: 10px; + margin-left: 8px; } /* Main Content */ @@ -329,6 +329,15 @@ body { opacity: 0.5; } +.main-footer { + background: transparent; + color: var(--text-muted); +} + +.main-footer .border-top { + border-color: var(--border) !important; +} + /* RTL Adjustments */ [dir="rtl"] .ms-auto { margin-right: auto !important; diff --git a/index.php b/index.php index 48bd657..eea9493 100644 --- a/index.php +++ b/index.php @@ -419,7 +419,7 @@ if (isset($_GET['action']) || isset($_POST['action'])) { if ($type === 'purchase') { $stmt = db()->prepare("SELECT pr.*, c.name as party_name FROM purchase_returns pr LEFT JOIN customers c ON pr.supplier_id = c.id WHERE pr.id = ?"); - $stmt->execute([return_id]); + $stmt->execute([$return_id]); $return = $stmt->fetch(PDO::FETCH_ASSOC); if ($return) { $stmtItems = db()->prepare("SELECT pri.*, i.name_en, i.name_ar, i.sku FROM purchase_return_items pri JOIN stock_items i ON pri.item_id = i.id WHERE pri.return_id = ?"); @@ -661,6 +661,23 @@ function getPromotionalPrice($item) { $message = "Unit added!"; } + if (isset($_POST['edit_category'])) { + db()->prepare("UPDATE stock_categories SET name_en = ?, name_ar = ? WHERE id = ?")->execute([$_POST['name_en'] ?? '', $_POST['name_ar'] ?? '', (int)$_POST['id']]); + $message = "Category updated!"; + } + if (isset($_POST['delete_category'])) { + db()->prepare("DELETE FROM stock_categories WHERE id = ?")->execute([(int)$_POST['id']]); + $message = "Category deleted!"; + } + if (isset($_POST['edit_unit'])) { + db()->prepare("UPDATE stock_units SET name_en = ?, name_ar = ?, short_name_en = ?, short_name_ar = ? WHERE id = ?")->execute([$_POST['name_en'] ?? '', $_POST['name_ar'] ?? '', $_POST['short_en'] ?? '', $_POST['short_ar'] ?? '', (int)$_POST['id']]); + $message = "Unit updated!"; + } + if (isset($_POST['delete_unit'])) { + db()->prepare("DELETE FROM stock_units WHERE id = ?")->execute([(int)$_POST['id']]); + $message = "Unit deleted!"; + } + if (isset($_POST['add_customer'])) { db()->prepare("INSERT INTO customers (name, email, phone, tax_id, balance, type) VALUES (?, ?, ?, ?, ?, ?)")->execute([$_POST['name'] ?? '', $_POST['email'] ?? '', $_POST['phone'] ?? '', $_POST['tax_id'] ?? '', (float)($_POST['balance'] ?? 0), $_POST['type'] ?? 'customer']); $message = "Entity added!"; @@ -2502,6 +2519,13 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Accounting System'; + + + + = __('pos') ?> + + +
- - - - = __('pos') ?> - - -