-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `forbitto_khokacosmetics_db`
--

-- --------------------------------------------------------

--
-- Table structure for table `account_transactions`
--

CREATE TABLE `account_transactions` (
  `id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `transaction_type` enum('credit','debit') NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `reference_type` varchar(50) NOT NULL,
  `reference_id` int(11) NOT NULL,
  `description` text DEFAULT NULL,
  `transaction_date` datetime DEFAULT current_timestamp(),
  `created_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `activity_logs`
--

CREATE TABLE `activity_logs` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `action` varchar(100) NOT NULL,
  `table_name` varchar(100) DEFAULT NULL,
  `record_id` int(10) UNSIGNED DEFAULT NULL,
  `old_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`old_values`)),
  `new_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`new_values`)),
  `description` text DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `activity_logs`
--

INSERT INTO `activity_logs` (`id`, `user_id`, `action`, `table_name`, `record_id`, `old_values`, `new_values`, `description`, `ip_address`, `user_agent`, `created_at`) VALUES
(1, 1, 'clear_logs', 'security', NULL, NULL, NULL, 'Cleared all activity logs', '103.253.46.207', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-05 08:43:05'),
(2, 1, 'create', 'financial_accounts', 18, '\"Created account: Cash\"', NULL, NULL, '103.253.46.207', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-05 08:44:53'),
(3, 1, 'create', 'financial_accounts', 19, '\"Created account: Bank\"', NULL, NULL, '103.253.46.207', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-05 08:45:15'),
(4, 1, 'create', 'financial_accounts', 20, '\"Created account: Mobile Banking\"', NULL, NULL, '103.253.46.207', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '2026-03-05 08:45:39'),
(5, 1, 'login', 'auth', 1, NULL, NULL, 'User logged in successfully', '103.253.46.207', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 08:46:46'),
(6, 1, 'login', 'auth', 1, NULL, NULL, 'User logged in successfully', '36.50.179.34', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 08:49:18'),
(7, 1, 'login', 'auth', 1, NULL, NULL, 'User logged in successfully', '36.50.179.34', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 08:53:40'),
(8, 1, 'login', 'auth', 1, NULL, NULL, 'User logged in successfully', '36.50.179.34', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 08:53:40'),
(9, 1, 'login', 'auth', 1, NULL, NULL, 'User logged in successfully', '37.111.225.173', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 08:59:05'),
(10, 1, 'login', 'auth', 1, NULL, NULL, 'User logged in successfully', '36.50.179.34', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 09:11:27'),
(11, 1, 'create', 'contacts', 32, NULL, NULL, 'Created new supplier: Random Supplier', '103.253.46.207', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 09:20:29'),
(12, 1, 'create', 'products', 37, NULL, NULL, 'Created product: কাবেরী মেহেদী (SKU: 5706402489119)', '103.253.46.207', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 09:22:49'),
(13, 1, 'purchase_deleted', 'purchases', 12, '{\"reference_no\":\"PO-20260211-8583\",\"total\":\"167100.00\"}', NULL, NULL, '103.253.46.207', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 09:23:37'),
(14, 1, 'purchase_deleted', 'purchases', 13, '{\"reference_no\":\"PO-20260211-4041\",\"total\":\"167100.00\"}', NULL, NULL, '103.253.46.207', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 09:23:40'),
(15, 1, 'purchase_deleted', 'purchases', 18, '{\"reference_no\":\"PO-20260219-5452\",\"total\":\"16000.00\"}', NULL, NULL, '103.253.46.207', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 09:23:43'),
(16, 1, 'purchase_deleted', 'purchases', 19, '{\"reference_no\":\"PO-20260221-7639\",\"total\":\"294900.00\"}', NULL, NULL, '103.253.46.207', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 09:23:45'),
(17, 1, 'purchase_deleted', 'purchases', 20, '{\"reference_no\":\"PO-20260224-7675\",\"total\":\"301000.00\"}', NULL, NULL, '103.253.46.207', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 09:23:48'),
(18, 1, 'create', 'purchases', 21, NULL, NULL, 'Purchase Created: PO-20260305-5533', '103.253.46.207', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 09:25:29'),
(19, 1, 'create', 'sales', 48, NULL, NULL, 'Sale Created: INV-20260305-50099A', '36.50.179.34', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 09:30:45'),
(20, 1, 'login', 'auth', 1, NULL, NULL, 'User logged in successfully', '37.111.225.73', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-05 10:11:58'),
(21, 1, 'login', 'auth', 1, NULL, NULL, 'User logged in successfully', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:48:28'),
(22, 1, 'login', 'auth', 1, NULL, NULL, 'User logged in successfully', '43.245.122.180', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-17 10:49:04'),
(23, 1, 'delete_sale', 'sales', 48, '{\"id\":48,\"reference_no\":\"INV-20260305-50099A\",\"customer_id\":null,\"sale_date\":\"2026-03-05\",\"total_amount\":\"1440.00\",\"tax_amount\":\"0.00\",\"discount_amount\":\"0.00\",\"paid_amount\":\"1440.00\",\"staff_commission_percent\":\"0.00\",\"staff_commission_amount\":\"0.00\",\"status\":\"completed\",\"created_by\":1,\"created_at\":\"2026-03-05 15:30:45\"}', NULL, NULL, '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:49:53'),
(24, 1, 'sale_deleted', 'sales', 48, '{\"reference_no\":\"INV-20260305-50099A\",\"total\":\"1440.00\"}', NULL, NULL, '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:49:53'),
(25, 1, 'update_settings', 'settings', NULL, NULL, '{\"csrf_token\":\"d39fc0fa36e3ed1a793bc17d6f3e012ce890b2026068f04552584d5fab00a657\",\"company_name\":\"Dewan Traders\",\"company_email\":\"admin@example.com\",\"company_phone\":\"+880 1308-203135\",\"currency_symbol\":\"\\u09f3\",\"timezone\":\"Asia\\/Dhaka\",\"tax_id\":\"\",\"default_tax_rate\":\"0\",\"company_address\":\"Joypurhat\"}', 'Updated system settings', '43.245.122.180', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '2026-03-17 10:50:00'),
(26, 1, 'purchase_deleted', 'purchases', 21, '{\"reference_no\":\"PO-20260305-5533\",\"total\":\"10000.00\"}', NULL, NULL, '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:50:02'),
(27, 1, 'delete_capital_transaction', 'capital', 112, '{\"id\":112,\"trans_date\":\"2026-03-03\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"500.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09ac\\u09be\\u099c\\u09be\\u09b0\",\"created_by\":1,\"created_at\":\"2026-03-03 14:24:29\"}', NULL, 'Deleted capital transaction ID: 112 Amount: 500.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:52:15'),
(28, 1, 'delete_capital_transaction', 'capital', 111, '{\"id\":111,\"trans_date\":\"2026-03-02\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"437000.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09ad\\u09c1\\u09b2 add capital \\u0995\\u09b0\\u09be\",\"created_by\":1,\"created_at\":\"2026-03-02 21:17:37\"}', NULL, 'Deleted capital transaction ID: 111 Amount: 437000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:52:20'),
(29, 1, 'delete_capital_transaction', 'capital', 91, '{\"id\":91,\"trans_date\":\"2026-02-26\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"900.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u099c\\u09cb\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-26 18:51:10\"}', NULL, 'Deleted capital transaction ID: 91 Amount: 900.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:52:24'),
(30, 1, 'delete_capital_transaction', 'capital', 90, '{\"id\":90,\"trans_date\":\"2026-02-26\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"100.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09ac\\u09be\\u099c\\u09be\\u09b0\",\"created_by\":1,\"created_at\":\"2026-02-26 15:29:40\"}', NULL, 'Deleted capital transaction ID: 90 Amount: 100.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:52:28'),
(31, 1, 'delete_capital_transaction', 'capital', 89, '{\"id\":89,\"trans_date\":\"2026-02-26\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"500.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u0986\\u09b0\\u09b6\\u09bf\\u09b0 \\u0986\\u09ae\\u09cd\\u09ae\\u09c1\",\"created_by\":1,\"created_at\":\"2026-02-26 15:27:57\"}', NULL, 'Deleted capital transaction ID: 89 Amount: 500.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:52:31'),
(32, 1, 'delete_capital_transaction', 'capital', 101, '{\"id\":101,\"trans_date\":\"2026-02-27\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"300.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09a4\\u09b0\\u09ae\\u09c1\\u099c\",\"created_by\":1,\"created_at\":\"2026-02-27 20:18:02\"}', NULL, 'Deleted capital transaction ID: 101 Amount: 300.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:52:35'),
(33, 1, 'delete_capital_transaction', 'capital', 92, '{\"id\":92,\"trans_date\":\"2026-02-26\",\"investor_id\":29,\"type\":\"withdrawal\",\"amount\":\"1500.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09a4\\u09c7\\u09b2+ \\u0995\\u09ae\\u09bf\\u09b6\\u09be\\u09a8\",\"created_by\":1,\"created_at\":\"2026-02-26 18:51:43\"}', NULL, 'Deleted capital transaction ID: 92 Amount: 1500.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:52:38'),
(34, 1, 'delete_capital_transaction', 'capital', 88, '{\"id\":88,\"trans_date\":\"2026-02-25\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"200.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09ac\\u09be\\u09b8\\u09be\\u09b0 \\u0996\\u09b0\\u099a\",\"created_by\":1,\"created_at\":\"2026-02-26 09:36:52\"}', NULL, 'Deleted capital transaction ID: 88 Amount: 200.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:52:43'),
(35, 1, 'delete_capital_transaction', 'capital', 86, '{\"id\":86,\"trans_date\":\"2026-02-24\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"1000.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09b0\\u09be\\u099c\\u09b6\\u09be\\u09b9\\u09c0 \\u09ad\\u09c1\\u09b2 \\u0995\\u09b0\\u09c7 \\u09ac\\u09c7\\u09b6\\u09bf \\u09a6\\u09c7\\u0996\\u09be\\u09a8\\u09cb \",\"created_by\":1,\"created_at\":\"2026-02-24 22:46:06\"}', NULL, 'Deleted capital transaction ID: 86 Amount: 1000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:52:47'),
(36, 1, 'delete_capital_transaction', 'capital', 87, '{\"id\":87,\"trans_date\":\"2026-02-25\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"400.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09ac\\u09be\\u09b8\\u09be\\u09b0 \\u09ab\\u09b2 \\u0995\\u09c7\\u09a8\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-25 17:20:19\"}', NULL, 'Deleted capital transaction ID: 87 Amount: 400.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:52:51'),
(37, 1, 'delete_capital_transaction', 'capital', 83, '{\"id\":83,\"trans_date\":\"2026-02-24\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"7000.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"TMSS \\u0995\\u09bf\\u09b8\\u09cd\\u09a4\\u09bf\",\"created_by\":1,\"created_at\":\"2026-02-24 10:06:50\"}', NULL, 'Deleted capital transaction ID: 83 Amount: 7000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:52:56'),
(38, 1, 'delete_capital_transaction', 'capital', 82, '{\"id\":82,\"trans_date\":\"2026-02-24\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"2000.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09ac\\u09bf\\u0995\\u09be\\u09b6 \\u09a5\\u09c7\\u0995\\u09c7 \\u09b2\\u09cb\\u09a8 \\u09a8\\u09c7\\u0993\\u09df\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-24 10:05:33\"}', NULL, 'Deleted capital transaction ID: 82 Amount: 2000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:53:00'),
(39, 1, 'delete_capital_transaction', 'capital', 78, '{\"id\":78,\"trans_date\":\"2026-02-23\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"3000.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u0986\\u09b0\\u09be\\u09ab\\u09be\\u09a4 \\u098f\\u09b0 \\u09a6\\u09cb\\u0995\\u09be\\u09a8 \\u09ac\\u09be\\u0995\\u09bf \\u09aa\\u09b0\\u09bf\\u09b6\\u09cb\\u09a7 \",\"created_by\":1,\"created_at\":\"2026-02-24 04:53:21\"}', NULL, 'Deleted capital transaction ID: 78 Amount: 3000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:53:03'),
(40, 1, 'delete_capital_transaction', 'capital', 77, '{\"id\":77,\"trans_date\":\"2026-02-23\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"1000.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u0986\\u09b0\\u09b6\\u09bf\\u09b0 \\u0986\\u09ae\\u09cd\\u09ae\\u09c1\",\"created_by\":1,\"created_at\":\"2026-02-24 04:52:06\"}', NULL, 'Deleted capital transaction ID: 77 Amount: 1000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:53:07'),
(41, 1, 'delete_capital_transaction', 'capital', 76, '{\"id\":76,\"trans_date\":\"2026-02-23\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"2800.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09b9\\u09be\\u09b8 \\u09ac\\u09be\\u09ac\\u09c1\\u09a6 (\\u09ae\\u09bf\\u099c\\u09be\\u09a8)\",\"created_by\":1,\"created_at\":\"2026-02-24 04:50:59\"}', NULL, 'Deleted capital transaction ID: 76 Amount: 2800.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:53:23'),
(42, 1, 'delete_capital_transaction', 'capital', 75, '{\"id\":75,\"trans_date\":\"2026-02-23\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"500.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u099a\\u09be\\u09b2 \\u0995\\u09c7\\u09a8\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-24 04:40:12\"}', NULL, 'Deleted capital transaction ID: 75 Amount: 500.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:53:31'),
(43, 1, 'delete_capital_transaction', 'capital', 74, '{\"id\":74,\"trans_date\":\"2026-02-22\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"400.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u099c\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-22 16:49:08\"}', NULL, 'Deleted capital transaction ID: 74 Amount: 400.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:53:58'),
(44, 1, 'delete_capital_transaction', 'capital', 73, '{\"id\":73,\"trans_date\":\"2026-02-22\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"2000.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u099c\\u09c1\\u09ae\\u09bf\\u09b0 \\u0995\\u09be\\u099c \\u0995\\u09b0\\u09be \\u09ac\\u09be\\u09ac\\u09c1\\u09a6\",\"created_by\":1,\"created_at\":\"2026-02-22 16:24:33\"}', NULL, 'Deleted capital transaction ID: 73 Amount: 2000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:54:03'),
(45, 1, 'delete_capital_transaction', 'capital', 72, '{\"id\":72,\"trans_date\":\"2026-02-22\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"400.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"\\u09ac\\u09bf\\u09a6\\u09cd\\u09af\\u09c1\\u09ce \\u09ac\\u09bf\\u09b2 \\u09a6\\u09c7\\u0993\\u09df\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-22 14:15:42\"}', NULL, 'Deleted capital transaction ID: 72 Amount: 400.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:54:19'),
(46, 1, 'delete_capital_transaction', 'capital', 71, '{\"id\":71,\"trans_date\":\"2026-02-22\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"5000.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"\\u09b0\\u09b8\\u09cd\\u09a4\\u09c1\\u09ae \\u09ae\\u09be\\u09ae\\u09be (\\u09b6\\u09cd\\u09ac\\u09be\\u09b6\\u09c1\\u09dc\\u09bf\\u0995\\u09c7 \\u09a6\\u09c7\\u0993\\u09df\\u09be)\",\"created_by\":1,\"created_at\":\"2026-02-22 13:11:48\"}', NULL, 'Deleted capital transaction ID: 71 Amount: 5000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:54:23'),
(47, 1, 'delete_capital_transaction', 'capital', 70, '{\"id\":70,\"trans_date\":\"2026-02-22\",\"investor_id\":29,\"type\":\"injection\",\"amount\":\"22000.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"\\u09ab\\u09bf\\u09a1\\u09c7\\u09b0 \\u099f\\u09be\\u0995\\u09be \\u099c\\u09cb\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-22 13:10:01\"}', NULL, 'Deleted capital transaction ID: 70 Amount: 22000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:54:28'),
(48, 1, 'delete_capital_transaction', 'capital', 105, '{\"id\":105,\"trans_date\":\"2026-02-28\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"800.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u099c\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-28 19:59:45\"}', NULL, 'Deleted capital transaction ID: 105 Amount: 800.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:54:34'),
(49, 1, 'delete_capital_transaction', 'capital', 109, '{\"id\":109,\"trans_date\":\"2026-03-02\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"1520.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09ac\\u09be\\u099c\\u09be\\u09b0\",\"created_by\":1,\"created_at\":\"2026-03-02 16:50:26\"}', NULL, 'Deleted capital transaction ID: 109 Amount: 1520.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:54:38'),
(50, 1, 'delete_capital_transaction', 'capital', 110, '{\"id\":110,\"trans_date\":\"2026-03-02\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"218500.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u0986\\u0997\\u09c7 RB Agro \\u099f\\u09be\\u0995\\u09be \\u09a6\\u09c7\\u0993\\u09df\\u09be \\u09b8\\u09c7\\u0987\\u099f\\u09be \\u098f\\u09a1\\u099c\\u09be\\u09b8\\u09cd\\u099f \\u0995\\u09b0\\u09be\",\"created_by\":1,\"created_at\":\"2026-03-02 21:13:51\"}', NULL, 'Deleted capital transaction ID: 110 Amount: 218500.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:54:45'),
(51, 1, 'delete_capital_transaction', 'capital', 108, '{\"id\":108,\"trans_date\":\"2026-03-02\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"760.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09ac\\u09be\\u099c\\u09be\\u09b0\",\"created_by\":1,\"created_at\":\"2026-03-02 16:15:27\"}', NULL, 'Deleted capital transaction ID: 108 Amount: 760.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:54:51'),
(52, 1, 'delete_capital_transaction', 'capital', 107, '{\"id\":107,\"trans_date\":\"2026-03-02\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"1500.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u099c\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-03-02 16:14:29\"}', NULL, 'Deleted capital transaction ID: 107 Amount: 1500.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:55:23'),
(53, 1, 'delete_capital_transaction', 'capital', 106, '{\"id\":106,\"trans_date\":\"2026-02-28\",\"investor_id\":29,\"type\":\"withdrawal\",\"amount\":\"1500.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09a4\\u09c7\\u09b2+ \\u0995\\u09ae\\u09bf\\u09b6\\u09be\\u09a8\",\"created_by\":1,\"created_at\":\"2026-02-28 20:00:31\"}', NULL, 'Deleted capital transaction ID: 106 Amount: 1500.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:55:29'),
(54, 1, 'delete_capital_transaction', 'capital', 102, '{\"id\":102,\"trans_date\":\"2026-02-27\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"1200.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09a8\\u09bf\\u099c\",\"created_by\":1,\"created_at\":\"2026-02-27 20:19:02\"}', NULL, 'Deleted capital transaction ID: 102 Amount: 1200.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:55:34'),
(55, 1, 'delete_capital_transaction', 'capital', 97, '{\"id\":97,\"trans_date\":\"2026-02-27\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"200.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u0986\\u09b0\\u09b6\\u09bf\\u09b0 \\u0986\\u09ae\\u09cd\\u09ae\\u09c1\",\"created_by\":1,\"created_at\":\"2026-02-27 15:01:32\"}', NULL, 'Deleted capital transaction ID: 97 Amount: 200.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:55:38'),
(56, 1, 'delete_capital_transaction', 'capital', 95, '{\"id\":95,\"trans_date\":\"2026-02-27\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"4000.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09a6\\u09be\\u09ac\\u09bf \\u0995\\u09bf\\u09b8\\u09cd\\u09a4\\u09bf\",\"created_by\":1,\"created_at\":\"2026-02-27 11:24:26\"}', NULL, 'Deleted capital transaction ID: 95 Amount: 4000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:55:42'),
(57, 1, 'delete_capital_transaction', 'capital', 98, '{\"id\":98,\"trans_date\":\"2026-02-27\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"1000.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09ae\\u09bf\\u09b8\\u09c1\\u0995\\u09c7 \\u09a6\\u09c7\\u0993\\u09df\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-27 19:41:42\"}', NULL, 'Deleted capital transaction ID: 98 Amount: 1000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:55:47'),
(58, 1, 'delete_capital_transaction', 'capital', 100, '{\"id\":100,\"trans_date\":\"2026-02-27\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"1000.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09b0\\u09be\\u09b8\\u09c7\\u09b2\",\"created_by\":1,\"created_at\":\"2026-02-27 20:17:16\"}', NULL, 'Deleted capital transaction ID: 100 Amount: 1000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:55:52'),
(59, 1, 'login', 'auth', 1, NULL, NULL, 'User logged in successfully', '43.245.121.191', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 10:56:04'),
(60, 1, 'delete_capital_transaction', 'capital', 99, '{\"id\":99,\"trans_date\":\"2026-02-27\",\"investor_id\":29,\"type\":\"injection\",\"amount\":\"2200.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09ab\\u09bf\\u09a1\\u09c7\\u09b0 \\u099f\\u09be\\u0995\\u09be \",\"created_by\":1,\"created_at\":\"2026-02-27 19:43:30\"}', NULL, 'Deleted capital transaction ID: 99 Amount: 2200.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:56:09'),
(61, 1, 'delete_capital_transaction', 'capital', 94, '{\"id\":94,\"trans_date\":\"2026-02-26\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"1500.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u0986\\u09b0\\u09be\\u09ab\\u09be\\u09a4 \\u098f\\u09b0 \\u09ac\\u09be\\u0995\\u09bf \\u09aa\\u09b0\\u09bf\\u09b6\\u09cb\\u09a7 \",\"created_by\":1,\"created_at\":\"2026-02-26 22:59:22\"}', NULL, 'Deleted capital transaction ID: 94 Amount: 1500.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:56:15'),
(62, 1, 'delete_capital_transaction', 'capital', 66, '{\"id\":66,\"trans_date\":\"2026-02-21\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"45000.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09b6\\u09be\\u09b6\\u09c1\\u09dc\\u09c0\\u0995\\u09c7 \\u099f\\u09be\\u0995\\u09be \\u099c\\u09ae\\u09be \\u09a6\\u09c7\\u0993\\u09df\\u09be (\\u09b0\\u09cb\\u09b8\\u09cd\\u09a4\\u09ae \\u09ae\\u09be\\u09ae\\u09be)\",\"created_by\":1,\"created_at\":\"2026-02-21 20:30:50\"}', NULL, 'Deleted capital transaction ID: 66 Amount: 45000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:56:27'),
(63, 1, 'delete_capital_transaction', 'capital', 93, '{\"id\":93,\"trans_date\":\"2026-02-26\",\"investor_id\":29,\"type\":\"injection\",\"amount\":\"9800.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09ab\\u09bf\\u09a1\\u09c7\\u09b0 \\u099f\\u09be\\u0995\\u09be \",\"created_by\":1,\"created_at\":\"2026-02-26 22:58:24\"}', NULL, 'Deleted capital transaction ID: 93 Amount: 9800.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:56:43'),
(64, 1, 'delete_capital_transaction', 'capital', 85, '{\"id\":85,\"trans_date\":\"2026-02-24\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"211000.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09b0\\u09be\\u099c\\u09b6\\u09be\\u09b9\\u09c0 \\u09a5\\u09c7\\u0995\\u09c7 \\u0985\\u09a8\\u09b2\\u09be\\u0987\\u09a8 \\u0995\\u09b0\\u09be RB Agro\",\"created_by\":1,\"created_at\":\"2026-02-24 22:40:12\"}', NULL, 'Deleted capital transaction ID: 85 Amount: 211000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:56:50'),
(65, 1, 'delete_capital_transaction', 'capital', 64, '{\"id\":64,\"trans_date\":\"2026-02-21\",\"investor_id\":29,\"type\":\"injection\",\"amount\":\"20000.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"\\u09ab\\u09bf\\u09a1\\u09c7\\u09b0 \\u099f\\u09be\\u0995\\u09be \\u099c\\u09cb\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-21 16:42:22\"}', NULL, 'Deleted capital transaction ID: 64 Amount: 20000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:57:02'),
(66, 1, 'delete_capital_transaction', 'capital', 63, '{\"id\":63,\"trans_date\":\"2026-02-20\",\"investor_id\":29,\"type\":\"injection\",\"amount\":\"10000.00\",\"method\":\"mobile\",\"reference\":null,\"description\":\"\\u099c\\u09cb\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-20 22:38:36\"}', NULL, 'Deleted capital transaction ID: 63 Amount: 10000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:57:14'),
(67, 1, 'delete_capital_transaction', 'capital', 54, '{\"id\":54,\"trans_date\":\"2026-02-19\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"500.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"\\u0986\\u09b0\\u09b6\\u09c0\\u09b0 \\u0986\\u09ae\\u09cd\\u09ae\\u09c1\\u0995\\u09c7 \\u09a6\\u09c7\\u0993\\u09df\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-19 11:09:48\"}', NULL, 'Deleted capital transaction ID: 54 Amount: 500.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:57:21'),
(68, 1, 'delete_capital_transaction', 'capital', 59, '{\"id\":59,\"trans_date\":\"2026-02-19\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"250.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"\\u09ac\\u09be\\u09dc\\u09bf\\u09b0 \\u099c\\u09a8\\u09cd\\u09af  \\u0996\\u09c7\\u099c\\u09c1\\u09b0 \\u0995\\u09c7\\u09a8\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-19 15:56:21\"}', NULL, 'Deleted capital transaction ID: 59 Amount: 250.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:57:26'),
(69, 1, 'delete_capital_transaction', 'capital', 58, '{\"id\":58,\"trans_date\":\"2026-02-19\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"500.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"\\u0996\\u09c7\\u099c\\u09c1\\u09b0 \\u0995\\u09cd\\u09b0\\u09df\",\"created_by\":1,\"created_at\":\"2026-02-19 14:18:22\"}', NULL, 'Deleted capital transaction ID: 58 Amount: 500.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:57:30'),
(70, 1, 'delete_capital_transaction', 'capital', 65, '{\"id\":65,\"trans_date\":\"2026-02-21\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"480.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u099c\\u09cb\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-21 20:27:42\"}', NULL, 'Deleted capital transaction ID: 65 Amount: 480.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:57:37'),
(71, 1, 'delete_capital_transaction', 'capital', 57, '{\"id\":57,\"trans_date\":\"2026-02-19\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"400.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"\\u099f\\u09bf, \\u09b8\\u09bf, \\u09ac\\u09bf\",\"created_by\":1,\"created_at\":\"2026-02-19 13:34:08\"}', NULL, 'Deleted capital transaction ID: 57 Amount: 400.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:57:42'),
(72, 1, 'delete_capital_transaction', 'capital', 43, '{\"id\":43,\"trans_date\":\"2026-02-17\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"10000.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09ab\\u09be\\u0987\\u09b8\\u09be\\u09b2 \\u09ad\\u09be\\u0987 \\u099c\\u09cb\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-17 14:20:43\"}', NULL, 'Deleted capital transaction ID: 43 Amount: 10000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:57:49'),
(73, 1, 'delete_capital_transaction', 'capital', 53, '{\"id\":53,\"trans_date\":\"2026-02-18\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"2555.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"\\u09ac\\u09be\\u099c\\u09be\\u09b0\",\"created_by\":1,\"created_at\":\"2026-02-18 22:43:23\"}', NULL, 'Deleted capital transaction ID: 53 Amount: 2555.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:57:55'),
(74, 1, 'delete_capital_transaction', 'capital', 61, '{\"id\":61,\"trans_date\":\"2026-02-20\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"780.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09ae\\u09c7\\u09a1\\u09bf\\u09b8\\u09bf\\u09a8\",\"created_by\":1,\"created_at\":\"2026-02-20 13:06:57\"}', NULL, 'Deleted capital transaction ID: 61 Amount: 780.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:58:02'),
(75, 1, 'delete_capital_transaction', 'capital', 49, '{\"id\":49,\"trans_date\":\"2026-02-18\",\"investor_id\":29,\"type\":\"injection\",\"amount\":\"5000.00\",\"method\":\"mobile\",\"reference\":null,\"description\":\"\\u099c\\u09cb\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-18 20:59:39\"}', NULL, 'Deleted capital transaction ID: 49 Amount: 5000.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:58:06'),
(76, 1, 'delete_capital_transaction', 'capital', 52, '{\"id\":52,\"trans_date\":\"2026-02-18\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"575.00\",\"method\":\"mobile\",\"reference\":null,\"description\":\"\\u0997\\u09be\\u09dc\\u09bf\\u09b0 \\u09a4\\u09c7\\u09b2\",\"created_by\":1,\"created_at\":\"2026-02-18 21:02:34\"}', NULL, 'Deleted capital transaction ID: 52 Amount: 575.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:58:20'),
(77, 1, 'delete_capital_transaction', 'capital', 45, '{\"id\":45,\"trans_date\":\"2026-02-17\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"400.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09ac\\u09be\\u099c\\u09be\\u09b0\",\"created_by\":1,\"created_at\":\"2026-02-17 14:57:51\"}', NULL, 'Deleted capital transaction ID: 45 Amount: 400.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:58:25'),
(78, 1, 'delete_capital_transaction', 'capital', 50, '{\"id\":50,\"trans_date\":\"2026-02-18\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"1500.00\",\"method\":\"mobile\",\"reference\":null,\"description\":\"\\u099c\\u09cb\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-18 21:00:42\"}', NULL, 'Deleted capital transaction ID: 50 Amount: 1500.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:58:38'),
(79, 1, 'delete_capital_transaction', 'capital', 62, '{\"id\":62,\"trans_date\":\"2026-02-20\",\"investor_id\":29,\"type\":\"withdrawal\",\"amount\":\"1500.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"\\u09ae\\u09c1\\u09b0\\u0997\\u09c0 \\u09a4\\u09c7\\u09be\\u09b2\\u09be \\u0995\\u09ae\\u09bf\\u09b6\\u09be\\u09a8\",\"created_by\":1,\"created_at\":\"2026-02-20 17:58:24\"}', NULL, 'Deleted capital transaction ID: 62 Amount: 1500.00', '103.253.47.174', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36', '2026-03-17 10:58:42'),
(80, 1, 'update_user', 'Updated user: admin (admin)', NULL, NULL, NULL, NULL, '43.245.121.191', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 11:00:24'),
(81, 1, 'delete', 'financial_accounts', 18, '\"HARD DELETE: Cash\"', NULL, NULL, '43.245.121.191', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 11:04:42'),
(82, 1, 'delete', 'financial_accounts', 19, '\"HARD DELETE: Bank\"', NULL, NULL, '43.245.121.191', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 11:04:49'),
(83, 1, 'delete', 'financial_accounts', 20, '\"HARD DELETE: Mobile Banking\"', NULL, NULL, '43.245.121.191', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 11:04:59'),
(84, 1, 'create', 'financial_accounts', 21, '\"Created account: \\u0995\\u09cd\\u09af\\u09be\\u09b6\"', NULL, NULL, '43.245.121.191', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 11:09:05'),
(85, 1, 'create', 'financial_accounts', 22, '\"Created account: \\u09ac\\u09cd\\u09af\\u09be\\u0982\\u0995\"', NULL, NULL, '43.245.121.191', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 11:09:35'),
(86, 1, 'update', 'financial_accounts', 22, '\"Updated account: \\u0985\\u0997\\u09cd\\u09b0\\u09a3\\u09c0 \\u09ac\\u09cd\\u09af\\u09be\\u0982\\u0995\"', NULL, NULL, '43.245.121.191', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 11:10:12'),
(87, 1, 'create', 'financial_accounts', 23, '\"Created account: \\u09ac\\u09bf\\u0995\\u09be\\u09b6\"', NULL, NULL, '43.245.121.191', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 11:10:30'),
(88, 1, 'delete_capital_transaction', 'capital', 104, '{\"id\":104,\"trans_date\":\"2026-02-28\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"100.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u0994\\u09b7\\u09a7 \",\"created_by\":1,\"created_at\":\"2026-02-28 07:58:04\"}', NULL, 'Deleted capital transaction ID: 104 Amount: 100.00', '43.245.121.191', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 11:11:15'),
(89, 1, 'delete_capital_transaction', 'capital', 103, '{\"id\":103,\"trans_date\":\"2026-02-27\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"2400.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09a8\\u09bf\\u099c\",\"created_by\":1,\"created_at\":\"2026-02-27 20:19:51\"}', NULL, 'Deleted capital transaction ID: 103 Amount: 2400.00', '43.245.121.191', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 11:11:21'),
(90, 1, 'delete_capital_transaction', 'capital', 96, '{\"id\":96,\"trans_date\":\"2026-02-27\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"1500.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09b0\\u09c1\\u09b8\\u09cd\\u09a4\\u09c1\\u09ae \\u09ae\\u09be\\u09ae\\u09be \\u09a7\\u09be\\u09b0\",\"created_by\":1,\"created_at\":\"2026-02-27 15:00:56\"}', NULL, 'Deleted capital transaction ID: 96 Amount: 1500.00', '43.245.121.191', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 11:11:31'),
(91, 1, 'delete_capital_transaction', 'capital', 32, '{\"id\":32,\"trans_date\":\"2026-02-12\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"1000.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u0986\\u09b0\\u09b6\\u09c0 \\u0986\\u09ae\\u09cd\\u09ae\\u09c1\",\"created_by\":1,\"created_at\":\"2026-02-12 10:24:46\"}', NULL, 'Deleted capital transaction ID: 32 Amount: 1000.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:12:21'),
(92, 1, 'delete_capital_transaction', 'capital', 80, '{\"id\":80,\"trans_date\":\"2026-02-12\",\"investor_id\":29,\"type\":\"injection\",\"amount\":\"5200.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09ab\\u09bf\\u09a1\\u09c7\\u09b0 \\u0997\\u09be\\u09dc\\u09bf \\u09ad\\u09be\\u09b0\\u09be \\u099c\\u09cb\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-24 04:56:16\"}', NULL, 'Deleted capital transaction ID: 80 Amount: 5200.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:12:53'),
(93, 1, 'delete_capital_transaction', 'capital', 37, '{\"id\":37,\"trans_date\":\"2026-02-15\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"200000.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"Dbbl joma\",\"created_by\":1,\"created_at\":\"2026-02-15 23:08:20\"}', NULL, 'Deleted capital transaction ID: 37 Amount: 200000.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:12:56'),
(94, 1, 'delete_capital_transaction', 'capital', 44, '{\"id\":44,\"trans_date\":\"2026-02-17\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"300.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u099c\\u09c1\\u09ae\\u09bf \\u09b2\\u09be\\u0997\\u09be\\u09a8\\u09be \\u09ac\\u09bf\\u09b2\",\"created_by\":1,\"created_at\":\"2026-02-17 14:55:36\"}', NULL, 'Deleted capital transaction ID: 44 Amount: 300.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:00'),
(95, 1, 'delete_capital_transaction', 'capital', 46, '{\"id\":46,\"trans_date\":\"2026-02-17\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"100.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09ac\\u09be\\u099c\\u09be\\u09b0\",\"created_by\":1,\"created_at\":\"2026-02-17 14:58:08\"}', NULL, 'Deleted capital transaction ID: 46 Amount: 100.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:03'),
(96, 1, 'delete_capital_transaction', 'capital', 47, '{\"id\":47,\"trans_date\":\"2026-02-17\",\"investor_id\":29,\"type\":\"injection\",\"amount\":\"10000.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09ab\\u09bf\\u09a1\\u09c7\\u09b0 \\u099f\\u09be\\u0995\\u09be \\u099c\\u09cb\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-17 20:00:33\"}', NULL, 'Deleted capital transaction ID: 47 Amount: 10000.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:10'),
(97, 1, 'delete_capital_transaction', 'capital', 40, '{\"id\":40,\"trans_date\":\"2026-02-16\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"1500.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09a6\\u09cb\\u0995\\u09be\\u09a8 \\u09ac\\u09be\\u0995\\u09bf \\u09aa\\u09b0\\u09bf\\u09b6\\u09cb\\u09a7\",\"created_by\":1,\"created_at\":\"2026-02-16 13:10:43\"}', NULL, 'Deleted capital transaction ID: 40 Amount: 1500.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:13'),
(98, 1, 'delete_capital_transaction', 'capital', 35, '{\"id\":35,\"trans_date\":\"2026-02-14\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"1500.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09ae\\u09be\\u099b\\u09c7\\u09b0 \\u09a6\\u09be\\u09ae\",\"created_by\":1,\"created_at\":\"2026-02-14 08:49:38\"}', NULL, 'Deleted capital transaction ID: 35 Amount: 1500.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:17'),
(99, 1, 'delete_capital_transaction', 'capital', 41, '{\"id\":41,\"trans_date\":\"2026-02-16\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"500.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u0997\\u09be\\u09dc\\u09bf\\u09b0 \\u09a4\\u09c7\\u09b2 + \\u09a8\\u09bf\\u099c \\u09b9\\u09be\\u09a4 \\u0996\\u09b0\\u099a\",\"created_by\":1,\"created_at\":\"2026-02-16 17:33:09\"}', NULL, 'Deleted capital transaction ID: 41 Amount: 500.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:20'),
(100, 1, 'delete_capital_transaction', 'capital', 48, '{\"id\":48,\"trans_date\":\"2026-02-17\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"10000.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09ab\\u09be\\u09df\\u09b8\\u09be\\u09b2 \\u09ad\\u09be\\u0987 \\u0995\\u09c7 \\u09a6\\u09c7\\u0993\\u09df\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-17 21:11:48\"}', NULL, 'Deleted capital transaction ID: 48 Amount: 10000.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:24'),
(101, 1, 'delete_capital_transaction', 'capital', 84, '{\"id\":84,\"trans_date\":\"2026-02-24\",\"investor_id\":29,\"type\":\"withdrawal\",\"amount\":\"77500.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u0986\\u09a6\\u09ae\\/ \\u09a6\\u09c1\\u09b2\\u09c1 \\u09ab\\u09bf\\u09a1 \\u09ac\\u09bf\\u0995\\u09cd\\u09b0\\u09df\\u09c7\\u09b0 \\u099f\\u09be\\u0995\\u09be \\u09a8\\u09c7\\u0993\\u09df\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-24 10:31:40\"}', NULL, 'Deleted capital transaction ID: 84 Amount: 77500.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:27'),
(102, 1, 'delete_capital_transaction', 'capital', 60, '{\"id\":60,\"trans_date\":\"2026-02-19\",\"investor_id\":29,\"type\":\"withdrawal\",\"amount\":\"1000.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09ae\\u09c1\\u09b0\\u0997\\u09bf \\u09a4\\u09cb\\u09b2\\u09be \\u0995\\u09ae\\u09bf\\u09b6\\u09be\\u09a8\",\"created_by\":1,\"created_at\":\"2026-02-19 23:40:42\"}', NULL, 'Deleted capital transaction ID: 60 Amount: 1000.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:31'),
(103, 1, 'delete_capital_transaction', 'capital', 56, '{\"id\":56,\"trans_date\":\"2026-02-19\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"1100.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"\\u0986\\u09b0\\u09b6\\u09c0 \\u09aa\\u09cd\\u09b0\\u09be\\u0987\\u09ad\\u09c7\\u099f \\u098f\\u09b0 \\u09ac\\u09c7\\u09a4\\u09c1\\u09a8\",\"created_by\":1,\"created_at\":\"2026-02-19 11:11:28\"}', NULL, 'Deleted capital transaction ID: 56 Amount: 1100.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:35'),
(104, 1, 'delete_capital_transaction', 'capital', 55, '{\"id\":55,\"trans_date\":\"2026-02-19\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"500.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"\\u09aa\\u09be\\u09b0\\u09cd\\u09b8\\u09c7\\u09b2\",\"created_by\":1,\"created_at\":\"2026-02-19 11:10:38\"}', NULL, 'Deleted capital transaction ID: 55 Amount: 500.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:39'),
(105, 1, 'delete_capital_transaction', 'capital', 51, '{\"id\":51,\"trans_date\":\"2026-02-18\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"120.00\",\"method\":\"mobile\",\"reference\":null,\"description\":\"\\u0994\\u09b7\\u09a7 \\u0995\\u09c7\\u09a8\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-18 21:01:43\"}', NULL, 'Deleted capital transaction ID: 51 Amount: 120.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:42'),
(106, 1, 'delete_capital_transaction', 'capital', 22, '{\"id\":22,\"trans_date\":\"2026-01-27\",\"investor_id\":29,\"type\":\"withdrawal\",\"amount\":\"147000.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"Murgi kena babud\",\"created_by\":1,\"created_at\":\"2026-02-11 16:06:32\"}', NULL, 'Deleted capital transaction ID: 22 Amount: 147000.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:45');
INSERT INTO `activity_logs` (`id`, `user_id`, `action`, `table_name`, `record_id`, `old_values`, `new_values`, `description`, `ip_address`, `user_agent`, `created_at`) VALUES
(107, 1, 'delete_capital_transaction', 'capital', 21, '{\"id\":21,\"trans_date\":\"2026-01-26\",\"investor_id\":29,\"type\":\"injection\",\"amount\":\"162000.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"Feed kena babud\",\"created_by\":1,\"created_at\":\"2026-02-11 15:51:24\"}', NULL, 'Deleted capital transaction ID: 21 Amount: 162000.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:48'),
(108, 1, 'delete_capital_transaction', 'capital', 79, '{\"id\":79,\"trans_date\":\"2026-01-27\",\"investor_id\":29,\"type\":\"injection\",\"amount\":\"3000.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\\u09ab\\u09bf\\u09a1\\u09c7\\u09b0 \\u0997\\u09be\\u09dc\\u09bf \\u09ad\\u09be\\u09b0\\u09be \\u099c\\u09cb\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-24 04:54:52\"}', NULL, 'Deleted capital transaction ID: 79 Amount: 3000.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:51'),
(109, 1, 'delete_capital_transaction', 'capital', 24, '{\"id\":24,\"trans_date\":\"2026-02-07\",\"investor_id\":29,\"type\":\"injection\",\"amount\":\"10000.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"Office joma\",\"created_by\":1,\"created_at\":\"2026-02-11 16:23:05\"}', NULL, 'Deleted capital transaction ID: 24 Amount: 10000.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:54'),
(110, 1, 'delete_capital_transaction', 'capital', 36, '{\"id\":36,\"trans_date\":\"2026-02-08\",\"investor_id\":29,\"type\":\"withdrawal\",\"amount\":\"50000.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u0986\\u09a6\\u09ae \\u09ae\\u09be\\u09ae\\u09be\\u09b0 \\u0995\\u09be\\u099b\\u09c7 \\u09a5\\u09c7\\u0995\\u09c7 \\u09ab\\u09bf\\u09a1 \\u09ac\\u09bf\\u0995\\u09cd\\u09b0\\u09bf\\u09b0\\u09b0 \\u099f\\u09be\\u0995\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-15 20:37:31\"}', NULL, 'Deleted capital transaction ID: 36 Amount: 50000.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:56'),
(111, 1, 'delete_capital_transaction', 'capital', 20, '{\"id\":20,\"trans_date\":\"2026-02-11\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"1500.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"Deposit to DBBL accounts\",\"created_by\":1,\"created_at\":\"2026-02-11 15:49:16\"}', NULL, 'Deleted capital transaction ID: 20 Amount: 1500.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:13:59'),
(112, 1, 'delete_capital_transaction', 'capital', 28, '{\"id\":28,\"trans_date\":\"2026-02-11\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"423.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"Error fixed\",\"created_by\":1,\"created_at\":\"2026-02-11 17:16:18\"}', NULL, 'Deleted capital transaction ID: 28 Amount: 423.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:14:02'),
(113, 1, 'delete_capital_transaction', 'capital', 30, '{\"id\":30,\"trans_date\":\"2026-02-12\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"200.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09b8\\u09df\\u09be\\u09ac\\u09bf\\u09a8 \\u09a4\\u09c7\\u09b2\",\"created_by\":1,\"created_at\":\"2026-02-12 06:53:31\"}', NULL, 'Deleted capital transaction ID: 30 Amount: 200.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:14:05'),
(114, 1, 'delete_capital_transaction', 'capital', 42, '{\"id\":42,\"trans_date\":\"2026-02-17\",\"investor_id\":29,\"type\":\"injection\",\"amount\":\"700.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u099c\\u09cb\\u09ae\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-17 14:19:57\"}', NULL, 'Deleted capital transaction ID: 42 Amount: 700.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:14:08'),
(115, 1, 'delete_capital_transaction', 'capital', 34, '{\"id\":34,\"trans_date\":\"2026-02-13\",\"investor_id\":29,\"type\":\"withdrawal\",\"amount\":\"1500.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u0995\\u09ae\\u09bf\\u09b6\\u09be\\u09a8+ \\u09a4\\u09c7\\u09b2\",\"created_by\":1,\"created_at\":\"2026-02-13 20:43:46\"}', NULL, 'Deleted capital transaction ID: 34 Amount: 1500.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:14:11'),
(116, 1, 'delete_capital_transaction', 'capital', 39, '{\"id\":39,\"trans_date\":\"2026-02-16\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"6400.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09b8\\u09c7\\u099f\\u09c7\\u09b0 \\u09a8\\u09c7\\u099f \\u0995\\u09bf\\u09a8\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-16 11:49:24\"}', NULL, 'Deleted capital transaction ID: 39 Amount: 6400.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:14:13'),
(117, 1, 'delete_capital_transaction', 'capital', 38, '{\"id\":38,\"trans_date\":\"2026-02-16\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"2000.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09a7\\u09be\\u09b0 \\u09aa\\u09b0\\u09bf\\u09b6\\u09a7\",\"created_by\":1,\"created_at\":\"2026-02-16 10:30:27\"}', NULL, 'Deleted capital transaction ID: 38 Amount: 2000.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:14:16'),
(118, 1, 'delete_capital_transaction', 'capital', 33, '{\"id\":33,\"trans_date\":\"2026-02-13\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"300.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09a8\\u09bf\\u099c\",\"created_by\":1,\"created_at\":\"2026-02-13 09:04:17\"}', NULL, 'Deleted capital transaction ID: 33 Amount: 300.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:14:19'),
(119, 1, 'delete_capital_transaction', 'capital', 31, '{\"id\":31,\"trans_date\":\"2026-02-12\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"500.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u0986\\u09b0\\u09b6\\u09c0 \\u0986\\u09ae\\u09cd\\u09ae\\u09c1\",\"created_by\":1,\"created_at\":\"2026-02-12 10:23:49\"}', NULL, 'Deleted capital transaction ID: 31 Amount: 500.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:14:23'),
(120, 1, 'delete_capital_transaction', 'capital', 29, '{\"id\":29,\"trans_date\":\"2026-02-11\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"150.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"\\u09b2\\u09be\\u09a1\\u09a1\\u09c1 \\u0995\\u09c7\\u09a8\\u09be\",\"created_by\":1,\"created_at\":\"2026-02-11 19:15:22\"}', NULL, 'Deleted capital transaction ID: 29 Amount: 150.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:14:25'),
(121, 1, 'delete_capital_transaction', 'capital', 26, '{\"id\":26,\"trans_date\":\"2026-02-11\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"2000.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"Aroshy ammu khoros\",\"created_by\":1,\"created_at\":\"2026-02-11 16:25:16\"}', NULL, 'Deleted capital transaction ID: 26 Amount: 2000.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:14:28'),
(122, 1, 'delete_capital_transaction', 'capital', 23, '{\"id\":23,\"trans_date\":\"2026-02-11\",\"investor_id\":29,\"type\":\"injection\",\"amount\":\"113500.00\",\"method\":\"bank\",\"reference\":null,\"description\":\"Feed kena babud\",\"created_by\":1,\"created_at\":\"2026-02-11 16:08:18\"}', NULL, 'Deleted capital transaction ID: 23 Amount: 113500.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:14:31'),
(123, 1, 'delete_capital_transaction', 'capital', 25, '{\"id\":25,\"trans_date\":\"2026-02-11\",\"investor_id\":10,\"type\":\"withdrawal\",\"amount\":\"5500.00\",\"method\":\"cash\",\"reference\":null,\"description\":\"Basa vara\",\"created_by\":1,\"created_at\":\"2026-02-11 16:24:18\"}', NULL, 'Deleted capital transaction ID: 25 Amount: 5500.00', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:14:33'),
(124, 1, 'delete_investor', 'capital', 29, NULL, NULL, 'Deleted investor ID: 29', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:14:58'),
(125, 1, 'update_investor', 'capital', 10, '{\"id\":10,\"type\":\"investor\",\"name\":\"Owner (Me)\",\"email\":\"\",\"image\":null,\"phone\":\"01723219162\",\"company_name\":null,\"address\":null,\"credit_limit\":\"0.00\",\"created_at\":\"2026-02-08 23:49:20\",\"opening_balance\":\"0.00\",\"balance\":\"0.00\",\"opening_balance_date\":null}', '{\"name\":\"Owner (Me)\",\"phone\":\"01724356876\",\"email\":\"\"}', 'Updated investor: Owner (Me)', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:16:11'),
(126, 1, 'update_investor', 'capital', 10, '{\"id\":10,\"type\":\"investor\",\"name\":\"Owner (Me)\",\"email\":\"\",\"image\":null,\"phone\":\"01724356876\",\"company_name\":null,\"address\":null,\"credit_limit\":\"0.00\",\"created_at\":\"2026-02-08 23:49:20\",\"opening_balance\":\"0.00\",\"balance\":\"0.00\",\"opening_balance_date\":null}', '{\"name\":\"Dewan MD Mahmudul Hasan Mamun (Me)\",\"phone\":\"01724356876\",\"email\":\"\"}', 'Updated investor: Dewan MD Mahmudul Hasan Mamun (Me)', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:17:13'),
(127, 1, 'update_settings', 'settings', NULL, NULL, '{\"csrf_token\":\"791cb3c40e266d5deedb28e561e34921fc556cca0ab72471898a11c6542a61cf\",\"company_name\":\"Dewan Traders\",\"company_email\":\"admin@example.com\",\"company_phone\":\"01724356876\",\"currency_symbol\":\"\\u09f3\",\"timezone\":\"Asia\\/Dhaka\",\"tax_id\":\"\",\"default_tax_rate\":\"0\",\"company_address\":\"Joypurhat\"}', 'Updated system settings', '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:17:55'),
(128, 1, 'delete_user', 'Deleted user: Cashier User (ID: 3)', NULL, NULL, NULL, NULL, '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:18:20'),
(129, 1, 'delete_user', 'Deleted user: Manager User (ID: 2)', NULL, NULL, NULL, NULL, '43.245.121.191', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-17 11:18:22'),
(130, 1, 'Capital Injected', 'capital', 113, NULL, NULL, 'Amount: ৳20,000.00 via Account ID: bank', '43.245.121.191', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 11:25:17'),
(131, 1, 'login', 'auth', 1, NULL, NULL, 'User logged in successfully', '157.15.222.244', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 15:45:53'),
(132, 1, 'delete_capital_transaction', 'capital', 113, '{\"id\":113,\"trans_date\":\"2026-03-17\",\"investor_id\":10,\"type\":\"injection\",\"amount\":\"20000.00\",\"method\":\"\",\"reference\":\"\",\"description\":\"\",\"created_by\":1,\"created_at\":\"2026-03-17 17:25:17\"}', NULL, 'Deleted capital transaction ID: 113 Amount: 20000.00', '157.15.222.244', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 15:48:45'),
(133, 1, 'update', 'financial_accounts', 22, '\"Updated account: \\u0985\\u0997\\u09cd\\u09b0\\u09a3\\u09c0 \\u09ac\\u09cd\\u09af\\u09be\\u0982\\u0995\"', NULL, NULL, '157.15.222.244', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '2026-03-17 15:50:12'),
(134, 1, 'login', 'auth', 1, NULL, NULL, 'User logged in successfully', '103.204.208.120', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-03-24 07:48:55');

-- --------------------------------------------------------

--
-- Table structure for table `capital_transactions`
--

CREATE TABLE `capital_transactions` (
  `id` int(10) UNSIGNED NOT NULL,
  `trans_date` date NOT NULL,
  `investor_id` int(10) UNSIGNED NOT NULL,
  `type` enum('injection','withdrawal') NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `method` enum('cash','bank','mobile') DEFAULT 'cash',
  `reference` varchar(100) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `created_by` int(10) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `contacts`
--

CREATE TABLE `contacts` (
  `id` int(10) UNSIGNED NOT NULL,
  `type` enum('customer','supplier','investor') NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `company_name` varchar(255) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `credit_limit` decimal(12,2) DEFAULT 0.00,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `opening_balance` decimal(12,2) DEFAULT 0.00,
  `balance` decimal(10,2) DEFAULT 0.00,
  `opening_balance_date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `contacts`
--

INSERT INTO `contacts` (`id`, `type`, `name`, `email`, `image`, `phone`, `company_name`, `address`, `credit_limit`, `created_at`, `opening_balance`, `balance`, `opening_balance_date`) VALUES
(10, 'investor', 'Dewan MD Mahmudul Hasan Mamun (Me)', '', NULL, '01724356876', NULL, NULL, 0.00, '2026-02-08 17:49:20', 0.00, 0.00, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `expenses`
--

CREATE TABLE `expenses` (
  `id` int(10) UNSIGNED NOT NULL,
  `category` varchar(100) NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `reference` varchar(100) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `expense_date` date NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `financial_accounts`
--

CREATE TABLE `financial_accounts` (
  `id` int(11) NOT NULL,
  `account_name` varchar(100) NOT NULL,
  `account_number` varchar(50) DEFAULT NULL,
  `account_type` enum('cash','bank','mobile_banking') NOT NULL DEFAULT 'cash',
  `balance` decimal(15,2) DEFAULT 0.00,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `financial_accounts`
--

INSERT INTO `financial_accounts` (`id`, `account_name`, `account_number`, `account_type`, `balance`, `is_active`, `created_at`, `updated_at`) VALUES
(21, 'ক্যাশ', NULL, 'cash', 0.00, 1, '2026-03-17 11:09:05', '2026-03-17 11:09:05'),
(22, 'অগ্রণী ব্যাংক', NULL, 'bank', 20000.00, 1, '2026-03-17 11:09:35', '2026-03-17 11:25:17'),
(23, 'বিকাশ', NULL, 'mobile_banking', 0.00, 1, '2026-03-17 11:10:30', '2026-03-17 11:10:30');

-- --------------------------------------------------------

--
-- Table structure for table `financial_transactions`
--

CREATE TABLE `financial_transactions` (
  `id` int(11) NOT NULL,
  `financial_account_id` int(11) NOT NULL,
  `transaction_type` enum('credit','debit') NOT NULL COMMENT 'credit = money in, debit = money out',
  `amount` decimal(15,2) NOT NULL,
  `reference_type` varchar(50) DEFAULT NULL COMMENT 'sale, purchase, expense, opening_balance, etc',
  `reference_id` int(11) DEFAULT NULL COMMENT 'ID of the related record',
  `description` text DEFAULT NULL,
  `transaction_date` date NOT NULL,
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `financial_transactions`
--

INSERT INTO `financial_transactions` (`id`, `financial_account_id`, `transaction_type`, `amount`, `reference_type`, `reference_id`, `description`, `transaction_date`, `created_by`, `created_at`) VALUES
(181, 22, 'credit', 20000.00, 'capital_injection', 113, 'Capital Added (Ref: )', '2026-03-17', 1, '2026-03-17 11:25:17');

-- --------------------------------------------------------

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` int(10) UNSIGNED NOT NULL,
  `payable_type` varchar(50) NOT NULL,
  `payable_id` int(10) UNSIGNED NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `method` enum('cash','card','bank','mobile') DEFAULT 'cash',
  `note` text DEFAULT NULL,
  `paid_at` date NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `sku` varchar(100) NOT NULL,
  `barcode_symbology` enum('C128','C39','EAN13','EAN8') DEFAULT 'C128',
  `description` text DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `category_id` int(10) UNSIGNED DEFAULT NULL,
  `supplier_id` int(10) UNSIGNED DEFAULT NULL,
  `unit_id` int(10) UNSIGNED DEFAULT NULL,
  `cost_price` decimal(12,2) DEFAULT 0.00,
  `selling_price` decimal(12,2) DEFAULT 0.00,
  `stock_quantity` int(11) DEFAULT 0,
  `alert_quantity` int(11) DEFAULT 10,
  `gallery` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`gallery`)),
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `commission_rate` decimal(10,2) DEFAULT 0.00,
  `commission_type` enum('percentage','fixed') DEFAULT 'percentage'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`id`, `name`, `slug`, `sku`, `barcode_symbology`, `description`, `image`, `category_id`, `supplier_id`, `unit_id`, `cost_price`, `selling_price`, `stock_quantity`, `alert_quantity`, `gallery`, `is_active`, `created_at`, `updated_at`, `commission_rate`, `commission_type`) VALUES
(1, 'Samsung Galaxy S23', 'samsung-galaxy-s23', 'SAM-A1B2C3', 'C128', 'Latest Samsung smartphone with 256GB storage', NULL, NULL, NULL, 1, 65000.00, 75000.00, 6, 5, NULL, 0, '2026-02-07 14:02:16', '2026-02-09 09:17:38', 0.00, 'percentage'),
(2, 'iPhone 14 Pro', 'iphone-14-pro', 'IPH-D4E5F6', 'C128', 'Apple iPhone 14 Pro with 256GB', NULL, NULL, NULL, 1, 95000.00, 110000.00, 6, 5, NULL, 0, '2026-02-07 14:02:16', '2026-02-09 09:17:38', 0.00, 'percentage'),
(3, 'Sony Headphones WH-1000XM5', 'sony-headphones-wh-1000xm5', 'SON-G7H8I9', 'C128', 'Premium noise-cancelling headphones', NULL, NULL, NULL, 1, 22000.00, 28000.00, 30, 10, NULL, 0, '2026-02-07 14:02:16', '2026-02-09 09:17:22', 0.00, 'percentage'),
(4, 'Nike Air Max', 'nike-air-max', 'NIK-J1K2L3', 'EAN13', 'Running shoes - Size 42', NULL, NULL, NULL, 1, 4500.00, 6500.00, 1, 15, NULL, 0, '2026-02-07 14:02:16', '2026-02-09 09:17:37', 0.00, 'percentage'),
(5, 'Adidas T-Shirt', 'adidas-t-shirt', 'ADI-M4N5O6', 'C39', 'Cotton sports t-shirt', NULL, NULL, NULL, 1, 800.00, 1200.00, -90, 10, NULL, 0, '2026-02-07 14:02:16', '2026-02-09 09:17:38', 0.00, 'percentage'),
(6, 'Coffee Beans Premium', 'coffee-beans-premium', 'COF-P7Q8R9', 'C128', 'Arabica coffee beans', NULL, NULL, NULL, 2, 1200.00, 1800.00, 5, 10, NULL, 0, '2026-02-07 14:02:16', '2026-02-09 09:17:22', 0.00, 'percentage'),
(7, 'Organic Green Tea', 'organic-green-tea', 'TEA-S1T2U3', 'C128', 'Premium green tea leaves', NULL, NULL, NULL, 4, 500.00, 750.00, 45, 15, NULL, 0, '2026-02-07 14:02:16', '2026-02-09 09:16:05', 0.00, 'percentage'),
(8, 'Garden Shovel', 'garden-shovel', 'GAR-V4W5X6', 'C39', 'Heavy-duty gardening shovel', NULL, NULL, NULL, 1, 350.00, 550.00, 20, 5, NULL, 0, '2026-02-07 14:02:16', '2026-02-09 09:17:22', 0.00, 'percentage'),
(9, 'LED Light Bulb', 'led-light-bulb', 'LED-Y7Z8A9', 'EAN8', '12W energy-saving bulb', NULL, NULL, NULL, 1, 150.00, 250.00, 100, 20, NULL, 0, '2026-02-07 14:02:16', '2026-02-09 09:17:22', 0.00, 'percentage'),
(10, 'Yoga Mat', 'yoga-mat', 'YOG-B1C2D3', 'C128', 'Non-slip exercise mat', NULL, NULL, NULL, 1, 800.00, 1200.00, 38, 10, NULL, 0, '2026-02-07 14:02:16', '2026-02-09 09:17:29', 0.00, 'percentage'),
(11, 't1', 't1', 'T-0E8F30', 'C128', 'irhihr', NULL, NULL, NULL, 2, 500.00, 600.00, 100, 10, NULL, 0, '2026-02-08 07:46:24', '2026-02-08 07:57:57', 0.00, 'percentage'),
(12, 'noise', 'noise', 'NOI-263EF0', 'C128', 'dnoisngis', NULL, NULL, NULL, 1, 5000.00, 6000.00, 50, 10, NULL, 0, '2026-02-08 07:58:26', '2026-02-09 09:15:52', 0.00, 'percentage'),
(13, 'eiohaiog', 'eiohaiog', 'EIO-63F013', 'C128', 'itiosngsssssss', NULL, NULL, NULL, 1, 500.00, 700.00, 100, 10, NULL, 0, '2026-02-08 08:05:26', '2026-02-09 09:17:20', 0.00, 'percentage'),
(14, 'ngkfng', 'ngkfng', 'NGK-BE5164', 'C128', 'dnhdmgh', NULL, NULL, NULL, 4, 500.00, 700.00, 50, 10, NULL, 0, '2026-02-08 08:10:51', '2026-02-09 09:15:49', 0.00, 'percentage'),
(16, 'dfihiodfxngh', 'dfihiodfxngh', 'DFI-5CA29C', 'C128', 'fhjmjpdofjh', NULL, NULL, NULL, 5, 50.00, 55.00, 62, 10, NULL, 0, '2026-02-08 08:15:33', '2026-02-09 09:17:21', 0.00, 'percentage'),
(18, 'Awetery', 'awetery', 'AWE-29ACF7', 'C128', 'fasdvsd', NULL, NULL, NULL, 2, 4543.00, 4634.00, 574, 10, NULL, 0, '2026-02-09 11:28:02', '2026-02-10 08:44:44', 5.00, 'percentage'),
(19, 'dfusd', 'dfusd', 'DFU-C6507F', 'C128', 'dasbyfd', NULL, NULL, NULL, 4, 50.00, 60.00, 100, 10, NULL, 0, '2026-02-09 15:02:20', '2026-02-09 15:05:47', 0.00, 'percentage'),
(20, 'ijiodgjrdfshjb', 'ijiodgjrdfshjb', 'IJI-FC5E05', 'C128', 'igonsdnv', NULL, NULL, 19, 4, 555.00, 666.00, 55, 10, NULL, 0, '2026-02-09 15:14:39', '2026-02-10 08:44:37', 0.00, ''),
(21, 'knlkn', 'knlkn', 'KNL-652DFC', 'C128', 'nkj', NULL, NULL, 19, 5, 100.00, 120.00, 50, 10, NULL, 0, '2026-02-09 16:49:42', '2026-02-10 08:44:23', 0.00, 'percentage'),
(22, 'East pitha', 'east-pitha', 'EAS-E48403', 'C128', 'East', NULL, NULL, 21, 1, 12.00, 15.00, 0, 10, NULL, 0, '2026-02-10 08:55:58', '2026-02-10 13:59:01', 0.30, 'percentage'),
(23, 'Sonali Starter Feed', 'sonali-starter-deleted-1772699749', 'SON-0A2837', 'C128', 'Sonali starter chicks feed', 'assets/uploads/products/6991d9667a6bf_3e84b887.jpg', NULL, 24, 1, 2785.00, 3000.00, 0, 10, NULL, 0, '2026-02-10 14:06:08', '2026-03-05 09:23:40', 150.00, 'fixed'),
(24, 'Sonali Grower', 'sonali-grower', 'SON-8E078F', 'C128', 'Sonali Feed', NULL, NULL, 24, 1, 2785.00, 2785.00, 0, 10, NULL, 0, '2026-02-10 14:28:56', '2026-03-05 09:23:40', 250.00, 'percentage'),
(25, 'Boyler Grower', 'boyler-grower', 'BOY-565028', 'C128', 'Per piece 50kg', NULL, NULL, 24, 1, 3455.00, 3455.00, 0, 10, NULL, 0, '2026-02-11 10:36:37', '2026-02-11 10:39:06', 235.00, 'fixed'),
(29, 'Sonali Grower Feed', 'sonali-grower-1-deleted-1772699748', 'SON-B02D11', 'C128', 'Sonali Feed', 'assets/uploads/products/6991d927179ce_29631f1f.jpg', NULL, 24, 1, 2785.00, 3000.00, 47, 10, NULL, 0, '2026-02-11 12:48:11', '2026-03-05 09:23:45', 150.00, 'fixed'),
(30, 'Sonali classic chick', 'sonali-classic-chick-deleted-1772699743-deleted-1772699746', 'SON-F19805', 'C128', '', 'assets/uploads/products/6991df4f19df7_19dbfc59.jpg', NULL, 30, 1, 32.00, 0.00, 0, 10, NULL, 0, '2026-02-15 14:59:27', '2026-03-05 09:23:43', 0.00, 'fixed'),
(31, 'Sonali classic super chicks', 'sonali-classic-super-chicks-deleted-1772699742', 'SON-538687', 'C128', 'Sonali chicks', 'assets/uploads/products/6992f36538c57_92aa459a.jpg', NULL, 30, 1, 0.00, 0.00, 0, 10, NULL, 0, '2026-02-16 10:37:25', '2026-03-05 08:35:42', 0.00, 'fixed'),
(32, 'Broiler Stater Feed', 'broiler-stater-feed-deleted-1772699740', 'BRO-454218', 'C128', 'Broiler Feed', 'assets/uploads/products/69945a2454885_287d6257.jpg', NULL, 24, 1, 3220.00, 3400.00, 0, 0, NULL, 0, '2026-02-17 12:08:04', '2026-03-05 08:35:40', 0.00, 'fixed'),
(33, 'Broiler Grower Feed', 'broiler-grower-feed-deleted-1772699738', 'BRO-02A9D1', 'C128', 'Broiler Feed', 'assets/uploads/products/69945a702aea8_a258af21.jpg', NULL, 24, 1, 3220.00, 3400.00, 0, 10, NULL, 0, '2026-02-17 12:09:20', '2026-03-05 08:35:38', 0.00, 'fixed'),
(34, 'Broiler Finisher Feed', 'broiler-finisher-feed-deleted-1772699734', 'BRO-B81C36', 'C128', '', 'assets/uploads/products/69945acb821e0_d134d9b0.jpg', NULL, 24, 1, 3195.00, 3350.00, 0, 10, NULL, 0, '2026-02-17 12:10:51', '2026-03-05 09:23:45', 0.00, 'fixed'),
(35, 'House Feed Grower 50 KG', 'house-feed-grower-50-kg-deleted-1772699732', 'HOU-1C9979', 'C128', 'Radey Feed', NULL, NULL, 24, 1, 1875.00, 1900.00, 0, 10, NULL, 0, '2026-02-23 23:16:17', '2026-03-05 09:23:48', 0.00, 'percentage'),
(36, 'House Feed Stater 50 KG', 'house-feed-stater-50-kg-deleted-1772699728', 'HOU-CB1D89', 'C128', 'Radey Feed', NULL, NULL, 24, 1, 1900.00, 1920.00, 0, 10, NULL, 0, '2026-02-23 23:18:36', '2026-03-05 09:23:48', 0.00, 'percentage'),
(37, 'কাবেরী মেহেদী', 'n-a-deleted-1773744572', '5706402489119', 'C128', '', 'assets/uploads/products/69a94b69a14cc_ea881c51.jpg', NULL, 32, 1, 100.00, 120.00, 0, 10, NULL, 0, '2026-03-05 09:22:49', '2026-03-17 10:50:02', 0.00, 'percentage');

-- --------------------------------------------------------

--
-- Table structure for table `purchases`
--

CREATE TABLE `purchases` (
  `id` int(10) UNSIGNED NOT NULL,
  `reference_no` varchar(50) NOT NULL,
  `supplier_id` int(10) UNSIGNED DEFAULT NULL,
  `purchase_date` date NOT NULL,
  `total_amount` decimal(12,2) NOT NULL,
  `paid_amount` decimal(12,2) DEFAULT 0.00,
  `agent_commission_percent` decimal(5,2) DEFAULT 0.00,
  `agent_commission_amount` decimal(10,2) DEFAULT 0.00,
  `status` enum('pending','ordered','received','canceled') NOT NULL DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `purchase_items`
--

CREATE TABLE `purchase_items` (
  `id` int(10) UNSIGNED NOT NULL,
  `purchase_id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL,
  `quantity` int(11) NOT NULL,
  `unit_cost` decimal(12,2) NOT NULL,
  `subtotal` decimal(12,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sales`
--

CREATE TABLE `sales` (
  `id` int(10) UNSIGNED NOT NULL,
  `reference_no` varchar(50) NOT NULL,
  `customer_id` int(10) UNSIGNED DEFAULT NULL,
  `sale_date` date NOT NULL,
  `total_amount` decimal(12,2) NOT NULL,
  `tax_amount` decimal(12,2) DEFAULT 0.00,
  `discount_amount` decimal(12,2) DEFAULT 0.00,
  `paid_amount` decimal(12,2) DEFAULT 0.00,
  `staff_commission_percent` decimal(5,2) DEFAULT 0.00,
  `staff_commission_amount` decimal(10,2) DEFAULT 0.00,
  `status` enum('pending','completed','canceled') DEFAULT 'completed',
  `created_by` int(10) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sale_items`
--

CREATE TABLE `sale_items` (
  `id` int(10) UNSIGNED NOT NULL,
  `sale_id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL,
  `quantity` int(11) NOT NULL,
  `unit_price` decimal(12,2) NOT NULL,
  `subtotal` decimal(12,2) NOT NULL,
  `discount_type` enum('percentage','fixed') DEFAULT 'fixed',
  `discount_value` decimal(12,2) DEFAULT 0.00,
  `discount_amount` decimal(12,2) DEFAULT 0.00,
  `commission_amount` decimal(10,2) DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sale_returns`
--

CREATE TABLE `sale_returns` (
  `id` int(10) UNSIGNED NOT NULL,
  `sale_id` int(10) UNSIGNED NOT NULL,
  `return_date` date NOT NULL,
  `total_amount` decimal(12,2) DEFAULT NULL,
  `refund_amount` decimal(12,2) DEFAULT NULL,
  `status` enum('pending','completed','rejected') DEFAULT 'pending',
  `reason` text DEFAULT NULL,
  `created_by` int(10) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sale_return_items`
--

CREATE TABLE `sale_return_items` (
  `id` int(10) UNSIGNED NOT NULL,
  `return_id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL,
  `quantity` int(11) NOT NULL,
  `unit_price` decimal(12,2) DEFAULT NULL,
  `subtotal` decimal(12,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `id` int(10) UNSIGNED NOT NULL,
  `setting_key` varchar(50) NOT NULL,
  `setting_value` text DEFAULT NULL,
  `setting_type` enum('text','number','boolean','json') DEFAULT 'text',
  `category` varchar(50) DEFAULT 'general',
  `updated_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `settings` (`id`, `setting_key`, `setting_value`, `setting_type`, `category`, `updated_by`, `created_at`, `updated_at`) VALUES
(1, 'company_name', 'Dewan Traders', 'text', 'general', 1, '2026-02-08 11:07:02', '2026-03-17 10:50:00'),
(2, 'company_email', 'admin@example.com', 'text', 'general', 1, '2026-02-08 11:07:02', '2026-02-10 07:07:15'),
(3, 'company_phone', '01724356876', 'text', 'general', 1, '2026-02-08 11:07:02', '2026-03-17 11:17:55'),
(4, 'company_address', 'Joypurhat', 'text', 'general', 1, '2026-02-08 11:07:02', '2026-03-17 10:50:00'),
(5, 'currency_symbol', '৳', 'text', 'general', 1, '2026-02-08 11:07:02', '2026-02-12 05:30:38'),
(6, 'timezone', 'Asia/Dhaka', 'text', 'general', 1, '2026-02-08 11:07:02', '2026-02-12 05:30:38'),
(25, 'tax_id', '', 'text', 'general', 1, '2026-02-08 11:11:46', '2026-02-12 05:30:38'),
(26, 'default_tax_rate', '0', 'text', 'general', 1, '2026-02-08 11:11:46', '2026-02-12 05:30:38'),
(35, 'company_tagline', 'Smart Business Management System', 'text', 'company', 1, '2026-02-10 05:56:55', '2026-02-10 07:07:15'),
(36, 'company_website', 'www.forbitpos.com', 'text', 'company', 1, '2026-02-10 05:56:55', '2026-02-10 07:07:15'),
(37, 'company_tax_number', '', 'text', 'company', 1, '2026-02-10 05:56:55', '2026-02-10 07:07:15'),
(38, 'invoice_note', 'Thank you for your business!', 'text', 'print', 1, '2026-02-10 05:56:55', '2026-02-10 07:07:15'),
(39, 'invoice_terms', 'All sales are final. No refunds without receipt...', 'text', 'print', 1, '2026-02-10 05:56:55', '2026-02-10 07:07:15'),
(40, 'print_logo_enabled', '0', 'boolean', 'print', 1, '2026-02-10 05:56:55', '2026-02-10 07:07:15'),
(41, 'print_show_tax_number', '1', 'boolean', 'print', 1, '2026-02-10 05:56:55', '2026-02-10 07:07:15'),
(42, 'date_format', 'd M Y', 'text', 'general', NULL, '2026-02-10 05:56:55', '2026-02-10 05:56:55'),
(43, 'time_format', 'H:i', 'text', 'general', NULL, '2026-02-10 05:56:55', '2026-02-10 05:56:55');

-- --------------------------------------------------------

--
-- Table structure for table `stock_movements`
--

CREATE TABLE `stock_movements` (
  `id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL,
  `type` enum('sale','purchase','return','adjustment') NOT NULL,
  `quantity` int(11) NOT NULL,
  `reference_type` varchar(100) DEFAULT NULL,
  `reference_id` int(10) UNSIGNED DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `stock_movements`
--

INSERT INTO `stock_movements` (`id`, `product_id`, `type`, `quantity`, `reference_type`, `reference_id`, `description`, `created_at`) VALUES
(4, 16, 'adjustment', 12, NULL, NULL, 'gsfg', '2026-02-08 11:04:12'),
(5, 16, 'adjustment', 6, 'sale_delete', 15, 'Stock restored from deleted sale', '2026-02-09 09:17:02'),
(6, 6, 'adjustment', 1, 'sale_delete', 15, 'Stock restored from deleted sale', '2026-02-09 09:17:02'),
(7, 5, 'adjustment', 4, 'sale_delete', 14, 'Stock restored from deleted sale', '2026-02-09 09:17:11'),
(8, 5, 'adjustment', 1, 'sale_delete', 13, 'Stock restored from deleted sale', '2026-02-09 09:17:12'),
(9, 13, 'adjustment', 5, 'sale_delete', 12, 'Stock restored from deleted sale', '2026-02-09 09:17:14'),
(10, 13, 'adjustment', 3, 'sale_delete', 11, 'Stock restored from deleted sale', '2026-02-09 09:17:16'),
(11, 13, 'adjustment', 1, 'sale_delete', 10, 'Stock restored from deleted sale', '2026-02-09 09:17:18'),
(12, 13, 'adjustment', 1, 'sale_delete', 9, 'Stock restored from deleted sale', '2026-02-09 09:17:19'),
(13, 13, 'adjustment', 1, 'sale_delete', 8, 'Stock restored from deleted sale', '2026-02-09 09:17:20'),
(14, 16, 'adjustment', 3, 'sale_delete', 7, 'Stock restored from deleted sale', '2026-02-09 09:17:21'),
(15, 8, 'adjustment', 1, 'sale_delete', 6, 'Stock restored from deleted sale', '2026-02-09 09:17:22'),
(16, 1, 'adjustment', 1, 'sale_delete', 6, 'Stock restored from deleted sale', '2026-02-09 09:17:22'),
(17, 10, 'adjustment', 1, 'sale_delete', 6, 'Stock restored from deleted sale', '2026-02-09 09:17:22'),
(18, 3, 'adjustment', 1, 'sale_delete', 6, 'Stock restored from deleted sale', '2026-02-09 09:17:22'),
(19, 9, 'adjustment', 1, 'sale_delete', 6, 'Stock restored from deleted sale', '2026-02-09 09:17:22'),
(20, 6, 'adjustment', 1, 'sale_delete', 6, 'Stock restored from deleted sale', '2026-02-09 09:17:22'),
(21, 1, 'adjustment', 1, 'sale_delete', 1, 'Stock restored from deleted sale', '2026-02-09 09:17:23'),
(22, 2, 'adjustment', 1, 'sale_delete', 2, 'Stock restored from deleted sale', '2026-02-09 09:17:24'),
(23, 4, 'adjustment', 1, 'sale_delete', 3, 'Stock restored from deleted sale', '2026-02-09 09:17:26'),
(24, 5, 'adjustment', 2, 'sale_delete', 3, 'Stock restored from deleted sale', '2026-02-09 09:17:26'),
(25, 10, 'adjustment', 2, 'sale_delete', 4, 'Stock restored from deleted sale', '2026-02-09 09:17:28'),
(26, 10, 'adjustment', 1, 'sale_delete', 5, 'Stock restored from deleted sale', '2026-02-09 09:17:29'),
(27, 4, 'adjustment', -50, 'purchase_delete', 2, 'Stock reduced from deleted purchase', '2026-02-09 09:17:38'),
(28, 5, 'adjustment', -100, 'purchase_delete', 2, 'Stock reduced from deleted purchase', '2026-02-09 09:17:38'),
(29, 1, 'adjustment', -20, 'purchase_delete', 1, 'Stock reduced from deleted purchase', '2026-02-09 09:17:38'),
(30, 2, 'adjustment', -10, 'purchase_delete', 1, 'Stock reduced from deleted purchase', '2026-02-09 09:17:38'),
(31, 20, 'adjustment', 5, 'sale_delete', 20, 'Stock restored from deleted sale', '2026-02-09 15:16:22'),
(32, 18, 'adjustment', 4, 'sale_delete', 20, 'Stock restored from deleted sale', '2026-02-09 15:16:22'),
(33, 18, 'return', 9, 'sale_cancel', 19, 'Stock restored from sale cancellation', '2026-02-09 15:25:40'),
(34, 21, 'adjustment', -2, 'purchase_delete', 3, 'Stock reduced from deleted purchase', '2026-02-09 16:57:58'),
(35, 20, 'adjustment', -4, 'purchase_delete', 4, 'Stock reduced from deleted purchase', '2026-02-10 08:42:33'),
(36, 21, 'adjustment', 2, 'sale_delete', 27, 'Stock restored from deleted sale', '2026-02-10 08:44:09'),
(37, 20, 'adjustment', 2, 'sale_delete', 26, 'Stock restored from deleted sale', '2026-02-10 08:44:12'),
(38, 20, 'adjustment', 3, 'sale_delete', 25, 'Stock restored from deleted sale', '2026-02-10 08:44:16'),
(39, 20, 'adjustment', 2, 'sale_delete', 24, 'Stock restored from deleted sale', '2026-02-10 08:44:23'),
(40, 21, 'adjustment', 2, 'sale_delete', 24, 'Stock restored from deleted sale', '2026-02-10 08:44:23'),
(41, 18, 'adjustment', 3, 'sale_delete', 18, 'Stock restored from deleted sale', '2026-02-10 08:44:28'),
(42, 20, 'adjustment', 1, 'sale_delete', 23, 'Stock restored from deleted sale', '2026-02-10 08:44:31'),
(43, 20, 'adjustment', 1, 'sale_delete', 22, 'Stock restored from deleted sale', '2026-02-10 08:44:34'),
(44, 20, 'adjustment', 3, 'sale_delete', 21, 'Stock restored from deleted sale', '2026-02-10 08:44:37'),
(45, 18, 'adjustment', 5, 'sale_delete', 17, 'Stock restored from deleted sale', '2026-02-10 08:44:41'),
(46, 18, 'adjustment', 3, 'sale_delete', 16, 'Stock restored from deleted sale', '2026-02-10 08:44:44'),
(47, 22, 'adjustment', -15, 'purchase_delete', 5, 'Stock reduced from deleted purchase', '2026-02-10 09:16:15'),
(48, 22, 'adjustment', -100, 'purchase_delete', 6, 'Stock reduced from deleted purchase', '2026-02-10 13:01:56'),
(49, 22, 'adjustment', -128, 'purchase_delete', 8, 'Stock reduced from deleted purchase', '2026-02-10 13:01:58'),
(50, 22, 'adjustment', -100, 'purchase_delete', 7, 'Stock reduced from deleted purchase', '2026-02-10 13:02:01'),
(51, 22, 'adjustment', 5, 'sale_delete', 28, 'Stock restored from deleted sale', '2026-02-10 13:02:14'),
(52, 22, 'adjustment', 15, NULL, NULL, 'Damage', '2026-02-10 13:13:17'),
(53, 22, 'adjustment', 10, 'sale_delete', 29, 'Stock restored from deleted sale', '2026-02-10 13:56:12'),
(54, 22, 'adjustment', -1000, 'purchase_delete', 9, 'Stock reduced from deleted purchase', '2026-02-10 13:59:01'),
(55, 24, 'adjustment', 1, 'sale_delete', 33, 'Stock restored from deleted sale', '2026-02-10 15:10:34'),
(56, 23, 'adjustment', -10, 'purchase_delete', 11, 'Stock reduced from deleted purchase', '2026-02-11 09:01:13'),
(57, 24, 'adjustment', -50, 'purchase_delete', 11, 'Stock reduced from deleted purchase', '2026-02-11 09:01:13'),
(58, 23, 'adjustment', -60, 'purchase_delete', 10, 'Stock reduced from deleted purchase', '2026-02-11 09:01:15'),
(59, 24, 'adjustment', 2, 'sale_delete', 32, 'Stock restored from deleted sale', '2026-02-11 09:02:31'),
(60, 24, 'adjustment', 1, 'sale_delete', 31, 'Stock restored from deleted sale', '2026-02-11 09:02:35'),
(61, 23, 'adjustment', 4, 'sale_delete', 31, 'Stock restored from deleted sale', '2026-02-11 09:02:35'),
(62, 23, 'adjustment', 60, 'sale_delete', 30, 'Stock restored from deleted sale', '2026-02-11 09:02:42'),
(63, 25, 'adjustment', -5, 'purchase_delete', 14, 'Stock reduced from deleted purchase', '2026-02-11 10:38:46'),
(64, 29, 'adjustment', 1, 'sale_delete', 37, 'Stock restored from deleted sale', '2026-02-12 05:44:44'),
(65, 29, 'adjustment', 2, 'sale_delete', 38, 'Stock restored from deleted sale', '2026-02-15 16:39:13'),
(66, 29, 'adjustment', 20, 'sale_delete', 39, 'Stock restored from deleted sale', '2026-02-15 16:39:32'),
(67, 34, 'adjustment', -40, 'purchase_delete', 15, 'Stock reduced from deleted purchase', '2026-02-17 15:36:01'),
(68, 29, 'adjustment', -60, 'purchase_delete', 15, 'Stock reduced from deleted purchase', '2026-02-17 15:36:01'),
(69, 34, 'adjustment', -40, 'purchase_delete', 16, 'Stock reduced from deleted purchase', '2026-02-19 08:59:06'),
(70, 29, 'adjustment', -60, 'purchase_delete', 16, 'Stock reduced from deleted purchase', '2026-02-19 08:59:06'),
(71, 34, 'adjustment', 80, NULL, NULL, 'Fghb', '2026-02-21 08:45:20'),
(72, 34, 'adjustment', 40, NULL, NULL, 'Deleted stock adjusted', '2026-02-21 08:45:56'),
(73, 34, 'adjustment', -20, NULL, NULL, 'Farther adjustments', '2026-02-21 08:46:43'),
(74, 34, 'adjustment', -60, NULL, NULL, 'Faragav', '2026-02-21 08:47:04'),
(75, 29, 'adjustment', 60, NULL, NULL, 'Adjusted', '2026-02-21 08:47:51'),
(76, 36, 'adjustment', 40, 'sale_delete', 47, 'Stock restored from deleted sale', '2026-03-05 08:36:16'),
(77, 35, 'adjustment', 120, 'sale_delete', 47, 'Stock restored from deleted sale', '2026-03-05 08:36:16'),
(78, 29, 'adjustment', 10, 'sale_delete', 46, 'Stock restored from deleted sale', '2026-03-05 08:36:18'),
(79, 29, 'adjustment', 5, 'sale_delete', 45, 'Stock restored from deleted sale', '2026-03-05 08:36:24'),
(80, 34, 'adjustment', 22, 'sale_delete', 44, 'Stock restored from deleted sale', '2026-03-05 08:36:31'),
(81, 29, 'adjustment', 9, 'sale_delete', 44, 'Stock restored from deleted sale', '2026-03-05 08:36:31'),
(82, 29, 'adjustment', 25, 'sale_delete', 43, 'Stock restored from deleted sale', '2026-03-05 08:36:37'),
(83, 23, 'adjustment', 6, 'sale_delete', 43, 'Stock restored from deleted sale', '2026-03-05 08:36:37'),
(84, 30, 'adjustment', 500, 'sale_delete', 42, 'Stock restored from deleted sale', '2026-03-05 08:36:46'),
(85, 24, 'adjustment', 2, 'sale_delete', 36, 'Stock restored from deleted sale', '2026-03-05 08:36:48'),
(86, 23, 'adjustment', 4, 'sale_delete', 35, 'Stock restored from deleted sale', '2026-03-05 08:37:06'),
(87, 24, 'adjustment', 1, 'sale_delete', 35, 'Stock restored from deleted sale', '2026-03-05 08:37:06'),
(88, 24, 'adjustment', 60, 'sale_delete', 34, 'Stock restored from deleted sale', '2026-03-05 08:37:09'),
(89, 29, 'adjustment', 2, 'sale_delete', 41, 'Stock restored from deleted sale', '2026-03-05 08:37:12'),
(90, 29, 'adjustment', 20, 'sale_delete', 40, 'Stock restored from deleted sale', '2026-03-05 08:37:14'),
(91, 24, 'adjustment', -60, 'purchase_delete', 12, 'Stock reduced from deleted purchase', '2026-03-05 09:23:37'),
(92, 24, 'adjustment', -50, 'purchase_delete', 13, 'Stock reduced from deleted purchase', '2026-03-05 09:23:40'),
(93, 23, 'adjustment', -10, 'purchase_delete', 13, 'Stock reduced from deleted purchase', '2026-03-05 09:23:40'),
(94, 30, 'adjustment', -500, 'purchase_delete', 18, 'Stock reduced from deleted purchase', '2026-03-05 09:23:43'),
(95, 29, 'adjustment', -60, 'purchase_delete', 19, 'Stock reduced from deleted purchase', '2026-03-05 09:23:45'),
(96, 34, 'adjustment', -40, 'purchase_delete', 19, 'Stock reduced from deleted purchase', '2026-03-05 09:23:45'),
(97, 35, 'adjustment', -120, 'purchase_delete', 20, 'Stock reduced from deleted purchase', '2026-03-05 09:23:48'),
(98, 36, 'adjustment', -40, 'purchase_delete', 20, 'Stock reduced from deleted purchase', '2026-03-05 09:23:48'),
(99, 37, 'adjustment', 12, 'sale_delete', 48, 'Stock restored from deleted sale', '2026-03-17 10:49:53'),
(100, 37, 'adjustment', -100, 'purchase_delete', 21, 'Stock reduced from deleted purchase', '2026-03-17 10:50:02');

-- --------------------------------------------------------

--
-- Table structure for table `tax_settings`
--

CREATE TABLE `tax_settings` (
  `id` int(10) UNSIGNED NOT NULL,
  `tax_name` varchar(50) NOT NULL,
  `tax_rate` decimal(5,2) DEFAULT 0.00,
  `is_active` tinyint(1) DEFAULT 1,
  `is_default` tinyint(1) DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tax_settings`
--

INSERT INTO `tax_settings` (`id`, `tax_name`, `tax_rate`, `is_active`, `is_default`, `created_at`) VALUES
(1, 'VAT', 15.00, 1, 1, '2026-02-08 11:07:02');

-- --------------------------------------------------------

--
-- Table structure for table `units`
--

CREATE TABLE `units` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `short_name` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `units`
--

INSERT INTO `units` (`id`, `name`, `short_name`) VALUES
(1, 'Piece', 'pc'),
(2, 'Kilogram', 'kg'),
(3, 'Liter', 'L'),
(4, 'Box', 'box'),
(5, 'Dozen', 'dz');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `account_transactions`
--
ALTER TABLE `account_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `activity_logs`
--
ALTER TABLE `activity_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_user` (`user_id`),
  ADD KEY `idx_table` (`table_name`,`record_id`),
  ADD KEY `idx_created` (`created_at`);

--
-- Indexes for table `capital_transactions`
--
ALTER TABLE `capital_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `investor_id` (`investor_id`),
  ADD KEY `created_by` (`created_by`);

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `contacts`
--
ALTER TABLE `contacts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_type` (`type`);

--
-- Indexes for table `expenses`
--
ALTER TABLE `expenses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_date` (`expense_date`);

--
-- Indexes for table `financial_accounts`
--
ALTER TABLE `financial_accounts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `financial_transactions`
--
ALTER TABLE `financial_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_account` (`financial_account_id`),
  ADD KEY `idx_date` (`transaction_date`),
  ADD KEY `idx_reference` (`reference_type`,`reference_id`);

--
-- Indexes for table `payments`
--
ALTER TABLE `payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_payable` (`payable_type`,`payable_id`);

--
-- Indexes for table `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `slug` (`slug`),
  ADD UNIQUE KEY `sku` (`sku`),
  ADD KEY `unit_id` (`unit_id`),
  ADD KEY `idx_sku` (`sku`),
  ADD KEY `idx_stock` (`stock_quantity`),
  ADD KEY `idx_category` (`category_id`),
  ADD KEY `idx_supplier` (`supplier_id`);

--
-- Indexes for table `purchases`
--
ALTER TABLE `purchases`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `reference_no` (`reference_no`),
  ADD KEY `supplier_id` (`supplier_id`),
  ADD KEY `idx_date` (`purchase_date`),
  ADD KEY `idx_status` (`status`);

--
-- Indexes for table `purchase_items`
--
ALTER TABLE `purchase_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_id` (`product_id`),
  ADD KEY `idx_purchase` (`purchase_id`);

--
-- Indexes for table `sales`
--
ALTER TABLE `sales`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `reference_no` (`reference_no`),
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `created_by` (`created_by`),
  ADD KEY `idx_date` (`sale_date`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_reference` (`reference_no`);

--
-- Indexes for table `sale_items`
--
ALTER TABLE `sale_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_id` (`product_id`),
  ADD KEY `idx_sale` (`sale_id`);

--
-- Indexes for table `sale_returns`
--
ALTER TABLE `sale_returns`
  ADD PRIMARY KEY (`id`),
  ADD KEY `created_by` (`created_by`),
  ADD KEY `idx_sale` (`sale_id`),
  ADD KEY `idx_status` (`status`);

--
-- Indexes for table `sale_return_items`
--
ALTER TABLE `sale_return_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `return_id` (`return_id`),
  ADD KEY `product_id` (`product_id`);

--
-- Indexes for table `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `setting_key` (`setting_key`);

--
-- Indexes for table `stock_movements`
--
ALTER TABLE `stock_movements`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_product` (`product_id`),
  ADD KEY `idx_type` (`type`);

--
-- Indexes for table `tax_settings`
--
ALTER TABLE `tax_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `units`
--
ALTER TABLE `units`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `account_transactions`
--
ALTER TABLE `account_transactions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `activity_logs`
--
ALTER TABLE `activity_logs`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=135;

--
-- AUTO_INCREMENT for table `capital_transactions`
--
ALTER TABLE `capital_transactions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=114;

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `contacts`
--
ALTER TABLE `contacts`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

--
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46;

--
-- AUTO_INCREMENT for table `financial_accounts`
--
ALTER TABLE `financial_accounts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `financial_transactions`
--
ALTER TABLE `financial_transactions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=182;

--
-- AUTO_INCREMENT for table `payments`
--
ALTER TABLE `payments`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=53;

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=38;

--
-- AUTO_INCREMENT for table `purchases`
--
ALTER TABLE `purchases`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `purchase_items`
--
ALTER TABLE `purchase_items`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

--
-- AUTO_INCREMENT for table `sales`
--
ALTER TABLE `sales`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49;

--
-- AUTO_INCREMENT for table `sale_items`
--
ALTER TABLE `sale_items`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=63;

--
-- AUTO_INCREMENT for table `sale_returns`
--
ALTER TABLE `sale_returns`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sale_return_items`
--
ALTER TABLE `sale_return_items`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `settings`
--
ALTER TABLE `settings`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=92;

--
-- AUTO_INCREMENT for table `stock_movements`
--
ALTER TABLE `stock_movements`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=101;

--
-- AUTO_INCREMENT for table `tax_settings`
--
ALTER TABLE `tax_settings`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `units`
--
ALTER TABLE `units`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `account_transactions`
--
ALTER TABLE `account_transactions`
  ADD CONSTRAINT `account_transactions_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `financial_accounts` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `activity_logs`
--
ALTER TABLE `activity_logs`
  ADD CONSTRAINT `activity_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `capital_transactions`
--
ALTER TABLE `capital_transactions`
  ADD CONSTRAINT `capital_transactions_ibfk_1` FOREIGN KEY (`investor_id`) REFERENCES `contacts` (`id`),
  ADD CONSTRAINT `capital_transactions_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`);

--
-- Constraints for table `products`
--
ALTER TABLE `products`
  ADD CONSTRAINT `products_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `products_ibfk_2` FOREIGN KEY (`unit_id`) REFERENCES `units` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `purchases`
--
ALTER TABLE `purchases`
  ADD CONSTRAINT `purchases_ibfk_1` FOREIGN KEY (`supplier_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `purchase_items`
--
ALTER TABLE `purchase_items`
  ADD CONSTRAINT `purchase_items_ibfk_1` FOREIGN KEY (`purchase_id`) REFERENCES `purchases` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `purchase_items_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `sales`
--
ALTER TABLE `sales`
  ADD CONSTRAINT `sales_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `contacts` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `sales_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `sale_items`
--
ALTER TABLE `sale_items`
  ADD CONSTRAINT `sale_items_ibfk_1` FOREIGN KEY (`sale_id`) REFERENCES `sales` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `sale_items_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `sale_returns`
--
ALTER TABLE `sale_returns`
  ADD CONSTRAINT `sale_returns_ibfk_1` FOREIGN KEY (`sale_id`) REFERENCES `sales` (`id`),
  ADD CONSTRAINT `sale_returns_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`);

--
-- Constraints for table `sale_return_items`
--
ALTER TABLE `sale_return_items`
  ADD CONSTRAINT `sale_return_items_ibfk_1` FOREIGN KEY (`return_id`) REFERENCES `sale_returns` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `sale_return_items_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`);

--
-- Constraints for table `stock_movements`
--
ALTER TABLE `stock_movements`
  ADD CONSTRAINT `stock_movements_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE;
COMMIT;

