/*M!999999\- enable the sandbox mode */ 
-- MariaDB dump 10.19  Distrib 10.11.14-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1    Database: app_38471
-- ------------------------------------------------------
-- Server version	10.11.14-MariaDB-0+deb12u2

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Dumping data for table `migrations`
--

LOCK TABLES `migrations` WRITE;
/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
INSERT INTO `migrations` VALUES
(1,'20260216_add_invoices.sql','2026-02-21 06:58:26'),
(2,'20260216_add_quotations.sql','2026-02-21 06:58:26'),
(3,'20260216_add_stock_tables.sql','2026-02-21 06:58:26'),
(4,'20260216_pos_advanced_features.sql','2026-02-21 06:58:26'),
(5,'20260216_setup_pos_full.sql','2026-02-21 06:58:27'),
(6,'20260216_update_precision_3_decimal.sql','2026-02-21 06:58:28'),
(7,'20260217_accounting_module.sql','2026-02-21 06:58:28'),
(8,'20260217_biometric_devices.sql','2026-02-21 06:58:28'),
(9,'20260217_hr_module.sql','2026-02-21 06:58:28'),
(10,'20260217_purchase_returns.sql','2026-02-21 06:58:28'),
(11,'20260217_sales_returns.sql','2026-02-21 06:58:28'),
(12,'20260217_vat_accounts.sql','2026-02-21 06:58:28'),
(13,'20260218_create_license_table.sql','2026-02-21 06:58:28'),
(14,'20260218_pos_payments.sql','2026-02-21 06:58:28'),
(15,'20260220_license_server_schema.sql','2026-02-21 06:58:28'),
(16,'20260220_unify_pos_sales.sql','2026-02-21 06:58:29'),
(17,'fix_lpo_foreign_key.sql','2026-02-21 06:58:29'),
(18,'20260216_add_credit_limit.sql','2026-02-21 07:12:15'),
(19,'20260216_add_invoice_status.sql','2026-02-21 07:12:15'),
(20,'20260216_add_payments_table.sql','2026-02-21 07:12:15'),
(21,'20260216_update_invoices_payment.sql','2026-02-21 07:12:15'),
(22,'20260216_vat_and_profile.sql','2026-02-21 07:12:15'),
(23,'20260217_biometric_attendance.sql','2026-02-21 07:12:15'),
(24,'20260217_biometric_logs_update.sql','2026-02-21 07:12:15'),
(25,'20260217_hr_payroll_unique.sql','2026-02-21 07:12:15'),
(26,'20260218_modern_loyalty_system.sql','2026-02-21 07:12:15'),
(27,'20260219_add_license_fields.sql','2026-02-21 07:12:15'),
(28,'20260219_add_trial_logic.sql','2026-02-21 07:12:15'),
(29,'20260219_add_vat_to_pos_items.sql','2026-02-21 07:12:15'),
(30,'20260219_fix_vat_columns.sql','2026-02-21 07:12:15'),
(31,'20260220_add_due_date_to_invoices.sql','2026-02-21 07:12:15'),
(32,'20260220_split_customers_suppliers.sql','2026-02-21 07:12:15'),
(33,'20260220_split_invoices_purchases.sql','2026-02-21 07:12:15'),
(34,'20260220_unify_pos_sales.php','2026-02-21 07:13:28'),
(35,'20260221_fix_supplier_foreign_keys.sql','2026-02-21 08:29:25'),
(36,'20260221_add_theme_to_users.sql','2026-02-21 10:01:17');
/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping data for table `role_groups`
--

LOCK TABLES `role_groups` WRITE;
/*!40000 ALTER TABLE `role_groups` DISABLE KEYS */;
INSERT INTO `role_groups` VALUES
(1,'Administrator','all','2026-02-18 05:30:12'),
(4,'Cashier','[\"pos_view\",\"pos_add\",\"items_view\",\"items_add\"]','2026-02-18 09:32:14'),
(5,'Admin','[\"pos_view\",\"pos_add\",\"pos_edit\",\"quotations_view\",\"quotations_add\",\"quotations_edit\",\"customers_view\",\"customers_add\",\"customers_edit\",\"suppliers_view\",\"suppliers_add\",\"suppliers_edit\",\"sales_view\",\"sales_add\",\"sales_edit\",\"purchases_view\",\"purchases_add\",\"purchases_edit\",\"hr_view\",\"hr_add\",\"hr_edit\",\"hr_delete\",\"users_view\"]','2026-02-18 09:33:29'),
(6,'Accountant','[\"accounting_view\",\"accounting_add\",\"accounting_edit\"]','2026-02-18 09:34:03');
/*!40000 ALTER TABLE `role_groups` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping data for table `role_permissions`
--

LOCK TABLES `role_permissions` WRITE;
/*!40000 ALTER TABLE `role_permissions` DISABLE KEYS */;
INSERT INTO `role_permissions` VALUES
(58,1,'accounting_add'),
(60,1,'accounting_delete'),
(59,1,'accounting_edit'),
(57,1,'accounting_view'),
(154,1,'backups_add'),
(156,1,'backups_delete'),
(155,1,'backups_edit'),
(153,1,'backups_view'),
(70,1,'balance_sheet_add'),
(72,1,'balance_sheet_delete'),
(71,1,'balance_sheet_edit'),
(69,1,'balance_sheet_view'),
(138,1,'cash_registers_add'),
(140,1,'cash_registers_delete'),
(139,1,'cash_registers_edit'),
(137,1,'cash_registers_view'),
(102,1,'cashflow_report_add'),
(104,1,'cashflow_report_delete'),
(103,1,'cashflow_report_edit'),
(101,1,'cashflow_report_view'),
(10,1,'categories_add'),
(12,1,'categories_delete'),
(11,1,'categories_edit'),
(9,1,'categories_view'),
(150,1,'customer_display_settings_add'),
(152,1,'customer_display_settings_delete'),
(151,1,'customer_display_settings_edit'),
(149,1,'customer_display_settings_view'),
(94,1,'customer_statement_add'),
(96,1,'customer_statement_delete'),
(95,1,'customer_statement_edit'),
(93,1,'customer_statement_view'),
(18,1,'customers_add'),
(20,1,'customers_delete'),
(19,1,'customers_edit'),
(17,1,'customers_view'),
(2,1,'dashboard_add'),
(4,1,'dashboard_delete'),
(3,1,'dashboard_edit'),
(1,1,'dashboard_view'),
(122,1,'devices_add'),
(124,1,'devices_delete'),
(123,1,'devices_edit'),
(121,1,'devices_view'),
(50,1,'expense_categories_add'),
(52,1,'expense_categories_delete'),
(51,1,'expense_categories_edit'),
(49,1,'expense_categories_view'),
(54,1,'expenses_add'),
(56,1,'expenses_delete'),
(55,1,'expenses_edit'),
(53,1,'expenses_view'),
(106,1,'expiry_report_add'),
(108,1,'expiry_report_delete'),
(107,1,'expiry_report_edit'),
(105,1,'expiry_report_view'),
(86,1,'hr_attendance_add'),
(88,1,'hr_attendance_delete'),
(87,1,'hr_attendance_edit'),
(85,1,'hr_attendance_view'),
(78,1,'hr_departments_add'),
(80,1,'hr_departments_delete'),
(79,1,'hr_departments_edit'),
(77,1,'hr_departments_view'),
(82,1,'hr_employees_add'),
(84,1,'hr_employees_delete'),
(83,1,'hr_employees_edit'),
(81,1,'hr_employees_view'),
(90,1,'hr_payroll_add'),
(92,1,'hr_payroll_delete'),
(91,1,'hr_payroll_edit'),
(89,1,'hr_payroll_view'),
(6,1,'items_add'),
(8,1,'items_delete'),
(7,1,'items_edit'),
(5,1,'items_view'),
(158,1,'logs_add'),
(160,1,'logs_delete'),
(159,1,'logs_edit'),
(157,1,'logs_view'),
(110,1,'low_stock_report_add'),
(112,1,'low_stock_report_delete'),
(111,1,'low_stock_report_edit'),
(109,1,'low_stock_report_view'),
(114,1,'loyalty_history_add'),
(116,1,'loyalty_history_delete'),
(115,1,'loyalty_history_edit'),
(113,1,'loyalty_history_view'),
(211,1,'lpos_add'),
(213,1,'lpos_delete'),
(212,1,'lpos_edit'),
(210,1,'lpos_view'),
(118,1,'payment_methods_add'),
(120,1,'payment_methods_delete'),
(119,1,'payment_methods_edit'),
(117,1,'payment_methods_view'),
(26,1,'pos_add'),
(28,1,'pos_delete'),
(27,1,'pos_edit'),
(25,1,'pos_view'),
(66,1,'profit_loss_add'),
(68,1,'profit_loss_delete'),
(67,1,'profit_loss_edit'),
(65,1,'profit_loss_view'),
(46,1,'purchase_returns_add'),
(48,1,'purchase_returns_delete'),
(47,1,'purchase_returns_edit'),
(45,1,'purchase_returns_view'),
(42,1,'purchases_add'),
(44,1,'purchases_delete'),
(43,1,'purchases_edit'),
(41,1,'purchases_view'),
(38,1,'quotations_add'),
(40,1,'quotations_delete'),
(39,1,'quotations_edit'),
(37,1,'quotations_view'),
(142,1,'register_sessions_add'),
(144,1,'register_sessions_delete'),
(143,1,'register_sessions_edit'),
(141,1,'register_sessions_view'),
(130,1,'role_groups_add'),
(132,1,'role_groups_delete'),
(131,1,'role_groups_edit'),
(129,1,'role_groups_view'),
(30,1,'sales_add'),
(32,1,'sales_delete'),
(31,1,'sales_edit'),
(34,1,'sales_returns_add'),
(36,1,'sales_returns_delete'),
(35,1,'sales_returns_edit'),
(33,1,'sales_returns_view'),
(29,1,'sales_view'),
(146,1,'scale_devices_add'),
(148,1,'scale_devices_delete'),
(147,1,'scale_devices_edit'),
(145,1,'scale_devices_view'),
(126,1,'settings_add'),
(128,1,'settings_delete'),
(127,1,'settings_edit'),
(125,1,'settings_view'),
(98,1,'supplier_statement_add'),
(100,1,'supplier_statement_delete'),
(99,1,'supplier_statement_edit'),
(97,1,'supplier_statement_view'),
(22,1,'suppliers_add'),
(24,1,'suppliers_delete'),
(23,1,'suppliers_edit'),
(21,1,'suppliers_view'),
(62,1,'trial_balance_add'),
(64,1,'trial_balance_delete'),
(63,1,'trial_balance_edit'),
(61,1,'trial_balance_view'),
(14,1,'units_add'),
(16,1,'units_delete'),
(15,1,'units_edit'),
(13,1,'units_view'),
(134,1,'users_add'),
(136,1,'users_delete'),
(135,1,'users_edit'),
(133,1,'users_view'),
(74,1,'vat_report_add'),
(76,1,'vat_report_delete'),
(75,1,'vat_report_edit'),
(73,1,'vat_report_view'),
(162,4,'items_add'),
(161,4,'items_view'),
(164,4,'pos_add'),
(163,4,'pos_view'),
(166,4,'sales_add'),
(165,4,'sales_view'),
(174,5,'customers_add'),
(175,5,'customers_edit'),
(173,5,'customers_view'),
(186,5,'hr_add'),
(188,5,'hr_delete'),
(187,5,'hr_edit'),
(185,5,'hr_view'),
(215,5,'lpos_add'),
(217,5,'lpos_delete'),
(216,5,'lpos_edit'),
(214,5,'lpos_view'),
(168,5,'pos_add'),
(169,5,'pos_edit'),
(167,5,'pos_view'),
(183,5,'purchases_add'),
(184,5,'purchases_edit'),
(182,5,'purchases_view'),
(171,5,'quotations_add'),
(172,5,'quotations_edit'),
(170,5,'quotations_view'),
(180,5,'sales_add'),
(181,5,'sales_edit'),
(179,5,'sales_view'),
(177,5,'suppliers_add'),
(178,5,'suppliers_edit'),
(176,5,'suppliers_view'),
(189,5,'users_view'),
(191,6,'accounting_add'),
(193,6,'accounting_delete'),
(192,6,'accounting_edit'),
(190,6,'accounting_view'),
(203,6,'balance_sheet_add'),
(205,6,'balance_sheet_delete'),
(204,6,'balance_sheet_edit'),
(202,6,'balance_sheet_view'),
(199,6,'profit_loss_add'),
(201,6,'profit_loss_delete'),
(200,6,'profit_loss_edit'),
(198,6,'profit_loss_view'),
(195,6,'trial_balance_add'),
(197,6,'trial_balance_delete'),
(196,6,'trial_balance_edit'),
(194,6,'trial_balance_view'),
(207,6,'vat_report_add'),
(209,6,'vat_report_delete'),
(208,6,'vat_report_edit'),
(206,6,'vat_report_view');
/*!40000 ALTER TABLE `role_permissions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping data for table `users`
--

LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES
(1,1,'admin','$2y$10$uLxB5VJa9nZ3nGhukx7jOeBotQ/PtumL3ndbzTZ.TjrAr9yJH/hIq','admin@example.com',NULL,'uploads/profile_1_1771401598.png','default','active','2026-02-18 05:30:12'),
(2,1,'admin2','$2y$10$A299UOd8VZWXyuKcbcLwWewIg.7V2ti3oomGaKH9qhMm4vdG6a/xi',NULL,NULL,NULL,'default','active','2026-02-18 06:44:10'),
(5,1,'moosa','$2y$10$Ho5NrFTAb6HUH4VvCd4NZuCsKGMl4v1pvWiesEuC29fDDu6Pkg7AS','aalabry@gmail.com',NULL,NULL,'default','active','2026-02-18 09:30:38');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping data for table `payment_methods`
--

LOCK TABLES `payment_methods` WRITE;
/*!40000 ALTER TABLE `payment_methods` DISABLE KEYS */;
INSERT INTO `payment_methods` VALUES
(1,'Cash','كاش','2026-02-16 08:33:31'),
(2,'Credit Card','بطاقة بنكية','2026-02-16 08:33:53'),
(3,'Bank Transfer','تحويل بنكي','2026-02-16 08:34:17');
/*!40000 ALTER TABLE `payment_methods` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping data for table `settings`
--

LOCK TABLES `settings` WRITE;
/*!40000 ALTER TABLE `settings` DISABLE KEYS */;
INSERT INTO `settings` VALUES
('allow_zero_stock_sell','1','2026-02-18 05:23:57'),
('bank_name','','2026-02-16 09:49:27'),
('company_address','AL Hamra\r\nOman','2026-02-16 10:05:55'),
('company_email','aalabry@gmail.com','2026-02-16 09:49:27'),
('company_iban','','2026-02-16 09:49:27'),
('company_logo','uploads/logo.png','2026-02-16 09:49:48'),
('company_name','Bahjet Al-Safa Trading','2026-02-16 09:49:26'),
('company_phone','99359472','2026-02-16 09:49:26'),
('company_website','','2026-02-16 09:49:27'),
('cr_number','','2026-02-16 09:18:20'),
('default_vat_rate','5','2026-02-16 09:49:27'),
('favicon','uploads/favicon.png','2026-02-16 10:09:59'),
('invoice_footer','','2026-02-16 09:49:27'),
('loyalty_enabled','0','2026-02-18 05:06:52'),
('loyalty_points_per_unit','1','2026-02-18 05:06:52'),
('loyalty_redeem_points_per_unit','100','2026-02-18 05:06:52'),
('manager_name','','2026-02-16 09:49:27'),
('registration_no','','2026-02-16 10:05:55'),
('vat_enabled','1','2026-02-16 09:18:20'),
('vat_number','OM25418','2026-02-16 09:49:27');
/*!40000 ALTER TABLE `settings` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping data for table `acc_accounts`
--

LOCK TABLES `acc_accounts` WRITE;
/*!40000 ALTER TABLE `acc_accounts` DISABLE KEYS */;
INSERT INTO `acc_accounts` VALUES
(1,'1000','Assets','الأصول','asset',NULL),
(2,'1100','Cash on Hand','النقدية','asset',1),
(3,'1200','Bank Account','حساب البنك','asset',1),
(4,'1300','Accounts Receivable','حسابات العملاء','asset',1),
(5,'1400','Inventory','المخزون','asset',1),
(6,'2000','Liabilities','الالتزامات','liability',NULL),
(7,'2100','Accounts Payable','حسابات الموردين','liability',6),
(8,'3000','Equity','حقوق الملكية','equity',NULL),
(9,'4000','Revenue','الإيرادات','revenue',NULL),
(10,'4100','Sales Revenue','إيرادات المبيعات','revenue',9),
(11,'5000','Expenses','المصروفات','expense',NULL),
(12,'5100','Cost of Goods Sold','تكلفة البضاعة المباعة','expense',11),
(13,'5200','Operating Expenses','مصاريف تشغيلية','expense',11),
(14,'1500','VAT Input','ضريبة القيمة المضافة - مدخلات','asset',1),
(15,'2300','VAT Payable','ضريبة القيمة المضافة - مستحقة','liability',6);
/*!40000 ALTER TABLE `acc_accounts` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2026-02-21 10:01:20
