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

START TRANSACTION;



--
-- Database: `melsoft_quanta`
--

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

--
-- Table structure for table `account_types`
--

CREATE TABLE IF NOT EXISTS `account_types` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` int DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `account_types`
--

INSERT INTO `account_types` (`id`, `code`, `name`, `description`, `created_at`, `updated_at`) VALUES
(1, 1000, 'Sales', NULL, '2025-05-23 19:15:38', '2025-07-02 03:50:42'),
(2, 1001, 'Cost of Sales', NULL, '2025-05-23 19:17:01', '2025-05-23 19:17:01'),
(3, 1002, 'Accounts Receivable', NULL, '2025-05-23 19:17:49', '2025-05-23 19:17:49'),
(4, 1003, 'Accounts Payable', NULL, '2025-05-23 19:18:04', '2025-05-23 19:18:04'),
(5, 1004, 'Current Asset', NULL, '2025-05-23 19:19:05', '2025-05-23 19:19:05'),
(6, 1005, 'Current Liability', NULL, '2025-05-23 19:19:21', '2025-05-23 19:19:21'),
(7, 1006, 'Fixed Asset', NULL, '2025-05-23 19:19:36', '2025-05-23 19:19:36'),
(8, 1007, 'Long Term Liability', NULL, '2025-05-23 19:19:54', '2025-05-23 19:19:54'),
(9, 1008, 'Non Current Asset', NULL, '2025-05-23 19:20:14', '2025-05-23 19:20:14'),
(10, 1009, 'Expense', NULL, '2025-05-23 19:20:36', '2025-05-23 19:20:36'),
(11, 1010, 'Cost of Goods Sold', NULL, '2025-05-23 19:20:56', '2025-05-23 19:20:56'),
(12, 1011, 'Cash, and Cash Equivalent', NULL, '2025-05-23 19:21:32', '2025-05-23 19:21:32'),
(13, 1012, 'Revenue', NULL, '2025-05-23 19:25:27', '2025-05-23 19:25:27'),
(14, 1013, 'Inventories', NULL, '2025-05-23 19:28:23', '2025-05-23 19:28:23'),
(15, 1014, 'Trade Receivable', NULL, '2025-05-24 03:02:31', '2025-05-24 03:02:31'),
(16, 1015, 'Trade Payable', NULL, '2025-05-24 03:02:49', '2025-05-24 03:02:49'),
(17, 1016, 'Other Income', NULL, '2025-05-24 03:03:02', '2025-05-24 03:03:02'),
(18, 1017, 'Prepayment', NULL, '2025-05-24 03:03:12', '2025-05-24 03:03:12'),
(19, 1018, 'Property, Plant & Equipment', NULL, '2025-05-24 03:04:14', '2025-05-24 03:04:14'),
(23, 1019, 'Equity', NULL, '2025-07-03 02:53:51', '2025-07-03 02:53:51'),
(24, 1020, 'demo', NULL, '2025-12-12 06:18:35', '2025-12-12 06:18:35'),
(25, 1021, 'Demo2', NULL, '2025-12-12 06:18:49', '2025-12-12 06:19:28');

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

--
-- Table structure for table `ageings`
--

CREATE TABLE IF NOT EXISTS `ageings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `age_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `group_type` enum('monthly','daily','custom') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'monthly',
  `interval_type` enum('invoice_date','statement_date') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'statement_date',
  `interval_30_days` tinyint(1) DEFAULT '0',
  `interval_7_days` tinyint(1) DEFAULT '0',
  `interval_custom` tinyint(1) DEFAULT '0',
  `custom_age_1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_age_2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_age_3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_age_4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_age_5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_age_6` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_age_7` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_interval_1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_interval_2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_interval_3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_interval_4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_interval_5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_interval_6` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ageings`
--

INSERT INTO `ageings` (`id`, `age_code`, `description`, `group_type`, `interval_type`, `interval_30_days`, `interval_7_days`, `interval_custom`, `custom_age_1`, `custom_age_2`, `custom_age_3`, `custom_age_4`, `custom_age_5`, `custom_age_6`, `custom_age_7`, `custom_interval_1`, `custom_interval_2`, `custom_interval_3`, `custom_interval_4`, `custom_interval_5`, `custom_interval_6`, `created_at`, `updated_at`) VALUES
(1, 'Month-end', 'Monthly', 'monthly', 'statement_date', 1, 0, 0, 'Current', '30 Days', '60 Days', '90 Days', '120 Days', '150 Days', '180 Days', '30 Days', '60 Days', '90 Days', '120 Days', '150 Days', '180 Days', '2025-09-10 06:46:20', '2025-09-10 06:46:20'),
(2, 'Day-End', 'Daily', 'daily', 'statement_date', 0, 1, 0, 'Today', '1 Day', '2 Days', '3 Days', '4 Days', '5 Days', '6 Days', '7 Days', '14 Days', '21 Days', '28 Days', '35 Days', '42 Days', '2025-09-10 06:48:33', '2025-09-10 06:48:33'),
(7, 'DEM001', 'demo', 'monthly', 'statement_date', 1, 0, 0, 'Current', '30 Days', '60 Days', '90 Days', '120 Days', '150 Days', '180 Days', '30 Days', '60 Days', '90 Days', '120 Days', '150 Days', '180 Days', '2025-12-19 06:02:20', '2025-12-19 06:02:20'),
(8, 'DEM002', 'demo', 'monthly', 'statement_date', 1, 0, 0, 'Current', '30 Days', '60 Days', '90 Days', '120 Days', '150 Days', '180 Days', '30 Days', '60 Days', '90 Days', '120 Days', '150 Days', '180 Days', '2025-12-19 06:02:28', '2025-12-19 06:02:28');

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

--
-- Table structure for table `areas`
--

CREATE TABLE IF NOT EXISTS `areas` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `country` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `specific_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `areas`
--

INSERT INTO `areas` (`id`, `code`, `name`, `country`, `city`, `specific_location`, `created_at`, `updated_at`) VALUES
(1, '+2638234', '10Floor Regal Star House', 'Zimbabwe', 'Harare', '25 George Silundika Avenue,', '2025-09-08 14:50:38', '2025-09-08 14:50:38'),
(2, '+2636666', 'Shopping Centre', 'Zimbabwe', 'Bunket', 'Near Zuva Fuel Station', '2025-09-08 14:53:11', '2025-09-08 14:53:11'),
(4, '+263677', 'Jongwe Corner', 'Zimbabwe', 'Chinhoyi', 'Along Main Road', '2025-09-08 14:56:37', '2025-09-08 14:56:37'),
(6, 'DEM001', 'Demo', 'demo1', 'demo', 'domo1', '2025-12-11 13:55:08', '2025-12-11 13:55:08'),
(7, 'DEM002', 'DemO', 'demo2', 'demo', 'demo2', '2025-12-11 13:55:36', '2025-12-19 06:05:42');

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

--
-- Table structure for table `assets`
--

CREATE TABLE IF NOT EXISTS `assets` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `asset_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `asset_type_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `asset_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `no_of_units` int DEFAULT NULL,
  `master_asset` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `serial_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cost_center` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `supplier` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchase_price` decimal(15,2) DEFAULT NULL,
  `insured_value` decimal(15,2) DEFAULT NULL,
  `scrap_value` decimal(15,2) DEFAULT NULL,
  `purchase_date` date DEFAULT NULL,
  `replacement_date` date DEFAULT NULL,
  `selling_price` decimal(15,2) DEFAULT NULL,
  `selling_date` date DEFAULT NULL,
  `reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `base_cost` decimal(15,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `banks`
--

CREATE TABLE IF NOT EXISTS `banks` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `bin_locations`
--

CREATE TABLE IF NOT EXISTS `bin_locations` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `bin_locations_code_unique` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bin_locations`
--

INSERT INTO `bin_locations` (`id`, `code`, `description`, `created_at`, `updated_at`) VALUES
(1, 'BIN00001', 'Invoice Bin', '2025-09-08 18:54:37', '2025-09-08 18:54:37'),
(3, 'BIN00003', 'Testing Bin Location', '2025-09-09 10:46:19', '2025-09-09 10:46:19'),
(6, 'DEM002', 'demo432', '2025-12-19 07:12:12', '2025-12-19 07:34:32');

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

--
-- Table structure for table `block_depreciation`
--

CREATE TABLE IF NOT EXISTS `block_depreciation` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `start_date` date DEFAULT NULL,
  `residual_value` decimal(15,2) DEFAULT NULL,
  `depriciation_method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchase_value` decimal(15,2) DEFAULT NULL,
  `book_dep_start_date` date DEFAULT NULL,
  `total` int DEFAULT NULL,
  `prior_year` int DEFAULT NULL,
  `current_year` int DEFAULT NULL,
  `initial_allowance` decimal(15,2) DEFAULT NULL,
  `impairement_cost` decimal(15,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `cashbooks`
--

CREATE TABLE IF NOT EXISTS `cashbooks` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `account_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `gl_account_id` bigint UNSIGNED NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`),
  KEY `fk_cashbooks_glaccount` (`gl_account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cashbooks`
--

INSERT INTO `cashbooks` (`id`, `account_type`, `code`, `gl_account_id`, `description`, `created_at`, `updated_at`) VALUES
(2, '', 'CSBK004', 9, 'Cash Usd', '2025-08-21 10:46:34', '2025-09-08 18:25:38'),
(3, '', 'CSBK002', 9, 'Test 2', '2025-08-21 10:47:03', '2025-09-08 18:02:44'),
(10, 'cash', 'DEM001', 64, 'DEMO', '2025-12-19 06:16:41', '2025-12-19 06:16:41'),
(11, 'cash', 'DEM002', 58, 'DEMO2', '2025-12-19 06:16:52', '2025-12-19 06:17:24');

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

--
-- Table structure for table `cashbook_entries`
--

CREATE TABLE IF NOT EXISTS `cashbook_entries` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `cashbook_id` bigint UNSIGNED DEFAULT NULL,
  `project_id` bigint UNSIGNED DEFAULT NULL,
  `date` date NOT NULL,
  `module` enum('GL','AR','AP') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_id` bigint UNSIGNED NOT NULL,
  `account_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'gl, customer, supplier',
  `reference_id` bigint UNSIGNED DEFAULT NULL,
  `reference_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'invoice, supplier_invoice',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tr_code` enum('Receipt','Payment') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency_id` int UNSIGNED NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `dr_amount` decimal(15,2) DEFAULT NULL,
  `cr_amount` decimal(15,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `cashbook_entries_currency_id_foreign` (`currency_id`),
  KEY `fk_cashbook_entries_cashbook_id` (`cashbook_id`),
  KEY `fk_cashbook_entries_project` (`project_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cashbook_entries`
--

INSERT INTO `cashbook_entries` (`id`, `cashbook_id`, `project_id`, `date`, `module`, `account_id`, `account_type`, `reference_id`, `reference_type`, `description`, `tr_code`, `currency_id`, `amount`, `dr_amount`, `cr_amount`, `created_at`, `updated_at`) VALUES
(1, 2, NULL, '2025-09-09', 'GL', 50, 'App\\Models\\GeneralLedger', NULL, NULL, 'Computer Defragmentation', 'Payment', 1, 100.00, 0.00, 100.00, '2025-09-10 16:52:21', '2025-09-10 16:52:21'),
(2, 11, 2, '2025-12-19', 'GL', 58, 'App\\Models\\GeneralLedger', NULL, NULL, 'demo432', 'Payment', 1, 22.00, 0.00, 22.00, '2025-12-19 07:53:18', '2025-12-19 07:53:18'),
(3, 2, NULL, '2026-05-20', 'AR', 8, 'App\\Models\\CustomerAccount', 2, 'invoice', 'Payment for Invoice MELINV000161', 'Receipt', 1, 22.50, 22.50, 0.00, '2026-05-20 08:48:00', '2026-05-20 08:48:00'),
(4, 2, NULL, '2026-05-20', 'GL', 9, 'App\\Models\\GeneralLedger', 2, 'invoice', 'Receipt RCPT000001', 'Receipt', 1, 22.50, 22.50, 0.00, '2026-05-20 08:48:00', '2026-05-20 08:48:00'),
(5, 2, NULL, '2026-05-20', 'AR', 8, 'App\\Models\\CustomerAccount', 2, 'invoice', 'Payment for Invoice MELINV000161', 'Receipt', 1, 22.50, 22.50, 0.00, '2026-05-20 08:51:58', '2026-05-20 08:51:58'),
(6, 2, NULL, '2026-05-20', 'GL', 9, 'App\\Models\\GeneralLedger', 2, 'invoice', 'Receipt RCPT000002', 'Receipt', 1, 22.50, 22.50, 0.00, '2026-05-20 08:51:58', '2026-05-20 08:51:58'),
(7, 2, NULL, '2026-05-20', 'AR', 8, 'App\\Models\\CustomerAccount', 2, 'invoice', 'Payment for Invoice MELINV000161', 'Receipt', 1, 5.00, 5.00, 0.00, '2026-05-20 08:53:59', '2026-05-20 08:53:59'),
(8, 2, NULL, '2026-05-20', 'GL', 9, 'App\\Models\\GeneralLedger', 2, 'invoice', 'Receipt RCPT000003', 'Receipt', 1, 5.00, 5.00, 0.00, '2026-05-20 08:53:59', '2026-05-20 08:53:59'),
(9, 2, NULL, '2026-05-21', 'AR', 13, 'App\\Models\\CustomerAccount', 14, 'invoice', 'Payment for Invoice MELINV000164', 'Receipt', 1, 100.00, 100.00, 0.00, '2026-05-21 06:14:33', '2026-05-21 06:14:33'),
(10, 2, NULL, '2026-05-21', 'GL', 9, 'App\\Models\\GeneralLedger', 14, 'invoice', 'Receipt RCPT000004', 'Receipt', 1, 100.00, 100.00, 0.00, '2026-05-21 06:14:33', '2026-05-21 06:14:33');

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

--
-- Table structure for table `cashbook_temp_entries`
--

CREATE TABLE IF NOT EXISTS `cashbook_temp_entries` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `cashbook_id` bigint UNSIGNED DEFAULT NULL,
  `project_id` bigint UNSIGNED DEFAULT NULL,
  `date` date NOT NULL,
  `module` enum('GL','AR','AP') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_id` bigint UNSIGNED NOT NULL,
  `account_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'gl, customer, supplier',
  `reference_id` bigint UNSIGNED DEFAULT NULL,
  `reference_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'invoice, supplier_invoice',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tr_code` enum('Receipt','Payment') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency_id` int UNSIGNED NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `dr_amount` decimal(15,2) DEFAULT NULL,
  `cr_amount` decimal(15,2) DEFAULT NULL,
  `status` enum('Pending','Processed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Pending',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `cashbook_temp_entries_currency_id_foreign` (`currency_id`),
  KEY `fk_cashbook_temp_entries_cashbook_id` (`cashbook_id`),
  KEY `fk_cashbook_temp_entries_project` (`project_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `company_settings`
--

CREATE TABLE IF NOT EXISTS `company_settings` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `company_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `logo_path` longtext COLLATE utf8mb4_unicode_ci,
  `address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `phone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `website` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bank_details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `company_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency_id` int UNSIGNED DEFAULT NULL,
  `tax_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `currency_id` (`currency_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `company_settings`
--

INSERT INTO `company_settings` (`id`, `company_name`, `logo_path`, `address`, `phone`, `email`, `website`, `bank_details`, `company_code`, `currency_id`, `tax_id`, `created_at`, `updated_at`) VALUES
(1, 'Melsoft Pvt Ltd', 'assets/img/logo_1779267641_V3kMOJpNHH.jpg', '25 George Silundika 10th Floor Regal Star House Harare', '+263 71 496 6574', 'info@melsoftzim.co.zw', 'https://www.melsoftzim.co.zw', '[{\"bank_name\":\"CABS - USD\",\"account_name\":\"Melsoft (Pvt) Ltd\",\"account_number\":\"1146778236\",\"branch\":\"Harare\",\"suffix_code\":null}]', 'Melsoft', 1, '2110034567', '2025-09-09 12:20:29', '2026-05-20 07:00:41');

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

--
-- Table structure for table `cost_center`
--

CREATE TABLE IF NOT EXISTS `cost_center` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `currencies`
--

CREATE TABLE IF NOT EXISTS `currencies` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `symbol` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `currencies`
--

INSERT INTO `currencies` (`id`, `code`, `symbol`, `name`, `created_at`, `updated_at`) VALUES
(1, 'USD', 'USD', 'United States Dollar', '2025-05-23 23:45:27', '2025-07-02 08:18:37'),
(2, 'ZWG', 'ZWG', 'Zimbabwe Currency', '2025-05-23 23:45:54', '2025-05-23 23:45:54'),
(12, 'ZAR', 'ZAR', 'RSA Rand', '2025-07-15 10:59:48', '2025-07-15 10:59:48'),
(13, 'Kwacha', 'Kwacha', 'Zambia Currency', '2025-09-09 11:42:12', '2025-09-09 11:42:12');

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

--
-- Table structure for table `customers`
--

CREATE TABLE IF NOT EXISTS `customers` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_person` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `customer_accounts`
--

CREATE TABLE IF NOT EXISTS `customer_accounts` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `account_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `customer_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `customer_account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `contact_person` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `contact_1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `contact_2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `category_id` bigint UNSIGNED DEFAULT NULL,
  `sales_rep_id` bigint UNSIGNED DEFAULT NULL,
  `area_id` bigint UNSIGNED DEFAULT NULL,
  `age_analysis_id` int DEFAULT NULL,
  `term` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `terms` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `vat` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tin` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `province` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_foreign_currency` tinyint(1) DEFAULT '0',
  `foreign_currency_id` int UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_customer_code` (`customer_code`),
  KEY `idx_category_id` (`category_id`),
  KEY `idx_sales_rep_id` (`sales_rep_id`),
  KEY `idx_area_id` (`area_id`),
  KEY `idx_foreign_currency_id` (`foreign_currency_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customer_accounts`
--

INSERT INTO `customer_accounts` (`id`, `account_type`, `customer_code`, `customer_account`, `contact_person`, `contact_1`, `contact_2`, `email`, `address`, `category_id`, `sales_rep_id`, `area_id`, `age_analysis_id`, `term`, `terms`, `vat`, `tin`, `city`, `province`, `is_foreign_currency`, `foreign_currency_id`, `created_at`, `updated_at`) VALUES
(3, '', 'CST8009090', 'Marcus Ruhinga', 'Marcus Ruhinga', '4567890', NULL, 'marcusruhinga02@gmail.com', 'chikurubi Max prison camp', NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'harare', NULL, 0, NULL, '2025-09-22 11:24:05', '2025-09-22 11:24:05'),
(4, '', '8', 'Marcus Ruhinga', 'Marcus Ruhinga', '82288282', NULL, 'marcusruhinga02@gmail.com', 'chikurubi Max prison camp', NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, 'harare', NULL, 0, NULL, '2025-09-22 11:53:32', '2025-09-22 11:53:32'),
(5, '', 'Demo', 'Demo', 'Demo', '00000000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, '2025-09-23 15:05:14', '2025-09-23 15:05:14'),
(6, '', 'test', 'test', 'test', '00000', 'test', 'test@gmail.com', 'test', 4, 3, 2, 1, NULL, NULL, '15', '567890', 'harare', 'harare', 0, NULL, '2025-09-23 15:07:28', '2025-09-23 15:07:28'),
(7, '', 'SVE', 'Henry Nyasha', 'Nyaradzai M', '0787448024', NULL, 'henry@gmail.com', 'Masvingo', 4, 4, NULL, 1, NULL, 'Current', NULL, NULL, 'Masvingo', 'Masvingo', 0, NULL, '2025-10-27 12:57:17', '2025-11-04 11:40:34'),
(8, '', 'CHI002', 'Mr Chinyerere', 'Mr Chinyerere', '0773525434', NULL, NULL, 'United Methodist church \r\nWaterfalls, Harare', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, '2025-11-21 11:24:27', '2025-11-21 11:24:27'),
(9, '', 'HUN001', 'Hungwe wire & rope', '0773091950', 'Hungwe', NULL, NULL, '7 Falcon Street, Bulawayo', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, '2025-11-21 13:04:48', '2025-11-21 13:04:48'),
(10, '', 'GOL0001', 'Gold Bar Consultancy Services', 'Calvin Madzorera', '0774146245/ 0775195853', 'Gidion Magaramombe', 'madzorera@gmail.com', '3 Trent Crescent\r\nMarlborough\r\nHarare\r\nZimbabwe', NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, 'Harare', 'Harare', 0, NULL, '2025-11-27 14:16:36', '2025-11-27 14:16:36'),
(11, '', 'VUL001', 'Vulindlela Secondary School', 'M Masuku Head', '0771046273', NULL, NULL, 'Vulindlela Secondary School\r\nP Bag 5858\r\nLupane', NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, 'Lupane', NULL, 0, NULL, '2025-11-29 06:22:34', '2025-11-29 06:22:34'),
(12, '', 'CHA001', 'Chambuta Primary school', 'Chambuta', '0716440539', NULL, NULL, 'P. Bag 7064\r\nChiredzi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, '2025-12-01 04:11:59', '2025-12-01 04:11:59'),
(13, '', 'OXF001', 'Oxford Study Centre', 'Mr Kadenge', '0772496354', '0716941743', NULL, '4048 Dzivarasekwa 1\r\n Harare', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, '2025-12-02 05:17:08', '2025-12-02 05:17:08'),
(14, '', 'LAN001', 'Lancaster Primary School', 'Lancaster', '0773948181', '0714073929', 'eshmaelk2@gmail.com', 'P.O.Box 834\r\nKaroi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Karoi', 'Mash West', 0, NULL, '2025-12-02 06:53:59', '2025-12-02 06:53:59'),
(15, '', 'DOU001', 'Double Visions', 'Tafara', '0781008325', NULL, NULL, 'Masvingo', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Masvingo', 'Masvingo', 0, NULL, '2025-12-04 21:42:50', '2025-12-04 21:42:50'),
(16, '', 'MEL001', 'Melios Technologies (Pvt) Ltd', 'Douglas Chatbot', '+263 78 819 9908', '+61410833789', NULL, '54 Cork Road,\r\nAvondale\r\nHarare', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Harare', 'Harare', 0, NULL, '2025-12-05 12:56:37', '2025-12-05 12:56:37');

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

--
-- Table structure for table `customer_categories`
--

CREATE TABLE IF NOT EXISTS `customer_categories` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customer_categories`
--

INSERT INTO `customer_categories` (`id`, `code`, `name`, `description`, `created_at`, `updated_at`) VALUES
(2, '7005', 'Test 2', 'Test2', '2025-06-10 19:27:59', '2025-09-08 10:34:46'),
(4, '7001', 'Resaler', 'Resaler', '2025-09-08 14:29:07', '2025-09-08 14:29:07'),
(5, '7002', 'Low Psychgraphic', 'Low Psychgraphic', '2025-09-08 14:32:07', '2025-09-08 14:32:07'),
(6, '7007', 'Testing', 'Testing', '2025-09-08 14:35:30', '2025-09-08 14:35:30'),
(8, 'DEM001', 'Demo', 'Demo', '2025-12-11 14:00:44', '2025-12-11 14:00:44'),
(9, 'DEM003', 'demo3', 'demo', '2025-12-19 06:01:17', '2025-12-19 06:01:17');

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

--
-- Table structure for table `customer_invoice_generation`
--

CREATE TABLE IF NOT EXISTS `customer_invoice_generation` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `added_by` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `customer_journals`
--

CREATE TABLE IF NOT EXISTS `customer_journals` (
  `id` int NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `customer_account_id` bigint UNSIGNED NOT NULL,
  `project_id` bigint UNSIGNED DEFAULT NULL,
  `narration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `reference` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency_id` int UNSIGNED NOT NULL,
  `tr_code` enum('DR','CR') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `customer_account_id` (`customer_account_id`),
  KEY `currency_id` (`currency_id`),
  KEY `fk_customer_journals_project` (`project_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customer_journals`
--

INSERT INTO `customer_journals` (`id`, `date`, `customer_account_id`, `project_id`, `narration`, `reference`, `currency_id`, `tr_code`, `amount`, `created_at`, `updated_at`) VALUES
(1, '2025-08-27', 5, NULL, 'eyyy', 'eyyytesterty', 1, 'DR', 45.00, '2025-08-27 04:41:07', '2025-08-27 04:41:07'),
(2, '2025-09-08', 6, NULL, 'wdff', 'wretr', 1, 'DR', 3455.00, '2025-09-08 17:12:50', '2025-09-08 17:12:50'),
(3, '2025-09-10', 6, NULL, 'Customer Assistance Journal', 'REF CST-J 073', 2, 'DR', 11110.00, '2025-09-10 11:56:02', '2025-09-10 11:56:02'),
(4, '2025-09-10', 5, NULL, 'Customer Interaction Journal', 'REF CST-J 077', 12, 'DR', 111000.00, '2025-09-10 11:56:17', '2025-09-10 11:56:17'),
(5, '2025-09-10', 10, NULL, 'Customer Insight Journal', 'REF CST-J 011', 1, 'DR', 110.00, '2025-09-10 11:56:22', '2025-09-10 11:56:22'),
(6, '2025-09-10', 7, NULL, 'Customer Feedback Journal', 'REF CST-J 055', 13, 'CR', 11000.00, '2025-09-10 11:56:22', '2025-09-10 11:56:22');

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

--
-- Table structure for table `customer_journal_temps`
--

CREATE TABLE IF NOT EXISTS `customer_journal_temps` (
  `id` int NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `customer_account_id` bigint UNSIGNED NOT NULL,
  `project_id` bigint UNSIGNED DEFAULT NULL,
  `narration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `reference` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency_id` int UNSIGNED NOT NULL,
  `tr_code` enum('DR','CR') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `status` enum('Pending','Processed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Pending',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `customer_account_id` (`customer_account_id`),
  KEY `currency_id` (`currency_id`),
  KEY `fk_customer_journal_temps_project` (`project_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customer_journal_temps`
--

INSERT INTO `customer_journal_temps` (`id`, `date`, `customer_account_id`, `project_id`, `narration`, `reference`, `currency_id`, `tr_code`, `amount`, `status`, `created_at`, `updated_at`) VALUES
(9, '2025-12-19', 5, NULL, 'DEMO', 'demo', 2, 'CR', 223.00, 'Pending', '2025-12-19 07:59:45', '2025-12-19 08:00:03');

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

--
-- Table structure for table `customer_receipt_generation`
--

CREATE TABLE IF NOT EXISTS `customer_receipt_generation` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `added_by` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `customer_transactions`
--

CREATE TABLE IF NOT EXISTS `customer_transactions` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `transaction_type` enum('invoice','credit_note','debit_note') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `debit_credit` enum('debit','credit') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `debit_ledger_account_id` bigint UNSIGNED NOT NULL,
  `credit_ledger_account_id` bigint UNSIGNED NOT NULL,
  `tax_account_id` bigint UNSIGNED DEFAULT NULL,
  `always_prompt_credit` tinyint(1) DEFAULT '0',
  `always_split_credit` tinyint(1) DEFAULT '0',
  `use_tax` tinyint(1) DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`),
  KEY `fk_debit_ledger` (`debit_ledger_account_id`),
  KEY `fk_credit_ledger` (`credit_ledger_account_id`),
  KEY `fk_tax_account` (`tax_account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customer_transactions`
--

INSERT INTO `customer_transactions` (`id`, `transaction_type`, `code`, `description`, `debit_credit`, `debit_ledger_account_id`, `credit_ledger_account_id`, `tax_account_id`, `always_prompt_credit`, `always_split_credit`, `use_tax`, `created_at`, `updated_at`) VALUES
(2, 'invoice', 'INV', 'Invoice', 'debit', 13, 43, 15, 0, 0, 1, '2025-07-01 07:47:50', '2025-09-01 05:04:01'),
(3, 'invoice', 'CRN', 'Credit Note', 'credit', 13, 43, 15, 0, 0, 1, '2025-09-01 05:05:18', '2025-09-01 05:05:18'),
(4, 'invoice', 'DBN', 'Debit Note', 'debit', 14, 7, 15, 0, 0, 1, '2025-09-01 05:06:20', '2025-09-01 05:06:20'),
(13, 'invoice', 'DEM002', 'demo4324', 'debit', 58, 58, NULL, 0, 0, 0, '2025-12-19 05:55:14', '2025-12-19 05:55:49'),
(14, 'invoice', 'DEM001', 'demo', 'debit', 64, 58, NULL, 0, 0, 0, '2025-12-19 05:55:31', '2025-12-19 05:55:31');

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

--
-- Table structure for table `daily_rates`
--

CREATE TABLE IF NOT EXISTS `daily_rates` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `home_currency` int NOT NULL,
  `foreign_currency` int UNSIGNED NOT NULL,
  `home_rate` decimal(20,6) NOT NULL,
  `foreign_rate` decimal(20,6) NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `fk_daily_rates_home_currency` (`home_currency`),
  KEY `fk_daily_rates_foreign_currency` (`foreign_currency`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `daily_rates`
--

INSERT INTO `daily_rates` (`id`, `home_currency`, `foreign_currency`, `home_rate`, `foreign_rate`, `description`, `created_at`, `updated_at`) VALUES
(5, 2, 2, 1.000000, 333.000000, 'Blazer', '2025-07-02 10:19:20', '2025-07-02 10:19:20'),
(6, 8, 1, 1.000000, 0.030400, '09/09/2025', '2025-09-09 11:53:48', '2025-09-09 11:53:48'),
(7, 9, 2, 1.000000, -0.000100, 'demo', '2025-12-19 07:43:08', '2025-12-19 07:43:08');

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

--
-- Table structure for table `departments`
--

CREATE TABLE IF NOT EXISTS `departments` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `departments`
--

INSERT INTO `departments` (`id`, `code`, `desc`, `created_at`, `updated_at`) VALUES
(2, 'Admin', 'Administration', '2025-05-23 23:22:42', '2025-05-23 23:22:42'),
(7, '2001', 'Accounts', '2025-09-08 12:24:24', '2025-09-08 12:24:24'),
(8, '2002', 'HR', '2025-09-08 12:24:44', '2025-09-08 12:24:44'),
(9, '2003', 'Sales', '2025-09-08 12:24:58', '2025-09-08 12:24:58'),
(10, '2004', 'Marketing', '2025-09-08 12:25:54', '2025-09-08 12:25:54'),
(11, '2005', 'IT', '2025-09-08 12:27:09', '2025-09-08 12:27:09'),
(13, 'DEM001', 'Demo', '2025-12-12 06:16:47', '2025-12-12 06:16:47'),
(14, 'DEM002', 'Demo0', '2025-12-12 06:17:38', '2025-12-12 06:17:38');

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

--
-- Table structure for table `depreciation_methods`
--

CREATE TABLE IF NOT EXISTS `depreciation_methods` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `straightline` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `equal_allowance` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reducing_balance` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `units_of_usage` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `plant_and_machinery` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `immediate_rightoff` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `zero_depr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `percentage` int DEFAULT NULL,
  `no_of_years` int DEFAULT NULL,
  `total_units` int DEFAULT NULL,
  `initial_percentage` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `document_headers`
--

CREATE TABLE IF NOT EXISTS `document_headers` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `document_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_document_id` bigint UNSIGNED DEFAULT NULL,
  `parent_document_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_account_id` bigint UNSIGNED NOT NULL,
  `contact_person` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `document_date` date NOT NULL,
  `delivery_date` date DEFAULT NULL,
  `due_date` date DEFAULT NULL,
  `order_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `project_id` bigint UNSIGNED DEFAULT NULL,
  `representative_id` bigint UNSIGNED DEFAULT NULL,
  `settlement_term` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency_code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `allow_negative` tinyint(1) NOT NULL DEFAULT '0',
  `sales_representative_id` bigint UNSIGNED DEFAULT NULL,
  `notes` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `exclusive_total` decimal(15,2) NOT NULL DEFAULT '0.00',
  `tax_amount` decimal(15,2) NOT NULL DEFAULT '0.00',
  `discount_total` decimal(15,2) NOT NULL DEFAULT '0.00',
  `inclusive_total` decimal(15,2) NOT NULL DEFAULT '0.00',
  `pricing_type` enum('exclusive','inclusive') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'exclusive',
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'draft',
  `processed_at` datetime DEFAULT NULL,
  `processed_by` bigint UNSIGNED DEFAULT NULL,
  `addedby` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `document_number` (`document_number`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `document_headers`
--

INSERT INTO `document_headers` (`id`, `type`, `document_number`, `parent_document_id`, `parent_document_type`, `customer_account_id`, `contact_person`, `document_date`, `delivery_date`, `due_date`, `order_number`, `project_id`, `representative_id`, `settlement_term`, `currency_code`, `allow_negative`, `sales_representative_id`, `notes`, `exclusive_total`, `tax_amount`, `discount_total`, `inclusive_total`, `pricing_type`, `status`, `processed_at`, `processed_by`, `addedby`, `created_at`, `updated_at`) VALUES
(1, 'quotation', 'MELQUO000197', NULL, NULL, 5, 'Demo', '2025-11-18', '2025-11-18', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-11-18 09:32:38', '2025-11-18 09:32:38'),
(2, 'invoice', 'MELINV000161', NULL, NULL, 8, 'Mr Chinyerere', '2025-11-21', '2025-11-21', '2025-11-21', NULL, NULL, 6, NULL, 'USD', 0, 1, 'C.O.D', 50.00, 0.00, 0.00, 50.00, 'inclusive', 'paid', NULL, NULL, 6, '2025-11-21 11:25:48', '2026-05-20 08:53:59'),
(3, 'quotation', 'MELQUO000198', NULL, NULL, 5, 'Demo', '2025-11-21', '2025-11-21', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-11-21 11:42:11', '2025-11-21 11:42:11'),
(4, 'invoice', 'MELINV000162', NULL, NULL, 5, 'Demo', '2025-11-21', '2025-11-21', '2025-11-21', NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'inclusive', 'processed', NULL, NULL, 6, '2025-11-21 12:23:31', '2025-11-21 12:23:31'),
(5, 'invoice', 'MELINV000163', NULL, NULL, 5, 'Demo', '2025-11-21', '2025-11-21', '2025-11-21', NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'inclusive', 'processed', NULL, NULL, 6, '2025-11-21 12:23:31', '2025-11-21 12:23:31'),
(6, 'quotation', 'MELQUO000199', NULL, NULL, 9, '0773091950', '2025-11-21', '2025-11-21', NULL, 'verbal', NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 50.00, 0.00, 0.00, 50.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-11-21 13:06:42', '2025-11-21 13:06:42'),
(7, 'quotation', 'MELQUO000200', NULL, NULL, 5, 'Demo', '2025-11-21', '2025-11-21', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-11-21 13:08:02', '2025-11-21 13:08:02'),
(8, 'quotation', 'MELQUO000201', NULL, NULL, 10, 'Calvin Madzorera', '2025-11-27', '2025-11-27', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE\r\n5. \r\n6.', 95.00, 0.00, 0.00, 95.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-11-27 14:30:39', '2025-11-27 14:30:39'),
(9, 'quotation', 'MELQUO000202', NULL, NULL, 10, 'Calvin Madzorera', '2025-11-27', '2025-11-27', NULL, 'verbal', NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE\r\n5. 60% deposit required to be paid before project starts\r\n6. Maximum project timeline is 3 days, provided that all information required is given', 95.00, 0.00, 0.00, 95.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-11-27 14:35:05', '2025-11-27 14:35:05'),
(10, 'quotation', 'MELQUO000203', NULL, NULL, 11, 'M Masuku Head', '2025-11-29', '2025-11-29', NULL, 'verbal', NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 680.00, 0.00, 0.00, 680.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-11-29 06:55:52', '2025-11-29 06:55:52'),
(11, 'quotation', 'MELQUO000204', NULL, NULL, 12, 'Chambuta', '2025-12-01', '2025-12-01', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 342.00, 0.00, 0.00, 342.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-12-01 04:14:54', '2025-12-01 04:14:54'),
(12, 'quotation', 'MELQUO000205', NULL, NULL, 12, 'Chambuta', '2025-12-01', '2025-12-01', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 342.00, 0.00, 0.00, 342.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-12-01 04:19:36', '2025-12-01 04:19:36'),
(13, 'quotation', 'MELQUO000206', NULL, NULL, 13, 'Mr Kadenge', '2025-12-02', '2025-12-02', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 485.00, 0.00, 0.00, 485.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-12-02 05:25:35', '2025-12-02 05:25:35'),
(14, 'invoice', 'MELINV000164', NULL, NULL, 13, 'Mr Kadenge', '2025-12-02', '2025-12-02', '2025-12-02', NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 485.00, 0.00, 0.00, 485.00, 'inclusive', 'partially_paid', NULL, NULL, 6, '2025-12-02 05:28:18', '2026-05-21 06:14:33'),
(15, 'quotation', 'MELQUO000207', NULL, NULL, 14, 'Lancaster', '2025-12-02', '2025-12-02', NULL, 'Verbal', NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 342.00, 0.00, 0.00, 342.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-12-02 06:56:57', '2025-12-02 06:56:57'),
(16, 'invoice', 'MELINV000165', NULL, NULL, 15, 'Tafara', '2025-12-04', '2025-12-04', '2025-12-04', NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 5.00, 0.00, 0.00, 5.00, 'inclusive', 'processed', NULL, NULL, 6, '2025-12-04 21:44:00', '2025-12-04 21:44:00'),
(17, 'quotation', 'MELQUO000208', NULL, NULL, 16, 'Douglas Chatbot', '2025-12-05', '2025-12-05', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 1700.00, 0.00, 0.00, 1700.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-12-05 13:29:37', '2025-12-05 13:29:37'),
(18, 'quotation', 'MELQUO000209', NULL, NULL, 16, 'Douglas Chatbot', '2025-12-05', '2025-12-05', NULL, 'verbal', NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 1800.00, 0.00, 0.00, 1800.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-12-05 15:06:03', '2025-12-05 15:06:03'),
(19, 'quotation', 'MELQTN000207', NULL, NULL, 5, 'Demo', '2025-11-18', '2025-11-18', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n                            2. Payment mode USD\r\n                            3. Payment to be done before any service. (COD)\r\n                            4. E & OE', 0.00, 0.00, 0.00, 0.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-11-18 06:30:20', '2025-11-18 06:30:20'),
(20, 'quotation', 'MELQTN000208', NULL, NULL, 5, 'Demo', '2025-11-18', '2025-11-18', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-11-18 06:46:25', '2025-11-18 06:46:25'),
(21, 'quotation', 'MELQTN000209', NULL, NULL, 5, 'Demo', '2025-11-18', '2025-11-18', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE\r\n5. Testing', 0.00, 0.00, 0.00, 0.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-11-18 06:46:58', '2025-11-18 06:46:58'),
(22, 'quotation', 'MELQTN000210', NULL, NULL, 5, 'Demo', '2025-11-18', '2025-11-18', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-11-18 06:54:20', '2025-11-18 06:54:20'),
(23, 'sales_order', 'SO000011', NULL, NULL, 5, 'Demo', '2025-11-18', '2025-11-18', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-11-18 07:04:57', '2025-11-18 07:04:57'),
(24, 'sales_order', 'SO000012', NULL, NULL, 5, 'Demo', '2025-11-18', '2025-11-18', NULL, NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'exclusive', 'processed', NULL, NULL, 6, '2025-11-18 07:05:23', '2025-11-18 07:05:23'),
(25, 'invoice', 'INV000169', NULL, NULL, 5, 'Demo', '2025-11-18', '2025-11-18', '2025-11-18', NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'inclusive', 'processed', NULL, NULL, 6, '2025-11-18 09:02:13', '2025-11-18 09:02:13'),
(26, 'invoice', 'INV000170', NULL, NULL, 5, 'Demo', '2025-11-18', '2025-11-18', '2025-11-18', NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'inclusive', 'processed', NULL, NULL, 6, '2025-11-18 09:06:05', '2025-11-18 09:06:05'),
(27, 'invoice', 'INV000171', NULL, NULL, 5, 'Demo', '2025-11-18', '2025-11-18', '2025-11-18', NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'inclusive', 'processed', NULL, NULL, 6, '2025-11-18 09:08:03', '2025-11-18 09:08:03'),
(28, 'invoice', 'INV000172', NULL, NULL, 5, 'Demo', '2025-11-18', '2025-11-18', '2025-11-18', NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'inclusive', 'processed', NULL, NULL, 6, '2025-11-18 09:11:32', '2025-11-18 09:11:32'),
(29, 'invoice', 'INV000173', NULL, NULL, 5, 'Demo', '2025-11-18', '2025-11-18', '2025-11-18', NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'inclusive', 'processed', NULL, NULL, 6, '2025-11-18 09:13:11', '2025-11-18 09:13:11'),
(30, 'invoice', 'INV000174', NULL, NULL, 5, 'Demo', '2025-11-18', '2025-11-18', '2025-11-18', NULL, NULL, 6, NULL, 'USD', 0, 1, '1. This Document is Valid for 5 days.\r\n2. Payment mode USD\r\n3. Payment to be done before any service. (COD)\r\n4. E & OE', 0.00, 0.00, 0.00, 0.00, 'inclusive', 'processed', NULL, NULL, 6, '2025-11-18 09:16:02', '2025-11-18 09:16:02');

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

--
-- Table structure for table `document_lines`
--

CREATE TABLE IF NOT EXISTS `document_lines` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `document_header_id` bigint UNSIGNED NOT NULL,
  `module` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `hs_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `item_id` bigint UNSIGNED DEFAULT NULL,
  `account_id` bigint UNSIGNED DEFAULT NULL,
  `account_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `warehouse_id` bigint UNSIGNED DEFAULT NULL,
  `quantity` int NOT NULL,
  `confirmed_quantity` int NOT NULL,
  `uom_id` bigint UNSIGNED DEFAULT NULL,
  `price` decimal(15,4) NOT NULL,
  `tax_id` bigint UNSIGNED NOT NULL,
  `tax_rate` decimal(5,2) NOT NULL,
  `discount_percent` decimal(5,2) NOT NULL DEFAULT '0.00',
  `line_tax` decimal(15,2) NOT NULL DEFAULT '0.00',
  `line_total` decimal(15,2) NOT NULL DEFAULT '0.00',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `document_lines`
--

INSERT INTO `document_lines` (`id`, `document_header_id`, `module`, `hs_code`, `item_id`, `account_id`, `account_type`, `warehouse_id`, `quantity`, `confirmed_quantity`, `uom_id`, `price`, `tax_id`, `tax_rate`, `discount_percent`, `line_tax`, `line_total`, `description`, `created_at`, `updated_at`) VALUES
(1, 1, 'ST', NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, 0.0000, 2, 15.00, 0.00, 0.00, 0.00, NULL, '2025-11-18 09:32:38', '2025-11-18 09:32:38'),
(2, 2, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 50.0000, 10, 0.00, 0.00, 0.00, 50.00, 'Introduction to computers', '2025-11-21 11:25:48', '2025-11-21 11:25:48'),
(3, 3, 'ST', NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, 0.0000, 2, 15.00, 0.00, 0.00, 0.00, NULL, '2025-11-21 11:42:11', '2025-11-21 11:42:11'),
(4, 4, 'ST', NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, 0.0000, 2, 15.00, 0.00, 0.00, 0.00, NULL, '2025-11-21 12:23:31', '2025-11-21 12:23:31'),
(5, 5, 'ST', NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, 0.0000, 2, 15.00, 0.00, 0.00, 0.00, NULL, '2025-11-21 12:23:31', '2025-11-21 12:23:31'),
(6, 6, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 50.0000, 11, 0.00, 0.00, 0.00, 50.00, 'Website monthly maintainance/ Picture updates', '2025-11-21 13:06:42', '2025-11-21 13:06:42'),
(7, 7, 'ST', NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, 0.0000, 2, 15.00, 0.00, 0.00, 0.00, NULL, '2025-11-21 13:08:02', '2025-11-21 13:08:02'),
(8, 8, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 80.0000, 10, 0.00, 0.00, 0.00, 80.00, 'Website \r\nDevelopment', '2025-11-27 14:30:39', '2025-11-27 14:30:39'),
(9, 8, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 10.0000, 10, 0.00, 0.00, 0.00, 10.00, 'Domain Registration / yearly', '2025-11-27 14:30:39', '2025-11-27 14:30:39'),
(10, 8, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 5.0000, 10, 0.00, 0.00, 0.00, 5.00, 'Domain Hosting/Month', '2025-11-27 14:30:39', '2025-11-27 14:30:39'),
(11, 9, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 80.0000, 10, 0.00, 0.00, 0.00, 80.00, 'Website Development', '2025-11-27 14:35:05', '2025-11-27 14:35:05'),
(12, 9, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 10.0000, 10, 0.00, 0.00, 0.00, 10.00, 'Domain Registration/yearly', '2025-11-27 14:35:05', '2025-11-27 14:35:05'),
(13, 9, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 5.0000, 10, 0.00, 0.00, 0.00, 5.00, 'Domain Hosting/month', '2025-11-27 14:35:05', '2025-11-27 14:35:05'),
(14, 10, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 680.0000, 10, 0.00, 0.00, 0.00, 680.00, 'Melsoft Premium ERP installation', '2025-11-29 06:55:52', '2025-11-29 06:55:52'),
(15, 10, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 0.0000, 10, 0.00, 0.00, 0.00, 0.00, 'Setup & Training Free', '2025-11-29 06:55:52', '2025-11-29 06:55:52'),
(16, 10, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 0.0000, 10, 0.00, 0.00, 0.00, 0.00, 'Yearly subscription of $204 paid in the 2nd Year', '2025-11-29 06:55:52', '2025-11-29 06:55:52'),
(17, 11, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 342.0000, 10, 0.00, 0.00, 0.00, 342.00, 'Melsoft Essential Installation', '2025-12-01 04:14:54', '2025-12-01 04:14:54'),
(18, 11, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 0.0000, 10, 0.00, 0.00, 0.00, 0.00, 'Setup and Training FREE', '2025-12-01 04:14:54', '2025-12-01 04:14:54'),
(19, 12, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 342.0000, 10, 0.00, 0.00, 0.00, 342.00, 'Melsoft Essential School Management System', '2025-12-01 04:19:36', '2025-12-01 04:19:36'),
(20, 12, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 0.0000, 10, 0.00, 0.00, 0.00, 0.00, 'Setup and Training FREE', '2025-12-01 04:19:36', '2025-12-01 04:19:36'),
(21, 12, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 0.0000, 10, 0.00, 0.00, 0.00, 0.00, 'Yearly subscription of $144 paid in 2nd year', '2025-12-01 04:19:36', '2025-12-01 04:19:36'),
(22, 13, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 485.0000, 10, 0.00, 0.00, 0.00, 485.00, 'Melsoft Premium ERP School Management system', '2025-12-02 05:25:35', '2025-12-02 05:25:35'),
(23, 13, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 0.0000, 10, 0.00, 0.00, 0.00, 0.00, 'Setup & Training FREE', '2025-12-02 05:25:35', '2025-12-02 05:25:35'),
(24, 13, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 0.0000, 10, 0.00, 0.00, 0.00, 0.00, 'Yearly subscription of $194 paid in 2nd year', '2025-12-02 05:25:35', '2025-12-02 05:25:35'),
(25, 14, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 485.0000, 10, 0.00, 0.00, 0.00, 485.00, 'Melsoft Premium ERP School Management System', '2025-12-02 05:28:18', '2025-12-02 05:28:18'),
(26, 14, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 0.0000, 10, 0.00, 0.00, 0.00, 0.00, 'Set-up and Training FREE', '2025-12-02 05:28:18', '2025-12-02 05:28:18'),
(27, 14, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 0.0000, 10, 0.00, 0.00, 0.00, 0.00, 'Yearly Subscription of $194 paid in the 2nd year', '2025-12-02 05:28:18', '2025-12-02 05:28:18'),
(28, 15, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 342.0000, 10, 0.00, 0.00, 0.00, 342.00, 'Melsoft Essential School Management System', '2025-12-02 06:56:57', '2025-12-02 06:56:57'),
(29, 15, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 0.0000, 10, 0.00, 0.00, 0.00, 0.00, 'Setup and Training FREE', '2025-12-02 06:56:57', '2025-12-02 06:56:57'),
(30, 15, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 0.0000, 10, 0.00, 0.00, 0.00, 0.00, 'Yearly Subscription of $144 paid in the 2nd year', '2025-12-02 06:56:57', '2025-12-02 06:56:57'),
(31, 16, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 5.0000, 10, 0.00, 0.00, 0.00, 5.00, 'December Hosting', '2025-12-04 21:44:00', '2025-12-04 21:44:00'),
(32, 17, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 580.0000, 10, 0.00, 0.00, 0.00, 580.00, 'Chatbot Design & Flow Development for Passenger', '2025-12-05 13:29:37', '2025-12-05 13:29:37'),
(33, 17, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 580.0000, 10, 0.00, 0.00, 0.00, 580.00, 'Chatbot Design & Flow Development for Driver App', '2025-12-05 13:29:37', '2025-12-05 13:29:37'),
(34, 17, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 280.0000, 10, 0.00, 0.00, 0.00, 280.00, 'Whatsapp Business API Setup & installation', '2025-12-05 13:29:37', '2025-12-05 13:29:37'),
(35, 17, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 150.0000, 10, 0.00, 0.00, 0.00, 150.00, 'Testing & Deployment', '2025-12-05 13:29:37', '2025-12-05 13:29:37'),
(36, 17, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 60.0000, 10, 0.00, 0.00, 0.00, 60.00, 'Training & Documentation', '2025-12-05 13:29:37', '2025-12-05 13:29:37'),
(37, 17, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 30.0000, 10, 0.00, 0.00, 0.00, 30.00, 'Support/ Call-out', '2025-12-05 13:29:37', '2025-12-05 13:29:37'),
(38, 17, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 10.0000, 10, 0.00, 0.00, 0.00, 10.00, 'Domain Registration/ Year', '2025-12-05 13:29:37', '2025-12-05 13:29:37'),
(39, 17, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 10.0000, 10, 0.00, 0.00, 0.00, 10.00, 'Hosting Gold Package/Month', '2025-12-05 13:29:37', '2025-12-05 13:29:37'),
(40, 18, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 620.0000, 10, 0.00, 0.00, 0.00, 620.00, 'Chatbot Design &Flow Development for Passenger', '2025-12-05 15:06:03', '2025-12-05 15:06:03'),
(41, 18, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 620.0000, 10, 0.00, 0.00, 0.00, 620.00, 'Chatbot Design & Flow Development for Driver App', '2025-12-05 15:06:03', '2025-12-05 15:06:03'),
(42, 18, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 280.0000, 10, 0.00, 0.00, 0.00, 280.00, 'Whatsapp Business API Setup & Installation', '2025-12-05 15:06:03', '2025-12-05 15:06:03'),
(43, 18, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 150.0000, 10, 0.00, 0.00, 0.00, 150.00, 'Testing & Deployment', '2025-12-05 15:06:03', '2025-12-05 15:06:03'),
(44, 18, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 70.0000, 10, 0.00, 0.00, 0.00, 70.00, 'Training & Documentation', '2025-12-05 15:06:03', '2025-12-05 15:06:03'),
(45, 18, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 40.0000, 10, 0.00, 0.00, 0.00, 40.00, 'Support/ Call-out', '2025-12-05 15:06:03', '2025-12-05 15:06:03'),
(46, 18, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 10.0000, 10, 0.00, 0.00, 0.00, 10.00, 'Domain Registration/ Year', '2025-12-05 15:06:03', '2025-12-05 15:06:03'),
(47, 18, 'GL', NULL, NULL, 50, NULL, NULL, 1, 1, NULL, 10.0000, 10, 0.00, 0.00, 0.00, 10.00, 'Hosting Gold Package/ Month', '2025-12-05 15:06:03', '2025-12-05 15:06:03');

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

--
-- Table structure for table `document_line_links`
--

CREATE TABLE IF NOT EXISTS `document_line_links` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `document_link_id` bigint UNSIGNED NOT NULL,
  `source_line_id` bigint UNSIGNED NOT NULL,
  `target_line_id` bigint UNSIGNED NOT NULL,
  `quantity_linked` decimal(15,4) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `document_line_links_document_link_id_foreign` (`document_link_id`),
  KEY `idx_doc_line_links_source` (`source_line_id`),
  KEY `idx_doc_line_links_target` (`target_line_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `document_links`
--

CREATE TABLE IF NOT EXISTS `document_links` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `source_id` bigint UNSIGNED NOT NULL,
  `source_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `target_id` bigint UNSIGNED NOT NULL,
  `target_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `link_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `created_by` bigint UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_document_links_source_target` (`source_id`,`source_type`,`target_id`,`target_type`),
  KEY `idx_doc_links_source` (`source_id`,`source_type`),
  KEY `idx_doc_links_target` (`target_id`,`target_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `document_settings`
--

CREATE TABLE IF NOT EXISTS `document_settings` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `document_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `prefix` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'DOC',
  `start_number` int UNSIGNED NOT NULL DEFAULT '1',
  `pricing_type` enum('exclusive','inclusive') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'exclusive',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `document_type` (`document_type`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `document_settings`
--

INSERT INTO `document_settings` (`id`, `document_type`, `prefix`, `start_number`, `pricing_type`, `created_at`, `updated_at`) VALUES
(1, 'quotation', 'MELQUO', 210, 'exclusive', '2025-07-14 12:30:12', '2025-12-05 15:06:03'),
(2, 'sales_order', 'MELSO', 11, 'exclusive', '2025-07-15 06:08:26', '2025-11-15 05:44:47'),
(3, 'invoice', 'MELINV', 166, 'inclusive', '2025-07-15 07:53:54', '2025-12-04 21:44:00'),
(4, 'credit_note', 'MELCRN', 7, 'inclusive', '2025-07-16 11:10:45', '2025-11-15 05:45:47'),
(5, 'debit_note', 'MELDN', 6, 'exclusive', '2025-07-22 11:50:07', '2025-11-15 05:46:11'),
(6, 'receipt', 'MELREC', 82, 'exclusive', '2025-07-25 05:48:49', '2025-11-15 05:46:43');

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

--
-- Table structure for table `document_status_history`
--

CREATE TABLE IF NOT EXISTS `document_status_history` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `document_id` bigint UNSIGNED NOT NULL,
  `document_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `from_status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `to_status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `action` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_doc_status_history_doc` (`document_id`,`document_type`),
  KEY `idx_doc_status_history_user` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `employee`
--

CREATE TABLE IF NOT EXISTS `employee` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `fullname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `employee_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `designation` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `department` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE IF NOT EXISTS `failed_jobs` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `general_journals`
--

CREATE TABLE IF NOT EXISTS `general_journals` (
  `id` int NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `account_id` bigint UNSIGNED NOT NULL,
  `account_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `project_id` bigint UNSIGNED DEFAULT NULL,
  `narration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `reference` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `source_id` bigint UNSIGNED DEFAULT NULL,
  `source_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency_id` int UNSIGNED NOT NULL,
  `tr_code` enum('DR','CR') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`),
  KEY `currency_id` (`currency_id`),
  KEY `fk_general_journals_project` (`project_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `general_journals`
--

INSERT INTO `general_journals` (`id`, `date`, `account_id`, `account_type`, `project_id`, `narration`, `reference`, `source_id`, `source_type`, `currency_id`, `tr_code`, `amount`, `created_at`, `updated_at`) VALUES
(1, '2025-08-08', 26, NULL, NULL, 'teseyes', 'eyyy', NULL, NULL, 2, 'CR', 45.00, '2025-08-08 12:49:12', '2025-08-08 12:49:12'),
(2, '2025-08-18', 21, NULL, NULL, 'eyes', 'eyyytest', NULL, NULL, 1, 'CR', 234.00, '2025-08-18 08:06:22', '2025-08-18 08:06:22'),
(3, '2025-08-18', 19, NULL, NULL, 'teseyes', 'eyyytest', NULL, NULL, 1, 'DR', 4567.00, '2025-08-18 08:37:53', '2025-08-18 08:37:53'),
(4, '2025-08-18', 17, NULL, NULL, 'teseyes', 'test', NULL, NULL, 2, 'CR', 4567.00, '2025-08-18 08:37:53', '2025-08-18 08:37:53'),
(5, '2025-08-18', 19, NULL, NULL, 'eyes', 'eyyytest', NULL, NULL, 2, 'CR', 4567.00, '2025-08-18 08:43:25', '2025-08-18 08:43:25'),
(6, '2025-08-18', 34, NULL, NULL, 'eyes', 'eyyy', NULL, NULL, 2, 'DR', 4567.00, '2025-08-18 08:43:25', '2025-08-18 08:43:25'),
(7, '2025-08-18', 26, NULL, NULL, 'teseyes', 'eyyytest', NULL, NULL, 1, 'CR', 4567.00, '2025-08-18 08:44:04', '2025-08-18 08:44:04'),
(8, '2025-08-18', 20, NULL, NULL, 'eyyywerew', 'test', NULL, NULL, 1, 'DR', 4567.00, '2025-08-18 08:44:04', '2025-08-18 08:44:04');

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

--
-- Table structure for table `general_journal_temps`
--

CREATE TABLE IF NOT EXISTS `general_journal_temps` (
  `id` int NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `account_id` bigint UNSIGNED NOT NULL,
  `account_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'AppModelsGeneralLedger',
  `project_id` bigint UNSIGNED DEFAULT NULL,
  `narration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `reference` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency_id` int UNSIGNED NOT NULL,
  `tr_code` enum('DR','CR') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `status` enum('Pending','Processed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Pending',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`),
  KEY `currency_id` (`currency_id`),
  KEY `fk_general_journal_temps_project` (`project_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `general_journal_temps`
--

INSERT INTO `general_journal_temps` (`id`, `date`, `account_id`, `account_type`, `project_id`, `narration`, `reference`, `currency_id`, `tr_code`, `amount`, `status`, `created_at`, `updated_at`) VALUES
(10, '2025-08-19', 19, 'AppModelsGeneralLedger', NULL, 'AGain', 'test', 1, 'CR', 9.00, 'Pending', '2025-08-19 04:49:06', '2025-09-10 12:34:43'),
(12, '2025-09-10', 57, 'AppModelsGeneralLedger', NULL, 'office machines', 'REF GJ-J 031', 2, 'CR', 118.00, 'Pending', '2025-09-10 12:33:13', '2025-09-10 12:33:13'),
(13, '2025-12-19', 58, '', NULL, 'DEMO', 'demo', 2, 'DR', 233.07, 'Pending', '2025-12-19 08:02:27', '2025-12-19 08:03:07'),
(14, '2025-12-19', 64, '', NULL, 'DEMO2', 'demo', 1, 'DR', 233.00, 'Pending', '2025-12-19 08:02:54', '2025-12-19 08:02:54');

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

--
-- Table structure for table `general_ledgers`
--

CREATE TABLE IF NOT EXISTS `general_ledgers` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `account_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_type` enum('asset','liability','equity','revenue','expense') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_code` (`account_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `groups`
--

CREATE TABLE IF NOT EXISTS `groups` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `groups`
--

INSERT INTO `groups` (`id`, `name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'Administrator', 'Administration', '2025-09-09 21:20:38', '2025-09-09 21:20:38'),
(2, 'Accounts', 'Accounts Department', '2025-09-10 02:31:54', '2025-09-10 02:31:54'),
(3, 'IT', 'IT Department', '2025-09-10 02:32:33', '2025-09-10 02:32:33'),
(4, 'Marketing', 'Marketing Department', '2025-09-10 02:33:06', '2025-09-10 02:33:06');

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

--
-- Table structure for table `home_currencies`
--

CREATE TABLE IF NOT EXISTS `home_currencies` (
  `id` int NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency` int NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `home_currencies`
--

INSERT INTO `home_currencies` (`id`, `code`, `currency`, `description`, `created_at`, `updated_at`) VALUES
(2, '10003', 1, 'tesuuu', '2025-06-12 11:01:59', '2025-09-09 11:50:21'),
(7, 'CRNCY01', 1, 'USD', '2025-09-09 11:48:58', '2025-09-09 11:48:58'),
(8, 'CRNCY03', 13, 'KWACHA', '2025-09-09 11:49:53', '2025-09-09 11:49:53'),
(9, 'DEM001', 13, 'demo432', '2025-12-19 07:40:22', '2025-12-19 07:40:22');

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

--
-- Table structure for table `home_currency`
--

CREATE TABLE IF NOT EXISTS `home_currency` (
  `id` int NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `home_currency`
--

INSERT INTO `home_currency` (`id`, `code`, `currency`, `description`, `created_at`, `updated_at`) VALUES
(1, 'USD', '1', 'home', '2025-06-12 07:37:57', '2025-06-12 07:37:57'),
(2, '4000', '2', '345678', '2025-06-12 07:38:12', '2025-06-12 07:38:12');

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

--
-- Table structure for table `inventories`
--

CREATE TABLE IF NOT EXISTS `inventories` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `item_id` bigint UNSIGNED NOT NULL,
  `warehouse_id` int UNSIGNED NOT NULL,
  `available_quantity` decimal(15,4) NOT NULL DEFAULT '0.0000',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `item_id` (`item_id`),
  KEY `warehouse_id` (`warehouse_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `inventory_categories`
--

CREATE TABLE IF NOT EXISTS `inventory_categories` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `group_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `inventory_categories_group_code_unique` (`group_code`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inventory_categories`
--

INSERT INTO `inventory_categories` (`id`, `group_code`, `name`, `description`, `created_at`, `updated_at`) VALUES
(2, '001', 'Computer Equipment', 'White T-shirt', '2025-06-13 12:49:03', '2025-06-13 12:49:03'),
(6, 'STK00002', 'Stationaries', 'Stationaries', '2025-09-09 10:48:25', '2025-09-09 10:51:11'),
(7, 'STK00004', 'Network Cables', 'Network Cables', '2025-09-09 10:49:20', '2025-09-09 10:49:20'),
(8, 'STK00006', 'Groceries', 'Groceries', '2025-09-09 10:50:52', '2025-09-09 10:50:52'),
(11, 'DEM001', 'demo', 'demo2', '2025-12-16 08:27:34', '2025-12-16 08:27:34');

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

--
-- Table structure for table `inventory_journals`
--

CREATE TABLE IF NOT EXISTS `inventory_journals` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `item_id` bigint UNSIGNED NOT NULL,
  `warehouse_id` int UNSIGNED NOT NULL,
  `gl_control_account_id` bigint UNSIGNED NOT NULL,
  `reference` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `project_id` bigint UNSIGNED DEFAULT NULL,
  `quantity_in` decimal(15,2) DEFAULT NULL,
  `quantity_out` decimal(15,2) DEFAULT NULL,
  `uom_id` int UNSIGNED NOT NULL,
  `currency_id` int UNSIGNED NOT NULL,
  `unit_cost` decimal(15,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `item_id` (`item_id`),
  KEY `warehouse_id` (`warehouse_id`),
  KEY `gl_control_account_id` (`gl_control_account_id`),
  KEY `project_id` (`project_id`),
  KEY `uom_id` (`uom_id`),
  KEY `currency_id` (`currency_id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inventory_journals`
--

INSERT INTO `inventory_journals` (`id`, `date`, `item_id`, `warehouse_id`, `gl_control_account_id`, `reference`, `description`, `project_id`, `quantity_in`, `quantity_out`, `uom_id`, `currency_id`, `unit_cost`, `created_at`, `updated_at`) VALUES
(1, '2025-08-20', 5, 1, 27, 'qwer', 'rgh', 2, 2.00, 0.00, 4, 2, 1000.00, '2025-08-21 05:03:59', '2025-08-21 05:03:59'),
(2, '2025-08-21', 5, 1, 34, 'qwer', 'wertrew', 2, 0.00, 345.00, 9, 2, 100.00, '2025-08-21 05:51:31', '2025-08-21 05:51:31'),
(3, '2025-08-21', 15, 5, 34, 'qwer', 'sdfghjkjhgfd', 2, 200.00, 0.00, 4, 2, 209.00, '2025-08-21 05:51:33', '2025-08-21 05:51:33'),
(4, '2025-09-02', 8, 5, 43, 'test', 'rice', 2, 1000.00, 12.00, 4, 1, 10.00, '2025-09-02 12:10:03', '2025-09-02 12:10:03'),
(5, '2025-09-02', 9, 1, 34, 'eyyytest', NULL, 2, 2000.00, 0.00, 11, 1, 100.00, '2025-09-02 12:10:48', '2025-09-02 12:10:48'),
(6, '2025-09-10', 7, 1, 7, 'WRHSE022', 'Ram', 5, 27.00, 5.00, 10, 1, 5000.00, '2025-09-10 14:04:19', '2025-09-10 14:04:19'),
(7, '2025-09-10', 16, 5, 7, 'WRHSE024', 'testinnngnn', NULL, 117.00, 21.00, 10, 12, 35.00, '2025-09-10 14:05:51', '2025-09-10 14:05:51'),
(8, '2025-09-10', 17, 5, 39, 'WRHSE029', NULL, NULL, 117.00, 21.00, 10, 1, 19.05, '2025-09-10 14:05:51', '2025-09-10 14:05:51'),
(9, '2025-09-29', 9, 5, 21, 'invtest0302', 'testinf item by journal', 2, 1002.00, 0.00, 4, 1, 10.00, '2025-09-29 11:25:58', '2025-09-29 11:25:58'),
(10, '2025-09-29', 16, 5, 35, 'invtest1234', 'testitems', 4, 123.00, 0.00, 4, 1, 34.00, '2025-09-29 11:26:03', '2025-09-29 11:26:03'),
(11, '2025-09-29', 7, 1, 21, 'testing all', 'testall', 2, 3000.00, 0.00, 4, 1, 10.00, '2025-09-29 11:26:03', '2025-09-29 11:26:03');

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

--
-- Table structure for table `inventory_journal_temps`
--

CREATE TABLE IF NOT EXISTS `inventory_journal_temps` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `item_id` bigint UNSIGNED NOT NULL,
  `warehouse_id` int UNSIGNED NOT NULL,
  `gl_control_account_id` bigint UNSIGNED NOT NULL,
  `reference` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `project_id` bigint UNSIGNED DEFAULT NULL,
  `quantity_in` decimal(15,2) DEFAULT NULL,
  `quantity_out` decimal(15,2) DEFAULT NULL,
  `uom_id` int UNSIGNED NOT NULL,
  `currency_id` int UNSIGNED NOT NULL,
  `unit_cost` decimal(15,2) NOT NULL,
  `status` enum('Pending','Processed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Pending',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `item_id` (`item_id`),
  KEY `warehouse_id` (`warehouse_id`),
  KEY `gl_control_account_id` (`gl_control_account_id`),
  KEY `project_id` (`project_id`),
  KEY `uom_id` (`uom_id`),
  KEY `currency_id` (`currency_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inventory_journal_temps`
--

INSERT INTO `inventory_journal_temps` (`id`, `date`, `item_id`, `warehouse_id`, `gl_control_account_id`, `reference`, `description`, `project_id`, `quantity_in`, `quantity_out`, `uom_id`, `currency_id`, `unit_cost`, `status`, `created_at`, `updated_at`) VALUES
(13, '2025-12-19', 9, 8, 64, 'demo', 'demo', 2, 32.00, 98.00, 17, 1, 100.00, 'Pending', '2025-12-19 08:04:33', '2025-12-19 08:04:33');

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

--
-- Table structure for table `inventory_transactions`
--

CREATE TABLE IF NOT EXISTS `inventory_transactions` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `transaction_type` enum('receipt','issue','adjustment') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `debit_credit` enum('debit','credit') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `debit_ledger_account_id` bigint UNSIGNED NOT NULL,
  `credit_ledger_account_id` bigint UNSIGNED NOT NULL,
  `tax_account_id` bigint UNSIGNED DEFAULT NULL,
  `always_prompt_credit` tinyint(1) DEFAULT '0',
  `always_split_credit` tinyint(1) DEFAULT '0',
  `use_tax` tinyint(1) DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`),
  KEY `fk_inventory_debit` (`debit_ledger_account_id`),
  KEY `fk_inventory_credit` (`credit_ledger_account_id`),
  KEY `fk_inventory_tax` (`tax_account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inventory_transactions`
--

INSERT INTO `inventory_transactions` (`id`, `transaction_type`, `code`, `description`, `debit_credit`, `debit_ledger_account_id`, `credit_ledger_account_id`, `tax_account_id`, `always_prompt_credit`, `always_split_credit`, `use_tax`, `created_at`, `updated_at`) VALUES
(2, 'receipt', 'IWO', 'Inventory Write-Off', 'credit', 7, 46, NULL, 0, 0, 0, '2025-09-01 05:29:55', '2025-09-01 05:29:55'),
(3, 'receipt', 'IG', 'Inventory Gain', 'debit', 7, 46, NULL, 0, 0, 0, '2025-09-01 05:30:23', '2025-09-01 05:30:23'),
(4, 'receipt', 'OB', 'Opening Balance', 'debit', 7, 19, NULL, 0, 0, 0, '2025-09-01 05:31:12', '2025-09-01 05:31:12'),
(5, 'receipt', 'WT', 'Warehouse Transfer', 'debit', 7, 46, NULL, 0, 0, 0, '2025-09-01 05:32:21', '2025-09-01 05:32:21'),
(6, 'receipt', 'WTSC', 'Warehouse Transfer Supplier Cost', 'credit', 14, 7, 15, 0, 0, 1, '2025-09-01 05:33:11', '2025-09-01 05:33:11'),
(7, 'receipt', '5001', 'Received Stock', 'debit', 7, 13, NULL, 0, 0, 0, '2025-09-08 14:09:30', '2025-09-08 14:09:30'),
(8, 'receipt', '5002', 'Breakages', 'debit', 55, 46, NULL, 0, 0, 0, '2025-09-08 14:12:03', '2025-09-08 14:12:03'),
(12, 'receipt', 'DEM001', 'demo', 'debit', 58, 58, NULL, 0, 0, 0, '2025-12-19 05:49:13', '2025-12-19 05:49:13'),
(13, 'receipt', 'DEM002', 'demo', 'debit', 64, 64, NULL, 0, 0, 0, '2025-12-19 05:49:39', '2025-12-19 05:49:39');

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

--
-- Table structure for table `invoice_generation`
--

CREATE TABLE IF NOT EXISTS `invoice_generation` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `added_by` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `items`
--

CREATE TABLE IF NOT EXISTS `items` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `warehouse` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `groups` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `price` decimal(15,2) DEFAULT NULL,
  `selling_price` decimal(15,2) DEFAULT NULL,
  `currency` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `itemwarehouse`
--

CREATE TABLE IF NOT EXISTS `itemwarehouse` (
  `id` int NOT NULL AUTO_INCREMENT,
  `item_id` int NOT NULL,
  `warehouse_id` int NOT NULL,
  `quantity` int DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `itemwarehouse`
--

INSERT INTO `itemwarehouse` (`id`, `item_id`, `warehouse_id`, `quantity`, `created_at`, `updated_at`) VALUES
(1, 21, 4, 0, '2025-09-24 12:46:49', '2025-09-25 13:32:59'),
(2, 21, 1, 391, '2025-09-25 08:34:15', '2025-10-18 08:09:18'),
(3, 22, 1, 100, '2025-09-26 07:41:24', '2025-09-26 07:54:25'),
(4, 9, 5, 1002, '2025-09-29 11:25:58', '2025-09-29 11:25:58'),
(5, 16, 5, 123, '2025-09-29 11:26:03', '2025-09-29 11:26:03'),
(6, 7, 1, 1980, '2025-09-29 11:26:03', '2025-09-30 14:39:05'),
(7, 7, 6, 20, '2025-09-30 12:37:23', '2025-09-30 14:39:05'),
(8, 9, 1, -102, '2025-11-11 03:01:06', '2025-11-11 03:01:06'),
(9, 15, 1, -10, '2025-11-11 12:15:41', '2025-11-11 12:15:41'),
(10, 10, 1, -1, '2025-11-15 10:18:50', '2025-11-15 10:18:50'),
(11, 23, 7, 20, '2025-12-11 13:40:05', '2025-12-11 13:40:05'),
(12, 24, 8, 500, '2025-12-11 13:45:55', '2025-12-11 13:45:55'),
(13, 25, 7, 5456, '2025-12-19 07:08:38', '2025-12-19 07:08:38');

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

--
-- Table structure for table `item_type_images`
--

CREATE TABLE IF NOT EXISTS `item_type_images` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `price_listing_setup_id` int UNSIGNED NOT NULL,
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `item_type_images`
--

INSERT INTO `item_type_images` (`id`, `price_listing_setup_id`, `path`, `created_at`, `updated_at`) VALUES
(2, 4, 'item_types/4/QW1kyBCkaBsfEPKt1hJ4ApmDW22EGu7cCUF4B6Gr.png', '2025-06-23 09:40:48', '2025-06-23 09:40:48'),
(4, 9, 'item_types/9/HDAMX8aLzkhCFJUprhvXf5KWIdS3XqUIx9ZDqprz.jpg', '2025-06-23 12:25:12', '2025-06-23 12:25:12'),
(5, 9, 'item_types/9/Spa0fodBsdz9Yxio3Q3xKuGyR1zMuj4SBg0Nyv9f.jpg', '2025-06-23 12:25:12', '2025-06-23 12:25:12'),
(6, 9, 'item_types/9/WMlUsBduJhVVdium9AHEaOzE7OTFCtkvATM4eaGY.jpg', '2025-06-23 12:25:12', '2025-06-23 12:25:12'),
(7, 9, 'item_types/9/7ITkQJetRsXOn75YZZBJBqZkegZJkPO3Bug1vp5x.jpg', '2025-06-23 12:25:12', '2025-06-23 12:25:12'),
(10, 17, 'item_types/17/Mo4DwK5cqnLmO56GeocSbZJEG3L989YnHxexGfnh.webp', '2025-09-09 10:59:35', '2025-09-09 10:59:35');

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

--
-- Table structure for table `jobs`
--

CREATE TABLE IF NOT EXISTS `jobs` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payload` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `attempts` int DEFAULT NULL,
  `reserved_at` timestamp NULL DEFAULT NULL,
  `available_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `jobs_batches`
--

CREATE TABLE IF NOT EXISTS `jobs_batches` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_jobs` int DEFAULT NULL,
  `pending_jobs` int DEFAULT NULL,
  `failed_jobs` int DEFAULT NULL,
  `failed_jobs_ids` int DEFAULT NULL,
  `options` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cancelled_at` timestamp NULL DEFAULT NULL,
  `finished_at` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `journals`
--

CREATE TABLE IF NOT EXISTS `journals` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `levels`
--

CREATE TABLE IF NOT EXISTS `levels` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `levelNumber` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `locations`
--

CREATE TABLE IF NOT EXISTS `locations` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `location_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `main_accounts`
--

CREATE TABLE IF NOT EXISTS `main_accounts` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `financial_category` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `main_accounts`
--

INSERT INTO `main_accounts` (`id`, `code`, `account_type`, `financial_category`, `account_code`, `account_name`, `created_at`, `updated_at`) VALUES
(7, '7400', '14', 'BS', NULL, 'Stock', '2025-05-23 23:31:24', '2025-05-23 23:31:24'),
(8, '4000', '10', 'IS', NULL, 'General Expenses', '2025-05-23 23:33:02', '2025-05-23 23:33:02'),
(9, '8400', '12', 'BS', NULL, 'Cash USD', '2025-05-23 23:33:37', '2025-05-23 23:33:37'),
(10, '8410', '12', 'BS', NULL, 'CABS USD', '2025-05-23 23:34:12', '2025-05-23 23:34:12'),
(11, '8420', '12', 'BS', NULL, 'CABS ZWG', '2025-05-23 23:34:57', '2025-05-23 23:34:57'),
(12, '8430', '12', 'BS', NULL, 'Cash ZWG', '2025-05-23 23:35:35', '2025-05-23 23:35:35'),
(13, '7100', '3', 'BS', NULL, 'Trade Receivable', '2025-05-23 23:37:27', '2025-05-23 23:37:27'),
(14, '9100', '4', 'BS', NULL, 'Trade Payable', '2025-05-23 23:37:56', '2025-05-23 23:37:56'),
(15, '9600', '6', 'BS', NULL, 'Vat', '2025-05-23 23:38:33', '2025-05-23 23:38:33'),
(16, '4100', '10', 'IS', NULL, 'Salaries & Wages', '2025-05-23 23:39:09', '2025-05-23 23:39:09'),
(17, '4300', '10', 'IS', NULL, 'Depreciation', '2025-05-23 23:39:38', '2025-05-23 23:39:38'),
(18, '9300', '6', 'BS', NULL, 'Purchase Accrual', '2025-05-23 23:41:56', '2025-05-23 23:41:56'),
(19, '9500', '6', 'BS', NULL, 'Opening/Suspense', '2025-05-23 23:42:54', '2025-05-23 23:42:54'),
(20, '8200', '5', 'BS', NULL, 'Prepayment', '2025-05-24 07:13:56', '2025-05-24 07:13:56'),
(21, '9200', '6', 'BS', NULL, 'Loan/From', '2025-05-24 07:14:49', '2025-05-24 07:14:49'),
(22, '8000', '5', 'BS', NULL, 'Director Loan', '2025-05-24 07:19:49', '2025-05-24 07:19:49'),
(25, '9400', '6', 'BS', NULL, 'Salaries & Wages Payable', '2025-05-24 07:21:38', '2025-05-24 07:21:38'),
(26, '8520', '5', 'BS', NULL, 'Loan/To Subsidiaries', '2025-05-24 07:22:45', '2025-05-24 07:22:45'),
(27, '9650', '6', 'BS', NULL, 'Loan/From Subsidiaries', '2025-05-24 07:23:21', '2025-05-24 07:23:21'),
(28, '9250', '6', 'BS', NULL, 'Dividend Payable', '2025-05-24 07:24:47', '2025-05-24 07:24:47'),
(30, '9350', '6', 'BS', NULL, 'Rent Payable', '2025-05-24 07:27:25', '2025-05-24 07:27:25'),
(31, '9950', '23', 'BS', NULL, 'Shareholder Capital', '2025-05-24 07:28:03', '2025-05-24 07:28:03'),
(32, '8530', '5', 'BS', NULL, 'Undeposited Funds', '2025-05-24 07:29:03', '2025-05-24 07:29:03'),
(34, '8270', '5', 'BS', NULL, 'Intercompany Receivable', '2025-05-24 07:31:41', '2025-05-24 07:31:41'),
(35, '9150', '6', 'BS', NULL, 'Intercompany Payable', '2025-05-24 07:32:13', '2025-05-24 07:32:13'),
(37, '2000', '2', 'IS', NULL, 'Purchases', '2025-05-30 19:58:28', '2025-05-30 19:58:28'),
(38, '2100', '11', 'IS', NULL, 'Cost of Goods sold', '2025-05-30 19:59:29', '2025-05-30 19:59:29'),
(39, '2200', '2', 'IS', NULL, 'Purchase Cost Variance', '2025-05-30 20:00:07', '2025-05-30 20:00:07'),
(43, '1000', '13', 'IS', NULL, 'Sales', '2025-06-24 12:17:41', '2025-06-24 12:17:41'),
(46, '2400', '2', 'IS', NULL, 'Stock Adjustments', '2025-06-26 11:23:57', '2025-06-26 11:23:57'),
(50, '1500', '13', 'IS', NULL, 'service', '2025-06-26 18:41:17', '2025-06-26 18:41:17'),
(52, '9700', '16', 'BS', NULL, 'Supplier Control', '2025-08-08 06:07:20', '2025-08-08 06:07:20'),
(54, '1200', '17', 'IS', NULL, 'Other Income', '2025-09-01 05:13:21', '2025-09-01 05:13:21'),
(55, '2300', '2', 'IS', NULL, 'Stock Cost Variance', '2025-09-01 05:14:26', '2025-09-01 05:14:26'),
(56, '999999', '13', 'IS', NULL, 'Computer Repairs', '2025-09-04 10:56:48', '2025-09-04 10:56:48'),
(57, '909099', '17', 'IS', NULL, 'Computer Maintenance', '2025-09-04 10:59:10', '2025-09-04 10:59:10'),
(58, 'DEM001', '24', 'IS', NULL, 'DEMO', '2025-12-12 06:20:24', '2025-12-12 06:20:24'),
(64, 'DEM003', '2', 'IS', NULL, 'demo', '2025-12-12 13:17:41', '2025-12-12 13:17:41');

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

--
-- Table structure for table `migrations`
--

CREATE TABLE IF NOT EXISTS `migrations` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_reset_tokens_table', 1),
(3, '2014_10_12_100000_create_password_resets_table', 1),
(4, '2019_08_19_000000_create_failed_jobs_table', 1),
(5, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(6, '2024_11_05_130802_create_account_types_table', 1),
(7, '2024_11_05_130958_create_banks_table', 1),
(8, '2024_11_05_131112_create_cashbook_table', 1),
(9, '2024_11_05_131239_create_currencies_table', 1),
(10, '2024_11_05_131326_create_customers_table', 1),
(11, '2024_11_05_131600_create_levels_table', 1),
(12, '2024_11_05_131739_create_home_currency_table', 1),
(13, '2024_11_05_131827_create_main_accounts_table', 1),
(14, '2024_11_05_132016_create_property_details_table', 1),
(15, '2024_11_05_132219_create_rates_table', 1),
(16, '2024_11_05_132302_create_units_table', 1),
(17, '2024_11_05_132420_create_sessions_table', 1),
(18, '2024_11_05_132643_create_sub_accounts_table', 1),
(19, '2024_11_05_132745_create_suppliers_table', 1),
(20, '2024_11_05_132935_create_tenants_table', 1),
(21, '2024_11_05_133211_create_tax_table', 1),
(22, '2024_11_05_133330_create_transactions_table', 1),
(23, '2024_11_05_133721_create_transaction_job_table', 1),
(24, '2024_11_05_134006_create_user_details_table', 1),
(25, '2024_11_05_134205_create_cache_table', 1),
(26, '2024_11_05_134510_create_cache_locks_table', 1),
(27, '2024_11_05_134559_create_customer_invoice_generation_table', 1),
(28, '2024_11_05_134643_create_customer_receipt_generation_table', 1),
(29, '2024_11_05_134736_create_invoice_generation_table', 1),
(30, '2024_11_05_134807_create_jobs_table', 1),
(31, '2024_11_05_135100_create_jobs_batches_table', 1),
(32, '2024_11_05_135359_create_journals_table', 1),
(33, '2024_11_05_135531_create_other_accounts_table', 1),
(34, '2024_11_05_135618_create_receipt_generation_table', 1),
(35, '2024_11_05_135804_create_asset_types_table', 1),
(36, '2024_11_05_135953_create_assets_table', 1),
(37, '2024_11_05_140623_create_block_depreciation_table', 1),
(38, '2024_11_05_141035_create_tax_depreciation_table', 1),
(39, '2024_11_05_141119_create_employee_table', 1),
(40, '2024_11_05_141308_create_locations_table', 1),
(41, '2024_11_05_141403_create_cost_center_table', 1),
(42, '2024_11_05_141447_create_departments_table', 1),
(43, '2024_11_05_141546_create_depreciation_methods_table', 1),
(44, '2024_11_05_141956_create_groups_table', 1),
(45, '2024_11_05_142045_create_items_table', 1),
(46, '2024_11_05_142254_create_warehouse_table', 1),
(47, '2024_11_05_142342_create_transaction_types_table', 1),
(48, '2024_11_07_092048_create_transaction_type_table', 1),
(49, '2024_11_11_095222_create_session_table', 1),
(50, '2024_11_12_120336_create_rooms_table', 1),
(51, '2026_04_29_000001_add_parent_link_to_document_headers', 2),
(52, '2026_04_29_000002_add_parent_link_to_supplier_document_headers', 2),
(53, '2026_04_29_000003_add_source_link_to_general_journals', 2),
(54, '2026_05_05_114756_make_documents_immutable_with_triggers', 3),
(55, '2026_05_05_160000_remove_immutability_add_editability_and_linking', 3),
(56, '2026_05_07_115558_add_account_type_to_document_lines', 4),
(57, '2026_05_07_115652_add_account_type_to_supplier_document_lines', 4),
(58, '2026_05_07_120144_add_account_type_to_general_journals', 4),
(59, '2026_05_07_135721_add_account_type_to_general_journal_temps', 5),
(60, '2026_05_20_092114_add_account_id_to_receipt_lines_table', 6),
(61, '2026_05_21_114726_update_logo_path_to_longtext_on_company_settings_table', 7),
(62, '2026_05_21_115541_update_receipts_table_for_walkin', 8);

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

--
-- Table structure for table `other_accounts`
--

CREATE TABLE IF NOT EXISTS `other_accounts` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `payment_methods`
--

CREATE TABLE IF NOT EXISTS `payment_methods` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `payment_methods` (`id`, `code`, `description`, `created_at`, `updated_at`) VALUES
(1, 'BANK', 'Bank Transfer', '2025-11-17 08:10:16', '2025-11-17 08:10:16'),
(2, 'MOBILE', 'Mobile Money', '2025-11-17 08:10:16', '2025-11-17 08:10:16'),
(3, 'CARD', 'Credit/Debit Card', '2025-11-17 08:10:16', '2025-11-17 08:10:16');

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

--
-- Table structure for table `payment_types`
--

CREATE TABLE IF NOT EXISTS `payment_types` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment_types`
--

INSERT INTO `payment_types` (`id`, `code`, `description`, `created_at`, `updated_at`) VALUES
(1, '1000', 'Ecocash USD', '2025-11-17 07:11:11', '2025-11-17 07:11:11'),
(2, '8200', 'Cash', '2025-11-17 07:11:43', '2025-11-17 07:11:43'),
(4, 'DEM001', 'demo1', '2025-12-19 06:07:12', '2025-12-19 06:07:56');

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

--
-- Table structure for table `permissions`
--

CREATE TABLE IF NOT EXISTS `permissions` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `groupby` int NOT NULL,
  `feature` varchar(225) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `groupby_index` (`groupby`)
) ENGINE=InnoDB AUTO_INCREMENT=266 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `slug`, `groupby`, `feature`, `created_at`, `updated_at`) VALUES
(1, 'Edit', 'Edit', 0, 'Mainmenu', NULL, NULL),
(2, 'Chart of Accounts', 'Chart of Accounts', 1, 'chartofaccounts', NULL, NULL),
(3, 'General Ledger', 'General Ledger', 2, 'chartofaccounts', '2025-09-11 16:51:58', '2025-09-11 16:51:58'),
(4, 'Add General Ledger', 'Add General Ledger', 2, 'chartofaccounts', '2025-09-11 16:51:58', '2025-09-11 16:51:58'),
(5, 'Edit General Ledger', 'Edit General Ledger', 2, 'chartofaccounts', '2025-09-11 16:53:24', '2025-09-11 16:53:24'),
(6, 'Delete General Ledger', 'Delete General Ledger', 2, 'chartofaccounts', '2025-09-11 16:53:24', '2025-09-11 16:53:24'),
(7, 'Account Types', 'Account Types', 4, 'chartofaccounts', '2025-09-11 17:00:57', '2025-09-11 17:00:57'),
(8, 'Add Account Types', 'Add Account Types', 4, 'chartofaccounts', '2025-09-11 17:02:30', '2025-09-11 17:02:30'),
(9, 'Edit Account Types', 'Edit Account Types', 4, 'chartofaccounts', '2025-09-11 17:02:30', '2025-09-11 17:02:30'),
(10, 'Delete Account Types', 'Delete Account Types', 4, 'chartofaccounts', '2025-09-11 17:04:05', '2025-09-11 17:04:05'),
(11, 'Departments', 'Departments', 5, 'chartofaccounts', '2025-09-11 17:04:05', '2025-09-11 17:04:05'),
(12, 'Add Department', 'Add Department', 5, 'chartofaccounts', '2025-09-11 17:07:06', '2025-09-11 17:07:06'),
(13, 'Edit Department', 'Edit Department', 5, 'chartofaccounts', '2025-09-11 17:07:06', '2025-09-11 17:07:06'),
(14, 'Delete Department', 'Delete Department', 5, 'chartofaccounts', '2025-09-11 17:09:56', '2025-09-11 17:09:56'),
(15, 'Transaction Types', 'Transaction Types', 6, 'tranctiontypes', '2025-09-11 17:09:56', '2025-09-11 17:09:56'),
(16, 'Customers TType', 'Customers TType', 7, 'tranctiontypes', '2025-09-11 19:09:39', '2025-09-11 19:09:39'),
(17, 'Add Customer TType', 'Add Customer TType', 7, 'tranctiontypes', '2025-09-11 19:09:39', '2025-09-11 19:09:39'),
(18, 'Edit Customer TType', 'Edit Customer TType', 7, 'tranctiontypes', '2025-09-11 19:12:11', '2025-09-11 19:12:11'),
(19, 'Delete Customer TType', 'Delete Customer TType', 7, 'tranctiontypes', '2025-09-11 19:12:11', '2025-09-11 19:12:11'),
(20, 'Supplier TType', 'Supplier TType', 8, 'tranctiontypes', '2025-09-11 19:18:06', '2025-09-11 19:18:06'),
(21, 'Add Supplier TType', 'Add Supplier TType', 8, 'tranctiontypes', '2025-09-11 19:18:06', '2025-09-11 19:18:06'),
(22, 'Edit Supplier TType', 'Edit Supplier TType', 8, 'tranctiontypes', '2025-09-11 19:20:03', '2025-09-11 19:20:03'),
(23, 'Delete Supplier TType', 'Delete Supplier TType', 8, 'tranctiontypes', '2025-09-11 19:20:03', '2025-09-11 19:20:03'),
(24, 'Inventory TType', 'Inventory TType', 9, 'tranctiontypes', '2025-09-11 19:23:07', '2025-09-11 19:23:07'),
(25, 'Add Inventory TType', 'Add Inventory TType', 9, 'tranctiontypes', '2025-09-11 19:23:07', '2025-09-11 19:23:07'),
(26, 'Edit Inventory TType', 'Edit Inventory TType', 9, 'tranctiontypes', '2025-09-11 19:24:23', '2025-09-11 19:24:23'),
(27, 'Delete Inventory TType', 'Delete Inventory TType', 9, 'tranctiontypes', '2025-09-11 19:24:23', '2025-09-11 19:24:23'),
(28, 'Customers', 'Customers', 10, 'customers', '2025-09-12 10:24:15', '2025-09-12 10:24:15'),
(29, 'Customer Account', 'Customer Account', 11, 'customers', '2025-09-12 10:24:15', '2025-09-12 10:24:15'),
(30, 'Add Customer Account ', 'Add Customer Account ', 11, 'customers', '2025-09-12 10:25:25', '2025-09-12 10:25:25'),
(31, 'Edit Customer Account ', 'Edit Customer Account ', 11, 'customers', '2025-09-12 10:25:25', '2025-09-12 10:25:25'),
(32, 'Delete Customers Account', 'Delete Customers Account', 11, 'customers', '2025-09-12 10:31:26', '2025-09-12 10:31:26'),
(33, 'Suppliers', 'Suppliers', 12, 'suppliers', '2025-09-12 10:31:26', '2025-09-12 10:31:26'),
(34, 'Supplier Accounts', 'Supplier Accounts', 13, 'suppliers', '2025-09-12 10:41:40', '2025-09-12 10:41:40'),
(35, 'Add Supplier Account', 'Add Supplier Account', 13, 'suppliers', '2025-09-12 10:41:40', '2025-09-12 10:41:40'),
(36, 'Edit Supplier Account', 'Edit Supplier Account', 13, 'suppliers', '2025-09-12 11:01:10', '2025-09-12 11:01:10'),
(37, 'Delete Supplier Account', 'Delete Supplier Account', 13, 'suppliers', '2025-09-12 11:01:10', '2025-09-12 11:01:10'),
(38, 'Cashbook', 'Cashbook', 14, 'Cashbook', '2025-09-12 11:32:58', '2025-09-12 11:32:58'),
(39, 'Cashbook Account', 'Cashbook Account', 15, 'Cashbook', '2025-09-12 11:32:58', '2025-09-12 11:32:58'),
(40, 'Add Cashbook Account', 'Add Cashbook Account', 15, 'Cashbook', '2025-09-12 11:47:01', '2025-09-12 11:47:01'),
(41, 'Edit Cashbook Account', 'Edit Cashbook Account', 15, 'Cashbook', '2025-09-12 11:47:01', '2025-09-12 11:47:01'),
(42, 'Delete Cashbook Account', 'Delete Cashbook Account', 15, 'Cashbook', '2025-09-12 12:03:46', '2025-09-12 12:03:46'),
(43, 'Inventory', 'Inventory', 16, 'Inventory', '2025-09-12 12:03:46', '2025-09-12 12:03:46'),
(44, 'Bin Locations', 'Bin Locations', 17, 'Inventory', '2025-09-12 12:32:36', '2025-09-12 12:32:36'),
(45, 'Add Bin Locations', 'Add Bin Locations', 17, 'Inventory', '2025-09-12 12:32:36', '2025-09-12 12:32:36'),
(46, 'Edit Bin Locations', 'Edit Bin Locations', 17, 'Inventory', '2025-09-12 12:34:42', '2025-09-12 12:34:42'),
(47, 'Delete Bin Locations', 'Delete Bin Locations', 17, 'Inventory', '2025-09-12 12:34:42', '2025-09-12 12:34:42'),
(48, 'Cartegories', 'Cartegories', 18, 'Inventory', '2025-09-12 12:54:25', '2025-09-12 12:54:25'),
(49, 'Add Cartegories', 'Add Cartegories', 18, 'Inventory', '2025-09-12 12:54:25', '2025-09-12 12:54:25'),
(50, 'Edit Cartegories', 'Edit Cartegories', 18, 'Inventory', '2025-09-12 12:55:49', '2025-09-12 12:55:49'),
(51, 'Delete Cartegories', 'Delete Cartegories', 18, 'Inventory', '2025-09-12 12:55:49', '2025-09-12 12:55:49'),
(52, 'Items', 'Items', 19, 'Inventory', '2025-09-12 12:58:24', '2025-09-12 12:58:24'),
(53, 'Add Items', 'Add Items', 19, 'Inventory', '2025-09-12 12:58:24', '2025-09-12 12:58:24'),
(54, 'Edit Items', 'Edit Items', 19, 'Inventory', '2025-09-12 13:00:46', '2025-09-12 13:00:46'),
(55, 'Delete Items', 'Delete Items', 19, 'Inventory', '2025-09-12 13:00:46', '2025-09-12 13:00:46'),
(56, 'Price List Names', 'Price List Names', 20, 'Inventory', '2025-09-12 13:06:20', '2025-09-12 13:06:20'),
(57, 'Add Price List Name', 'Add Price List Name', 20, 'Inventory', '2025-09-12 13:06:20', '2025-09-12 13:06:20'),
(58, 'Edit Price List Name', 'Edit Price List Name', 20, 'Inventory', '2025-09-12 13:07:57', '2025-09-12 13:07:57'),
(59, 'Delete Price List Name', 'Delete Price List Name', 20, 'Inventory', '2025-09-12 13:07:57', '2025-09-12 13:07:57'),
(60, 'UOM', 'UOM', 21, 'Inventory', '2025-09-12 13:09:14', '2025-09-12 13:09:14'),
(61, 'Add UOM', 'Add UOM', 21, 'Inventory', '2025-09-12 13:09:14', '2025-09-12 13:09:14'),
(62, 'Edit UOM', 'Edit UOM', 21, 'Inventory', '2025-09-12 13:10:07', '2025-09-12 13:10:07'),
(63, 'Delete UOM', 'Delete UOM', 21, 'Inventory', '2025-09-12 13:10:07', '2025-09-12 13:10:07'),
(64, 'UOM Cartegories', 'UOM Cartegories', 22, 'Inventory', '2025-09-12 13:11:52', '2025-09-12 13:11:52'),
(65, 'Add UOM Cartegories', 'Add UOM Cartegories', 22, 'Inventory', '2025-09-12 13:11:52', '2025-09-12 13:13:09'),
(66, 'Edit UOM Cartegories ', 'Edit UOM Cartegories ', 22, 'Inventory', '2025-09-12 13:13:09', '2025-09-12 13:13:09'),
(67, 'Delete UOM Cartegories ', 'Delete UOM Cartegories ', 22, 'Inventory', '2025-09-12 13:13:09', '2025-09-12 13:13:09'),
(68, 'Warehouse', 'Warehouse', 23, 'Inventory', '2025-09-12 13:14:49', '2025-09-12 13:14:49'),
(69, 'Add Warehouse', 'Add Warehouse', 23, 'Inventory', '2025-09-12 13:14:49', '2025-09-12 13:14:49'),
(70, 'Edit Warehouse', 'Edit Warehouse', 23, 'Inventory', '2025-09-12 13:16:37', '2025-09-12 13:16:37'),
(71, 'Delete Warehouse', 'Delete Warehouse', 23, 'Inventory', '2025-09-12 13:16:37', '2025-09-12 13:16:37'),
(72, 'Multicurrency', 'Multicurrency', 24, 'Multicurrency', '2025-09-12 13:18:43', '2025-09-12 13:18:43'),
(73, 'Currency', 'Currency', 25, 'Multicurrency', '2025-09-12 13:18:43', '2025-09-12 13:18:43'),
(74, 'Add Currency ', 'Add Currency ', 25, 'Multicurrency', '2025-09-12 13:24:10', '2025-09-12 13:24:10'),
(75, 'Edit Currency ', 'Edit Currency ', 25, 'Multicurrency', '2025-09-12 13:24:10', '2025-09-12 13:24:10'),
(76, 'Delete Currency', 'Delete Currency', 25, 'Multicurrency', '2025-09-12 13:27:38', '2025-09-12 13:27:38'),
(77, 'Home Currency', 'Home Currency', 26, 'Multicurrency', '2025-09-12 13:27:38', '2025-09-12 13:27:38'),
(78, 'Add Home Currency', 'Add Home Currency', 26, 'Multicurrency', '2025-09-12 13:30:40', '2025-09-12 13:30:40'),
(79, 'Edit Home Currency', 'Edit Home Currency', 26, 'Multicurrency', '2025-09-12 13:30:40', '2025-09-12 13:30:40'),
(80, 'Delete Home Currency', 'Delete Home Currency', 26, 'Multicurrency', '2025-09-12 13:33:04', '2025-09-12 13:33:04'),
(81, 'Daily Rates', 'Daily Rates', 27, 'Multicurrency', '2025-09-12 13:33:04', '2025-09-12 13:33:04'),
(82, 'Add Daily Rates', 'Add Daily Rates', 27, 'Multicurrency', '2025-09-12 13:37:44', '2025-09-12 13:37:44'),
(83, 'Edit Daily Rates', 'Edit Daily Rates', 27, 'Multicurrency', '2025-09-12 13:37:44', '2025-09-12 13:37:44'),
(84, 'Delete Daily Rates', 'Delete Daily Rates', 27, 'Multicurrency', '2025-09-12 13:37:44', '2025-09-12 13:37:44'),
(85, 'Tax', 'Tax', 28, 'Tax', '2025-09-12 13:51:17', '2025-09-12 13:51:17'),
(86, 'Add Tax', 'Add Tax', 28, 'Tax', '2025-09-12 13:51:17', '2025-09-12 13:51:17'),
(87, 'Edit Tax', 'Edit Tax', 28, 'Tax', '2025-09-12 13:51:17', '2025-09-12 13:51:17'),
(88, 'Delete Tax', 'Delete Tax', 28, 'Tax', '2025-09-12 13:51:17', '2025-09-12 13:51:17'),
(89, 'Projects', 'Projects', 29, 'Projects', '2025-09-12 13:55:34', '2025-09-12 13:55:34'),
(90, 'Add Projects', 'Add Projects', 29, 'Projects', '2025-09-12 13:55:34', '2025-09-12 13:55:34'),
(91, 'Edit Projects', 'Edit Projects', 29, 'Projects', '2025-09-12 13:55:34', '2025-09-12 13:55:34'),
(92, 'Delete Projects', 'Delete Projects', 29, 'Projects', '2025-09-12 13:55:34', '2025-09-12 13:55:34'),
(93, 'Customer Cartegory', 'Customer Cartegory', 30, 'customers', '2025-09-13 12:42:14', '2025-09-13 12:42:14'),
(94, 'Add Customer Cartegory', 'Add Customer Cartegory', 30, 'customers', '2025-09-13 12:42:14', '2025-09-13 12:42:14'),
(95, 'Edit Customer Cartegory', 'Edit Customer Cartegory', 30, 'customers', '2025-09-13 12:43:24', '2025-09-13 12:43:24'),
(96, 'Delete Customer Cartegory', 'Delete Customer Cartegory', 30, 'customers', '2025-09-13 12:43:24', '2025-09-13 12:43:24'),
(97, 'Customer Age Analysis', 'Customer Age Analysis', 31, 'customers', '2025-09-13 12:47:06', '2025-09-13 12:47:06'),
(98, 'Add Customer Age Analysis', 'Add Customer Age Analysis', 31, 'customers', '2025-09-13 12:47:06', '2025-09-13 12:47:06'),
(99, 'Edit Customer Age Analysis', 'Edit Customer Age Analysis', 31, 'customers', '2025-09-13 12:47:06', '2025-09-13 12:47:06'),
(100, 'Delete Customer Age Analysis', 'Delete Customer Age Analysis', 31, 'customers', '2025-09-13 12:47:06', '2025-09-13 12:47:06'),
(101, 'Customer Sales Rep', 'Customer Sales Rep', 32, 'Customers', '2025-09-13 12:50:39', '2025-09-13 12:50:39'),
(102, 'Add Customer Sales Rep', 'Add Customer Sales Rep', 32, 'customers', '2025-09-13 12:50:39', '2025-09-13 12:50:39'),
(103, 'Edit Customer Sales Rep', 'Edit Customer Sales Rep', 32, 'customers', '2025-09-13 12:50:39', '2025-09-13 12:50:39'),
(104, 'Delete Customer Sales Rep', 'Delete Customer Sales Rep', 32, 'customers', '2025-09-13 12:50:39', '2025-09-13 12:50:39'),
(105, 'Customer Area', 'Customer Areas', 33, 'customers', '2025-09-13 12:54:05', '2025-09-13 12:54:05'),
(106, 'Add Customer Areas', 'Add Customer Areas', 33, 'customers', '2025-09-13 12:54:05', '2025-09-13 12:54:05'),
(107, 'Edit Customer Areas', 'Edit Customer Areas', 33, 'customers', '2025-09-13 12:54:05', '2025-09-13 12:54:05'),
(108, 'Delete Customer Areas', 'Delete Customer Areas', 33, 'customers', '2025-09-13 12:54:05', '2025-09-13 12:54:05'),
(109, 'Supplier Category', 'Supplier Categories ', 34, 'suppliers', '2025-09-13 12:59:43', '2025-09-13 12:59:43'),
(110, 'Add Supplier Categories ', 'Add Supplier Categories ', 34, 'suppliers', '2025-09-13 12:59:43', '2025-09-13 12:59:43'),
(111, 'Edit Supplier Categories ', 'Edit Supplier Categories ', 34, 'suppliers', '2025-09-13 12:59:43', '2025-09-13 12:59:43'),
(112, 'Delete Supplier Categories ', 'Delete Supplier Categories ', 34, 'suppliers', '2025-09-13 12:59:43', '2025-09-13 12:59:43'),
(113, 'Supplier Age Analysis', 'Supplier Age Analysis', 35, 'suppliers', '2025-09-13 13:02:12', '2025-09-13 13:02:12'),
(114, 'Add Supplier Age Analysis', 'Add Supplier Age Analysis', 35, 'suppliers', '2025-09-13 13:02:12', '2025-09-13 13:02:12'),
(115, 'Edit Supplier Age Analysis', 'Edit Supplier Age Analysis', 35, 'suppliers', '2025-09-13 13:02:12', '2025-09-13 13:02:12'),
(116, 'Delete Supplier Age Analysis', 'Delete Supplier Age Analysis', 35, 'suppliers', '2025-09-13 13:02:12', '2025-09-13 13:02:12'),
(117, 'Supplier Area', 'Supplier Area', 36, 'suppliers', '2025-09-13 13:04:06', '2025-09-13 13:04:06'),
(118, 'Add Supplier Area', 'Add Supplier Area', 36, 'suppliers', '2025-09-13 13:04:06', '2025-09-13 13:04:06'),
(119, 'Edit Supplier Area', 'Edit Supplier Area', 36, 'suppliers', '2025-09-13 13:04:06', '2025-09-13 13:04:06'),
(120, 'Delete Supplier Area', 'Delete Supplier Area', 36, 'suppliers', '2025-09-13 13:05:05', '2025-09-13 13:05:05'),
(121, 'Processing', 'Processing', 37, 'Process', '2025-09-13 13:40:30', '2025-09-13 13:40:30'),
(122, 'Process General Ledger', 'Process General Ledger', 38, 'Process General Ledger', '2025-09-13 13:40:30', '2025-09-13 13:40:30'),
(123, 'Bank Reconcilliation', 'Bank Reconcilliation', 39, 'Process General Ledger', '2025-09-13 14:30:39', '2025-09-13 14:30:39'),
(124, 'Add Bank Reconcilliation', 'Add Bank Reconcilliation', 39, 'Process General Ledger', '2025-09-13 14:30:39', '2025-09-13 14:30:39'),
(125, 'Edit Bank Reconcilliation', 'Edit Bank Reconcilliation', 39, 'Process General Ledger', '2025-09-13 14:30:39', '2025-09-13 14:30:39'),
(126, 'Delete Bank Reconcilliation', 'Delete Bank Reconcilliation', 39, 'Process General Ledger', '2025-09-13 14:30:39', '2025-09-13 14:30:39'),
(128, 'Cashbook Receipt', 'Process Cashbook Receipt', 40, 'Process General Ledger', '2025-09-13 14:41:46', '2025-09-13 14:41:46'),
(129, 'Add Cashbook Receipt', 'Add Cashbook Receipt', 40, 'Process General Ledger', '2025-09-13 14:41:46', '2025-09-13 14:41:46'),
(130, 'Edit Cashbook Receipt', 'Edit Cashbook Receipt', 40, 'Process General Ledger', '2025-09-13 14:41:46', '2025-09-13 14:41:46'),
(131, 'Delete Cashbook Receipt', 'Delete Cashbook Receipt', 40, 'Process General Ledger', '2025-09-13 14:41:46', '2025-09-13 14:41:46'),
(135, 'Cashbook Payment', 'Cashbook Payment', 41, 'Process General Ledger', '2025-09-13 14:46:17', '2025-09-13 14:46:17'),
(136, 'Add Cashbook Payment', 'Add Cashbook Payment', 41, 'Process General Ledger', '2025-09-13 14:46:17', '2025-09-13 14:46:17'),
(137, 'Edit Cashbook Payment', 'Edit Cashbook Payment', 41, 'Process General Ledger', '2025-09-13 14:46:17', '2025-09-13 14:46:17'),
(138, 'Delete Cashbook Payment', 'Delete Cashbook Payment', 41, 'Process General Ledger', '2025-09-13 14:46:17', '2025-09-13 14:46:17'),
(139, 'Process Customer', 'Process Customer', 42, 'Process Customer', '2025-09-13 16:08:49', '2025-09-13 16:08:49'),
(140, 'Customer Quotation', 'Customer Quotation', 43, 'Process Customer', '2025-09-13 16:08:49', '2025-09-13 16:08:49'),
(141, 'Add Customer Quotation', 'Add Customer Quotation', 43, 'Process Customer', '2025-09-13 16:11:40', '2025-09-13 16:11:40'),
(142, 'Edit Customer Quotation', 'Edit Customer Quotation', 43, 'Process Customer', '2025-09-13 16:11:40', '2025-09-13 16:11:40'),
(143, 'Delete Customer Quotation', 'Delete Customer Quotation', 43, 'Process Customer', '2025-09-13 16:15:19', '2025-09-13 16:15:19'),
(144, 'Sales Order', 'Sales Order', 45, 'Process Customer', '2025-09-13 16:15:19', '2025-09-13 16:15:19'),
(145, 'Add Sales Order', 'Add Sales Order', 45, 'Process Customer', '2025-09-13 16:18:59', '2025-09-13 16:18:59'),
(146, 'Edit Sales Order', 'Edit Sales Order', 45, 'Process Customer', '2025-09-13 16:18:59', '2025-09-13 16:18:59'),
(147, 'Delete Sales Order', 'Delete Sales Order', 45, 'Process Customer', '2025-09-13 16:20:39', '2025-09-13 16:20:39'),
(148, 'Customer Invoice', 'Customer Invoice', 46, 'Process Customer', '2025-09-13 16:20:39', '2025-09-13 16:20:39'),
(149, 'Add Customer Invoice', 'Add Customer Invoice', 46, 'Process Customer', '2025-09-13 16:22:07', '2025-09-13 16:22:07'),
(150, 'Edit Customer Invoice', 'Edit Customer Invoice', 46, 'Process Customer', '2025-09-13 16:22:07', '2025-09-13 16:22:07'),
(151, 'Delete Customer Invoice', 'Delete Customer Invoice', 46, 'Process Customer', '2025-09-13 16:27:35', '2025-09-13 16:27:35'),
(152, 'Credit Note', 'Credit Note', 47, 'Process Customer', '2025-09-13 16:27:35', '2025-09-13 16:27:35'),
(153, 'Add Credit Note', 'Add Credit Note', 47, 'Process Customer', '2025-09-13 16:28:36', '2025-09-13 16:28:36'),
(154, 'Edit Credit Note', 'Edit Credit Note', 47, 'Process Customer', '2025-09-13 16:28:36', '2025-09-13 16:28:36'),
(155, 'Delete Credit Note', 'Delete Credit Note', 47, 'Process Customer', '2025-09-13 16:36:54', '2025-09-13 16:36:54'),
(156, 'Debit Note', 'Debit Note', 48, 'Process Customer', '2025-09-13 16:36:54', '2025-09-13 16:36:54'),
(157, 'Add Debit Note', 'Add Debit Note', 48, 'Process Customer', '2025-09-13 16:38:16', '2025-09-13 16:38:16'),
(158, 'Edit Debit Note', 'Edit Debit Note', 48, 'Process Customer', '2025-09-13 16:38:16', '2025-09-13 16:38:16'),
(159, 'Delete Debit Note', 'Delete Debit Note', 48, 'Process Customer', '2025-09-13 16:41:16', '2025-09-13 16:41:16'),
(160, 'Customer Receipting', 'Customer Receipting', 49, 'Process Customer', '2025-09-13 16:41:16', '2025-09-13 16:41:16'),
(161, 'Add Customer Receipt', 'Add Customer Receipt', 49, 'Process Customer', '2025-09-13 16:43:14', '2025-09-13 16:43:14'),
(162, 'Edit Customer Receipt', 'Edit Customer Receipt', 49, 'Process Customer', '2025-09-13 16:43:14', '2025-09-13 16:43:14'),
(163, 'Delete Customer Receipt', 'Delete Customer Receipt', 49, 'Process Customer', '2025-09-13 16:50:02', '2025-09-13 16:50:02'),
(164, 'Process Supplier', 'Process Supplier', 50, 'Process Supplier', '2025-09-13 16:50:02', '2025-09-13 16:50:02'),
(165, 'Purchase Order', 'Purchase Order', 51, 'Process Supplier', '2025-09-13 16:54:14', '2025-09-13 16:54:14'),
(166, 'Add Purchase Order', 'Add Purchase Order', 51, 'Process Suppier', '2025-09-13 16:54:14', '2025-09-13 16:54:14'),
(167, 'Edit Purchase Order', 'Edit Purchase Order', 51, 'Process Supplier', '2025-09-13 16:54:14', '2025-09-13 16:54:14'),
(168, 'Delete Purchase Order', 'Delete Purchase Order', 51, 'Process Supplier', '2025-09-13 16:54:14', '2025-09-13 16:54:14'),
(169, 'Goods Received Voucher', 'Goods Received Voucher', 52, 'Process Supplier', '2025-09-13 17:06:21', '2025-09-13 17:06:21'),
(170, 'Add Goods Received Voucher', 'Add Goods Received Voucher', 52, 'Process Supplier', '2025-09-13 17:06:21', '2025-09-13 17:06:21'),
(171, 'Edit Goods Received Voucher', 'Edit Goods Received Voucher', 52, 'Process Supplier', '2025-09-13 17:17:14', '2025-09-13 17:17:14'),
(172, 'Delete Goods Received Voucher', 'Delete Goods Received Voucher', 52, 'Process Supplier', '2025-09-13 17:17:14', '2025-09-13 17:17:14'),
(173, 'Supplier Invoice', 'Supplier Invoice', 53, 'Process Supplier', '2025-09-13 17:38:13', '2025-09-13 17:38:13'),
(174, 'Add Supplier Invoice', 'Add Supplier Invoice', 53, 'Process Supplier', '2025-09-13 17:38:13', '2025-09-13 17:38:13'),
(175, 'Edit Supplier Invoice', 'Edit Supplier Invoice', 53, 'Process Supplier', '2025-09-13 17:39:52', '2025-09-13 17:39:52'),
(176, 'Return & Debit', 'Return & Debit', 54, 'Process Supplier', '2025-09-13 17:39:52', '2025-09-13 17:39:52'),
(177, 'Add Return & Debit', 'Add Return & Debit', 54, 'Process Supplier', '2025-09-13 17:40:58', '2025-09-13 17:40:58'),
(178, 'Edit Return & Debit', 'Edit Return & Debit', 54, 'Process Supplier', '2025-09-13 17:40:58', '2025-09-13 17:40:58'),
(179, 'Delete Return & Debit', 'Delete Return & Debit', 54, 'Process Supplier', '2025-09-13 17:42:54', '2025-09-13 17:42:54'),
(180, 'Credit To Supplier', 'Credit To Supplier', 55, 'Process Supplier', '2025-09-13 17:42:54', '2025-09-13 17:42:54'),
(181, 'Add Credit To Supplier', 'Add Credit To Supplier', 55, 'Process Supplier', '2025-09-13 18:08:52', '2025-09-13 18:08:52'),
(182, 'Edit Credit To Supplier', 'Edit Credit To Supplier', 55, 'Process Supplier', '2025-09-13 18:08:52', '2025-09-13 18:08:52'),
(183, 'Delete Creadit To Supplier', 'Delete Creadit To Supplier', 55, 'Process Supplier', '2025-09-13 18:10:50', '2025-09-13 18:10:50'),
(184, 'Journals', 'Journals', 56, 'Process Journal', '2025-09-13 18:10:50', '2025-09-13 18:10:50'),
(185, 'Customer Journal', 'Customer Journal', 57, 'Process Journal', '2025-09-13 18:12:24', '2025-09-13 18:12:24'),
(186, 'Add Customer Journals', 'Add Customer Journals', 57, 'Process Journal', '2025-09-13 18:12:24', '2025-09-13 18:12:24'),
(187, 'Edit Customer Journals', 'Edit Customer Journals', 57, 'Process Journal', '2025-09-13 18:14:30', '2025-09-13 18:14:30'),
(188, 'Delete Customer Journal', 'Delete Customer Journal', 57, 'Process Journal', '2025-09-13 18:14:30', '2025-09-13 18:14:30'),
(189, 'Supplier Journal', 'Supplier Journal', 58, 'Process Journal', '2025-09-13 18:20:36', '2025-09-13 18:20:36'),
(190, 'Add Supplier Journal', 'Add Supplier Journal', 58, 'Process Journal', '2025-09-13 18:20:36', '2025-09-13 18:20:36'),
(191, 'Edit Supplier Journal', 'Edit Supplier Journal', 58, 'Process Journal ', '2025-09-13 18:21:50', '2025-09-13 18:21:50'),
(192, 'Delete Supplier Journal', 'Delete Supplier Journal', 58, 'Process Journal', '2025-09-13 18:21:50', '2025-09-13 18:21:50'),
(193, 'General Journal', 'General Journal', 59, 'Process Journal', '2025-09-13 18:23:53', '2025-09-13 18:23:53'),
(194, 'Add General Journal', 'Add General Journal', 59, 'Process Journal', '2025-09-13 18:23:53', '2025-09-13 18:23:53'),
(195, 'Edit General Journal', 'Edit General Journal', 59, 'Process Journal', '2025-09-13 18:23:53', '2025-09-13 18:23:53'),
(196, 'Delete General Journal', 'Delete General Journal', 59, 'Process Journal', '2025-09-13 18:23:53', '2025-09-13 18:23:53'),
(197, 'Inventory  Journal', 'Inventory  Journal', 60, 'Process Journal', '2025-09-13 18:26:19', '2025-09-13 18:26:19'),
(198, 'Add Inventory Journal', 'Add Inventory Journal', 60, 'Process Journal', '2025-09-13 18:26:19', '2025-09-13 18:26:19'),
(199, 'Edit Inventory Journal', 'Edit Inventory Journal', 60, 'Process Journal', '2025-09-13 18:26:19', '2025-09-13 18:26:19'),
(200, 'Delete Inventory Journal', 'Delete Inventory Journal', 60, 'Process Journal', '2025-09-13 18:26:19', '2025-09-13 18:26:19'),
(201, 'Warehouse Transfer', 'Warehouse Transfer', 61, 'Warehouse Transfer', '2025-09-13 18:28:49', '2025-09-13 18:28:49'),
(202, 'Add Warehouse Transfer', 'Add Warehouse Transfer', 61, 'Warehouse Transfer', '2025-09-13 18:28:49', '2025-09-13 18:28:49'),
(203, 'Edit Warehouse Transfer', 'Edit Warehouse Transfer', 61, 'Warehouse Transfer', '2025-09-13 18:29:47', '2025-09-13 18:29:47'),
(204, 'Delete Warehouse Transfer', 'Delete Warehouse Transfer', 61, 'Warehouse Transfer', '2025-09-13 18:29:47', '2025-09-13 18:29:47'),
(205, 'Reports ', 'Reports ', 62, 'Reports', '2025-09-13 18:31:47', '2025-09-13 18:31:47'),
(206, 'General Ledger Reports', 'General Ledger Reports', 63, 'General Ledger Reports', '2025-09-13 18:31:47', '2025-09-13 18:31:47'),
(207, 'GL Transactions', 'GL Transactions', 64, 'General Ledger Reports', '2025-09-13 18:34:48', '2025-09-13 18:34:48'),
(208, 'Tax Report', 'Tax Report', 65, 'General Ledger Reports', '2025-09-13 18:34:48', '2025-09-13 18:34:48'),
(209, 'Delete Supplier Invoice', 'Delete Supplier Invoice', 53, 'Process Supplier', '2025-09-13 18:50:11', '2025-09-13 18:50:11'),
(210, 'Cashbook Report', 'Cashbook Report', 66, 'General Ledger Reports', '2025-09-13 19:07:09', '2025-09-13 19:07:09'),
(211, 'Project Report', 'Project Report', 67, 'General Ledger Reports', '2025-09-13 19:07:09', '2025-09-13 19:07:09'),
(212, 'Income Statement Report', 'Income Statement Report', 69, 'General Ledger Reports', '2025-09-13 19:08:52', '2025-09-13 19:08:52'),
(213, 'Balance Sheet Report', 'Balance Sheet Report', 70, 'General Ledger Reports', '2025-09-13 19:08:52', '2025-09-13 19:08:52'),
(214, 'Trial Balance Report', 'Trial Balance Report', 71, 'General Ledger Reports', '2025-09-13 19:11:15', '2025-09-13 19:11:15'),
(215, 'Customer Reports', 'Customer Reports', 72, 'Customer Reports', '2025-09-13 19:11:15', '2025-09-13 19:11:15'),
(218, 'Customer Statements', 'Customer Statements', 73, 'Customer Reports', '2025-09-13 19:14:12', '2025-09-13 19:14:12'),
(219, 'Customer Age Analysis Report', 'Customer Age Analysis Report', 74, 'Customer Reports', '2025-09-13 19:14:12', '2025-09-13 19:14:12'),
(220, 'Customer Daily Transactions', 'Customer Daily Transactions', 75, 'Customer Reports', '2025-09-13 19:16:52', '2025-09-13 19:16:52'),
(221, 'Customer Sales Collection', 'Customer Sales Collection', 76, 'Customer Reports', '2025-09-13 19:16:52', '2025-09-13 19:16:52'),
(222, 'Customer Outstanding Sales', 'Customer Outstanding Sales', 77, 'Customer Reports', '2025-09-13 19:19:24', '2025-09-13 19:19:24'),
(223, 'Invoice Summary', 'Invoice Summary', 78, 'Customer Reports', '2025-09-13 19:19:24', '2025-09-13 19:19:24'),
(224, 'Customer Listing', 'Customer Listing', 79, 'Customer Reports', '2025-09-13 19:23:26', '2025-09-13 19:23:26'),
(225, 'Customer Documents Reprint', 'Customer Documents Reprint', 80, 'Customer Reports', '2025-09-13 19:23:26', '2025-09-13 19:23:26'),
(226, 'Supplier Reports', 'Supplier Reports', 81, 'Supplier Reports', '2025-09-13 19:35:43', '2025-09-13 19:35:43'),
(227, 'Supplier Statements', 'Supplier Statements', 82, 'Supplier Reports', '2025-09-13 19:35:43', '2025-09-13 19:35:43'),
(228, 'Supplier Age Analysis Report', 'Supplier Age Analysis Report', 84, 'Supplier Reports', '2025-09-13 19:43:29', '2025-09-13 19:43:29'),
(229, 'Supplier Daily Transactions', 'Supplier Daily Transactions', 85, 'Supplier Reports', '2025-09-13 19:43:29', '2025-09-13 19:43:29'),
(230, 'Payments', 'Payments', 86, 'Supplier Reports', '2025-09-13 19:43:29', '2025-09-13 19:43:29'),
(231, 'Outstanding Payments', 'Outstanding Payments', 87, 'Supplier Reports', '2025-09-13 19:43:29', '2025-09-13 19:43:29'),
(232, 'Supplier Invoices', 'Supplier Invoices', 88, 'Supplier Reports', '2025-09-13 19:43:29', '2025-09-13 19:43:29'),
(233, 'Supplier Listing', 'Supplier Listing', 89, 'Supplier Reports', '2025-09-13 19:43:29', '2025-09-13 19:43:29'),
(234, 'Supplier Document Reprint', 'Supplier Document Reprint', 90, 'Supplier Reports', '2025-09-13 19:43:29', '2025-09-13 19:43:29'),
(235, 'Inventory Reports ', 'Inventory Reports ', 91, 'Inventory Reports ', '2025-09-13 19:54:30', '2025-09-13 19:54:30'),
(236, 'Stock Level', 'Stock Level', 92, 'Inventory Reports ', '2025-09-13 19:54:30', '2025-09-13 19:54:30'),
(237, 'Stock Movement', 'Stock Movement', 93, 'Inventory Reports ', '2025-09-13 19:54:30', '2025-09-13 19:54:30'),
(238, 'Warehouse Transfers', 'Warehouse Transfers', 94, 'Inventory Reports ', '2025-09-13 19:54:30', '2025-09-13 19:54:30'),
(239, 'Sales Analysis', 'Sales Analysis', 95, 'Inventory Reports ', '2025-09-13 19:54:30', '2025-09-13 19:54:30'),
(240, 'Stock Valuation', 'Stock Valuation', 96, 'Inventory Reports ', '2025-09-13 19:54:30', '2025-09-13 19:54:30'),
(241, 'Stock Management', 'Stock Management', 97, 'Inventory Reports ', '2025-09-13 19:54:30', '2025-09-13 19:54:30'),
(242, 'Administration', 'Administration', 98, 'Administration', '2025-09-15 11:21:02', '2025-09-15 11:21:02'),
(243, 'General Settings', 'General Settings', 99, 'General Settings', '2025-09-15 11:21:02', '2025-09-15 11:21:02'),
(244, 'Company Information', 'Company Information', 100, 'General Settings', '2025-09-15 11:23:22', '2025-09-15 11:23:22'),
(245, 'Add Company Information', 'Add Company Information', 100, 'Genral Settings', '2025-09-15 11:23:22', '2025-09-15 11:23:22'),
(246, 'Edit Company Information', 'Edit Company Information', 100, 'General Settings', '2025-09-15 11:27:21', '2025-09-15 11:27:21'),
(247, 'Delete Company Information', 'Delete Company Information', 100, 'General Settings', '2025-09-15 11:27:21', '2025-09-15 11:27:21'),
(248, 'User Settings', 'User Settings', 101, 'User Settings', '2025-09-15 11:29:03', '2025-09-15 11:29:03'),
(249, 'Users', 'Users', 102, 'User Settings', '2025-09-15 11:29:03', '2025-09-15 11:29:03'),
(250, 'Add Users', 'Add Users', 102, 'User Settings', '2025-09-15 11:29:49', '2025-09-15 11:29:49'),
(251, 'Edit Users', 'Edit Users', 102, 'User Settings', '2025-09-15 11:29:49', '2025-09-15 11:29:49'),
(252, 'Delete Users', 'Delete Users', 102, 'User Settings', '2025-09-15 11:31:11', '2025-09-15 11:31:11'),
(253, 'User Group', 'User Group', 103, 'User Setting', '2025-09-15 11:31:11', '2025-09-15 11:31:11'),
(254, 'Add User Group', 'Add User Group', 103, 'User Setting', '2025-09-15 11:33:17', '2025-09-15 11:33:17'),
(255, 'Edit User Group', 'Edit User Group', 103, 'User Setting', '2025-09-15 11:33:17', '2025-09-15 11:33:17'),
(256, 'Delete User Group', 'Delete User Group', 103, 'User Setting', '2025-09-15 11:33:17', '2025-09-15 11:33:17'),
(257, 'Group', 'Group', 104, 'User Settings', '2025-09-15 11:37:28', '2025-09-15 11:37:28'),
(258, 'Add Group', 'Add Group', 104, 'User Settings', '2025-09-15 11:37:28', '2025-09-15 11:37:28'),
(259, 'Edit Group', 'Edit Group', 104, 'User Settings', '2025-09-15 11:37:28', '2025-09-15 11:37:28'),
(260, 'Delete Group', 'Delete Group', 104, 'User Settings', '2025-09-15 11:37:28', '2025-09-15 11:37:28'),
(262, 'Roles', 'Roles', 105, 'User Settings', '2025-09-15 12:53:48', '2025-09-15 12:53:48'),
(263, 'Add Roles', 'Add Roles', 105, 'User Settings', '2025-09-15 12:53:48', '2025-09-15 12:53:48'),
(264, 'Edit Roles', 'Edit Roles', 105, 'User Settings', '2025-09-15 12:55:37', '2025-09-15 12:55:37'),
(265, 'Delete Roles', 'Delete Roles', 105, 'User Settings', '2025-09-15 12:55:37', '2025-09-15 12:55:37');

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

--
-- Table structure for table `permission_user`
--

CREATE TABLE IF NOT EXISTS `permission_user` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `permissions_id` bigint UNSIGNED NOT NULL,
  `role_id` bigint UNSIGNED DEFAULT NULL,
  `user_id` int NOT NULL,
  `created_at` varchar(225) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `updated_at` varchar(225) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_permission_role_permission` (`permissions_id`),
  KEY `fk_permission_role_role` (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1757 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permission_user`
--

INSERT INTO `permission_user` (`id`, `permissions_id`, `role_id`, `user_id`, `created_at`, `updated_at`) VALUES
(603, 1, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(604, 2, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(605, 3, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(606, 7, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(607, 11, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(608, 15, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(609, 16, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(610, 20, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(611, 24, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(612, 28, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(613, 29, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(614, 93, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(615, 97, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(616, 105, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(617, 33, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(618, 34, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(619, 109, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(620, 113, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(621, 117, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(622, 38, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(623, 39, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(624, 43, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(625, 44, NULL, 6, '2025-09-18 13:54:09', '2025-09-18 13:54:09'),
(626, 48, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(627, 52, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(628, 56, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(629, 60, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(630, 64, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(631, 68, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(632, 72, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(633, 73, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(634, 77, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(635, 81, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(636, 85, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(637, 89, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(638, 121, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(639, 122, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(640, 123, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(641, 128, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(642, 135, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(643, 139, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(644, 140, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(645, 144, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(646, 148, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(647, 152, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(648, 156, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(649, 160, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(650, 164, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(651, 165, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(652, 169, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(653, 173, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(654, 176, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(655, 180, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(656, 184, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(657, 185, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(658, 189, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(659, 193, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(660, 197, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(661, 201, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(662, 205, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(663, 206, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(664, 207, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(665, 208, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(666, 210, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(667, 211, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(668, 212, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(669, 213, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(670, 214, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(671, 215, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(672, 218, NULL, 6, '2025-09-18 13:54:10', '2025-09-18 13:54:10'),
(673, 219, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(674, 220, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(675, 221, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(676, 222, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(677, 223, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(678, 224, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(679, 225, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(680, 226, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(681, 227, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(682, 228, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(683, 229, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(684, 230, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(685, 231, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(686, 232, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(687, 233, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(688, 234, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(689, 235, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(690, 236, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(691, 237, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(692, 238, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(693, 239, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(694, 240, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(695, 241, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(696, 242, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(697, 244, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(698, 248, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(699, 249, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(700, 257, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(701, 262, NULL, 6, '2025-09-18 13:54:11', '2025-09-18 13:54:11'),
(951, 1, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(952, 2, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(953, 3, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(954, 4, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(955, 5, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(956, 6, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(957, 7, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(958, 8, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(959, 9, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(960, 10, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(961, 11, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(962, 12, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(963, 13, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(964, 14, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(965, 15, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(966, 16, NULL, 6, '2025-09-18 14:05:29', '2025-09-18 14:05:29'),
(967, 17, NULL, 6, '2025-09-18 14:05:30', '2025-09-18 14:05:30'),
(968, 18, NULL, 6, '2025-09-18 14:05:30', '2025-09-18 14:05:30'),
(969, 19, NULL, 6, '2025-09-18 14:05:30', '2025-09-18 14:05:30'),
(970, 20, NULL, 6, '2025-09-18 14:05:30', '2025-09-18 14:05:30'),
(971, 21, NULL, 6, '2025-09-18 14:05:30', '2025-09-18 14:05:30'),
(972, 22, NULL, 6, '2025-09-18 14:05:30', '2025-09-18 14:05:30'),
(973, 23, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(974, 24, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(975, 25, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(976, 26, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(977, 27, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(978, 28, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(979, 29, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(980, 30, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(981, 31, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(982, 32, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(983, 93, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(984, 94, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(985, 95, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(986, 96, NULL, 6, '2025-09-18 14:05:31', '2025-09-18 14:05:31'),
(987, 97, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(988, 98, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(989, 99, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(990, 100, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(991, 105, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(992, 106, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(993, 107, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(994, 108, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(995, 33, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(996, 34, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(997, 35, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(998, 36, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(999, 37, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1000, 109, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1001, 110, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1002, 111, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1003, 112, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1004, 113, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1005, 114, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1006, 115, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1007, 116, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1008, 117, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1009, 118, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1010, 119, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1011, 120, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1012, 38, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1013, 39, NULL, 6, '2025-09-18 14:05:32', '2025-09-18 14:05:32'),
(1014, 40, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1015, 41, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1016, 42, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1017, 43, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1018, 44, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1019, 45, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1020, 46, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1021, 47, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1022, 48, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1023, 49, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1024, 50, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1025, 51, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1026, 52, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1027, 53, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1028, 54, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1029, 55, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1030, 56, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1031, 57, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1032, 58, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1033, 59, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1034, 60, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1035, 61, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1036, 62, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1037, 63, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1038, 64, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1039, 65, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1040, 66, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1041, 67, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1042, 68, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1043, 69, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1044, 70, NULL, 6, '2025-09-18 14:05:33', '2025-09-18 14:05:33'),
(1045, 71, NULL, 6, '2025-09-18 14:05:34', '2025-09-18 14:05:34'),
(1046, 72, NULL, 6, '2025-09-18 14:05:34', '2025-09-18 14:05:34'),
(1047, 73, NULL, 6, '2025-09-18 14:05:34', '2025-09-18 14:05:34'),
(1048, 74, NULL, 6, '2025-09-18 14:05:34', '2025-09-18 14:05:34'),
(1049, 75, NULL, 6, '2025-09-18 14:05:34', '2025-09-18 14:05:34'),
(1050, 76, NULL, 6, '2025-09-18 14:05:34', '2025-09-18 14:05:34'),
(1051, 77, NULL, 6, '2025-09-18 14:05:34', '2025-09-18 14:05:34'),
(1052, 78, NULL, 6, '2025-09-18 14:05:34', '2025-09-18 14:05:34'),
(1053, 79, NULL, 6, '2025-09-18 14:05:35', '2025-09-18 14:05:35'),
(1054, 80, NULL, 6, '2025-09-18 14:05:35', '2025-09-18 14:05:35'),
(1055, 81, NULL, 6, '2025-09-18 14:05:35', '2025-09-18 14:05:35'),
(1056, 82, NULL, 6, '2025-09-18 14:05:35', '2025-09-18 14:05:35'),
(1057, 83, NULL, 6, '2025-09-18 14:05:35', '2025-09-18 14:05:35'),
(1058, 84, NULL, 6, '2025-09-18 14:05:35', '2025-09-18 14:05:35'),
(1059, 85, NULL, 6, '2025-09-18 14:05:35', '2025-09-18 14:05:35'),
(1060, 86, NULL, 6, '2025-09-18 14:05:35', '2025-09-18 14:05:35'),
(1061, 87, NULL, 6, '2025-09-18 14:05:35', '2025-09-18 14:05:35'),
(1062, 88, NULL, 6, '2025-09-18 14:05:35', '2025-09-18 14:05:35'),
(1063, 89, NULL, 6, '2025-09-18 14:05:36', '2025-09-18 14:05:36'),
(1064, 90, NULL, 6, '2025-09-18 14:05:36', '2025-09-18 14:05:36'),
(1065, 91, NULL, 6, '2025-09-18 14:05:36', '2025-09-18 14:05:36'),
(1066, 92, NULL, 6, '2025-09-18 14:05:36', '2025-09-18 14:05:36'),
(1067, 121, NULL, 6, '2025-09-18 14:05:36', '2025-09-18 14:05:36'),
(1068, 122, NULL, 6, '2025-09-18 14:05:36', '2025-09-18 14:05:36'),
(1069, 123, NULL, 6, '2025-09-18 14:05:36', '2025-09-18 14:05:36'),
(1070, 124, NULL, 6, '2025-09-18 14:05:36', '2025-09-18 14:05:36'),
(1071, 125, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1072, 126, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1073, 128, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1074, 129, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1075, 130, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1076, 131, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1077, 135, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1078, 136, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1079, 137, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1080, 138, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1081, 139, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1082, 140, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1083, 141, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1084, 142, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1085, 143, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1086, 144, NULL, 6, '2025-09-18 14:05:37', '2025-09-18 14:05:37'),
(1087, 145, NULL, 6, '2025-09-18 14:05:38', '2025-09-18 14:05:38'),
(1088, 146, NULL, 6, '2025-09-18 14:05:38', '2025-09-18 14:05:38'),
(1089, 147, NULL, 6, '2025-09-18 14:05:38', '2025-09-18 14:05:38'),
(1090, 148, NULL, 6, '2025-09-18 14:05:38', '2025-09-18 14:05:38'),
(1091, 149, NULL, 6, '2025-09-18 14:05:38', '2025-09-18 14:05:38'),
(1092, 150, NULL, 6, '2025-09-18 14:05:38', '2025-09-18 14:05:38'),
(1093, 151, NULL, 6, '2025-09-18 14:05:38', '2025-09-18 14:05:38'),
(1094, 152, NULL, 6, '2025-09-18 14:05:38', '2025-09-18 14:05:38'),
(1095, 153, NULL, 6, '2025-09-18 14:05:38', '2025-09-18 14:05:38'),
(1096, 154, NULL, 6, '2025-09-18 14:05:38', '2025-09-18 14:05:38'),
(1097, 155, NULL, 6, '2025-09-18 14:05:39', '2025-09-18 14:05:39'),
(1098, 156, NULL, 6, '2025-09-18 14:05:39', '2025-09-18 14:05:39'),
(1099, 157, NULL, 6, '2025-09-18 14:05:39', '2025-09-18 14:05:39'),
(1100, 158, NULL, 6, '2025-09-18 14:05:39', '2025-09-18 14:05:39'),
(1101, 159, NULL, 6, '2025-09-18 14:05:39', '2025-09-18 14:05:39'),
(1102, 160, NULL, 6, '2025-09-18 14:05:39', '2025-09-18 14:05:39'),
(1103, 161, NULL, 6, '2025-09-18 14:05:39', '2025-09-18 14:05:39'),
(1104, 162, NULL, 6, '2025-09-18 14:05:39', '2025-09-18 14:05:39'),
(1105, 163, NULL, 6, '2025-09-18 14:05:39', '2025-09-18 14:05:39'),
(1106, 164, NULL, 6, '2025-09-18 14:05:39', '2025-09-18 14:05:39'),
(1107, 165, NULL, 6, '2025-09-18 14:05:39', '2025-09-18 14:05:39'),
(1108, 166, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1109, 167, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1110, 168, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1111, 169, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1112, 170, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1113, 171, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1114, 172, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1115, 173, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1116, 174, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1117, 175, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1118, 209, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1119, 176, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1120, 177, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1121, 178, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1122, 179, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1123, 180, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1124, 181, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1125, 182, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1126, 183, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1127, 184, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1128, 185, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1129, 186, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1130, 187, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1131, 188, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1132, 189, NULL, 6, '2025-09-18 14:05:40', '2025-09-18 14:05:40'),
(1133, 190, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1134, 191, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1135, 192, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1136, 193, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1137, 194, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1138, 195, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1139, 196, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1140, 197, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1141, 198, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1142, 199, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1143, 200, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1144, 201, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1145, 202, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1146, 203, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1147, 204, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1148, 205, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1149, 206, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1150, 207, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1151, 208, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1152, 210, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1153, 211, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1154, 212, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1155, 213, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1156, 214, NULL, 6, '2025-09-18 14:05:41', '2025-09-18 14:05:41'),
(1157, 215, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1158, 218, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1159, 219, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1160, 220, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1161, 221, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1162, 222, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1163, 223, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1164, 224, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1165, 225, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1166, 226, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1167, 227, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1168, 228, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1169, 229, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1170, 230, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1171, 231, NULL, 6, '2025-09-18 14:05:42', '2025-09-18 14:05:42'),
(1172, 232, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1173, 233, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1174, 234, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1175, 235, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1176, 236, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1177, 237, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1178, 238, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1179, 239, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1180, 240, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1181, 241, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1182, 242, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1183, 243, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1184, 244, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1185, 245, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1186, 246, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1187, 247, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1188, 248, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1189, 249, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1190, 250, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1191, 251, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1192, 252, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1193, 257, NULL, 6, '2025-09-18 14:05:43', '2025-09-18 14:05:43'),
(1194, 258, NULL, 6, '2025-09-18 14:05:44', '2025-09-18 14:05:44'),
(1195, 259, NULL, 6, '2025-09-18 14:05:44', '2025-09-18 14:05:44'),
(1196, 260, NULL, 6, '2025-09-18 14:05:44', '2025-09-18 14:05:44'),
(1197, 262, NULL, 6, '2025-09-18 14:05:44', '2025-09-18 14:05:44'),
(1198, 263, NULL, 6, '2025-09-18 14:05:44', '2025-09-18 14:05:44'),
(1199, 264, NULL, 6, '2025-09-18 14:05:44', '2025-09-18 14:05:44'),
(1200, 265, NULL, 6, '2025-09-18 14:05:44', '2025-09-18 14:05:44'),
(1485, 121, NULL, 8, '2025-09-22 13:27:08', '2025-09-22 13:27:08'),
(1486, 164, NULL, 8, '2025-09-22 13:27:08', '2025-09-22 13:27:08'),
(1487, 173, NULL, 8, '2025-09-22 13:27:08', '2025-09-22 13:27:08'),
(1488, 174, NULL, 8, '2025-09-22 13:27:08', '2025-09-22 13:27:08'),
(1489, 175, NULL, 8, '2025-09-22 13:27:08', '2025-09-22 13:27:08'),
(1490, 121, NULL, 7, '2025-10-07 13:26:21', '2025-10-07 13:26:21'),
(1491, 139, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1492, 140, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1493, 141, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1494, 142, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1495, 144, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1496, 145, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1497, 146, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1498, 148, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1499, 149, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1500, 150, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1501, 164, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1502, 165, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1503, 169, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1504, 173, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1505, 176, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1506, 180, NULL, 7, '2025-10-07 13:26:22', '2025-10-07 13:26:22'),
(1507, 1, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1508, 2, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1509, 3, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1510, 4, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1511, 5, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1512, 6, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1513, 7, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1514, 8, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1515, 9, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1516, 10, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1517, 11, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1518, 12, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1519, 13, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1520, 14, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1521, 15, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1522, 16, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1523, 17, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1524, 18, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1525, 19, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1526, 20, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1527, 21, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1528, 22, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1529, 23, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1530, 24, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1531, 25, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1532, 26, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1533, 27, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1534, 28, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1535, 29, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1536, 30, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1537, 31, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1538, 32, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1539, 93, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1540, 94, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1541, 95, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1542, 96, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1543, 97, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1544, 98, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1545, 99, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1546, 100, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1547, 105, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1548, 106, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1549, 107, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1550, 108, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1551, 33, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1552, 34, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1553, 35, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1554, 36, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1555, 37, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1556, 109, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1557, 110, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1558, 111, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1559, 112, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1560, 113, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1561, 114, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1562, 115, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1563, 116, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1564, 117, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1565, 118, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1566, 119, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1567, 120, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1568, 38, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1569, 39, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1570, 40, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1571, 41, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1572, 42, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1573, 43, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1574, 44, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1575, 45, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1576, 46, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1577, 47, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1578, 48, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1579, 49, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1580, 50, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1581, 51, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1582, 52, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1583, 53, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1584, 54, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1585, 55, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1586, 56, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1587, 57, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1588, 58, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1589, 59, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1590, 60, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1591, 61, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1592, 62, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1593, 63, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1594, 64, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1595, 65, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1596, 66, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1597, 67, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1598, 68, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1599, 69, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1600, 70, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1601, 71, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1602, 72, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1603, 73, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1604, 74, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1605, 75, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1606, 76, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1607, 77, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1608, 78, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1609, 79, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1610, 80, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1611, 81, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1612, 82, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1613, 83, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1614, 84, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1615, 85, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1616, 86, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1617, 87, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1618, 88, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1619, 89, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1620, 90, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1621, 91, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1622, 92, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1623, 121, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1624, 122, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1625, 123, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1626, 124, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1627, 125, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1628, 126, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1629, 128, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1630, 129, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1631, 130, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1632, 131, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1633, 135, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1634, 136, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1635, 137, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1636, 138, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1637, 139, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1638, 140, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1639, 141, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1640, 142, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1641, 143, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1642, 144, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1643, 145, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1644, 146, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1645, 147, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1646, 148, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1647, 149, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1648, 150, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1649, 151, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1650, 152, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1651, 153, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1652, 154, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1653, 155, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1654, 156, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1655, 157, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1656, 158, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1657, 159, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1658, 160, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1659, 161, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1660, 162, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1661, 163, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1662, 164, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1663, 165, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1664, 166, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1665, 167, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1666, 168, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1667, 169, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1668, 170, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1669, 171, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1670, 172, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1671, 173, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1672, 174, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1673, 175, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1674, 209, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1675, 176, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1676, 177, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1677, 178, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1678, 179, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1679, 180, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1680, 181, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1681, 182, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1682, 183, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1683, 184, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1684, 185, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1685, 186, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1686, 187, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1687, 188, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1688, 189, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1689, 190, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1690, 191, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1691, 192, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1692, 193, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1693, 194, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1694, 195, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1695, 196, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1696, 197, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1697, 198, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1698, 199, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1699, 200, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1700, 201, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1701, 202, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1702, 203, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1703, 204, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1704, 205, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1705, 206, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1706, 207, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1707, 208, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1708, 210, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1709, 211, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1710, 212, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1711, 213, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1712, 214, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1713, 215, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1714, 218, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1715, 219, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1716, 220, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1717, 221, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1718, 222, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1719, 223, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1720, 224, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1721, 225, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1722, 226, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1723, 227, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1724, 228, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1725, 229, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1726, 230, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1727, 231, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1728, 232, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1729, 233, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1730, 234, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1731, 235, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1732, 236, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1733, 237, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1734, 238, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1735, 239, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1736, 240, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1737, 241, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1738, 242, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1739, 243, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1740, 244, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1741, 245, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1742, 246, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1743, 247, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1744, 248, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1745, 249, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1746, 250, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1747, 251, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1748, 252, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1749, 257, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1750, 258, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1751, 259, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1752, 260, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1753, 262, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1754, 263, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1755, 264, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47'),
(1756, 265, NULL, 9, '2025-12-12 14:01:47', '2025-12-12 14:01:47');

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

--
-- Table structure for table `price_listings`
--

CREATE TABLE IF NOT EXISTS `price_listings` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `item_id` int UNSIGNED NOT NULL,
  `price_list_id` int UNSIGNED NOT NULL,
  `unit` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency_id` int UNSIGNED NOT NULL,
  `price` decimal(15,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `price_listing_setup_id` bigint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_price_listings_item` (`item_id`),
  KEY `fk_price_listings_price_list` (`price_list_id`),
  KEY `fk_price_listings_currency` (`currency_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `price_listing_markups`
--

CREATE TABLE IF NOT EXISTS `price_listing_markups` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `price_listing_setup_id` int UNSIGNED NOT NULL,
  `price_list_name_id` int UNSIGNED NOT NULL,
  `markup_pct` decimal(5,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `price_listing_markups`
--

INSERT INTO `price_listing_markups` (`id`, `price_listing_setup_id`, `price_list_name_id`, `markup_pct`, `created_at`, `updated_at`) VALUES
(5, 7, 2, 10.00, '2025-06-23 10:14:50', '2025-06-23 10:14:50'),
(6, 8, 2, 22.00, '2025-06-23 11:53:44', '2025-06-23 11:53:44'),
(7, 10, 2, 20.00, '2025-06-26 09:58:45', '2025-06-26 09:58:45'),
(12, 16, 2, 10.00, '2025-08-05 11:22:14', '2025-08-05 11:22:14'),
(13, 16, 3, 20.00, '2025-08-05 11:22:14', '2025-08-05 11:22:14'),
(14, 21, 3, 0.05, '2025-09-25 08:34:16', '2025-09-25 08:34:16'),
(15, 22, 3, 3.00, '2025-09-26 07:41:24', '2025-09-26 07:41:24'),
(16, 23, 3, 30.00, '2025-12-11 13:40:05', '2025-12-11 13:40:05'),
(17, 23, 7, 25.00, '2025-12-11 13:40:05', '2025-12-11 13:40:05'),
(18, 23, 8, 20.00, '2025-12-11 13:40:05', '2025-12-11 13:40:05'),
(19, 23, 9, 20.00, '2025-12-11 13:40:05', '2025-12-11 13:40:05'),
(20, 23, 10, 50.00, '2025-12-11 13:40:05', '2025-12-11 13:40:05'),
(21, 23, 11, 40.00, '2025-12-11 13:40:06', '2025-12-11 13:40:06');

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

--
-- Table structure for table `price_listing_setups`
--

CREATE TABLE IF NOT EXISTS `price_listing_setups` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  `is_service_item` tinyint(1) DEFAULT '0',
  `has_warehouse` tinyint(1) DEFAULT '0',
  `has_units_of_measure` tinyint(1) DEFAULT '0',
  `commissionable` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `category_id` bigint UNSIGNED DEFAULT NULL,
  `bin_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `barcode_box` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `cost` decimal(15,2) NOT NULL DEFAULT '0.00',
  `least_grv_cost` decimal(15,2) NOT NULL DEFAULT '0.00',
  `min_gp_pct` decimal(5,2) NOT NULL DEFAULT '0.00',
  `warehouse_id` bigint UNSIGNED DEFAULT NULL,
  `warehouse_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `price_listing_setups1`
--

CREATE TABLE IF NOT EXISTS `price_listing_setups1` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `is_service_item` tinyint(1) NOT NULL DEFAULT '0',
  `is_physical_item` tinyint(1) NOT NULL DEFAULT '1',
  `has_warehouse` tinyint(1) NOT NULL DEFAULT '1',
  `has_units_of_measure` tinyint(1) NOT NULL DEFAULT '1',
  `commissionable` tinyint(1) NOT NULL DEFAULT '1',
  `category_id` int UNSIGNED NOT NULL,
  `bin_location_id` int UNSIGNED DEFAULT NULL,
  `barcode_box` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cost` decimal(10,2) NOT NULL,
  `least_grv_cost` decimal(10,2) DEFAULT NULL,
  `min_gp_pct` decimal(5,2) DEFAULT NULL,
  `vat_rate` decimal(5,2) DEFAULT NULL,
  `stocking_unit_id` int UNSIGNED DEFAULT NULL,
  `default_purchase_unit_id` int UNSIGNED DEFAULT NULL,
  `default_sale_unit_id` int UNSIGNED DEFAULT NULL,
  `warehouse_id` int UNSIGNED DEFAULT NULL,
  `warehouse_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `original_quantity` int NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`),
  KEY `fk_stocking_unit` (`stocking_unit_id`),
  KEY `fk_purchase_unit` (`default_purchase_unit_id`),
  KEY `fk_sale_unit` (`default_sale_unit_id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `price_listing_setups1`
--

INSERT INTO `price_listing_setups1` (`id`, `code`, `description1`, `description2`, `active`, `is_service_item`, `is_physical_item`, `has_warehouse`, `has_units_of_measure`, `commissionable`, `category_id`, `bin_location_id`, `barcode_box`, `cost`, `least_grv_cost`, `min_gp_pct`, `vat_rate`, `stocking_unit_id`, `default_purchase_unit_id`, `default_sale_unit_id`, `warehouse_id`, `warehouse_desc`, `original_quantity`, `created_at`, `updated_at`) VALUES
(4, 'ITM-003', 'test 3', 'Test', 1, 0, 1, 1, 1, 1, 2, 2, '1234567890987654321`2345678', 1000.00, 5.00, 20.00, 1.00, NULL, NULL, NULL, 1, 'reqwetru', 0, '2025-06-23 09:40:48', '2025-06-23 09:40:48'),
(5, 'ITM-004', 'Test 4', NULL, 1, 0, 1, 1, 1, 1, 2, 2, '1234567890987654321`2345678', 1000.00, 5.00, 4.00, 1.00, NULL, NULL, NULL, 1, 'tets', 0, '2025-06-23 09:42:19', '2025-06-23 09:42:19'),
(7, 'ITM-006', 'Test 6', NULL, 1, 0, 1, 1, 1, 1, 2, 2, '23456789098765432123456789', 5000.00, 5004.00, 5.00, 10.00, NULL, NULL, NULL, 1, 'testing testing', 0, '2025-06-23 10:14:50', '2025-06-23 10:14:50'),
(8, 'ITM-0010', 'test testing', 'Test', 1, 0, 1, 1, 1, 1, 2, 2, '1234567890-', 10.00, 5.00, 5.00, 20.00, NULL, NULL, NULL, 1, 'reqwetru', 0, '2025-06-23 11:53:44', '2025-06-23 11:53:44'),
(9, '1000', 'test', NULL, 1, 0, 1, 1, 1, 1, 2, 2, '3456', 100.00, 5.00, 7.00, 15.00, NULL, NULL, NULL, 1, 'asdfghj', 0, '2025-06-23 12:25:12', '2025-06-23 12:25:12'),
(10, 'ITM-0987665', 'test', NULL, 1, 0, 1, 1, 1, 1, 2, NULL, NULL, 200.00, NULL, NULL, 15.00, 6, 6, NULL, 3, NULL, 0, '2025-06-26 09:58:45', '2025-06-26 09:58:45'),
(11, 'ITM_0987654', 'wertyui', NULL, 1, 0, 1, 1, 1, 1, 2, NULL, NULL, 39.00, NULL, NULL, NULL, NULL, 7, NULL, 1, NULL, 0, '2025-06-26 10:06:38', '2025-06-26 10:06:38'),
(15, 'OTM--oo3', 'Test 4', 'Test testing 1. 2', 1, 0, 1, 1, 1, 1, 2, 2, '3535353535353535353', 20.00, NULL, NULL, NULL, 5, 4, 5, 1, NULL, 300, '2025-08-01 11:45:53', '2025-08-01 11:45:53'),
(16, 'ITM-0473', 'Test Me', NULL, 1, 0, 1, 1, 1, 1, 2, NULL, NULL, 34.00, NULL, NULL, NULL, 5, 4, 4, 1, 'testing testing', 500, '2025-08-05 11:22:14', '2025-08-05 11:22:14'),
(17, 'ITEM0002', '8Gig RAM Toshiba', '8Gig RAM Toshiba', 1, 0, 1, 1, 1, 1, 2, 3, 'BAR00001', 16.05, 17.05, 15.05, NULL, 10, 7, 8, 5, 'Harare Branch', 25, '2025-09-09 10:59:35', '2025-09-09 10:59:35'),
(18, 'ITM-9930', 'test item', NULL, 1, 0, 1, 1, 1, 1, 2, 1, 'N002938911DF', 102.00, 123.00, 12.00, 12.00, 4, 6, 10, 1, 'main warehouse', 10, '2025-09-24 12:06:41', '2025-09-24 12:06:41'),
(19, 'itm-03993', 'testes', 'testes', 1, 0, 1, 1, 1, 1, 2, 3, 'h003994kd', 12.00, 13.00, 21.00, 12.00, 6, 6, 9, 1, 'twst', 13, '2025-09-24 12:44:59', '2025-09-24 12:44:59'),
(20, 'itm-039912', 'testes', 'testes', 1, 0, 1, 1, 1, 1, 2, 3, 'h003994kd', 10.00, 13.00, 21.00, 12.00, 7, 6, 9, 1, 'twst', 13, '2025-09-24 12:46:48', '2025-09-24 12:46:48'),
(21, 'ITM-009252025', 'ITM-009252025 TEST', 'TEST ITM-009252025', 1, 0, 1, 1, 1, 1, 6, 3, 'OOTUTI3994985', 120.00, 20.00, 5.00, 15.00, 4, 4, 4, 1, 'TEST ITM-009252025', 230, '2025-09-25 08:34:15', '2025-09-25 08:34:15'),
(22, 'ITM-00091', 'Test Level  Quantity', NULL, 1, 0, 1, 1, 1, 1, 2, 3, '000913', 90.00, 13.00, 13.00, 3.00, 4, 4, 4, 1, 'Test Level  Quantity', 10, '2025-09-26 07:41:23', '2025-09-26 07:41:23'),
(23, 'DEM001', 'Demo1', 'Demo1', 1, 0, 1, 1, 1, 1, 10, 4, NULL, 10.00, NULL, NULL, 0.00, 16, 16, 16, 7, 'Demo Warehouse', 20, '2025-12-11 13:40:05', '2025-12-11 13:40:05');

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

--
-- Table structure for table `price_list_names`
--

CREATE TABLE IF NOT EXISTS `price_list_names` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `price_list_names`
--

INSERT INTO `price_list_names` (`id`, `code`, `name`, `description`, `created_at`, `updated_at`) VALUES
(3, '002', 'Retail', 'Retail', '2025-06-16 08:47:30', '2025-06-16 08:47:30'),
(7, '0002', '8 Gig RAM', '8 Gig RAM', '2025-09-09 11:14:27', '2025-09-09 11:38:27'),
(8, '0004', '2 PplyTissues', '2 PplyTissues', '2025-09-09 11:32:22', '2025-09-09 11:32:22'),
(9, '00012', '2Gig Ram', '2Gig Ram', '2025-09-09 11:40:36', '2025-09-09 11:40:36'),
(10, 'DEM001', 'Demo', 'Demo', '2025-12-11 13:26:59', '2025-12-11 13:26:59'),
(11, 'DEM002', 'Demo2', 'Demo2', '2025-12-11 13:28:22', '2025-12-11 13:28:22');

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

--
-- Table structure for table `projects`
--

CREATE TABLE IF NOT EXISTS `projects` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `projects`
--

INSERT INTO `projects` (`id`, `code`, `name`, `description`, `created_at`, `updated_at`) VALUES
(2, '0001', 'Test', 'Testing', '2025-06-13 05:24:02', '2025-06-13 05:24:02'),
(4, 'CHI001', 'Chiredzi Project', 'Robert Mugabe Road', '2025-09-06 23:42:11', '2025-09-06 23:42:11'),
(5, 'PRJT001', 'Masasa Warehouse', 'Masasa Warehouse building', '2025-09-09 12:04:10', '2025-09-09 12:04:10'),
(6, 'DEM001', 'demo', 'DEMO', '2025-12-19 07:45:44', '2025-12-19 07:45:44');

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

--
-- Table structure for table `property_details`
--

CREATE TABLE IF NOT EXISTS `property_details` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `owner_reg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `levels` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `area` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `groups` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `units` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `space` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `rates`
--

CREATE TABLE IF NOT EXISTS `rates` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `buying_rate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `receipts`
--

CREATE TABLE IF NOT EXISTS `receipts` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `receipt_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `receipt_date` date NOT NULL,
  `customer_id` bigint UNSIGNED DEFAULT NULL,
  `walk_in_customer_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_type_id` bigint UNSIGNED NOT NULL DEFAULT '1',
  `deposit_account_id` bigint UNSIGNED NOT NULL,
  `total_amount` decimal(15,2) NOT NULL,
  `reference` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `invoice_id` bigint UNSIGNED DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'draft',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `customer_fk` (`customer_id`),
  KEY `payment_type_fk` (`payment_type_id`),
  KEY `deposit_account_fk` (`deposit_account_id`),
  KEY `invoice_fk` (`invoice_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `receipts`
--

INSERT INTO `receipts` (`id`, `receipt_number`, `receipt_date`, `customer_id`, `walk_in_customer_name`, `payment_type_id`, `deposit_account_id`, `total_amount`, `reference`, `description`, `invoice_id`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(2, 'RCPT000001', '2026-05-20', 8, NULL, 2, 9, 22.50, NULL, NULL, 2, 'processed', '2026-05-20 08:48:00', '2026-05-20 08:48:00', NULL),
(3, 'RCPT000002', '2026-05-20', 8, NULL, 2, 9, 22.50, NULL, NULL, 2, 'processed', '2026-05-20 08:51:58', '2026-05-20 08:51:58', NULL),
(4, 'RCPT000003', '2026-05-20', 8, NULL, 2, 9, 5.00, NULL, NULL, 2, 'processed', '2026-05-20 08:53:59', '2026-05-20 08:53:59', NULL),
(5, 'RCPT000004', '2026-05-21', 13, NULL, 2, 9, 100.00, NULL, NULL, 14, 'processed', '2026-05-21 06:14:33', '2026-05-21 06:14:33', NULL);

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

--
-- Table structure for table `receipt_generation`
--

CREATE TABLE IF NOT EXISTS `receipt_generation` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `added_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `receipt_lines`
--

CREATE TABLE IF NOT EXISTS `receipt_lines` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `receipt_id` bigint UNSIGNED NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `invoice_id` bigint UNSIGNED DEFAULT NULL,
  `account_id` bigint UNSIGNED DEFAULT NULL,
  `amount` decimal(15,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `receipt_fk` (`receipt_id`),
  KEY `invoice_fk` (`invoice_id`),
  KEY `receipt_lines_account_id_foreign` (`account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `receipt_lines`
--

INSERT INTO `receipt_lines` (`id`, `receipt_id`, `description`, `invoice_id`, `account_id`, `amount`, `created_at`, `updated_at`) VALUES
(1, 2, 'Payment for Invoice MELINV000161', 2, 9, 22.50, '2026-05-20 08:48:00', '2026-05-20 08:48:00'),
(2, 3, 'Payment for Invoice MELINV000161', 2, 9, 22.50, '2026-05-20 08:51:58', '2026-05-20 08:51:58'),
(3, 4, 'Payment for Invoice MELINV000161', 2, 9, 5.00, '2026-05-20 08:53:59', '2026-05-20 08:53:59'),
(4, 5, 'Payment for Invoice MELINV000164', 14, 9, 100.00, '2026-05-21 06:14:33', '2026-05-21 06:14:33');

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

--
-- Table structure for table `roles`
--

CREATE TABLE IF NOT EXISTS `roles` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id`, `name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'Administrator', 'Administrator', '2025-09-07 00:33:11', '2025-09-07 00:33:11'),
(3, 'Assistant Accountant', 'Assistant Accountants', '2025-09-07 00:34:33', '2025-09-07 00:34:33'),
(4, 'Cost Accountant', 'Cost Accountant', '2025-09-10 02:35:01', '2025-09-10 02:35:01'),
(5, 'Software Engineer', 'Software Engineer', '2025-09-10 02:35:58', '2025-09-10 02:35:58'),
(6, 'Application Support', 'Application Support', '2025-09-10 02:36:31', '2025-09-10 02:36:31'),
(7, 'Software Support', 'Software Support', '2025-09-10 02:36:58', '2025-09-10 02:36:58'),
(8, 'Debtors Clerk', 'Debtors Clerk', '2025-09-22 14:38:09', '2025-09-22 14:38:09'),
(9, 'Creditors Clerk', 'Creditors Clerk', '2025-09-22 14:38:40', '2025-09-22 14:38:40');

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

--
-- Table structure for table `role_user`
--

CREATE TABLE IF NOT EXISTS `role_user` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `role_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_role_user_role` (`role_id`),
  KEY `fk_role_user_user` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `rooms`
--

CREATE TABLE IF NOT EXISTS `rooms` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `room_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `floor_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `space` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rent_amount` decimal(15,2) DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'unoccupied',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `sales_reps`
--

CREATE TABLE IF NOT EXISTS `sales_reps` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sales_reps`
--

INSERT INTO `sales_reps` (`id`, `code`, `name`, `created_at`, `updated_at`) VALUES
(1, 'EZ', 'Elias Zibayiwa', '2025-06-10 10:42:21', '2025-06-10 10:42:21'),
(3, 'SRPTV004', 'Godson Admin', '2025-09-08 14:41:04', '2025-09-08 14:41:04'),
(4, 'SRPTV005', 'Admire Admin', '2025-09-08 14:41:29', '2025-09-08 14:41:29'),
(6, 'SRPTV008', 'Admire Kadembo', '2025-09-08 14:44:31', '2025-09-08 14:44:31');

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

--
-- Table structure for table `session`
--

CREATE TABLE IF NOT EXISTS `session` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `session` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `sessions`
--

CREATE TABLE IF NOT EXISTS `sessions` (
  `id` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int DEFAULT NULL,
  `ip_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`, `created_at`, `updated_at`) VALUES
('7kmSigLDiVc20VjxKcMnXrwHiYw9waKfPDrF5SxI', 6, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', 'YTo2OntzOjY6Il90b2tlbiI7czo0MDoiSk5JSTk5aFpCQmNoVHpwSXhVNnF1NXJiZ2lPYVBpVmNFblZFM2N1RyI7czozOiJ1cmwiO2E6MDp7fXM6OToiX3ByZXZpb3VzIjthOjE6e3M6MzoidXJsIjtzOjIxOiJodHRwOi8vMTI3LjAuMC4xOjgwMDAiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX1zOjUwOiJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI7aTo2O3M6MTg6Imxhc3RfYWN0aXZpdHlfdGltZSI7aToxNzc5ODI4NTQyO30=', '1779828542', '2026-05-26 20:49:02', '2026-05-26 20:49:02');

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

--
-- Table structure for table `sub_accounts`
--

CREATE TABLE IF NOT EXISTS `sub_accounts` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parent_id` int NOT NULL,
  `account_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sub_accounts`
--

INSERT INTO `sub_accounts` (`id`, `code`, `parent_id`, `account_code`, `sub_code`, `sub_name`, `created_at`, `updated_at`) VALUES
(1, '2400', 5, '200', 'Stock Adjustments', 'sales', '2025-06-03 19:36:22', '2025-06-05 19:32:48'),
(2, '2100', 38, '300', 'Purchases', 'marcus ruhinga', '2025-06-26 11:58:44', '2025-06-26 11:58:44'),
(7, '8520', 26, '200', 'Loan/To Subsidiaries', 'test', '2025-07-08 08:56:47', '2025-07-08 08:56:47'),
(8, '1000', 43, '200', 'Sales', 'test', '2025-09-01 05:21:26', '2025-09-01 05:26:14'),
(9, '909099', 57, '9099000', 'Computer Maintenance', 'files Cleaning and Defragmentation', '2025-09-04 11:08:22', '2025-09-04 11:08:22'),
(10, '1000', 43, '100', 'Sales', 'Sales>Grocery', '2025-11-11 03:17:51', '2025-11-11 03:17:51');

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

--
-- Table structure for table `sub_accounts_2`
--

CREATE TABLE IF NOT EXISTS `sub_accounts_2` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `parent_id` int NOT NULL,
  `account_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sub_accounts_2_parent_id_foreign` (`parent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sub_accounts_2`
--

INSERT INTO `sub_accounts_2` (`id`, `parent_id`, `account_code`, `sub_name`, `created_at`, `updated_at`) VALUES
(1, 1, '300', 'test', '2025-11-27 13:44:05', '2025-11-27 13:44:05'),
(2, 4, 'PRE', 'Melsoft Premium ERP', '2025-11-28 15:23:37', '2025-11-28 15:23:37'),
(3, 4, 'ESS', 'Melsoft Essential', '2025-11-28 15:32:54', '2025-11-28 15:32:54'),
(4, 4, 'STA', 'Melsoft Standard', '2025-11-28 15:33:20', '2025-11-28 15:33:20'),
(5, 4, 'ELE', 'Melsoft Elevate ERP', '2025-11-28 15:33:51', '2025-11-28 15:33:51'),
(6, 4, 'TIM', 'Melsoft TimeGrid', '2025-11-28 15:34:08', '2025-11-28 15:34:08'),
(7, 5, 'QUA', 'Melsoft Quanta Accounting', '2025-11-28 15:42:25', '2025-11-28 15:42:25'),
(8, 5, 'VAU', 'Melsoft Vaulta', '2025-11-28 15:42:51', '2025-11-28 15:42:51'),
(9, 5, 'HRF', 'HRFusion ERP', '2025-11-28 15:43:11', '2025-11-28 15:43:11'),
(10, 5, 'PRO', 'Melsoft Prolex', '2025-11-28 15:43:40', '2025-11-28 15:43:40'),
(11, 5, 'ASS', 'Melsoft MelAssist', '2025-11-28 15:44:08', '2025-11-28 15:44:08'),
(12, 5, 'CRE', 'Melsoft Credora', '2025-11-28 15:44:37', '2025-11-28 15:44:37'),
(13, 5, 'CRM', 'Melsoft CRM', '2025-11-28 15:45:13', '2025-11-28 15:45:13'),
(14, 16, 'DEM001', 'DEMO', '2025-12-12 06:24:38', '2025-12-12 06:24:38');

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

--
-- Table structure for table `sub_accounts_3`
--

CREATE TABLE IF NOT EXISTS `sub_accounts_3` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `parent_id` int NOT NULL,
  `account_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sub_accounts_3_parent_id_foreign` (`parent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sub_accounts_3`
--

INSERT INTO `sub_accounts_3` (`id`, `parent_id`, `account_code`, `sub_name`, `created_at`, `updated_at`) VALUES
(1, 1, '400', 'test', '2025-11-27 13:44:16', '2025-11-27 13:44:16'),
(2, 2, 'INS', 'Installation', '2025-11-28 15:24:19', '2025-11-28 15:24:19'),
(3, 2, 'SUP', 'Support', '2025-11-28 15:36:40', '2025-11-28 15:36:40'),
(4, 3, 'INS', 'Installation', '2025-11-28 15:37:12', '2025-11-28 15:37:12'),
(5, 3, 'SUP', 'Support', '2025-11-28 15:37:27', '2025-11-28 15:37:27'),
(6, 4, 'INS', 'Installation', '2025-11-28 15:37:51', '2025-11-28 15:37:51'),
(7, 4, 'SUP', 'Support', '2025-11-28 15:38:02', '2025-11-28 15:38:02'),
(8, 5, 'INS', 'Installation', '2025-11-28 15:38:31', '2025-11-28 15:38:31'),
(9, 5, 'SUP', 'Support', '2025-11-28 15:38:41', '2025-11-28 15:38:41'),
(10, 6, 'INS', 'Installation', '2025-11-28 15:39:28', '2025-11-28 15:39:28'),
(11, 6, 'SUP', 'Support', '2025-11-28 15:39:40', '2025-11-28 15:39:40'),
(12, 7, 'INS', 'Installation', '2025-11-28 15:45:38', '2025-11-28 15:45:38'),
(13, 7, 'SUP', 'Support', '2025-11-28 15:45:49', '2025-11-28 15:45:49'),
(14, 7, 'SET', 'Setup', '2025-11-28 15:46:12', '2025-11-28 15:46:12'),
(15, 8, 'INS', 'Installation', '2025-11-28 15:46:43', '2025-11-28 15:46:43'),
(16, 8, 'SUP', 'Support', '2025-11-28 15:46:54', '2025-11-28 15:46:54'),
(17, 8, 'SET', 'Setup', '2025-11-28 15:47:02', '2025-11-28 15:47:02'),
(18, 9, 'INS', 'Installation', '2025-11-28 15:47:24', '2025-11-28 15:47:24'),
(19, 9, 'SUP', 'Support', '2025-11-28 15:47:35', '2025-11-28 15:47:35'),
(20, 9, 'SET', 'Setup', '2025-11-28 15:47:46', '2025-11-28 15:47:46'),
(21, 10, 'INS', 'Installation', '2025-11-28 15:48:06', '2025-11-28 15:48:06'),
(22, 10, 'SUP', 'Support', '2025-11-28 15:48:15', '2025-11-28 15:48:15'),
(23, 10, 'SET', 'Setup', '2025-11-28 15:48:28', '2025-11-28 15:48:28'),
(24, 11, 'INS', 'Installation', '2025-11-28 15:48:49', '2025-11-28 15:48:49'),
(25, 11, 'SUP', 'Support', '2025-11-28 15:48:57', '2025-11-28 15:48:57'),
(26, 11, 'SET', 'Setup', '2025-11-28 15:49:08', '2025-11-28 15:49:08'),
(27, 12, 'INS', 'Installation', '2025-11-28 15:49:29', '2025-11-28 15:49:29'),
(28, 12, 'SUP', 'Support', '2025-11-28 15:49:39', '2025-11-28 15:49:39'),
(29, 12, 'SET', 'Setup', '2025-11-28 15:49:53', '2025-11-28 15:49:53'),
(30, 13, 'INS', 'Installation', '2025-11-28 15:50:28', '2025-11-28 15:50:28'),
(31, 13, 'SUP', 'Support', '2025-11-28 15:50:38', '2025-11-28 15:50:38'),
(32, 13, 'SET', 'Setup', '2025-11-28 15:50:50', '2025-11-28 15:50:50');

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

--
-- Table structure for table `sub_accounts_4`
--

CREATE TABLE IF NOT EXISTS `sub_accounts_4` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `parent_id` int NOT NULL,
  `account_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sub_accounts_4_parent_id_foreign` (`parent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sub_accounts_4`
--

INSERT INTO `sub_accounts_4` (`id`, `parent_id`, `account_code`, `sub_name`, `created_at`, `updated_at`) VALUES
(1, 1, '100', 'testing', '2025-11-27 13:44:30', '2025-11-27 13:44:30');

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

--
-- Table structure for table `sub_accounts_5`
--

CREATE TABLE IF NOT EXISTS `sub_accounts_5` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `parent_id` int NOT NULL,
  `account_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sub_accounts_5_parent_id_foreign` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `suppliers`
--

CREATE TABLE IF NOT EXISTS `suppliers` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `supplier_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contactPerson` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `supplier_accounts`
--

CREATE TABLE IF NOT EXISTS `supplier_accounts` (
  `id` int NOT NULL AUTO_INCREMENT,
  `supplier_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `supplier_account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `contact_person` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `contact_1` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `contact_2` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `category_id` int DEFAULT NULL,
  `age_analysis_id` int DEFAULT NULL,
  `area_id` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `supplier_code` (`supplier_code`),
  KEY `category_id` (`category_id`),
  KEY `age_analysis_id` (`age_analysis_id`),
  KEY `area_id` (`area_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `supplier_accounts`
--

INSERT INTO `supplier_accounts` (`id`, `supplier_code`, `supplier_account`, `contact_person`, `contact_1`, `contact_2`, `email`, `address`, `category_id`, `age_analysis_id`, `area_id`, `created_at`, `updated_at`) VALUES
(1, 'SUP00008', 'marcus', 'Marcus Ruhinga', '4567890', NULL, 'marcusruhinga02@gmail.com', 'chikurubi Max prison camp', NULL, NULL, NULL, '2025-06-12 05:32:37', '2025-09-08 17:52:12'),
(3, 'SUP0001', 'Telone', 'Telone Manager', '+263 224333', '+263 77 777777', 'infor@telone.co.zw', '21 Robert Mugabe', NULL, NULL, NULL, '2025-09-08 17:51:16', '2025-09-08 17:51:16'),
(4, 'SUP009', 'test', 'SUP Test', '4567890', NULL, 'marcusruhinga02@gmail.com', 'chikurubi Max prison camp', NULL, 1, NULL, '2025-09-22 11:58:57', '2025-09-22 11:58:57'),
(9, 'DEM001', 'DEMO', 'Demo', 'demo', 'demoo', 'demo@gmail.com', NULL, 6, NULL, 6, '2025-12-19 06:10:36', '2025-12-19 06:10:36');

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

--
-- Table structure for table `supplier_ageing`
--

CREATE TABLE IF NOT EXISTS `supplier_ageing` (
  `id` int NOT NULL AUTO_INCREMENT,
  `age_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `group_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `interval_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `interval_30_days` tinyint(1) DEFAULT NULL,
  `interval_7_days` tinyint(1) DEFAULT NULL,
  `interval_custom` tinyint(1) DEFAULT NULL,
  `custom_age_1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_age_2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_age_3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_age_4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_age_5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_age_6` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_age_7` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_interval_1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_interval_2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_interval_3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_interval_4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_interval_5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_interval_6` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `suppliers_supplier_code_unique` (`age_code`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `supplier_ageing`
--

INSERT INTO `supplier_ageing` (`id`, `age_code`, `description`, `group_type`, `interval_type`, `interval_30_days`, `interval_7_days`, `interval_custom`, `custom_age_1`, `custom_age_2`, `custom_age_3`, `custom_age_4`, `custom_age_5`, `custom_age_6`, `custom_age_7`, `custom_interval_1`, `custom_interval_2`, `custom_interval_3`, `custom_interval_4`, `custom_interval_5`, `custom_interval_6`, `created_at`, `updated_at`) VALUES
(1, '2000', 'Test', 'monthly', 'invoice_date', 0, 1, 0, 'Current', '30 Days', '60 Days', '90 Days', '120 Days', '150 Days', '180 Days', '7 Days', '14 Days', '21 Days', '28 Days', '35 Days', '42 Days', '2025-09-10 18:17:40', '2025-09-10 18:17:40'),
(2, 'DEM001', 'demo4324', 'monthly', 'statement_date', 1, 0, 0, 'Current', '30 Days', '60 Days', '90 Days', '120 Days', '150 Days', '180 Days', '30 Days', '60 Days', '90 Days', '120 Days', '150 Days', '180 Days', '2025-12-19 06:12:25', '2025-12-19 06:12:25'),
(3, 'DEM002', 'demo', 'monthly', 'statement_date', 1, 0, 0, 'Current', '30 Days', '60 Days', '90 Days', '120 Days', '150 Days', '180 Days', '30 Days', '60 Days', '90 Days', '120 Days', '150 Days', '180 Days', '2025-12-19 06:12:39', '2025-12-19 06:12:39');

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

--
-- Table structure for table `supplier_areas`
--

CREATE TABLE IF NOT EXISTS `supplier_areas` (
  `id` int NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `country` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `specific_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `supplier_areas`
--

INSERT INTO `supplier_areas` (`id`, `code`, `name`, `country`, `city`, `specific_location`, `created_at`, `updated_at`) VALUES
(3, '+2633003', '55 Masasa Road', 'Zimbabwe', 'Harare', 'Masasa Industries', '2025-09-08 16:50:34', '2025-09-08 16:50:34'),
(4, '+263 757575', '21 Lorraine Drive', 'Zimbabwe', 'Harare', 'Second to Your Right', '2025-09-08 16:53:21', '2025-09-08 16:53:21'),
(5, '+263 1111', 'Metro', 'Zimbabwe', 'Bulawayo', 'Near SuperMarket', '2025-09-08 16:55:42', '2025-09-08 16:55:42'),
(6, '+263 56565', 'Gweru Hotel', 'Zimbabwe', 'Gweru', 'Near Texas Meats', '2025-09-08 16:59:38', '2025-09-08 16:59:38'),
(7, 'DEM002', 'DemO', 'demo2', 'demo', 'demo2', '2025-12-19 06:14:54', '2025-12-19 06:14:54'),
(8, 'DEM001', 'DemO', 'demo2', 'demo', 'demo2', '2025-12-19 06:15:02', '2025-12-19 06:15:02');

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

--
-- Table structure for table `supplier_categories`
--

CREATE TABLE IF NOT EXISTS `supplier_categories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `supplier_categories`
--

INSERT INTO `supplier_categories` (`id`, `code`, `name`, `description`, `created_at`, `updated_at`) VALUES
(2, '002', 'category 2', 'test 2', '2025-06-11 11:05:16', '2025-06-11 11:05:16'),
(3, '003', 'Cat 3', 'test 3', '2025-06-11 11:05:29', '2025-06-11 11:05:29'),
(5, '8888', 'Office Supplies', 'Office Supplies', '2025-09-08 17:35:24', '2025-09-08 17:35:24'),
(6, '8889', 'Production Supplier', 'Production Supplier', '2025-09-08 17:36:33', '2025-09-08 17:36:33'),
(8, 'DEM001', 'demo', 'demo', '2025-12-19 06:11:23', '2025-12-19 06:11:23'),
(9, 'DEM002', 'demo', 'demo', '2025-12-19 06:11:32', '2025-12-19 06:11:32');

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

--
-- Table structure for table `supplier_document_headers`
--

CREATE TABLE IF NOT EXISTS `supplier_document_headers` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'purchase_order, goods_received, sales_invoice, returns_debit, credit_supplier',
  `document_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_document_id` bigint UNSIGNED DEFAULT NULL,
  `parent_document_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `supplier_account_id` bigint UNSIGNED NOT NULL,
  `contact_person` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `document_date` date NOT NULL,
  `delivery_date` date DEFAULT NULL,
  `order_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `project_id` bigint UNSIGNED DEFAULT NULL,
  `currency_code` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'USD',
  `allow_negative` tinyint(1) DEFAULT '0',
  `status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'draft',
  `processed_by` bigint UNSIGNED DEFAULT NULL,
  `processed_at` datetime DEFAULT NULL,
  `exclusive_total` decimal(15,2) DEFAULT '0.00',
  `tax_amount` decimal(15,2) DEFAULT '0.00',
  `discount_total` decimal(15,2) DEFAULT '0.00',
  `inclusive_total` decimal(15,2) DEFAULT '0.00',
  `pricing_type` enum('exclusive','inclusive') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'exclusive',
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `addedby` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `supplier_document_headers`
--

INSERT INTO `supplier_document_headers` (`id`, `type`, `document_number`, `parent_document_id`, `parent_document_type`, `supplier_account_id`, `contact_person`, `document_date`, `delivery_date`, `order_number`, `project_id`, `currency_code`, `allow_negative`, `status`, `processed_by`, `processed_at`, `exclusive_total`, `tax_amount`, `discount_total`, `inclusive_total`, `pricing_type`, `notes`, `addedby`, `created_at`, `updated_at`) VALUES
(1, 'purchase_order', 'PO-0001', NULL, NULL, 1, 'John Doe', '2025-07-23', '2025-07-30', 'ORD-001', 2, 'USD', 0, 'draft', NULL, NULL, 1000.00, 150.00, 50.00, 1100.00, 'exclusive', 'First order for July', 0, '2025-07-23 14:47:59', '2025-07-23 14:47:59'),
(2, 'purchase_order', 'PO000001', NULL, NULL, 1, 'Marcus Ruhinga', '2025-07-23', '2025-07-23', NULL, NULL, 'USD', 0, 'draft', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-07-23 12:55:28', '2025-07-23 12:55:28'),
(3, 'purchase_order', 'PO000002', NULL, NULL, 1, 'Marcus Ruhinga', '2025-07-23', '2025-07-23', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 1000.00, 150.00, 0.00, 1150.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-07-23 12:56:42', '2025-07-23 12:56:42'),
(4, 'purchase_order', 'PO000003', NULL, NULL, 1, 'Marcus Ruhinga', '2025-07-25', '2025-07-25', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 39.00, 5.85, 0.00, 44.85, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-07-25 05:58:22', '2025-07-25 05:58:22'),
(5, 'purchase_order', 'PO000004', NULL, NULL, 1, 'Marcus Ruhinga', '2025-07-31', '2025-07-31', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-07-31 10:53:52', '2025-07-31 10:53:52'),
(6, 'purchase_order', 'PO000005', NULL, NULL, 1, 'Marcus Ruhinga', '2025-07-31', '2025-07-31', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-07-31 12:03:41', '2025-07-31 12:03:41'),
(7, 'purchase_order', 'PO000006', NULL, NULL, 1, 'Marcus Ruhinga', '2025-07-31', '2025-07-31', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-07-31 12:17:57', '2025-07-31 12:17:57'),
(8, 'purchase_order', 'PO000007', NULL, NULL, 1, 'Marcus Ruhinga', '2025-07-31', '2025-07-31', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-07-31 12:32:49', '2025-07-31 12:32:49'),
(9, 'purchase_order', 'PO000008', NULL, NULL, 1, NULL, '2025-07-31', '2025-07-31', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-07-31 12:32:56', '2025-07-31 12:32:56'),
(10, 'purchase_order', 'PO000009', NULL, NULL, 1, NULL, '2025-07-31', '2025-07-31', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-07-31 12:43:05', '2025-07-31 12:43:05'),
(11, 'goods_received', 'GRV000001', NULL, NULL, 1, 'Marcus Ruhinga', '2025-07-31', '2025-07-31', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-07-31 12:43:51', '2025-07-31 12:43:51'),
(12, 'purchase_order', 'PO000010', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-01', '2025-08-01', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-01 12:02:39', '2025-08-01 12:02:39'),
(13, 'returns_debit', 'RDN000001', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-01', '2025-08-01', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-01 12:30:32', '2025-08-01 12:30:32'),
(14, 'returns_debit', 'RDN000002', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-01', '2025-08-01', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-01 12:38:34', '2025-08-01 12:38:34'),
(15, 'returns_debit', 'RDN000003', NULL, NULL, 1, NULL, '2025-08-01', '2025-08-01', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-01 12:42:37', '2025-08-01 12:42:37'),
(16, 'returns_debit', 'RDN000004', NULL, NULL, 1, NULL, '2025-08-01', '2025-08-01', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-01 12:47:57', '2025-08-01 12:47:57'),
(17, 'returns_debit', 'RDN000005', NULL, NULL, 1, NULL, '2025-08-01', '2025-08-01', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-01 12:52:44', '2025-08-01 12:52:44'),
(18, 'purchase_order', 'PO000011', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 05:38:17', '2025-08-04 05:38:17'),
(19, 'goods_received', 'GRV000002', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 05:38:54', '2025-08-04 05:38:54'),
(20, 'sales_invoice', 'SINV000001', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 05:39:38', '2025-08-04 05:39:38'),
(21, 'goods_received', 'GRV000003', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 06:34:36', '2025-08-04 06:34:36'),
(22, 'goods_received', 'GRV000004', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 06:44:55', '2025-08-04 06:44:55'),
(23, 'goods_received', 'GRV000005', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 06:45:22', '2025-08-04 06:45:22'),
(24, 'goods_received', 'GRV000006', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 06:49:58', '2025-08-04 06:49:58'),
(25, 'goods_received', 'GRV000007', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 06:58:18', '2025-08-04 06:58:18'),
(26, 'goods_received', 'GRV000008', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 07:01:47', '2025-08-04 07:01:47'),
(27, 'goods_received', 'GRV000009', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 07:02:11', '2025-08-04 07:02:11'),
(28, 'goods_received', 'GRV000010', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 07:02:48', '2025-08-04 07:02:48'),
(29, 'goods_received', 'GRV000011', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 07:06:00', '2025-08-04 07:06:00'),
(30, 'goods_received', 'GRV000012', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 07:07:22', '2025-08-04 07:07:22'),
(31, 'goods_received', 'GRV000013', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 34000.00, 5100.00, 0.00, 39100.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 08:50:48', '2025-08-04 08:50:48'),
(32, 'goods_received', 'GRV000014', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 1000.00, 150.00, 0.00, 1150.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 11:02:10', '2025-08-04 11:02:10'),
(33, 'goods_received', 'GRV000015', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-04', '2025-08-04', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 10900.00, 1635.00, 0.00, 12535.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-04 12:54:53', '2025-08-04 12:54:53'),
(34, 'goods_received', 'GRV000016', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-05', '2025-08-05', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 3400.00, 510.00, 0.00, 3910.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-05 11:23:14', '2025-08-05 11:23:14'),
(35, 'goods_received', 'GRV000017', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-05', '2025-08-05', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 3400.00, 510.00, 0.00, 3910.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-05 12:20:03', '2025-08-05 12:20:03'),
(36, 'goods_received', 'GRV000018', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-07', '2025-08-07', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 34.00, 5.10, 0.00, 39.10, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-07 10:29:05', '2025-08-07 10:29:05'),
(37, 'warehouse_transfer', 'WT000001', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-07', '2025-08-07', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 340.00, 51.00, 0.00, 391.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-07 10:32:19', '2025-08-07 10:32:19'),
(38, 'goods_received', 'GRV000019', NULL, NULL, 1, 'Marcus Ruhinga', '2025-08-08', '2025-08-08', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 100000.00, 15000.00, 0.00, 115000.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-08-08 04:49:44', '2025-08-08 04:49:44'),
(39, 'credit_supplier', 'CS000001', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-02', '2025-09-02', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-02 08:05:07', '2025-09-02 08:05:07'),
(40, 'purchase_order', 'PO000012', NULL, NULL, 3, 'Telone Manager', '2025-09-09', '2025-09-09', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 108.88, 16.33, 11.12, 125.21, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-09 17:24:46', '2025-09-09 17:24:46'),
(41, 'goods_received', 'GRV000020', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-09', '2025-09-09', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 2290.00, 343.50, 0.00, 2633.50, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-09 17:28:33', '2025-09-09 17:28:33'),
(42, 'sales_invoice', 'SINV000002', NULL, NULL, 3, 'Telone Manager', '2025-09-09', '2025-09-09', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 112.35, 16.85, 0.00, 129.20, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-09 17:32:33', '2025-09-09 17:32:33'),
(43, 'returns_debit', 'RDN000006', NULL, NULL, 3, 'Telone Manager', '2025-09-09', '2025-09-09', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 112.35, 16.85, 0.00, 129.20, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-09 17:34:16', '2025-09-09 17:34:16'),
(44, 'credit_supplier', 'CS000002', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-09', '2025-09-09', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 5000.00, 750.00, 0.00, 5750.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-09 17:55:02', '2025-09-09 17:55:02'),
(45, 'goods_received', 'GRV000021', NULL, NULL, 3, 'Telone Manager', '2025-09-22', '2025-09-22', NULL, 5, 'USD', 0, 'processed', NULL, NULL, 546.75, 45.90, 34.00, 592.65, 'exclusive', 'cod', 0, '2025-09-22 14:15:32', '2025-09-22 14:15:32'),
(46, 'sales_invoice', 'SINV000003', NULL, NULL, 3, 'Telone Manager', '2025-09-22', '2025-09-22', NULL, 5, 'USD', 0, 'processed', NULL, NULL, 159.70, 23.95, 0.80, 183.65, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-22 14:18:28', '2025-09-22 14:18:28'),
(47, 'sales_invoice', 'SINV000004', NULL, NULL, 4, 'SUP Test', '2025-09-23', '2025-09-23', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 3350.00, 502.50, 0.00, 3852.50, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-23 17:43:03', '2025-09-23 17:43:03'),
(48, 'sales_invoice', 'SINV000005', NULL, NULL, 4, 'SUP Test', '2025-09-23', '2025-09-23', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 3350.00, 502.50, 0.00, 3852.50, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-23 17:47:37', '2025-09-23 17:47:38'),
(49, 'goods_received', 'GRV000022', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-25', '2025-09-25', '07858', 4, 'USD', 0, 'processed', NULL, NULL, 102.00, 0.00, 0.00, 102.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-25 10:07:45', '2025-09-25 10:07:46'),
(50, 'goods_received', 'GRV000023', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-25', '2025-09-25', '07858', 4, 'USD', 0, 'processed', NULL, NULL, 102.00, 0.00, 0.00, 102.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-25 10:11:09', '2025-09-25 10:11:09'),
(51, 'goods_received', 'GRV000024', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-25', '2025-09-25', '07858', 4, 'USD', 0, 'processed', NULL, NULL, 102.00, 0.00, 0.00, 102.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-25 10:11:27', '2025-09-25 10:11:27'),
(52, 'goods_received', 'GRV000025', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-25', '2025-09-25', '07858', 4, 'USD', 0, 'processed', NULL, NULL, 102.00, 0.00, 0.00, 102.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-25 10:11:33', '2025-09-25 10:11:33'),
(53, 'goods_received', 'GRV000026', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-25', '2025-09-25', '7890', 4, 'USD', 0, 'draft', NULL, NULL, 0.00, 0.00, 0.00, 0.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-25 11:11:10', '2025-09-25 11:11:10'),
(54, 'goods_received', 'GRV000027', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-25', '2025-09-25', '7890', 4, 'USD', 0, 'processed', NULL, NULL, 120.00, 0.00, 0.00, 120.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-25 11:12:12', '2025-09-25 11:12:12'),
(55, 'goods_received', 'GRV000028', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-25', '2025-09-25', '78', NULL, 'USD', 0, 'processed', NULL, NULL, 2400.00, 360.00, 0.00, 2760.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-25 11:17:48', '2025-09-25 11:17:48'),
(56, 'goods_received', 'GRV000029', NULL, NULL, 3, 'Telone Manager', '2025-09-25', '2025-09-25', '123', NULL, 'USD', 0, 'processed', NULL, NULL, 120.00, 18.00, 0.00, 138.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-25 11:27:31', '2025-09-25 11:27:31'),
(57, 'goods_received', 'GRV000030', NULL, NULL, 4, 'SUP Test', '2025-09-25', '2025-09-25', '7667', 2, 'USD', 0, 'processed', NULL, NULL, 2400.00, 360.00, 0.00, 2760.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-25 11:31:01', '2025-09-25 11:31:01'),
(58, 'goods_received', 'GRV000031', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-25', '2025-09-25', '12332', 2, 'USD', 0, 'processed', NULL, NULL, 120.00, 18.00, 0.00, 138.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-25 11:33:38', '2025-09-25 11:33:38'),
(59, 'goods_received', 'GRV000032', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-25', '2025-09-25', 'test', 2, 'USD', 0, 'processed', NULL, NULL, 1320.00, 198.00, 0.00, 1518.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-25 11:36:50', '2025-09-25 11:36:51'),
(60, 'goods_received', 'GRV000033', NULL, NULL, 3, 'Telone Manager', '2025-09-26', '2025-09-26', '3422', 2, 'USD', 0, 'processed', NULL, NULL, 8100.00, 1215.00, 0.00, 9315.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-26 07:54:25', '2025-09-26 07:54:25'),
(61, 'returns_debit', 'RDN000007', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-26', '2025-09-26', '75766', 2, 'USD', 0, 'processed', NULL, NULL, 4680.00, 702.00, 0.00, 5382.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-26 11:33:51', '2025-09-26 11:33:51'),
(62, 'goods_received', 'GRV000034', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-26', '2025-09-26', 'ty0059', NULL, 'USD', 0, 'processed', NULL, NULL, 4680.00, 702.00, 0.00, 5382.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-26 11:35:43', '2025-09-26 11:35:44'),
(63, 'returns_debit', 'RDN000008', NULL, NULL, 1, 'Marcus Ruhinga', '2025-09-29', '2025-09-29', '2430', 2, 'USD', 0, 'processed', NULL, NULL, 5000000.00, 0.00, 0.00, 5000000.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-09-29 11:35:12', '2025-09-29 11:35:13'),
(64, 'sales_invoice', 'SINV000006', NULL, NULL, 1, 'Marcus Ruhinga', '2025-10-01', '2025-10-01', '5879', 2, 'USD', 0, 'processed', NULL, NULL, 4800.00, 0.00, 0.00, 4800.00, 'exclusive', 'Please ensure items are properly packaged.', 0, '2025-10-01 13:15:18', '2025-10-01 13:15:19'),
(65, 'sales_invoice', 'SINV000008', NULL, NULL, 1, 'Marcus Ruhinga', '2025-10-08', '2025-10-08', '834', 2, 'USD', 0, 'processed', NULL, NULL, 3600.00, 540.00, 0.00, 4140.00, 'exclusive', 'Please ensure items are properly packaged.', 6, '2025-10-08 12:03:46', '2025-10-08 12:03:46'),
(66, 'sales_invoice', 'SINV000009', NULL, NULL, 1, 'Marcus Ruhinga', '2025-10-08', '2025-10-08', '834', 2, 'USD', 0, 'processed', NULL, NULL, 3600.00, 540.00, 0.00, 4140.00, 'exclusive', 'Please ensure items are properly packaged.', 6, '2025-10-08 12:03:56', '2025-10-08 12:03:57'),
(67, 'sales_invoice', 'SINV000010', NULL, NULL, 1, 'Marcus Ruhinga', '2025-10-08', '2025-10-08', '834', 2, 'USD', 0, 'processed', NULL, NULL, 3600.00, 540.00, 0.00, 4140.00, 'exclusive', 'Please ensure items are properly packaged.', 6, '2025-10-08 12:14:02', '2025-10-08 12:14:03'),
(68, 'sales_invoice', 'SINV000850', NULL, NULL, 3, 'Telone Manager', '2025-11-15', '2025-11-15', NULL, NULL, 'USD', 0, 'processed', NULL, NULL, 5802.00, 0.00, 0.00, 5802.00, 'exclusive', 'Please ensure items are properly packaged.', 6, '2025-11-15 05:53:06', '2025-11-15 05:53:06');

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

--
-- Table structure for table `supplier_document_lines`
--

CREATE TABLE IF NOT EXISTS `supplier_document_lines` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `supplier_document_header_id` bigint UNSIGNED NOT NULL,
  `module` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'ST',
  `hs_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `item_id` bigint UNSIGNED DEFAULT NULL,
  `account_id` bigint UNSIGNED DEFAULT NULL,
  `account_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `warehouse_id` bigint UNSIGNED DEFAULT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `confirmed_quantity` decimal(15,4) DEFAULT NULL,
  `uom_id` bigint UNSIGNED DEFAULT NULL,
  `price` decimal(15,4) NOT NULL,
  `tax_id` bigint UNSIGNED NOT NULL,
  `tax_rate` decimal(5,2) NOT NULL,
  `discount_percent` decimal(5,2) DEFAULT '0.00',
  `line_tax` decimal(15,4) DEFAULT '0.0000',
  `line_total` decimal(15,4) DEFAULT '0.0000',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `supplier_document_header_id` (`supplier_document_header_id`)
) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `supplier_document_lines`
--

INSERT INTO `supplier_document_lines` (`id`, `supplier_document_header_id`, `module`, `hs_code`, `item_id`, `account_id`, `account_type`, `warehouse_id`, `quantity`, `confirmed_quantity`, `uom_id`, `price`, `tax_id`, `tax_rate`, `discount_percent`, `line_tax`, `line_total`, `description`, `created_at`, `updated_at`) VALUES
(1, 3, 'ST', NULL, 4, NULL, NULL, 1, 1.0000, 1.0000, NULL, 1000.0000, 2, 15.00, 0.00, 150.0000, 1150.0000, NULL, '2025-07-23 14:56:42', '2025-07-23 14:56:42'),
(2, 4, 'ST', NULL, 11, NULL, NULL, 1, 1.0000, 1.0000, NULL, 39.0000, 2, 15.00, 0.00, 5.8500, 44.8500, NULL, '2025-07-25 07:58:22', '2025-07-25 07:58:22'),
(3, 5, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-07-31 12:53:52', '2025-07-31 12:53:52'),
(4, 6, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-07-31 14:03:41', '2025-07-31 14:03:41'),
(5, 7, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-07-31 14:17:57', '2025-07-31 14:17:57'),
(6, 8, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-07-31 14:32:49', '2025-07-31 14:32:49'),
(7, 9, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-07-31 14:32:56', '2025-07-31 14:32:56'),
(8, 10, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-07-31 14:43:05', '2025-07-31 14:43:05'),
(9, 11, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-07-31 14:43:51', '2025-07-31 14:43:51'),
(10, 12, 'GL', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-01 14:02:39', '2025-08-01 14:02:39'),
(11, 13, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-01 14:30:32', '2025-08-01 14:30:32'),
(12, 14, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-01 14:38:34', '2025-08-01 14:38:34'),
(13, 15, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-01 14:42:37', '2025-08-01 14:42:37'),
(14, 16, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-01 14:47:57', '2025-08-01 14:47:57'),
(15, 17, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-01 14:52:44', '2025-08-01 14:52:44'),
(16, 18, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-04 07:38:17', '2025-08-04 07:38:17'),
(17, 19, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-04 07:38:54', '2025-08-04 07:38:54'),
(18, 20, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-04 07:39:38', '2025-08-04 07:39:38'),
(19, 21, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-04 08:34:36', '2025-08-04 08:34:36'),
(20, 22, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-04 08:44:55', '2025-08-04 08:44:55'),
(21, 23, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-04 08:45:22', '2025-08-04 08:45:22'),
(22, 24, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-04 08:49:58', '2025-08-04 08:49:58'),
(23, 25, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-04 08:58:18', '2025-08-04 08:58:18'),
(24, 26, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-04 09:01:47', '2025-08-04 09:01:47'),
(25, 27, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-04 09:02:11', '2025-08-04 09:02:11'),
(26, 28, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-04 09:02:48', '2025-08-04 09:02:48'),
(27, 29, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-04 09:06:00', '2025-08-04 09:06:00'),
(28, 30, 'ST', NULL, NULL, NULL, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-08-04 09:07:22', '2025-08-04 09:07:22'),
(29, 31, 'ST', '1232', 9, NULL, NULL, 1, 340.0000, 340.0000, NULL, 100.0000, 2, 15.00, 0.00, 5100.0000, 39100.0000, 'test', '2025-08-04 10:50:48', '2025-08-04 10:50:48'),
(30, 32, 'ST', NULL, 9, NULL, NULL, 1, 10.0000, 10.0000, 6, 100.0000, 2, 15.00, 0.00, 150.0000, 1150.0000, NULL, '2025-08-04 13:02:10', '2025-08-04 13:02:10'),
(31, 33, 'ST', '200', 9, NULL, NULL, 1, 109.0000, 109.0000, NULL, 100.0000, 2, 15.00, 0.00, 1635.0000, 12535.0000, '200', '2025-08-04 14:54:53', '2025-08-04 14:54:53'),
(32, 34, 'ST', '1232', 16, NULL, NULL, 1, 100.0000, 100.0000, 5, 34.0000, 2, 15.00, 0.00, 510.0000, 3910.0000, '23456', '2025-08-05 13:23:14', '2025-08-05 13:23:14'),
(33, 35, 'ST', NULL, 16, NULL, NULL, 1, 1.0000, 100.0000, NULL, 34.0000, 2, 15.00, 0.00, 510.0000, 3910.0000, NULL, '2025-08-05 14:20:03', '2025-08-05 14:20:03'),
(34, 36, 'ST', NULL, 16, NULL, NULL, 1, 1.0000, 1.0000, NULL, 34.0000, 2, 15.00, 0.00, 5.1000, 39.1000, NULL, '2025-08-07 12:29:05', '2025-08-07 12:29:05'),
(35, 37, 'ST', '1232', 16, NULL, NULL, 1, 10.0000, 10.0000, 8, 34.0000, 2, 15.00, 0.00, 51.0000, 391.0000, '3456789', '2025-08-07 12:32:19', '2025-08-07 12:32:19'),
(36, 38, 'ST', NULL, 9, NULL, NULL, 1, 1.0000, 1000.0000, NULL, 100.0000, 2, 15.00, 0.00, 15000.0000, 115000.0000, NULL, '2025-08-08 06:49:44', '2025-08-08 06:49:44'),
(37, 39, 'GL', NULL, NULL, 22, NULL, NULL, 1.0000, 1.0000, NULL, 0.0000, 2, 15.00, 0.00, 0.0000, 0.0000, NULL, '2025-09-02 10:05:07', '2025-09-02 10:05:07'),
(38, 40, 'ST', NULL, 9, NULL, NULL, 1, 123.0000, 1.0000, NULL, 100.0000, 2, 15.00, 9.70, 13.5450, 103.8450, NULL, '2025-09-09 13:24:46', '2025-09-09 13:24:46'),
(39, 40, 'ST', NULL, 15, NULL, NULL, 1, 1.0000, 1.0000, 10, 20.0000, 2, 15.00, 7.10, 2.7870, 21.3670, NULL, '2025-09-09 13:24:46', '2025-09-09 13:24:46'),
(40, 41, 'ST', NULL, 8, NULL, NULL, 5, 129.0000, 129.0000, 9, 10.0000, 2, 15.00, 0.00, 193.5000, 1483.5000, NULL, '2025-09-09 13:28:33', '2025-09-09 13:28:33'),
(41, 41, 'ST', NULL, 10, NULL, NULL, 6, 5.0000, 5.0000, 10, 200.0000, 2, 15.00, 0.00, 150.0000, 1150.0000, NULL, '2025-09-09 13:28:33', '2025-09-09 13:28:33'),
(42, 42, 'ST', NULL, 17, NULL, NULL, 1, 7.0000, 7.0000, 4, 16.0500, 2, 15.00, 0.00, 16.8525, 129.2025, NULL, '2025-09-09 13:32:33', '2025-09-09 13:32:33'),
(43, 43, 'ST', NULL, 17, NULL, NULL, 5, 7.0000, 7.0000, NULL, 16.0500, 2, 15.00, 0.00, 16.8525, 129.2025, NULL, '2025-09-09 13:34:16', '2025-09-09 13:34:16'),
(44, 44, 'ST', NULL, 5, NULL, NULL, 5, 5.0000, 5.0000, NULL, 1000.0000, 2, 15.00, 0.00, 750.0000, 5750.0000, NULL, '2025-09-09 13:55:02', '2025-09-09 13:55:02'),
(45, 45, 'ST', NULL, 17, NULL, NULL, 1, 15.0000, 15.0000, NULL, 16.0500, 10, 0.00, 0.00, 0.0000, 240.7500, 'Ffgg', '2025-09-22 10:15:32', '2025-09-22 10:15:32'),
(46, 45, 'ST', NULL, 16, NULL, NULL, 1, 10.0000, 10.0000, NULL, 34.0000, 2, 15.00, 10.00, 45.9000, 351.9000, 'Test me', '2025-09-22 10:15:32', '2025-09-22 10:15:32'),
(47, 46, 'ST', NULL, 17, NULL, NULL, 1, 10.0000, 10.0000, NULL, 16.0500, 2, 15.00, 0.50, 23.9546, 183.6521, 'Rrr', '2025-09-22 10:18:28', '2025-09-22 10:18:28'),
(48, 47, 'GL', NULL, NULL, 37, NULL, NULL, 1.0000, 1.0000, NULL, 3350.0000, 2, 15.00, 0.00, 502.5000, 3852.5000, 'Purchases', '2025-09-23 13:43:03', '2025-09-23 13:43:03'),
(49, 48, 'GL', NULL, NULL, 37, NULL, NULL, 1.0000, 1.0000, NULL, 3350.0000, 2, 15.00, 0.00, 502.5000, 3852.5000, 'Purchases', '2025-09-23 13:47:38', '2025-09-23 13:47:38'),
(50, 49, 'ST', 'hs9394', 18, NULL, NULL, 1, 1.0000, 1.0000, 4, 102.0000, 10, 0.00, 0.00, 0.0000, 102.0000, 'tests', '2025-09-25 12:07:45', '2025-09-25 12:07:45'),
(51, 50, 'ST', 'hs9394', 18, NULL, NULL, 1, 1.0000, 1.0000, 4, 102.0000, 10, 0.00, 0.00, 0.0000, 102.0000, 'tests', '2025-09-25 12:11:09', '2025-09-25 12:11:09'),
(52, 51, 'ST', 'hs9394', 18, NULL, NULL, 1, 1.0000, 1.0000, 4, 102.0000, 10, 0.00, 0.00, 0.0000, 102.0000, 'tests', '2025-09-25 12:11:27', '2025-09-25 12:11:27'),
(53, 52, 'ST', 'hs9394', 18, NULL, NULL, 1, 1.0000, 1.0000, 4, 102.0000, 10, 0.00, 0.00, 0.0000, 102.0000, 'tests', '2025-09-25 12:11:33', '2025-09-25 12:11:33'),
(54, 53, 'ST', NULL, 21, NULL, NULL, 1, 1.0000, 1.0000, 4, 120.0000, 10, 0.00, 0.00, 0.0000, 120.0000, 'test', '2025-09-25 13:11:10', '2025-09-25 13:11:10'),
(55, 54, 'ST', NULL, 21, NULL, NULL, 1, 1.0000, 1.0000, 4, 120.0000, 10, 0.00, 0.00, 0.0000, 120.0000, 'test', '2025-09-25 13:12:12', '2025-09-25 13:12:12'),
(56, 55, 'ST', NULL, 21, NULL, NULL, 1, 1.0000, 20.0000, NULL, 120.0000, 2, 15.00, 0.00, 360.0000, 2760.0000, NULL, '2025-09-25 13:17:48', '2025-09-25 13:17:48'),
(57, 56, 'ST', NULL, 21, NULL, NULL, 1, 9.0000, 1.0000, NULL, 120.0000, 2, 15.00, 0.00, 18.0000, 138.0000, NULL, '2025-09-25 13:27:31', '2025-09-25 13:27:31'),
(58, 57, 'ST', 't23', 21, NULL, NULL, 1, 20.0000, 20.0000, NULL, 120.0000, 2, 15.00, 0.00, 360.0000, 2760.0000, 'test', '2025-09-25 13:31:01', '2025-09-25 13:31:01'),
(59, 58, 'ST', 'hs321', 21, NULL, NULL, 1, 10.0000, 1.0000, NULL, 120.0000, 2, 15.00, 0.00, 18.0000, 138.0000, 'test', '2025-09-25 13:33:38', '2025-09-25 13:33:38'),
(60, 59, 'ST', 'hs123', 21, NULL, NULL, 1, 11.0000, 11.0000, 4, 120.0000, 2, 15.00, 0.00, 198.0000, 1518.0000, 'testr3', '2025-09-25 13:36:50', '2025-09-25 13:36:50'),
(61, 60, 'ST', 'hr22223', 22, NULL, NULL, 1, 90.0000, 90.0000, 4, 90.0000, 2, 15.00, 0.00, 1215.0000, 9315.0000, 'test', '2025-09-26 09:54:25', '2025-09-26 09:54:25'),
(62, 61, 'ST', 'he123', 21, NULL, NULL, 1, 39.0000, 39.0000, 4, 120.0000, 2, 15.00, 0.00, 702.0000, 5382.0000, 'reverse', '2025-09-26 13:33:51', '2025-09-26 13:33:51'),
(63, 62, 'ST', 'hr332', 21, NULL, NULL, 1, 39.0000, 39.0000, 4, 120.0000, 2, 15.00, 0.00, 702.0000, 5382.0000, 'testc', '2025-09-26 13:35:44', '2025-09-26 13:35:44'),
(64, 63, 'ST', 'hr2661', 7, NULL, NULL, 1, 1000.0000, 1000.0000, 4, 5000.0000, 10, 0.00, 0.00, 0.0000, 5000000.0000, 'test qnty', '2025-09-29 13:35:12', '2025-09-29 13:35:12'),
(65, 64, 'ST', 'item43', 21, NULL, NULL, 1, 40.0000, 40.0000, 4, 120.0000, 10, 0.00, 0.00, 0.0000, 4800.0000, 'teds', '2025-10-01 15:15:19', '2025-10-01 15:15:19'),
(66, 65, 'ST', 'hs234', 21, 37, NULL, 1, 30.0000, 30.0000, 4, 120.0000, 2, 15.00, 0.00, 540.0000, 4140.0000, 'test', '2025-10-08 14:03:46', '2025-10-08 14:03:46'),
(67, 66, 'ST', 'hs234', 21, 37, NULL, 1, 30.0000, 30.0000, 4, 120.0000, 2, 15.00, 0.00, 540.0000, 4140.0000, 'test', '2025-10-08 14:03:57', '2025-10-08 14:03:57'),
(68, 67, 'ST', 'hs234', 21, 37, NULL, 1, 30.0000, 30.0000, 4, 120.0000, 2, 15.00, 0.00, 540.0000, 4140.0000, 'test', '2025-10-08 14:14:02', '2025-10-08 14:14:02'),
(69, 68, 'GL', NULL, NULL, 37, NULL, NULL, 1.0000, 1.0000, NULL, 5802.0000, 11, 0.00, 0.00, 0.0000, 5802.0000, 'Purchases', '2025-11-15 06:53:06', '2025-11-15 06:53:06');

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

--
-- Table structure for table `supplier_document_settings`
--

CREATE TABLE IF NOT EXISTS `supplier_document_settings` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `document_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `prefix` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'PO',
  `start_number` int DEFAULT '1',
  `pricing_type` enum('exclusive','inclusive') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'exclusive',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `document_type_unique` (`document_type`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `supplier_document_settings`
--

INSERT INTO `supplier_document_settings` (`id`, `document_type`, `prefix`, `start_number`, `pricing_type`, `created_at`, `updated_at`) VALUES
(1, 'purchase_order', 'MELPO', 13, 'exclusive', '2025-07-23 12:49:36', '2025-11-15 05:47:09'),
(2, 'sales_invoice', 'SUPINV', 23854, 'exclusive', '2025-07-23 12:56:53', '2025-11-15 05:50:04'),
(3, 'goods_received', 'MELGRV', 35, 'exclusive', '2025-07-25 05:58:46', '2025-11-15 05:47:44'),
(4, 'returns_debit', 'MELRD', 9, 'exclusive', '2025-08-01 12:30:25', '2025-11-15 05:48:08'),
(5, 'warehouse_transfer', 'WT', 2, 'exclusive', '2025-08-06 11:36:41', '2025-08-07 10:32:19'),
(6, 'credit_supplier', 'MELCTS', 3, 'exclusive', '2025-08-28 12:26:22', '2025-11-15 05:48:36');

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

--
-- Table structure for table `supplier_journals`
--

CREATE TABLE IF NOT EXISTS `supplier_journals` (
  `id` int NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `supplier_account_id` int NOT NULL,
  `project_id` bigint UNSIGNED DEFAULT NULL,
  `narration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `reference` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency_id` int UNSIGNED NOT NULL,
  `tr_code` enum('DR','CR') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_account_id` (`supplier_account_id`),
  KEY `currency_id` (`currency_id`),
  KEY `fk_supplier_journals_project` (`project_id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `supplier_journals`
--

INSERT INTO `supplier_journals` (`id`, `date`, `supplier_account_id`, `project_id`, `narration`, `reference`, `currency_id`, `tr_code`, `amount`, `created_at`, `updated_at`) VALUES
(1, '2025-08-10', 1, NULL, 'eyyy', 'eyyy', 2, 'DR', 10.00, '2025-08-08 07:25:12', '2025-08-08 07:25:12'),
(2, '2025-08-08', 1, NULL, 'eyyy', 'eyyy', 2, 'DR', 19.00, '2025-08-08 07:26:02', '2025-08-08 07:26:02'),
(3, '2025-08-08', 1, NULL, 'eyyy', 'eyyy', 2, 'CR', 40.00, '2025-08-08 07:36:41', '2025-08-08 07:36:41'),
(4, '2025-08-08', 1, NULL, 'eyyy', 'eyyy', 12, 'DR', 10.00, '2025-08-08 07:42:39', '2025-08-08 07:42:39'),
(5, '2025-08-08', 1, NULL, 'eyyy', 'eyyy', 2, 'CR', 10.00, '2025-08-08 07:46:47', '2025-08-08 07:46:47'),
(6, '2025-08-08', 1, NULL, 'eyyy', 'eyyy', 1, 'CR', 9.00, '2025-08-08 07:46:47', '2025-08-08 07:46:47'),
(7, '2025-08-08', 1, NULL, 'eyyy', 'eyyy', 2, 'DR', 9.00, '2025-08-08 07:46:47', '2025-08-08 07:46:47'),
(8, '2025-08-08', 1, NULL, 'eyyy', 'eyyy', 2, 'CR', 10.00, '2025-08-08 07:59:04', '2025-08-08 07:59:04'),
(9, '2025-08-08', 1, NULL, 'eyyy', 'eyyy', 2, 'CR', 10.00, '2025-08-08 08:11:16', '2025-08-08 08:11:16'),
(10, '2025-08-08', 1, NULL, 'eyyy', 'eyyy', 2, 'DR', 10.00, '2025-08-08 08:12:12', '2025-08-08 08:12:12'),
(11, '2025-08-08', 1, NULL, 'eyyy', 'eyyy', 1, 'DR', 45.00, '2025-08-08 08:16:00', '2025-08-08 08:16:00'),
(12, '2025-08-08', 1, NULL, 'eyes', 'eyyy', 12, 'DR', 9.00, '2025-08-08 08:56:21', '2025-08-08 08:56:21'),
(13, '2025-08-18', 1, NULL, 'eyes', 'eyyytest', 2, 'CR', 34.00, '2025-08-18 07:43:38', '2025-08-18 07:43:38'),
(14, '2025-09-10', 3, NULL, 'Logistic Journal', 'REF SUPL-J 011', 12, 'DR', 1111.00, '2025-09-10 12:27:55', '2025-09-10 12:27:55'),
(15, '2025-08-18', 1, NULL, 'Procurement Journal', 'REF SUPL-J 013', 1, 'CR', 56.00, '2025-09-10 12:28:21', '2025-09-10 12:28:21');

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

--
-- Table structure for table `supplier_journal_temps`
--

CREATE TABLE IF NOT EXISTS `supplier_journal_temps` (
  `id` int NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `supplier_account_id` int NOT NULL,
  `project_id` bigint UNSIGNED DEFAULT NULL,
  `narration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `reference` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency_id` int UNSIGNED NOT NULL,
  `tr_code` enum('DR','CR') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `status` enum('Pending','Processed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Pending',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_account_id` (`supplier_account_id`),
  KEY `currency_id` (`currency_id`),
  KEY `fk_supplier_journal_temps_project` (`project_id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `supplier_payments`
--

CREATE TABLE IF NOT EXISTS `supplier_payments` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `supplier_document_header_id` bigint UNSIGNED NOT NULL,
  `supplier_id` int NOT NULL,
  `payment_date` date NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `payment_method` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `reference_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_document_header_id` (`supplier_document_header_id`),
  KEY `supplier_id` (`supplier_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `supplier_transactions`
--

CREATE TABLE IF NOT EXISTS `supplier_transactions` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `transaction_type` enum('invoice','credit_note','debit_note') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `debit_credit` enum('debit','credit') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `debit_ledger_account_id` bigint UNSIGNED NOT NULL,
  `credit_ledger_account_id` bigint UNSIGNED NOT NULL,
  `tax_account_id` bigint UNSIGNED DEFAULT NULL,
  `always_prompt_credit` tinyint(1) DEFAULT '0',
  `always_split_credit` tinyint(1) DEFAULT '0',
  `use_tax` tinyint(1) DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`),
  KEY `fk_supplier_debit_ledger` (`debit_ledger_account_id`),
  KEY `fk_supplier_credit_ledger` (`credit_ledger_account_id`),
  KEY `fk_supplier_tax_account` (`tax_account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `supplier_transactions`
--

INSERT INTO `supplier_transactions` (`id`, `transaction_type`, `code`, `description`, `debit_credit`, `debit_ledger_account_id`, `credit_ledger_account_id`, `tax_account_id`, `always_prompt_credit`, `always_split_credit`, `use_tax`, `created_at`, `updated_at`) VALUES
(1, 'invoice', 'INV', 'Invoices', 'credit', 14, 7, 15, 0, 1, 1, '2025-07-01 08:05:50', '2025-09-01 05:08:07'),
(3, 'invoice', 'R&D', 'Return & Debit', 'debit', 14, 7, 15, 0, 0, 1, '2025-09-01 05:08:48', '2025-09-01 05:08:48'),
(4, 'invoice', 'CTS', 'Credit to Supplier', 'debit', 14, 7, 15, 0, 0, 1, '2025-09-01 05:09:54', '2025-09-01 05:09:54'),
(5, 'invoice', 'GRV', 'Goods Received Voucher', 'debit', 7, 18, NULL, 0, 0, 0, '2025-09-01 05:10:48', '2025-09-01 05:10:48'),
(6, 'invoice', 'IS', 'Issue Stock', 'debit', 7, 46, NULL, 0, 0, 0, '2025-09-01 05:11:48', '2025-09-01 05:11:48'),
(8, 'invoice', '4001', 'Purchase', 'debit', 16, 37, NULL, 0, 0, 0, '2025-09-08 13:26:33', '2025-09-08 13:26:33'),
(9, 'invoice', '4002', 'Fixed Assets', 'debit', 37, 10, NULL, 0, 0, 1, '2025-09-08 14:01:08', '2025-09-08 14:01:08'),
(12, 'invoice', 'DEM001', 'demo', 'debit', 58, 58, NULL, 0, 0, 0, '2025-12-19 05:52:08', '2025-12-19 05:52:08'),
(13, 'invoice', 'DEM003', 'demo', 'debit', 58, 64, NULL, 0, 0, 0, '2025-12-19 05:52:52', '2025-12-19 05:53:03');

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

--
-- Table structure for table `taxes`
--

CREATE TABLE IF NOT EXISTS `taxes` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `rate` decimal(8,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `description` (`description`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `taxes`
--

INSERT INTO `taxes` (`id`, `description`, `rate`, `created_at`, `updated_at`) VALUES
(2, 'VAT', 15.00, '2025-06-12 08:23:47', '2025-07-04 12:11:59'),
(10, 'Zero Rated', 0.00, '2025-09-13 02:52:56', '2025-09-13 02:52:56'),
(11, 'Exempted', 0.00, '2025-09-13 02:53:08', '2025-09-13 02:53:08'),
(12, 'demo4324', 23.00, '2025-12-19 07:44:21', '2025-12-19 07:44:21'),
(13, 'demo', 21.50, '2025-12-19 07:44:32', '2025-12-19 07:44:45');

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

--
-- Table structure for table `tax_depreciation`
--

CREATE TABLE IF NOT EXISTS `tax_depreciation` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `start_date` date DEFAULT NULL,
  `residual_value` decimal(15,2) DEFAULT NULL,
  `depriciation_method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchase_value` decimal(15,2) DEFAULT NULL,
  `tax` date DEFAULT NULL,
  `total` int DEFAULT NULL,
  `prior_year` int DEFAULT NULL,
  `current_year` int DEFAULT NULL,
  `initial_allowance` decimal(15,2) DEFAULT NULL,
  `impairement_cost` decimal(15,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `tax_types`
--

CREATE TABLE IF NOT EXISTS `tax_types` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `rate` decimal(5,2) NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `tenants`
--

CREATE TABLE IF NOT EXISTS `tenants` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tenant_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contactPerson` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `VAT` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `TIN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `level` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `space` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rooms` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rent_amount` decimal(15,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `transactions`
--

CREATE TABLE IF NOT EXISTS `transactions` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `narration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reference` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_subcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contra_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contra_subcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `added_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `source` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `qnty` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `price` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tax` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tax_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `discount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `batch` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `MNarration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `TType` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `transaction_job`
--

CREATE TABLE IF NOT EXISTS `transaction_job` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `narration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reference` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_subcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contra_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contra_subcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `added_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `source` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `qnty` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `price` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tax` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tax_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `discount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `batch` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `MNarration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `TType` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `transaction_type`
--

CREATE TABLE IF NOT EXISTS `transaction_type` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `gl_account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_group` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `transaction_type`
--

INSERT INTO `transaction_type` (`id`, `gl_account`, `account_group`, `created_at`, `updated_at`) VALUES
(1, '30', 'customers', '2025-06-24 12:41:02', '2025-06-24 12:41:02');

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

--
-- Table structure for table `transaction_types`
--

CREATE TABLE IF NOT EXISTS `transaction_types` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `gl_account` bigint UNSIGNED NOT NULL,
  `account_group` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `gl_account` (`gl_account`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE IF NOT EXISTS `units` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `level` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `uoms`
--

CREATE TABLE IF NOT EXISTS `uoms` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `uom_category_id` int UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uoms_code_unique` (`code`),
  KEY `uoms_uom_category_id_foreign` (`uom_category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `uoms`
--

INSERT INTO `uoms` (`id`, `code`, `description`, `uom_category_id`, `created_at`, `updated_at`) VALUES
(4, '001', 'Kilogramme(kg)', 2, '2025-06-18 12:20:38', '2025-06-18 12:49:47'),
(5, '002', 'Grames(g)', 2, '2025-06-18 12:21:10', '2025-06-18 12:21:10'),
(6, '003', 'Milligrame(mg)', 2, '2025-06-18 12:22:16', '2025-06-18 12:22:16'),
(7, '004', 'Hour(hr)', 3, '2025-06-18 12:22:37', '2025-06-18 12:22:37'),
(8, '005', 'seconds(s)', 3, '2025-06-18 12:23:27', '2025-06-18 12:23:27'),
(9, '00099', 'Metre', 4, '2025-06-18 12:54:57', '2025-06-18 12:54:57'),
(10, '000998', 'drum', 4, '2025-06-18 12:55:58', '2025-06-18 12:55:58'),
(11, '006', 'Minutes(mts)', 3, '2025-06-19 07:43:33', '2025-06-19 07:43:33'),
(12, '007', 'Milliseconds', 3, '2025-06-19 07:43:59', '2025-06-19 07:43:59'),
(14, 'BOX', 'Box', 3, '2025-11-11 02:41:56', '2025-11-11 02:41:56'),
(15, 'CASE', 'Case', 3, '2025-11-11 02:42:34', '2025-11-11 02:42:34'),
(16, 'DEM001', 'Demo', 9, '2025-12-11 13:24:29', '2025-12-11 13:24:29'),
(17, 'DEM002', 'Demo2', 10, '2025-12-11 13:25:14', '2025-12-11 13:25:14');

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

--
-- Table structure for table `uom_categories`
--

CREATE TABLE IF NOT EXISTS `uom_categories` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `uom_categories`
--

INSERT INTO `uom_categories` (`id`, `code`, `description`, `created_at`, `updated_at`) VALUES
(2, '4000', 'Weight', '2025-06-17 12:06:47', '2025-06-19 07:31:56'),
(3, '1000', 'time', '2025-06-17 12:06:57', '2025-06-17 12:06:57'),
(4, '004', 'wwlength', '2025-06-18 12:54:13', '2025-07-02 10:43:00'),
(7, 'UNI001', 'Unit', '2025-11-10 15:20:32', '2025-11-10 15:20:32'),
(8, 'LEN001', 'Length', '2025-11-10 15:20:48', '2025-11-10 15:20:48'),
(9, 'DEM001', 'Demo', '2025-12-11 13:22:15', '2025-12-11 13:22:15'),
(10, 'DEM002', 'demo432', '2025-12-11 13:22:34', '2025-12-19 07:04:06');

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

--
-- Table structure for table `uom_conversions`
--

CREATE TABLE IF NOT EXISTS `uom_conversions` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `uom_category_id` bigint UNSIGNED NOT NULL,
  `from_uom_id` bigint UNSIGNED NOT NULL,
  `to_uom_id` bigint UNSIGNED NOT NULL,
  `factor` decimal(20,6) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `uom_conversions`
--

INSERT INTO `uom_conversions` (`id`, `uom_category_id`, `from_uom_id`, `to_uom_id`, `factor`, `created_at`, `updated_at`) VALUES
(12, 2, 4, 5, 1000.000000, '2025-06-19 07:34:50', '2025-06-19 07:34:50'),
(14, 4, 10, 9, 500.000000, '2025-06-19 07:35:37', '2025-06-19 07:35:37'),
(15, 2, 4, 6, 1000000.000000, '2025-06-19 07:36:25', '2025-06-19 07:36:25'),
(16, 3, 7, 11, 60.000000, '2025-06-19 07:45:05', '2025-06-19 07:45:05'),
(17, 3, 11, 8, 60.000000, '2025-06-19 07:45:24', '2025-06-19 07:45:24'),
(18, 3, 8, 12, 11000.000000, '2025-06-19 07:46:15', '2025-07-02 12:14:28'),
(19, 2, 5, 4, 1000.000000, '2025-11-11 12:41:24', '2025-11-11 12:41:24');

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

--
-- Table structure for table `warehouse`
--

CREATE TABLE IF NOT EXISTS `warehouse` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `warehouses`
--

CREATE TABLE IF NOT EXISTS `warehouses` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `warehouses`
--

INSERT INTO `warehouses` (`id`, `code`, `description`, `created_at`, `updated_at`) VALUES
(1, 'W001', 'Main Central Warehouse', '2025-06-13 13:07:08', '2025-06-13 13:07:08'),
(5, 'W002', 'East Side Warehouse', '2025-08-07 12:28:23', '2025-08-07 12:28:23'),
(6, 'W003', 'West Side Warehouse', '2025-08-07 12:28:50', '2025-08-07 12:28:50'),
(7, 'DEM001', 'Demo', '2025-12-11 13:19:14', '2025-12-11 13:19:14'),
(8, 'DEM002', 'Demo2', '2025-12-11 13:20:25', '2025-12-11 13:20:25');

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

--
-- Table structure for table `warehouse_transfers`
--

CREATE TABLE IF NOT EXISTS `warehouse_transfers` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `document_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `transfer_date` date NOT NULL,
  `from_warehouse_id` int UNSIGNED NOT NULL,
  `to_warehouse_id` int UNSIGNED NOT NULL,
  `reference_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `from_warehouse_id` (`from_warehouse_id`),
  KEY `to_warehouse_id` (`to_warehouse_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `warehouse_transfers`
--

INSERT INTO `warehouse_transfers` (`id`, `document_number`, `transfer_date`, `from_warehouse_id`, `to_warehouse_id`, `reference_number`, `notes`, `status`, `created_at`, `updated_at`) VALUES
(2, 'WT-000001', '2025-08-07', 1, 1, NULL, NULL, 'completed', '2025-08-07 10:47:19', '2025-08-07 10:47:19'),
(4, 'WT-000003', '2025-09-04', 1, 6, 'fghh', 'Ghhhh', 'completed', '2025-09-04 20:12:37', '2025-09-04 20:12:37'),
(5, 'WT-000005', '2025-09-10', 1, 5, 'REF WR-HSE0012', NULL, 'completed', '2025-09-10 14:12:00', '2025-09-10 14:12:00'),
(6, 'WT-000006', '2025-09-30', 1, 5, 'yt3884m', 'testing trans', 'completed', '2025-09-30 12:23:38', '2025-09-30 12:23:38'),
(8, 'WT-000007', '2025-09-30', 1, 6, 'test93992', 'test93992tests', 'completed', '2025-09-30 12:37:23', '2025-09-30 12:37:23'),
(9, 'WT-000009', '2025-09-30', 1, 1, 'test93', 'test9399', 'completed', '2025-09-30 12:38:16', '2025-09-30 12:38:16'),
(10, 'WT-000010', '2025-09-30', 1, 6, 'test93', 'test9399', 'completed', '2025-09-30 12:39:04', '2025-09-30 12:39:04');

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

--
-- Table structure for table `warehouse_transfer_lines`
--

CREATE TABLE IF NOT EXISTS `warehouse_transfer_lines` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `transfer_id` bigint UNSIGNED NOT NULL,
  `item_id` bigint UNSIGNED NOT NULL,
  `reference` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `uom_id` int UNSIGNED NOT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `transfer_id` (`transfer_id`),
  KEY `item_id` (`item_id`),
  KEY `uom_id` (`uom_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `warehouse_transfer_lines`
--

INSERT INTO `warehouse_transfer_lines` (`id`, `transfer_id`, `item_id`, `reference`, `uom_id`, `quantity`, `created_at`, `updated_at`) VALUES
(1, 2, 9, '3456789', 11, 1.0000, '2025-08-07 10:47:19', '2025-08-07 10:47:19'),
(2, 4, 9, 'fgg', 9, 10.0000, '2025-09-04 20:12:37', '2025-09-04 20:12:37'),
(3, 5, 4, '', 4, 112.0000, '2025-09-10 14:12:00', '2025-09-10 14:12:00'),
(4, 5, 5, '', 5, 550.0000, '2025-09-10 14:12:00', '2025-09-10 14:12:00'),
(5, 6, 16, 'tethdhhs', 4, 10.0000, '2025-09-30 12:23:38', '2025-09-30 12:23:38'),
(7, 8, 7, 'testttvi', 4, 10.0000, '2025-09-30 12:37:23', '2025-09-30 12:37:23'),
(8, 9, 7, 'gedr5ry6', 4, 10.0000, '2025-09-30 12:38:16', '2025-09-30 12:38:16'),
(9, 10, 7, 'testtvgys79', 4, 10.0000, '2025-09-30 12:39:04', '2025-09-30 12:39:04');

--
-- Constraints for dumped tables
--

--
-- Constraints for table `document_line_links`
--
ALTER TABLE `document_line_links`
  ADD CONSTRAINT `document_line_links_document_link_id_foreign` FOREIGN KEY (`document_link_id`) REFERENCES `document_links` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `receipt_lines`
--
ALTER TABLE `receipt_lines`
  ADD CONSTRAINT `receipt_lines_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `main_accounts` (`id`) ON DELETE CASCADE;
COMMIT;

