= $titles[$page][$lang] ?? $titles['dashboard'][$lang] ?>
Sales Performance
Recent Customers
View All| Name | Phone | Balance |
|---|---|---|
| = htmlspecialchars($c['name']) ?> | = htmlspecialchars($c['phone']) ?> | OMR = number_format((float)$c['balance'], 3) ?> |
Quick Links
= $currTitle['en'] ?> Management
| Name | Tax ID | Phone | Balance | Actions | |
|---|---|---|---|---|---|
| = htmlspecialchars($c['name']) ?> | = htmlspecialchars($c['tax_id'] ?? '---') ?> | = htmlspecialchars($c['email']) ?> | = htmlspecialchars($c['phone']) ?> | OMR = number_format((float)$c['balance'], 3) ?> |
|
Stock Categories
| ID | Name (EN) | Name (AR) |
|---|---|---|
| = $cat['id'] ?> | = htmlspecialchars($cat['name_en']) ?> | = htmlspecialchars($cat['name_ar']) ?> |
Stock Units
| Name (EN) | Short (EN) | Name (AR) | Short (AR) |
|---|---|---|---|
| = htmlspecialchars($u['name_en']) ?> | = htmlspecialchars($u['short_name_en']) ?> | = htmlspecialchars($u['name_ar']) ?> | = htmlspecialchars($u['short_name_ar']) ?> |
Stock Items
| Image | SKU | Name | Category | Supplier | Stock Level | Expiry | VAT | Actions | |
|---|---|---|---|---|---|---|---|---|---|
|
|
= htmlspecialchars($item['sku']) ?> |
= htmlspecialchars($item['name_en']) ?>
Promo
= htmlspecialchars($item['name_ar']) ?>
|
= htmlspecialchars($item['cat_en']) ?> | = htmlspecialchars($item['supplier_name'] ?? '---') ?> |
= number_format((float)$item['stock_quantity'], 3) ?>
Min: = number_format((float)$item['min_stock_level'], 3) ?>
Low Stock
|
= !empty($item['expiry_date']) ? htmlspecialchars((string)$item['expiry_date']) : '---' ?> | = number_format((float)$item['vat_rate'], 3) ?>% |
|
Expiry Report
| SKU | Item Name | Category | Stock Level | Expiry Date | Status |
|---|---|---|---|---|---|
| No items found. | |||||
| = htmlspecialchars($item['sku']) ?> |
= htmlspecialchars($item['name_en']) ?>
= htmlspecialchars($item['name_ar']) ?>
|
= htmlspecialchars($item['cat_en'] ?? '---') ?> | = number_format((float)$item['stock_quantity'], 3) ?> | = $expiry_date !== '' ? htmlspecialchars((string)$expiry_date) : '---' ?> | Expired Near Expiry Good |
Low Stock Report
| SKU | Item Name | Category | Supplier | Min Level | Current Stock | Shortage |
|---|---|---|---|---|---|---|
| All items are above minimum levels. | ||||||
| = htmlspecialchars($item['sku']) ?> |
= htmlspecialchars($item['name_en']) ?>
= htmlspecialchars($item['name_ar']) ?>
|
= htmlspecialchars($item['cat_en'] ?? '---') ?> | = htmlspecialchars($item['supplier_name'] ?? '---') ?> | = number_format((float)$item['min_stock_level'], 2) ?> | = number_format((float)$item['stock_quantity'], 3) ?> | = number_format($shortage, 3) ?> |
Loyalty Transaction History
| Date | Customer | Tier | Type | Points | Description |
|---|---|---|---|---|---|
| No transactions found. | |||||
| = date('Y-m-d H:i', strtotime($lt['created_at'])) ?> |
= htmlspecialchars($lt['customer_name']) ?>
Current Balance: = number_format($lt['loyalty_points'], 0) ?> pts
|
= $tier ?> | = ucfirst($type) ?> | = (float)$lt['points_change'] > 0 ? '+' : '' ?>= number_format($lt['points_change'], 0) ?> | = htmlspecialchars($lt['description']) ?> |
Cart
Cart is empty
Quotations
| Quotation # | Date | Valid Until | Customer | Status | Total | Actions |
|---|---|---|---|---|---|---|
| QUO-= str_pad((string)$q['id'], 5, '0', STR_PAD_LEFT) ?> | = $q['quotation_date'] ?> | = $q['valid_until'] ?: '---' ?> | = htmlspecialchars($q['customer_name'] ?? '---') ?> | = htmlspecialchars($q['status']) ?> | OMR = number_format((float)$q['total_with_vat'], 3) ?> |
|
| No quotations found | ||||||
= $currTitle['en'] ?>
| Invoice # | Date | = $page === 'sales' ? 'Customer' : 'Supplier' ?> | Status | Total | Paid | Balance | Actions |
|---|---|---|---|---|---|---|---|
| INV-= str_pad((string)$inv['id'], 5, '0', STR_PAD_LEFT) ?> | = $inv['invoice_date'] ?> | = htmlspecialchars($inv['customer_name'] ?? '---') ?> | = htmlspecialchars(str_replace('_', ' ', $inv['status'])) ?> | OMR = number_format((float)$inv['total_with_vat'], 3) ?> | OMR = number_format((float)$inv['paid_amount'], 3) ?> | OMR = number_format((float)($inv['total_with_vat'] - $inv['paid_amount']), 3) ?> |
|
= $currTitle['en'] ?>
= htmlspecialchars($data['settings']['company_name'] ?? 'Accounting System') ?>
= nl2br(htmlspecialchars($data['settings']['company_address'] ?? '')) ?>
Statement of Account
= htmlspecialchars($data['selected_entity']['name']) ?>
= htmlspecialchars($data['selected_entity']['email']) ?> | = htmlspecialchars($data['selected_entity']['phone']) ?>
Period: = $_GET['start_date'] ?> to = $_GET['end_date'] ?>
| Date | Reference | Description | Debit | Credit | Balance |
|---|---|---|---|---|---|
| = $t['trans_date'] ?> | = $t['trans_type'] === 'invoice' ? 'INV-'.str_pad((string)$t['ref_no'], 5, '0', STR_PAD_LEFT) : 'RCP-'.str_pad((string)$t['id'], 5, '0', STR_PAD_LEFT) ?> | = $t['trans_type'] === 'invoice' ? 'Tax Invoice' : 'Payment - '.$t['payment_method'] ?> | = $debit > 0 ? number_format($debit, 3) : '' ?> | = $credit > 0 ? number_format($credit, 3) : '' ?> | = number_format($running_balance, 3) ?> |
| Closing Balance | OMR = number_format($running_balance, 3) ?> | ||||
Please select an entity and date range to generate the statement.
Cashflow Statement
= htmlspecialchars($data['settings']['company_name'] ?? 'Accounting System') ?>
= nl2br(htmlspecialchars($data['settings']['company_address'] ?? '')) ?>
Cashflow Statement
Period: = htmlspecialchars($_GET['start_date'] ?? date('Y-m-01')) ?> to = htmlspecialchars($_GET['end_date'] ?? date('Y-m-d')) ?>
| Description | Amount (OMR) |
|---|---|
| Opening Cash Balance | = number_format($data['opening_balance'], 3) ?> |
| Operating Activities | |
| Cash Received from Customers & Others | = number_format($op_inflow, 3) ?> |
| Cash Paid to Suppliers & Expenses | (= number_format($op_outflow, 3) ?>) |
| Net Cash from Operating Activities | = number_format($op_inflow - $op_outflow, 3) ?> |
| Investing Activities | |
| Net Cash from Investing Activities | = number_format($inv_inflow - $inv_outflow, 3) ?> |
| Financing Activities | |
| Net Cash from Financing Activities | = number_format($fin_inflow - $fin_outflow, 3) ?> |
| Net Change in Cash | = number_format($net_change, 3) ?> |
| Closing Cash Balance | = number_format($data['opening_balance'] + $net_change, 3) ?> |
___________________
Prepared By
___________________
Approved By
Payment Methods
| ID | Name (EN) | Name (AR) | Actions |
|---|---|---|---|
| = $pm['id'] ?> | = htmlspecialchars($pm['name_en'] ?? '') ?> | = htmlspecialchars($pm['name_ar'] ?? '') ?> |
|
Expense Categories
| ID | Name (EN) | Name (AR) | Actions |
|---|---|---|---|
| = $cat['id'] ?> | = htmlspecialchars($cat['name_en']) ?> | = htmlspecialchars($cat['name_ar']) ?> |
|
Accounting Module
= htmlspecialchars($data['settings']['company_name'] ?? 'Accounting System') ?>
= nl2br(htmlspecialchars($data['settings']['company_address'] ?? '')) ?>
= isset($_GET['view']) ? ucwords(str_replace('_', ' ', $_GET['view'])) : 'Journal' ?>
| Date | Description | Reference | Amount | Action |
|---|---|---|---|---|
| = $entry['entry_date'] ?> | = htmlspecialchars($entry['description']) ?> | = htmlspecialchars($entry['reference']) ?> | = number_format((float)$entry['total_debit'], 3) ?> |
| Code | Name | Type | Parent | Balance |
|---|---|---|---|---|
| = $acc['code'] ?> |
= htmlspecialchars($acc['name_en']) ?> = htmlspecialchars($acc['name_ar']) ?> |
= $acc['type'] ?> | = htmlspecialchars($acc['parent_name'] ?? '---') ?> | = number_format(getAccountBalance($acc['code']), 3) ?> |
VAT Summary Report
| VAT Input (Purchases) | = number_format($data['vat_report']['input_vat'], 3) ?> |
|---|---|
| VAT Output (Sales) | = number_format($data['vat_report']['output_vat'], 3) ?> |
| Net VAT Payable / (Refundable) | = number_format($data['vat_report']['net_vat'], 3) ?> |
| Code | Account Name | Debit | Credit |
|---|---|---|---|
| = $row['code'] ?> | = htmlspecialchars($row['name_en']) ?> | = number_format((float)$row['total_debit'], 3) ?> | = number_format((float)$row['total_credit'], 3) ?> |
| Total | = number_format($total_d, 3) ?> | = number_format($total_c, 3) ?> | |
Profit & Loss Statement
| Revenue | |
|---|---|
| = htmlspecialchars($acc['name_en']) ?> | = number_format($bal, 3) ?> |
| Total Revenue | = number_format($total_rev, 3) ?> |
| Expenses | |
| = htmlspecialchars($acc['name_en']) ?> | = number_format($bal, 3) ?> |
| Total Expenses | = number_format($total_exp, 3) ?> |
| Net Profit / Loss | = number_format($total_rev - $total_exp, 3) ?> |
Balance Sheet
Assets
| = htmlspecialchars($acc['name_en']) ?> | = number_format($bal, 3) ?> |
| Total Assets | = number_format($total_assets, 3) ?> |
Liabilities & Equity
| Liabilities | |
| = htmlspecialchars($acc['name_en']) ?> | = number_format($bal, 3) ?> |
| Equity | |
| = htmlspecialchars($acc['name_en']) ?> | = number_format($bal, 3) ?> |
| Retained Earnings (Current) | = number_format($earnings, 3) ?> |
| Total Liab. & Equity | = number_format($total_liab + $total_equity, 3) ?> |
Expenses List
| Date | Reference | Category | Description | Amount | Actions |
|---|---|---|---|---|---|
| = $exp['expense_date'] ?> | = htmlspecialchars($exp['reference_no'] ?: '---') ?> | = htmlspecialchars($exp['cat_en'] ?? 'Unknown') ?> | = htmlspecialchars($exp['description']) ?> | OMR = number_format((float)$exp['amount'], 3) ?> |
|
Expense Report
Total Expenses
OMR = number_format((float)$data['total_expenses'], 3) ?>
Period: = htmlspecialchars($_GET['start_date'] ?? date('Y-m-01')) ?> to = htmlspecialchars($_GET['end_date'] ?? date('Y-m-d')) ?>| Category | Total Amount | % of Total |
|---|---|---|
| No expenses found for this period. | ||
|
= htmlspecialchars($row['name_en']) ?>
= htmlspecialchars($row['name_ar']) ?>
|
OMR = number_format((float)$row['total'], 3) ?> | = number_format($percent, 1) ?>% |
Sales Returns
| Return # | Date | Invoice # | Customer | Total Amount | Actions |
|---|---|---|---|---|---|
| RET-= str_pad((string)$ret['id'], 5, '0', STR_PAD_LEFT) ?> | = $ret['return_date'] ?> | INV-= str_pad((string)$ret['invoice_id'], 5, '0', STR_PAD_LEFT) ?> | = htmlspecialchars($ret['customer_name'] ?? 'Walk-in') ?> | OMR = number_format((float)$ret['total_amount'], 3) ?> |
|
| No returns found | |||||
Purchase Returns
| Return # | Date | Invoice # | Supplier | Total Amount | Actions |
|---|---|---|---|---|---|
| PRET-= str_pad((string)$ret['id'], 5, '0', STR_PAD_LEFT) ?> | = $ret['return_date'] ?> | INV-= str_pad((string)$ret['invoice_id'], 5, '0', STR_PAD_LEFT) ?> | = htmlspecialchars($ret['supplier_name'] ?? 'Unknown') ?> | OMR = number_format((float)$ret['total_amount'], 3) ?> |
|
| No returns found | |||||
HR Departments
| ID | Department Name | Actions |
|---|---|---|
| = $d['id'] ?> | = htmlspecialchars($d['name']) ?> |
HR Employees
| Name | Biometric ID | Department | Position | Salary | Status | Actions |
|---|---|---|---|---|---|---|
|
= htmlspecialchars($e['name']) ?>
= htmlspecialchars($e['email']) ?>
|
= htmlspecialchars($e['biometric_id'] ?? '---') ?> | = htmlspecialchars($e['dept_name'] ?? '---') ?> | = htmlspecialchars($e['position']) ?> | OMR = number_format($e['salary'], 3) ?> | = $e['status'] ?> |
HR Attendance
| Employee | Department | Status | Clock In | Clock Out | Action |
|---|---|---|---|---|---|
| = htmlspecialchars($e['name']) ?> | = htmlspecialchars($e['dept_name'] ?? '---') ?> | = $e['status'] ?> Not Marked | = $e['clock_in'] ?? '---' ?> | = $e['clock_out'] ?? '---' ?> |
HR Payroll
| Employee | Basic | Bonus | Deductions | Net Salary | Status | Actions |
|---|---|---|---|---|---|---|
| = htmlspecialchars($p['emp_name']) ?> | OMR = number_format($p['basic_salary'], 3) ?> | + OMR = number_format($p['bonus'], 3) ?> | - OMR = number_format($p['deductions'], 3) ?> | OMR = number_format($p['net_salary'], 3) ?> | = $p['status'] ?> |
Biometric Devices
| Device Name | IP / IO Address | Port | Serial | Last Sync | Status | Actions |
|---|---|---|---|---|---|---|
| = htmlspecialchars($d['device_name']) ?> |
IP: = htmlspecialchars($d['ip_address']) ?>
IO: = htmlspecialchars($d['io_address']) ?>
|
= $d['port'] ?> | = htmlspecialchars($d['serial_number'] ?? '---') ?> | = $d['last_sync'] ?? 'Never' ?> | = $d['status'] ?> |
POS Devices
| Device Name | Type | Connection | Details | Status | Actions |
|---|---|---|---|---|---|
|
= htmlspecialchars($d['device_name']) ?>
|
= $d['device_type'] ?> | = $d['connection_type'] ?> | = htmlspecialchars((string)$d['ip_address']) ?>:= $d['port'] ?> Baud: = $d['baud_rate'] ?> USB Interface | = $d['status'] ?> |
Profile Picture
= htmlspecialchars($data['user']['username']) ?>
= htmlspecialchars($_SESSION['user_role_name'] ?? 'User') ?>
Edit Profile
Company Profile
Role Groups
Manage access levels and permissions
| Group Name | Created Date | Status | Actions |
|---|---|---|---|
|
|
= date('M d, Y', strtotime((string)$group['created_at'])) ?> | Active |
|
Customer Display Settings
Backup Settings
Manual Backup
Create a database backup immediately.
Available Backups
| Filename | Size | Date | Actions |
|---|---|---|---|
| No backups found. | |||
| = htmlspecialchars($b['name']) ?> | = htmlspecialchars($b['size']) ?> | = htmlspecialchars($b['date']) ?> |
|
User Management
Maintain your team accounts and security
| User Info | Access Level | Contact | Status | Actions |
|---|---|---|---|---|
|
= strtoupper(substr((string)$u['username'], 0, 1)) ?>
= htmlspecialchars((string)$u['username']) ?>
ID: #= str_pad((string)$u['id'], 4, '0', STR_PAD_LEFT) ?>
|
= htmlspecialchars((string)($u['group_name'] ?? 'No Role Assigned')) ?> |
= htmlspecialchars((string)($u['email'] ?? '')) ?>
= htmlspecialchars((string)($u['phone'] ?? '-')) ?>
|
Active Suspended |
|
Cash Registers Management
Define your shop counters and registers.
| ID | Name | Status | Created At | Actions |
|---|---|---|---|---|
| #= $r['id'] ?> | = htmlspecialchars($r['name']) ?> | = ucfirst($r['status']) ?> | = $r['created_at'] ?> |
|
Register Sessions (= count($data['sessions']) ?>)
Manage daily opening and closing of cash registers.
| ID | Register | Cashier | Opened At | Closed At | Opening Bal. | Cash Sale | Credit Card | Credit | Total Sale | Balance | Status | Report |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| #= $s['id'] ?> | = htmlspecialchars($s['register_name'] ?? 'N/A') ?> | = htmlspecialchars($s['username'] ?? 'N/A') ?> | = $s['opened_at'] ?> | = $s['closed_at'] ?? '---' ?> | OMR = number_format((float)$s['opening_balance'], 3) ?> | prepare("SELECT SUM(CASE WHEN LOWER(p.payment_method) = 'cash' THEN p.amount ELSE 0 END) as cash_total, SUM(CASE WHEN LOWER(p.payment_method) IN ('card', 'credit card', 'visa', 'mastercard') THEN p.amount ELSE 0 END) as card_total, SUM(CASE WHEN LOWER(p.payment_method) = 'credit' THEN p.amount ELSE 0 END) as credit_total, SUM(CASE WHEN LOWER(p.payment_method) LIKE '%transfer%' OR LOWER(p.payment_method) LIKE '%bank%' THEN p.amount ELSE 0 END) as transfer_total, SUM(p.amount) as total_sales FROM pos_payments p JOIN pos_transactions t ON p.transaction_id = t.id WHERE t.register_session_id = ? AND t.status = 'completed'"); $stats_stmt->execute([$s['id']]); $st = $stats_stmt->fetch(); $c_total = (float)($st['cash_total'] ?? 0); $cd_total = (float)($st['card_total'] ?? 0); $cr_total = (float)($st['credit_total'] ?? 0); $tr_total = (float)($st['transfer_total'] ?? 0); $t_sales = (float)($st['total_sales'] ?? 0); $row_expected_cash = (float)$s['opening_balance'] + $c_total; ?>OMR = number_format($c_total, 3) ?> | OMR = number_format($cd_total, 3) ?> | OMR = number_format($cr_total, 3) ?> | OMR = number_format($t_sales, 3) ?> | 0 ? 'text-info' : 'text-danger'); ?> OMR = number_format($diff, 3) ?> --- | = ucfirst($s['status']) ?> |
System Logs
Monitor system activity and errors
--- " . htmlspecialchars(basename($file)) . " ---
"; $lines = shell_exec("tail -n 50 " . escapeshellarg($path)); echo "" . htmlspecialchars((string)$lines) . "
No accessible log files found.