-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 26, 2025 at 09:26 AM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

-- Removed SET SQL_MODE to avoid SUPER privilege requirement on shared hosting
-- Removed START TRANSACTION to avoid SUPER privilege requirement on shared hosting  
-- Removed SET time_zone to avoid SUPER privilege requirement on shared hosting
-- Removed conditional MySQL comments to avoid SUPER privilege requirement on shared hosting

--
-- Database: `mypos`
--

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

--
-- Table structure for table `ac_accounts`
--

CREATE TABLE `ac_accounts` (
  `id` int(5) NOT NULL,
  `count_id` int(5) DEFAULT NULL,
  `store_id` int(5) DEFAULT NULL,
  `parent_id` int(5) DEFAULT NULL,
  `sort_code` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `account_name` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `account_code` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `currency_id` int(5) DEFAULT NULL,
  `balance` double(20,4) DEFAULT NULL,
  `base_currency_balance` decimal(20,4) DEFAULT NULL,
  `note` text CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `created_by` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `system_ip` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `system_name` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `delete_bit` int(1) DEFAULT 0,
  `account_selection_name` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `paymenttypes_id` int(1) DEFAULT NULL,
  `customer_id` int(5) DEFAULT NULL,
  `supplier_id` int(5) DEFAULT NULL,
  `expense_id` int(5) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ac_accounts`
--

INSERT INTO `ac_accounts` (`id`, `count_id`, `store_id`, `parent_id`, `sort_code`, `account_name`, `account_code`, `currency_id`, `balance`, `base_currency_balance`, `note`, `created_by`, `created_date`, `created_time`, `system_ip`, `system_name`, `status`, `delete_bit`, `account_selection_name`, `paymenttypes_id`, `customer_id`, `supplier_id`, `expense_id`) VALUES
(3, 1, 2, 0, '4', 'Cash Account', 'CASH/001', 148, 0.0000, 0.0000, '', 'System', '2025-09-13', '15:02:43', '127.0.0.1', 'localhost', 1, 1, NULL, NULL, NULL, NULL, NULL);

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

--
-- Table structure for table `ac_moneydeposits`
--

CREATE TABLE `ac_moneydeposits` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `deposit_date` date DEFAULT NULL,
  `reference_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `debit_account_id` int(11) DEFAULT NULL,
  `credit_account_id` int(11) DEFAULT NULL,
  `amount` double(20,4) DEFAULT NULL,
  `deposit_currency_id` int(11) DEFAULT NULL,
  `exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `base_currency_amount` decimal(20,4) DEFAULT NULL,
  `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_date` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `system_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `system_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ac_moneytransfer`
--

CREATE TABLE `ac_moneytransfer` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `count_id` int(10) DEFAULT NULL,
  `transfer_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `transfer_date` date DEFAULT NULL,
  `reference_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `debit_account_id` int(11) DEFAULT NULL,
  `credit_account_id` int(11) DEFAULT NULL,
  `amount` double(20,4) DEFAULT NULL,
  `transfer_currency_id` int(11) DEFAULT NULL,
  `exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `base_currency_amount` decimal(20,4) DEFAULT NULL,
  `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_date` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `system_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `system_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ac_transactions`
--

CREATE TABLE `ac_transactions` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `payment_code` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `transaction_date` date DEFAULT NULL,
  `transaction_type` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `debit_account_id` int(5) DEFAULT NULL,
  `credit_account_id` int(5) DEFAULT NULL,
  `debit_amt` double(20,4) DEFAULT NULL,
  `base_currency_debit_amt` decimal(20,4) DEFAULT NULL,
  `credit_amt` double(20,4) DEFAULT NULL,
  `base_currency_credit_amt` decimal(20,4) DEFAULT NULL,
  `currency_id` int(5) DEFAULT NULL,
  `exchange_rate` decimal(10,6) DEFAULT 1.000000,
  `note` text CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `created_by` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `ref_accounts_id` int(5) DEFAULT NULL COMMENT 'reference table',
  `ref_moneytransfer_id` int(5) DEFAULT NULL COMMENT 'reference table',
  `ref_moneydeposits_id` int(5) DEFAULT NULL COMMENT 'reference table',
  `ref_salespayments_id` int(5) DEFAULT NULL,
  `ref_salespaymentsreturn_id` int(5) DEFAULT NULL,
  `ref_purchasepayments_id` int(5) DEFAULT NULL,
  `ref_purchasepaymentsreturn_id` int(5) DEFAULT NULL,
  `ref_expense_id` int(5) DEFAULT NULL,
  `customer_id` int(5) DEFAULT NULL,
  `supplier_id` int(5) DEFAULT NULL,
  `transaction_currency_id` int(11) DEFAULT NULL,
  `short_code` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ci_sessions`
--

CREATE TABLE `ci_sessions` (
  `id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `timestamp` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `data` blob NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ci_sessions`
--

INSERT INTO `ci_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
('drgge9244g2qjb086ji6se2dhn8lh2cl', '::1', 1761467024, 0x5f5f63695f6c6173745f726567656e65726174657c693a313736313436373032343b6c616e67756167657c733a373a22456e676c697368223b63757272656e63797c733a303a22223b63757272656e63795f706c6163656d656e747c733a303a22223b63757272656e63795f636f64657c733a303a22223b766965775f646174657c733a31303a2264642d6d6d2d79797979223b766965775f74696d657c733a323a223132223b646563696d616c737c733a313a2232223b7174795f646563696d616c737c733a313a2232223b73746f72655f6e616d657c733a31303a22534141532041444d494e223b),
('vdaleg8beo1p0shnttkm9rtbu7q203dt', '::1', 1761467172, 0x5f5f63695f6c6173745f726567656e65726174657c693a313736313436373032343b6c616e67756167657c733a373a22456e676c697368223b63757272656e63797c733a313a2224223b63757272656e63795f706c6163656d656e747c733a343a224c656674223b63757272656e63795f636f64657c733a333a22555344223b766965775f646174657c733a31303a2264642d6d6d2d79797979223b766965775f74696d657c733a323a223132223b646563696d616c737c733a313a2230223b7174795f646563696d616c737c733a313a2230223b73746f72655f6e616d657c733a31363a224e43532042494c4c494e4720424f4f4b223b696e765f757365726e616d657c733a353a2261646d696e223b757365725f6c6e616d657c733a363a224d6f72726973223b696e765f7573657269647c733a313a2232223b6c6f676765645f696e7c623a313b726f6c655f69647c733a313a2232223b726f6c655f6e616d657c733a31313a2253746f72652041646d696e223b73746f72655f69647c733a313a2232223b656d61696c7c733a31373a2261646d696e406578616d706c652e636f6d223b737563636573737c733a31353a2257656c636f6d652041646d696e2021223b5f5f63695f766172737c613a313a7b733a373a2273756363657373223b733a333a226f6c64223b7d);

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

--
-- Table structure for table `db_activities`
--

CREATE TABLE `db_activities` (
  `id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `activity_type` enum('call','email','meeting','task','note','follow_up') NOT NULL,
  `subject` varchar(200) NOT NULL,
  `description` text DEFAULT NULL,
  `related_type` enum('lead','opportunity','customer','sale','quotation') DEFAULT NULL,
  `related_id` int(11) DEFAULT NULL,
  `assigned_to` int(11) DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `completed_date` datetime DEFAULT NULL,
  `priority` enum('low','medium','high','urgent') DEFAULT 'medium',
  `activity_status` varchar(20) DEFAULT NULL,
  `status` enum('pending','in_progress','completed','cancelled') DEFAULT 'pending',
  `outcome` varchar(500) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` time DEFAULT NULL,
  `updated_by` varchar(50) DEFAULT NULL,
  `updated_date` date DEFAULT NULL,
  `updated_time` time DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `delete_bit` int(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_activities`
--

INSERT INTO `db_activities` (`id`, `store_id`, `activity_type`, `subject`, `description`, `related_type`, `related_id`, `assigned_to`, `due_date`, `completed_date`, `priority`, `activity_status`, `status`, `outcome`, `created_by`, `created_date`, `created_time`, `updated_by`, `updated_date`, `updated_time`, `system_ip`, `system_name`, `delete_bit`) VALUES
(1, 1, 'call', 'Follow up call', NULL, NULL, NULL, NULL, '2025-09-23 00:00:00', NULL, 'high', 'pending', 'pending', NULL, 'admin', '2025-09-22', '07:20:05', NULL, NULL, NULL, NULL, NULL, 0);

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

--
-- Table structure for table `db_bankdetails`
--

CREATE TABLE `db_bankdetails` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `country_id` int(5) DEFAULT NULL,
  `holder_name` varchar(250) DEFAULT NULL,
  `bank_name` varchar(250) DEFAULT NULL,
  `branch_name` varchar(250) DEFAULT NULL,
  `code` varchar(250) DEFAULT NULL COMMENT 'IFSC or Bank Code',
  `account_type` varchar(250) DEFAULT NULL,
  `account_number` varchar(250) DEFAULT NULL,
  `other_details` mediumtext DEFAULT NULL,
  `description` mediumtext DEFAULT NULL,
  `status` int(5) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_bankdetails`
--

INSERT INTO `db_bankdetails` (`id`, `store_id`, `country_id`, `holder_name`, `bank_name`, `branch_name`, `code`, `account_type`, `account_number`, `other_details`, `description`, `status`) VALUES
(1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1);

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

--
-- Table structure for table `db_brands`
--

CREATE TABLE `db_brands` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `brand_code` varchar(50) DEFAULT NULL,
  `brand_name` varchar(100) DEFAULT NULL,
  `description` mediumtext DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_campaigns`
--

CREATE TABLE `db_campaigns` (
  `id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `campaign_name` varchar(200) NOT NULL,
  `campaign_type` enum('email','social_media','advertisement','trade_show','webinar','other') NOT NULL,
  `description` text DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `budget` decimal(15,2) DEFAULT 0.00,
  `currency_id` int(11) DEFAULT NULL,
  `status` enum('planning','active','paused','completed','cancelled') DEFAULT 'planning',
  `expected_leads` int(11) DEFAULT 0,
  `actual_leads` int(11) DEFAULT 0,
  `expected_revenue` decimal(15,2) DEFAULT 0.00,
  `actual_revenue` decimal(15,2) DEFAULT 0.00,
  `created_by` varchar(50) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` time DEFAULT NULL,
  `updated_by` varchar(50) DEFAULT NULL,
  `updated_date` date DEFAULT NULL,
  `updated_time` time DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `delete_bit` int(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_category`
--

CREATE TABLE `db_category` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `count_id` int(10) DEFAULT NULL COMMENT 'Use to create category Code',
  `category_code` varchar(50) DEFAULT NULL,
  `category_name` varchar(100) DEFAULT NULL,
  `description` mediumtext DEFAULT NULL,
  `company_id` int(5) DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_category`
--

INSERT INTO `db_category` (`id`, `store_id`, `count_id`, `category_code`, `category_name`, `description`, `company_id`, `status`) VALUES
(1, 2, 1, 'CT/02/0001', 'General', 'General Category', NULL, 1),
(2, 2, 2, 'CT/02/0002', 'Services', 'Service Category', NULL, 1);

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

--
-- Table structure for table `db_cobpayments`
--

CREATE TABLE `db_cobpayments` (
  `id` int(5) NOT NULL,
  `customer_id` int(5) DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `payment_type` varchar(50) DEFAULT NULL,
  `payment` double(10,2) DEFAULT NULL,
  `payment_note` mediumtext DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `created_time` time DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_company`
--

CREATE TABLE `db_company` (
  `id` double DEFAULT NULL,
  `company_code` varchar(150) DEFAULT NULL,
  `company_name` varchar(150) DEFAULT NULL,
  `company_website` varchar(150) DEFAULT NULL,
  `mobile` varchar(150) DEFAULT NULL,
  `phone` varchar(150) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `website` varchar(250) DEFAULT NULL,
  `company_logo` text DEFAULT NULL,
  `logo` mediumtext DEFAULT NULL,
  `upi_id` varchar(50) DEFAULT NULL,
  `upi_code` text DEFAULT NULL,
  `country` varchar(150) DEFAULT NULL,
  `state` varchar(150) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `address` varchar(300) DEFAULT NULL,
  `postcode` varchar(50) DEFAULT NULL,
  `gst_no` varchar(50) DEFAULT NULL,
  `vat_no` varchar(50) DEFAULT NULL,
  `pan_no` varchar(50) DEFAULT NULL,
  `bank_details` mediumtext DEFAULT NULL,
  `cid` int(10) DEFAULT NULL,
  `category_init` varchar(5) DEFAULT NULL,
  `item_init` varchar(5) DEFAULT NULL COMMENT 'INITAL CODE',
  `supplier_init` varchar(5) DEFAULT NULL COMMENT 'INITAL CODE',
  `purchase_init` varchar(5) DEFAULT NULL COMMENT 'INITAL CODE',
  `purchase_return_init` varchar(5) DEFAULT NULL,
  `customer_init` varchar(5) DEFAULT NULL COMMENT 'INITAL CODE',
  `sales_init` varchar(5) DEFAULT NULL COMMENT 'INITAL CODE',
  `sales_return_init` varchar(5) DEFAULT NULL,
  `expense_init` varchar(5) DEFAULT NULL,
  `invoice_view` int(5) DEFAULT NULL COMMENT '1=Standard,2=Indian GST',
  `status` int(1) DEFAULT NULL,
  `sms_status` int(1) DEFAULT NULL COMMENT '1=Enable 0=Disable',
  `sales_terms_and_conditions` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_company`
--

INSERT INTO `db_company` (`id`, `company_code`, `company_name`, `company_website`, `mobile`, `phone`, `email`, `website`, `company_logo`, `logo`, `upi_id`, `upi_code`, `country`, `state`, `city`, `address`, `postcode`, `gst_no`, `vat_no`, `pan_no`, `bank_details`, `cid`, `category_init`, `item_init`, `supplier_init`, `purchase_init`, `purchase_return_init`, `customer_init`, `sales_init`, `sales_return_init`, `expense_init`, `invoice_view`, `status`, `sms_status`, `sales_terms_and_conditions`) VALUES
(1, '', 'Company Name', NULL, '9999999999', '', 'admin@example.com', '', 'company_logo.png', 'logo-0.png', NULL, NULL, 'India', 'Karnataka', 'Belgaum', 'Address Details', '', '', '', '', '', 1, 'CT', 'IT', 'SP', 'PU', 'PR', 'CU', 'SL', 'PR', 'EX', 1, 1, 0, NULL);

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

--
-- Table structure for table `db_country`
--

CREATE TABLE `db_country` (
  `id` int(5) NOT NULL,
  `country` varchar(4050) DEFAULT NULL,
  `added_on` date DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_country`
--

INSERT INTO `db_country` (`id`, `country`, `added_on`, `status`) VALUES
(1, 'Abkhazia', '2020-11-03', 1),
(2, 'Afghanistan', '2020-11-03', 1),
(3, 'Albania', '2020-11-03', 1),
(4, 'Algeria', '2020-11-03', 1),
(5, 'Andorra', '2020-11-03', 1),
(6, 'Angola', '2020-11-03', 1),
(7, 'Antigua and Barbuda', '2020-11-03', 1),
(8, 'Argentina', '2020-11-03', 1),
(9, 'Armenia', '2020-11-03', 1),
(10, 'Australia', '2020-11-03', 1),
(11, 'Austria', '2020-11-03', 1),
(12, 'Azerbaijan', '2020-11-03', 1),
(13, 'Bahamas', '2020-11-03', 1),
(14, 'Bahrain', '2020-11-03', 1),
(15, 'Bangladesh', '2020-11-03', 1),
(16, 'Barbados', '2020-11-03', 1),
(17, 'Belarus', '2020-11-03', 1),
(18, 'Belgium', '2020-11-03', 1),
(19, 'Belize', '2020-11-03', 1),
(20, 'Benin', '2020-11-03', 1),
(21, 'Bhutan', '2020-11-03', 1),
(22, 'Bolivia', '2020-11-03', 1),
(23, 'Bosnia and Herzegovina', '2020-11-03', 1),
(24, 'Botswana', '2020-11-03', 1),
(25, 'Brazil', '2020-11-03', 1),
(26, 'Brunei', '2020-11-03', 1),
(27, 'Bulgaria', '2020-11-03', 1),
(28, 'Burkina Faso', '2020-11-03', 1),
(29, 'Burma', '2020-11-03', 1),
(30, 'Burundi', '2020-11-03', 1),
(31, 'Cambodia', '2020-11-03', 1),
(32, 'Cameroon', '2020-11-03', 1),
(33, 'Canada', '2020-11-03', 1),
(34, 'Cape Verde', '2020-11-03', 1),
(35, 'Central African Republic', '2020-11-03', 1),
(36, 'Chad', '2020-11-03', 1),
(37, 'Chile', '2020-11-03', 1),
(38, 'China', '2020-11-03', 1),
(39, 'Colombia', '2020-11-03', 1),
(40, 'Comoros', '2020-11-03', 1),
(41, 'Congo', '2020-11-03', 1),
(42, 'Cook Islands', '2020-11-03', 1),
(43, 'Costa Rica', '2020-11-03', 1),
(44, 'Croatia', '2020-11-03', 1),
(45, 'Cuba', '2020-11-03', 1),
(46, 'Cyprus', '2020-11-03', 1),
(47, 'Czech Republic', '2020-11-03', 1),
(48, 'C?te d\'Ivoire', '2020-11-03', 1),
(49, 'Denmark', '2020-11-03', 1),
(50, 'Djibouti', '2020-11-03', 1),
(51, 'Dominica', '2020-11-03', 1),
(52, 'Dominican Republic', '2020-11-03', 1),
(53, 'East Timor', '2020-11-03', 1),
(54, 'Ecuador', '2020-11-03', 1),
(55, 'Egypt', '2020-11-03', 1),
(56, 'El Salvador', '2020-11-03', 1),
(57, 'Equatorial Guinea', '2020-11-03', 1),
(58, 'Eritrea', '2020-11-03', 1),
(59, 'Estonia', '2020-11-03', 1),
(60, 'Ethiopia', '2020-11-03', 1),
(61, 'Fiji', '2020-11-03', 1),
(62, 'Finland', '2020-11-03', 1),
(63, 'France', '2020-11-03', 1),
(64, 'Gabon', '2020-11-03', 1),
(65, 'Gambia', '2020-11-03', 1),
(66, 'Georgia', '2020-11-03', 1),
(67, 'Germany', '2020-11-03', 1),
(68, 'Ghana', '2020-11-03', 1),
(69, 'Greece', '2020-11-03', 1),
(70, 'Grenada', '2020-11-03', 1),
(71, 'Guatemala', '2020-11-03', 1),
(72, 'Guinea', '2020-11-03', 1),
(73, 'Guinea-Bissau', '2020-11-03', 1),
(74, 'Guyana', '2020-11-03', 1),
(75, 'Haiti', '2020-11-03', 1),
(76, 'Honduras', '2020-11-03', 1),
(77, 'Hungary', '2020-11-03', 1),
(78, 'Iceland', '2020-11-03', 1),
(79, 'India', '2020-11-03', 1),
(80, 'Indonesia', '2020-11-03', 1),
(81, 'Iran', '2020-11-03', 1),
(82, 'Iraq', '2020-11-03', 1),
(83, 'Ireland', '2020-11-03', 1),
(84, 'Israel', '2020-11-03', 1),
(85, 'Italy', '2020-11-03', 1),
(86, 'Ivory Coast', '2020-11-03', 1),
(87, 'Jamaica', '2020-11-03', 1),
(88, 'Japan', '2020-11-03', 1),
(89, 'Jordan', '2020-11-03', 1),
(90, 'Kazakhstan', '2020-11-03', 1),
(91, 'Kenya', '2020-11-03', 1),
(92, 'Kiribati', '2020-11-03', 1),
(93, 'Korea, North', '2020-11-03', 1),
(94, 'Korea, South', '2020-11-03', 1),
(95, 'Kosovo', '2020-11-03', 1),
(96, 'Kuwait', '2020-11-03', 1),
(97, 'Kyrgyzstan', '2020-11-03', 1),
(98, 'Laos', '2020-11-03', 1),
(99, 'Latvia', '2020-11-03', 1),
(100, 'Lebanon', '2020-11-03', 1),
(101, 'Lesotho', '2020-11-03', 1),
(102, 'Liberia', '2020-11-03', 1),
(103, 'Libya', '2020-11-03', 1),
(104, 'Liechtenstein', '2020-11-03', 1),
(105, 'Lithuania', '2020-11-03', 1),
(106, 'Luxembourg', '2020-11-03', 1),
(107, 'Macedonia', '2020-11-03', 1),
(108, 'Madagascar', '2020-11-03', 1),
(109, 'Malawi', '2020-11-03', 1),
(110, 'Malaysia', '2020-11-03', 1),
(111, 'Maldives', '2020-11-03', 1),
(112, 'Mali', '2020-11-03', 1),
(113, 'Malta', '2020-11-03', 1),
(114, 'Marshall Islands', '2020-11-03', 1),
(115, 'Mauritania', '2020-11-03', 1),
(116, 'Mauritius', '2020-11-03', 1),
(117, 'Mexico', '2020-11-03', 1),
(118, 'Micronesia', '2020-11-03', 1),
(119, 'Moldova', '2020-11-03', 1),
(120, 'Monaco', '2020-11-03', 1),
(121, 'Mongolia', '2020-11-03', 1),
(122, 'Montenegro', '2020-11-03', 1),
(123, 'Morocco', '2020-11-03', 1),
(124, 'Mozambique', '2020-11-03', 1),
(125, 'Myanmar / Burma', '2020-11-03', 1),
(126, 'Nagorno-Karabakh', '2020-11-03', 1),
(127, 'Namibia', '2020-11-03', 1),
(128, 'Nauru', '2020-11-03', 1),
(129, 'Nepal', '2020-11-03', 1),
(130, 'Netherlands', '2020-11-03', 1),
(131, 'New Zealand', '2020-11-03', 1),
(132, 'Nicaragua', '2020-11-03', 1),
(133, 'Niger', '2020-11-03', 1),
(134, 'Nigeria', '2020-11-03', 1),
(135, 'Niue', '2020-11-03', 1),
(136, 'Northern Cyprus', '2020-11-03', 1),
(137, 'Norway', '2020-11-03', 1),
(138, 'Oman', '2020-11-03', 1),
(139, 'Pakistan', '2020-11-03', 1),
(140, 'Palau', '2020-11-03', 1),
(141, 'Palestine', '2020-11-03', 1),
(142, 'Panama', '2020-11-03', 1),
(143, 'Papua New Guinea', '2020-11-03', 1),
(144, 'Paraguay', '2020-11-03', 1),
(145, 'Peru', '2020-11-03', 1),
(146, 'Philippines', '2020-11-03', 1),
(147, 'Poland', '2020-11-03', 1),
(148, 'Portugal', '2020-11-03', 1),
(149, 'Qatar', '2020-11-03', 1),
(150, 'Romania', '2020-11-03', 1),
(151, 'Russia', '2020-11-03', 1),
(152, 'Rwanda', '2020-11-03', 1),
(153, 'Sahrawi Arab Democratic Republic', '2020-11-03', 1),
(154, 'Saint Kitts and Nevis', '2020-11-03', 1),
(155, 'Saint Lucia', '2020-11-03', 1),
(156, 'Saint Vincent and the Grenadines', '2020-11-03', 1),
(157, 'Samoa', '2020-11-03', 1),
(158, 'San Marino', '2020-11-03', 1),
(159, 'Saudi Arabia', '2020-11-03', 1),
(160, 'Senegal', '2020-11-03', 1),
(161, 'Serbia', '2020-11-03', 1),
(162, 'Seychelles', '2020-11-03', 1),
(163, 'Sierra Leone', '2020-11-03', 1),
(164, 'Singapore', '2020-11-03', 1),
(165, 'Slovakia', '2020-11-03', 1),
(166, 'Slovenia', '2020-11-03', 1),
(167, 'Solomon Islands', '2020-11-03', 1),
(168, 'Somalia', '2020-11-03', 1),
(169, 'Somaliland', '2020-11-03', 1),
(170, 'South Africa', '2020-11-03', 1),
(171, 'South Ossetia', '2020-11-03', 1),
(172, 'Spain', '2020-11-03', 1),
(173, 'Sri Lanka', '2020-11-03', 1),
(174, 'Sudan', '2020-11-03', 1),
(175, 'Suriname', '2020-11-03', 1),
(176, 'Swaziland', '2020-11-03', 1),
(177, 'Sweden', '2020-11-03', 1),
(178, 'Switzerland', '2020-11-03', 1),
(179, 'Syria', '2020-11-03', 1),
(180, 'S?o Tom? and Pr?ncipe', '2020-11-03', 1),
(181, 'Taiwan', '2020-11-03', 1),
(182, 'Tajikistan', '2020-11-03', 1),
(183, 'Tanzania', '2020-11-03', 1),
(184, 'Thailand', '2020-11-03', 1),
(185, 'Timor-Leste / East Timor', '2020-11-03', 1),
(186, 'Togo', '2020-11-03', 1),
(187, 'Tonga', '2020-11-03', 1),
(188, 'Trinidad and Tobago', '2020-11-03', 1),
(189, 'Tunisia', '2020-11-03', 1),
(190, 'Turkey', '2020-11-03', 1),
(191, 'Turkmenistan', '2020-11-03', 1),
(192, 'Tuvalu', '2020-11-03', 1),
(193, 'Uganda', '2020-11-03', 1),
(194, 'Ukraine', '2020-11-03', 1),
(195, 'United Arab Emirates', '2020-11-03', 1),
(196, 'United Kingdom', '2020-11-03', 1),
(197, 'United States', '2020-11-03', 1),
(198, 'Uruguay', '2020-11-03', 1),
(199, 'Uzbekistan', '2020-11-03', 1),
(200, 'Vanuatu', '2020-11-03', 1),
(201, 'Vatican City', '2020-11-03', 1),
(202, 'Venezuela', '2020-11-03', 1),
(203, 'Vietnam', '2020-11-03', 1),
(204, 'Yemen', '2020-11-03', 1),
(205, 'Zambia', '2020-11-03', 1),
(206, 'Zimbabwe', '2020-11-03', 1),
(207, 'South Sudan', '2025-07-30', 1),
(208, 'Myanmar', '2025-07-30', 1),
(209, 'North Korea', '2025-07-30', 1);

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

--
-- Table structure for table `db_coupons`
--

CREATE TABLE `db_coupons` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `code` varchar(50) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `value` double(20,2) DEFAULT NULL,
  `type` varchar(50) DEFAULT NULL,
  `expire_date` date DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `created_by` varchar(100) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(100) DEFAULT NULL,
  `system_name` varchar(250) DEFAULT NULL,
  `system_ip` varchar(250) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_currency`
--

CREATE TABLE `db_currency` (
  `id` int(5) NOT NULL,
  `currency_name` varchar(50) DEFAULT NULL,
  `currency_code` varchar(20) DEFAULT NULL,
  `currency` blob DEFAULT NULL,
  `symbol` mediumtext DEFAULT NULL,
  `currency_symbol` varchar(10) DEFAULT NULL,
  `is_base_currency` int(1) DEFAULT 0,
  `decimal_places` int(2) DEFAULT 2,
  `currency_position` enum('before','after') DEFAULT 'before',
  `status` int(5) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_currency`
--

INSERT INTO `db_currency` (`id`, `currency_name`, `currency_code`, `currency`, `symbol`, `currency_symbol`, `is_base_currency`, `decimal_places`, `currency_position`, `status`) VALUES
(1, 'UAE Dirham', 'AED', 0xd8afd8b5, 'د.إ', NULL, 1, 2, 'before', 1),
(2, 'Afghan Afghani', 'AFN', 0xd8af, '؋', NULL, 0, 2, 'before', 1),
(3, 'Albanian Lek', 'ALL', 0x4c656b, 'Lek', NULL, 0, 2, 'before', 1),
(4, 'Armenian Dram', 'AMD', 0xd6af, '֏', NULL, 0, 2, 'before', 1),
(5, 'Netherlands Antillean Guilder', 'ANG', 0xc6a3, 'ƒ', NULL, 0, 2, 'before', 1),
(6, 'Angolan Kwanza', 'AOA', 0x4b7a, 'Kz', NULL, 0, 2, 'before', 1),
(7, 'Argentine Peso', 'ARS', 0x24, '$', NULL, 0, 2, 'before', 1),
(8, 'Australian Dollar', 'AUD', 0x4124, 'A$', NULL, 0, 2, 'before', 1),
(9, 'Aruban Florin', 'AWG', 0xc6a3, 'ƒ', NULL, 0, 2, 'before', 1),
(10, 'Azerbaijani Manat', 'AZN', 0xe2b8bc, '₼', NULL, 0, 2, 'before', 1),
(11, 'Bosnia-Herzegovina Convertible Mark', 'BAM', 0x4b4d, 'KM', NULL, 0, 2, 'before', 1),
(12, 'Barbadian Dollar', 'BBD', 0x24, '$', NULL, 0, 2, 'before', 1),
(13, 'Bangladeshi Taka', 'BDT', 0xe0a6b3, '৳', NULL, 0, 2, 'before', 1),
(14, 'Bulgarian Lev', 'BGN', 0xd0bbd0b2, 'лв', NULL, 0, 2, 'before', 1),
(15, 'Bahraini Dinar', 'BHD', 0xd8afd8af, 'د.ب', NULL, 0, 2, 'before', 1),
(16, 'Burundian Franc', 'BIF', 0x464275, 'FBu', NULL, 0, 2, 'before', 1),
(17, 'Bermudian Dollar', 'BMD', 0x24, '$', NULL, 0, 2, 'before', 1),
(18, 'Brunei Dollar', 'BND', 0x4224, 'B$', NULL, 0, 2, 'before', 1),
(19, 'Bolivian Boliviano', 'BOB', 0x2462, '$b', NULL, 0, 2, 'before', 1),
(20, 'Brazilian Real', 'BRL', 0x5224, 'R$', NULL, 0, 2, 'before', 1),
(21, 'Bahamian Dollar', 'BSD', 0x24, '$', NULL, 0, 2, 'before', 1),
(22, 'Bhutanese Ngultrum', 'BTN', 0x4e752e, 'Nu.', NULL, 0, 2, 'before', 1),
(23, 'Botswanan Pula', 'BWP', 0x50, 'P', NULL, 0, 2, 'before', 1),
(24, 'Belarusian Ruble', 'BYN', 0x4272, 'Br', NULL, 0, 2, 'before', 1),
(25, 'Belize Dollar', 'BZD', 0x425a24, 'BZ$', NULL, 0, 2, 'before', 1),
(26, 'Canadian Dollar', 'CAD', 0x4324, 'C$', NULL, 0, 2, 'before', 1),
(27, 'Congolese Franc', 'CDF', 0x4643, 'FC', NULL, 0, 2, 'before', 1),
(28, 'Swiss Franc', 'CHF', 0x434846, 'CHF', NULL, 0, 2, 'before', 1),
(29, 'Chilean Peso', 'CLP', 0x24, '$', NULL, 0, 2, 'before', 1),
(30, 'Chinese Yuan', 'CNY', 0xc2a5, '¥', NULL, 0, 2, 'before', 1),
(31, 'Colombian Peso', 'COP', 0x24, '$', NULL, 0, 2, 'before', 1),
(32, 'Costa Rican Colón', 'CRC', 0xe282a1, '₡', NULL, 0, 2, 'before', 1),
(33, 'Cuban Convertible Peso', 'CUC', 0x43554324, 'CUC$', NULL, 0, 2, 'before', 1),
(34, 'Cuban Peso', 'CUP', 0xe282b1, '₱', NULL, 0, 2, 'before', 1),
(35, 'Cape Verdean Escudo', 'CVE', 0x24, '$', NULL, 0, 2, 'before', 1),
(36, 'Czech Koruna', 'CZK', 0x4bc48d20, 'Kč', NULL, 0, 2, 'before', 1),
(37, 'Djiboutian Franc', 'DJF', 0x46646a, 'Fdj', NULL, 0, 2, 'before', 1),
(38, 'Danish Krone', 'DKK', 0x6b7220, 'kr', NULL, 0, 2, 'before', 1),
(39, 'Dominican Peso', 'DOP', 0x524424, 'RD$', NULL, 0, 2, 'before', 1),
(40, 'Algerian Dinar', 'DZD', 0xd8afd8ac, 'د.ج', NULL, 0, 2, 'before', 1),
(41, 'Egyptian Pound', 'EGP', 0xc2a3, '£', NULL, 0, 2, 'before', 1),
(42, 'Eritrean Nakfa', 'ERN', 0x4e666b, 'Nfk', NULL, 0, 2, 'before', 1),
(43, 'Ethiopian Birr', 'ETB', 0x4272, 'Br', NULL, 0, 2, 'before', 1),
(44, 'Euro', 'EUR', 0xe282ac20, '€', NULL, 0, 2, 'before', 1),
(45, 'Fijian Dollar', 'FJD', 0x464a24, 'FJ$', NULL, 0, 2, 'before', 1),
(46, 'Falkland Islands Pound', 'FKP', 0xc2a3, '£', NULL, 0, 2, 'before', 1),
(47, 'British Pound Sterling', 'GBP', 0xc2a3, '£', NULL, 0, 2, 'before', 1),
(48, 'Georgian Lari', 'GEL', 0xe2b8be, '₾', NULL, 0, 2, 'before', 1),
(49, 'Guernsey Pound', 'GGP', 0xc2a3, '£', NULL, 0, 2, 'before', 1),
(50, 'Ghanaian Cedi', 'GHS', 0x4748c2a2, 'GH¢', NULL, 0, 2, 'before', 1),
(51, 'Gibraltar Pound', 'GIP', 0xc2a3, '£', NULL, 0, 2, 'before', 1),
(52, 'Gambian Dalasi', 'GMD', 0x44, 'D', NULL, 0, 2, 'before', 1),
(53, 'Guinean Franc', 'GNF', 0x4647, 'FG', NULL, 0, 2, 'before', 1),
(54, 'Guatemalan Quetzal', 'GTQ', 0x51, 'Q', NULL, 0, 2, 'before', 1),
(55, 'Guyanese Dollar', 'GYD', 0x24, '$', NULL, 0, 2, 'before', 1),
(56, 'Hong Kong Dollar', 'HKD', 0x484b24, 'HK$', NULL, 0, 2, 'before', 1),
(57, 'Honduran Lempira', 'HNL', 0x4c, 'L', NULL, 0, 2, 'before', 1),
(58, 'Croatian Kuna', 'HRK', 0x6b6e, 'kn', NULL, 0, 2, 'before', 1),
(59, 'Haitian Gourde', 'HTG', 0x47, 'G', NULL, 0, 2, 'before', 1),
(60, 'Hungarian Forint', 'HUF', 0x6674, 'Ft', NULL, 0, 2, 'before', 1),
(61, 'Indonesian Rupiah', 'IDR', 0x5270, 'Rp', NULL, 0, 2, 'before', 1),
(62, 'Israeli Shekel', 'ILS', 0xe282aa, '₪', NULL, 0, 2, 'before', 1),
(63, 'Isle of Man Pound', 'IMP', 0xc2a3, '£', NULL, 0, 2, 'before', 1),
(64, 'Indian Rupee', 'INR', 0xe282b9, '₹', NULL, 0, 2, 'before', 1),
(65, 'Iraqi Dinar', 'IQD', 0xd8b9d8af, 'ع.د', NULL, 0, 2, 'before', 1),
(66, 'Iranian Rial', 'IRR', 0xefbfbdefbfbdc2a5, '﷼', NULL, 0, 2, 'before', 1),
(67, 'Icelandic Krona', 'ISK', 0x6b7220, 'kr', NULL, 0, 2, 'before', 1),
(68, 'Jersey Pound', 'JEP', 0xc2a3, '£', NULL, 0, 2, 'before', 1),
(69, 'Jamaican Dollar', 'JMD', 0x4a24, 'J$', NULL, 0, 2, 'before', 1),
(70, 'Jordanian Dinar', 'JOD', 0xd8afd8a7, 'د.ا', NULL, 0, 2, 'before', 1),
(71, 'Japanese Yen', 'JPY', 0xc2a5, '¥', NULL, 0, 2, 'before', 1),
(72, 'Kenyan Shilling', 'KES', 0x4b5368, 'KSh', NULL, 0, 2, 'before', 1),
(73, 'Kyrgyzstani Som', 'KGS', 0xd181, 'с', NULL, 0, 2, 'before', 1),
(74, 'Cambodian Riel', 'KHR', 0xe185b3, '៛', NULL, 0, 2, 'before', 1),
(75, 'Comorian Franc', 'KMF', 0x4346, 'CF', NULL, 0, 2, 'before', 1),
(76, 'North Korean Won', 'KPW', 0xe2b8a9, '₩', NULL, 0, 2, 'before', 1),
(77, 'South Korean Won', 'KRW', 0xe2b8a9, '₩', NULL, 0, 2, 'before', 1),
(78, 'Kuwaiti Dinar', 'KWD', 0xd8afd983, 'د.ك', NULL, 0, 2, 'before', 1),
(79, 'Cayman Islands Dollar', 'KYD', 0x24, '$', NULL, 0, 2, 'before', 1),
(80, 'Kazakhstani Tenge', 'KZT', 0xe2b8b8, '₸', NULL, 0, 2, 'before', 1),
(81, 'Lao Kip', 'LAK', 0xe282ad, '₭', NULL, 0, 2, 'before', 1),
(82, 'Lebanese Pound', 'LBP', 0xd984d984, 'ل.ل', NULL, 0, 2, 'before', 1),
(83, 'Sri Lankan Rupee', 'LKR', 0xe282a8, '₨', NULL, 0, 2, 'before', 1),
(84, 'Liberian Dollar', 'LRD', 0x24, '$', NULL, 0, 2, 'before', 1),
(85, 'Lesotho Loti', 'LSL', 0x4c, 'L', NULL, 0, 2, 'before', 1),
(86, 'Libyan Dinar', 'LYD', 0xd984d8af, 'ل.د', NULL, 0, 2, 'before', 1),
(87, 'Moroccan Dirham', 'MAD', 0xd8afd9852e, 'د.م.', NULL, 0, 2, 'before', 1),
(88, 'Moldovan Leu', 'MDL', 0x6c6569, 'lei', NULL, 0, 2, 'before', 1),
(89, 'Malagasy Ariary', 'MGA', 0x4172, 'Ar', NULL, 0, 2, 'before', 1),
(90, 'Macedonian Denar', 'MKD', 0xd0b4d0b5d0bd, 'ден', NULL, 0, 2, 'before', 1),
(91, 'Myanmar Kyat', 'MMK', 0x4b, 'K', NULL, 0, 2, 'before', 1),
(92, 'Mongolian Tugrik', 'MNT', 0xe282ae, '₮', NULL, 0, 2, 'before', 1),
(93, 'Macanese Pataca', 'MOP', 0x4d4f5024, 'MOP$', NULL, 0, 2, 'before', 1),
(94, 'Mauritanian Ouguiya', 'MRU', 0x554d, 'UM', NULL, 0, 2, 'before', 1),
(95, 'Mauritian Rupee', 'MUR', 0xe282a8, '₨', NULL, 0, 2, 'before', 1),
(96, 'Maldivian Rufiyaa', 'MVR', 0x5266, 'Rf', NULL, 0, 2, 'before', 1),
(97, 'Malawian Kwacha', 'MWK', 0x4d4b, 'MK', NULL, 0, 2, 'before', 1),
(98, 'Mexican Peso', 'MXN', 0x24, '$', NULL, 0, 2, 'before', 1),
(99, 'Malaysian Ringgit', 'MYR', 0x524d, 'RM', NULL, 0, 2, 'before', 1),
(100, 'Mozambican Metical', 'MZN', 0x4d54, 'MT', NULL, 0, 2, 'before', 1),
(101, 'Namibian Dollar', 'NAD', 0x24, '$', NULL, 0, 2, 'before', 1),
(102, 'Nigerian Naira', 'NGN', 0xe282a6, '₦', NULL, 0, 2, 'before', 1),
(103, 'Nicaraguan Córdoba', 'NIO', 0x4324, 'C$', NULL, 0, 2, 'before', 1),
(104, 'Norwegian Krone', 'NOK', 0x6b7220, 'kr', NULL, 0, 2, 'before', 1),
(105, 'Nepalese Rupee', 'NPR', 0xe282a8, '₨', NULL, 0, 2, 'before', 1),
(106, 'New Zealand Dollar', 'NZD', 0x4e5a24, 'NZ$', NULL, 0, 2, 'before', 1),
(107, 'Omani Rial', 'OMR', 0xd8b1d8b9d8b1, 'ر.ع.', NULL, 0, 2, 'before', 1),
(108, 'Panamanian Balboa', 'PAB', 0x422f2e, 'B/.', NULL, 0, 2, 'before', 1),
(109, 'Peruvian Sol', 'PEN', 0x532f2e, 'S/.', NULL, 0, 2, 'before', 1),
(110, 'Papua New Guinean Kina', 'PGK', 0x4b, 'K', NULL, 0, 2, 'before', 1),
(111, 'Philippine Peso', 'PHP', 0xe282b1, '₱', NULL, 0, 2, 'before', 1),
(112, 'Pakistani Rupee', 'PKR', 0xe282a8, '₨', NULL, 0, 2, 'before', 1),
(113, 'Polish Zloty', 'PLN', 0x7ac582, 'zł', NULL, 0, 2, 'before', 1),
(114, 'Paraguayan Guaraní', 'PYG', 0x4773, 'Gs', NULL, 0, 2, 'before', 1),
(115, 'Qatari Riyal', 'QAR', 0xd8b1d982, 'ر.ق', NULL, 0, 2, 'before', 1),
(116, 'Romanian Leu', 'RON', 0x6c6569, 'lei', NULL, 0, 2, 'before', 1),
(117, 'Serbian Dinar', 'RSD', 0xd094d0b8d0bdd2b1, 'Дин.', NULL, 0, 2, 'before', 1),
(118, 'Russian Ruble', 'RUB', 0xe282bd, '₽', NULL, 0, 2, 'before', 1),
(119, 'Rwandan Franc', 'RWF', 0x52e282a3, 'R₣', NULL, 0, 2, 'before', 1),
(120, 'Saudi Riyal', 'SAR', 0xd8b1d8b3, 'ر.س', NULL, 0, 2, 'before', 1),
(121, 'Solomon Islands Dollar', 'SBD', 0x534924, 'SI$', NULL, 0, 2, 'before', 1),
(122, 'Seychellois Rupee', 'SCR', 0xe282a8, '₨', NULL, 0, 2, 'before', 1),
(123, 'Sudanese Pound', 'SDG', 0xd8acd8b3d8a7, 'ج.س.', NULL, 0, 2, 'before', 1),
(124, 'Swedish Krona', 'SEK', 0x6b7220, 'kr', NULL, 0, 2, 'before', 1),
(125, 'Singapore Dollar', 'SGD', 0x5324, 'S$', NULL, 0, 2, 'before', 1),
(126, 'Saint Helena Pound', 'SHP', 0xc2a3, '£', NULL, 0, 2, 'before', 1),
(127, 'Sierra Leonean Leone', 'SLE', 0x4c65, 'Le', NULL, 0, 2, 'before', 1),
(128, 'Sierra Leonean Leone (Old)', 'SLL', 0x4c65, 'Le', NULL, 0, 2, 'before', 1),
(129, 'Somali Shilling', 'SOS', 0x53, 'S', NULL, 0, 2, 'before', 1),
(130, 'Surinamese Dollar', 'SRD', 0x24, '$', NULL, 0, 2, 'before', 1),
(131, 'South Sudanese Pound', 'SSP', 0xc2a3, '£', NULL, 0, 2, 'before', 1),
(132, 'São Tomé and Príncipe Dobra', 'STN', 0x4462, 'Db', NULL, 0, 2, 'before', 1),
(133, 'Salvadoran Colón', 'SVC', 0x24, '$', NULL, 0, 2, 'before', 1),
(134, 'Syrian Pound', 'SYP', 0xc2a3, '£', NULL, 0, 2, 'before', 1),
(135, 'Swazi Lilangeni', 'SZL', 0x4c, 'L', NULL, 0, 2, 'before', 1),
(136, 'Thai Baht', 'THB', 0xe0b8bf, '฿', NULL, 0, 2, 'before', 1),
(137, 'Tajikistani Somoni', 'TJS', 0x534d, 'SM', NULL, 0, 2, 'before', 1),
(138, 'Turkmenistani Manat', 'TMT', 0x54, 'T', NULL, 0, 2, 'before', 1),
(139, 'Tunisian Dinar', 'TND', 0xd8afd8aa, 'د.ت', NULL, 0, 2, 'before', 1),
(140, 'Tongan Paʻanga', 'TOP', 0x5424, 'T$', NULL, 0, 2, 'before', 1),
(141, 'Turkish Lira', 'TRY', 0xe282ba, '₺', NULL, 0, 2, 'before', 1),
(142, 'Trinidad and Tobago Dollar', 'TTD', 0x545424, 'TT$', NULL, 0, 2, 'before', 1),
(143, 'Tuvalu Dollar', 'TVD', 0x24, '$', NULL, 0, 2, 'before', 1),
(144, 'Taiwan Dollar', 'TWD', 0x4e5424, 'NT$', NULL, 0, 2, 'before', 1),
(145, 'Tanzanian Shilling', 'TZS', 0x545368, 'TSh', NULL, 0, 2, 'before', 1),
(146, 'Ukrainian Hryvnia', 'UAH', 0xe282b4, '₴', NULL, 0, 2, 'before', 1),
(147, 'Ugandan Shilling', 'UGX', 0x555368, 'USh', NULL, 0, 2, 'before', 1),
(148, 'United States Dollar', 'USD', 0x24, '$', NULL, 0, 2, 'before', 1),
(149, 'Uruguayan Peso', 'UYU', 0x2455, '$U', NULL, 0, 2, 'before', 1),
(150, 'Uzbekistani Som', 'UZS', 0xd0bbd0b2, 'лв', NULL, 0, 2, 'before', 1),
(151, 'Venezuelan Bolívar Digital', 'VED', 0x42732e44, 'Bs.D', NULL, 0, 2, 'before', 1),
(152, 'Venezuelan Bolívar', 'VES', 0x4273, 'Bs', NULL, 0, 2, 'before', 1),
(153, 'Vietnamese Dong', 'VND', 0xe282ab, '₫', NULL, 0, 2, 'before', 1),
(154, 'Vanuatu Vatu', 'VUV', 0x5674, 'Vt', NULL, 0, 2, 'before', 1),
(155, 'Samoan Tala', 'WST', 0x575324, 'WS$', NULL, 0, 2, 'before', 1),
(156, 'Central African CFA Franc', 'XAF', 0x46434641, 'FCFA', NULL, 0, 2, 'before', 1),
(157, 'Silver Ounce', 'XAG', 0x6f7a, 'oz', NULL, 0, 2, 'before', 1),
(158, 'Gold Ounce', 'XAU', 0x6f7a, 'oz', NULL, 0, 2, 'before', 1),
(159, 'European Composite Unit', 'XBA', 0x584241, 'XBA', NULL, 0, 2, 'before', 1),
(160, 'European Monetary Unit', 'XBB', 0x584242, 'XBB', NULL, 0, 2, 'before', 1),
(161, 'European Unit of Account 9', 'XBC', 0x584243, 'XBC', NULL, 0, 2, 'before', 1),
(162, 'European Unit of Account 17', 'XBD', 0x584244, 'XBD', NULL, 0, 2, 'before', 1),
(163, 'East Caribbean Dollar', 'XCD', 0x24, '$', NULL, 0, 2, 'before', 1),
(164, 'Special Drawing Rights', 'XDR', 0x534452, 'SDR', NULL, 0, 2, 'before', 1),
(165, 'West African CFA Franc', 'XOF', 0x434641, 'CFA', NULL, 0, 2, 'before', 1),
(167, 'CFP Franc', 'XPF', 0xe282a3, '₣', NULL, 0, 2, 'before', 1),
(169, 'Sucre', 'XSU', 0x585355, 'XSU', NULL, 0, 2, 'before', 1),
(170, 'Testing Currency Code', 'XTS', 0x585453, 'XTS', NULL, 0, 2, 'before', 1),
(171, 'ADB Unit of Account', 'XUA', 0x585541, 'XUA', NULL, 0, 2, 'before', 1),
(173, 'Yemeni Rial', 'YER', 0xefbfbdefbfbdc2a5, '﷼', NULL, 0, 2, 'before', 1),
(174, 'South African Rand', 'ZAR', 0x52, 'R', NULL, 0, 2, 'before', 1),
(175, 'Zambian Kwacha', 'ZMW', 0x5a4b, 'ZK', NULL, 0, 2, 'before', 1),
(176, 'Zimbabwean Dollar', 'ZWL', 0x5a24, 'Z$', NULL, 0, 2, 'before', 1);

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

--
-- Table structure for table `db_currency_conversion_log`
--

CREATE TABLE `db_currency_conversion_log` (
  `id` int(11) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `transaction_type` varchar(50) DEFAULT NULL,
  `transaction_id` int(11) DEFAULT NULL,
  `from_currency_id` int(11) DEFAULT NULL,
  `to_currency_id` int(11) DEFAULT NULL,
  `original_amount` decimal(20,4) DEFAULT NULL,
  `converted_amount` decimal(20,4) DEFAULT NULL,
  `exchange_rate` decimal(20,6) DEFAULT NULL,
  `conversion_date` datetime DEFAULT current_timestamp(),
  `created_by` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_custadvance`
--

CREATE TABLE `db_custadvance` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `count_id` int(5) DEFAULT NULL,
  `payment_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `customer_id` int(5) DEFAULT NULL,
  `amount` double(20,4) DEFAULT NULL,
  `payment_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `system_ip` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `system_name` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `currency_id` int(5) DEFAULT NULL,
  `currency_code` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_customers`
--

CREATE TABLE `db_customers` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `count_id` int(10) DEFAULT NULL COMMENT 'Use to create Customer Code',
  `customer_code` varchar(20) DEFAULT NULL,
  `customer_name` varchar(50) DEFAULT NULL,
  `mobile` varchar(15) DEFAULT NULL,
  `phone` varchar(15) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `gstin` varchar(100) DEFAULT NULL,
  `tax_number` varchar(50) DEFAULT NULL,
  `vatin` varchar(100) DEFAULT NULL,
  `opening_balance` double(20,4) DEFAULT NULL,
  `sales_due` double(20,4) DEFAULT NULL,
  `sales_return_due` double(20,4) DEFAULT NULL,
  `country_id` int(50) DEFAULT NULL,
  `trading_currency_id` int(11) DEFAULT NULL,
  `currency_exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `state_id` int(50) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `postcode` varchar(10) DEFAULT NULL,
  `address` varchar(250) DEFAULT NULL,
  `ship_country_id` int(5) DEFAULT NULL,
  `ship_state_id` int(5) DEFAULT NULL,
  `ship_city` varchar(100) DEFAULT NULL,
  `ship_postcode` varchar(10) DEFAULT NULL,
  `ship_address` text DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(30) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `company_id` int(5) DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `location_link` text DEFAULT NULL,
  `attachment_1` text DEFAULT NULL,
  `price_level_type` varchar(50) DEFAULT 'Increase',
  `price_level` double(20,4) DEFAULT 0.0000,
  `delete_bit` int(1) DEFAULT 0,
  `tot_advance` double(20,4) DEFAULT NULL,
  `credit_limit` double(20,4) DEFAULT -1.0000,
  `customer_type` enum('wholesale','retail') NOT NULL DEFAULT 'retail',
  `default_price_type` enum('retail','wholesale') NOT NULL DEFAULT 'retail',
  `shippingaddress_id` int(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_customers`
--

INSERT INTO `db_customers` (`id`, `store_id`, `count_id`, `customer_code`, `customer_name`, `mobile`, `phone`, `email`, `gstin`, `tax_number`, `vatin`, `opening_balance`, `sales_due`, `sales_return_due`, `country_id`, `trading_currency_id`, `currency_exchange_rate`, `state_id`, `city`, `postcode`, `address`, `ship_country_id`, `ship_state_id`, `ship_city`, `ship_postcode`, `ship_address`, `system_ip`, `system_name`, `created_date`, `created_time`, `created_by`, `company_id`, `status`, `location_link`, `attachment_1`, `price_level_type`, `price_level`, `delete_bit`, `tot_advance`, `credit_limit`, `customer_type`, `default_price_type`, `shippingaddress_id`) VALUES
(1, 1, NULL, 'CU0001', 'Walk-in customer', NULL, '', '', '', '', NULL, 0.0000, 0.0000, 0.0000, 1, 148, 1.000000, NULL, NULL, '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2019-01-01', '10:55:54 pm', 'admin', NULL, 1, NULL, NULL, 'Increase', 0.0000, 1, NULL, -1.0000, 'retail', 'retail', 1),
(2, 1, NULL, 'CU0001', 'Walk-in customer', NULL, '', '', '', '', NULL, 0.0000, 0.0000, 0.0000, 1, NULL, 1.000000, NULL, NULL, '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2019-01-01', '10:55:54 pm', 'admin', NULL, 1, NULL, NULL, 'Increase', 0.0000, 1, NULL, -1.0000, 'retail', 'retail', 1),
(3, 2, 1, 'CU/02/0001', 'Walk-in customer', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0000, 0.0000, NULL, NULL, 1.000000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '127.0.0.1', 'LAPTOP-I5OUIM4R', '2021-02-12', '05:53:37 pm', '', NULL, 1, NULL, NULL, 'Increase', 0.0000, 1, 0.0000, -1.0000, 'retail', 'retail', 2);

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

--
-- Table structure for table `db_customer_coupons`
--

CREATE TABLE `db_customer_coupons` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `code` varchar(50) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `value` double(20,2) DEFAULT NULL,
  `type` varchar(50) DEFAULT NULL,
  `expire_date` date DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `created_by` varchar(100) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(100) DEFAULT NULL,
  `system_name` varchar(250) DEFAULT NULL,
  `system_ip` varchar(250) DEFAULT NULL,
  `customer_id` int(10) DEFAULT NULL,
  `coupon_id` int(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_customer_payments`
--

CREATE TABLE `db_customer_payments` (
  `id` int(5) NOT NULL,
  `salespayment_id` int(5) DEFAULT NULL,
  `customer_id` int(5) DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `payment_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `payment` double(10,2) DEFAULT NULL,
  `payment_note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `system_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `system_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_date` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_emailtemplates`
--

CREATE TABLE `db_emailtemplates` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `key` varchar(150) DEFAULT NULL,
  `template_name` varchar(100) DEFAULT NULL,
  `content` text DEFAULT NULL,
  `variables` text DEFAULT NULL,
  `status` int(5) DEFAULT NULL,
  `undelete_bit` int(5) DEFAULT NULL,
  `admin_only` int(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_emailtemplates`
--

INSERT INTO `db_emailtemplates` (`id`, `store_id`, `key`, `template_name`, `content`, `variables`, `status`, `undelete_bit`, `admin_only`) VALUES
(1, 1, 'SAAS_FORGOT_PASSWORD_EMAIL', 'Site forgot password email template', 'Hi {{user_name}},\r\n\r\nyour OTP is {{email_otp}}\r\n\r\nThank you\r\n{{saas_name}}', '{{user_name}}<br>\r\n{{saas_name}}<br>\r\n{{email_otp}}<br>', 1, 1, 1),
(2, 1, 'SAAS_WELCOME_EMAIL', 'Site welcome email', 'Hi {{user_name}},\r\nYour email id {{email_id}},\r\nwelcome to our {{saas_name}},\r\n\r\nThank you', '{{user_name}}<br>\r\n{{email_id}}<br>\r\n{{saas_name}}<br>', 1, 1, 1);

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

--
-- Table structure for table `db_exchange_rates`
--

CREATE TABLE `db_exchange_rates` (
  `id` int(11) NOT NULL,
  `from_currency_id` int(11) NOT NULL,
  `to_currency_id` int(11) NOT NULL,
  `exchange_rate` decimal(15,6) NOT NULL,
  `rate_type` enum('manual','api') NOT NULL DEFAULT 'manual',
  `effective_date` date NOT NULL,
  `expiry_date` date DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `created_by` varchar(50) DEFAULT NULL,
  `created_date` datetime DEFAULT NULL,
  `updated_by` varchar(50) DEFAULT NULL,
  `updated_date` datetime DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `db_expense`
--

CREATE TABLE `db_expense` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `count_id` int(10) DEFAULT NULL COMMENT 'Use to create Expense Code',
  `expense_code` varchar(50) DEFAULT NULL,
  `category_id` int(5) DEFAULT NULL,
  `expense_date` date DEFAULT NULL,
  `reference_no` varchar(50) DEFAULT NULL,
  `expense_for` varchar(100) DEFAULT NULL,
  `expense_amt` double(20,4) DEFAULT NULL,
  `payment_type` varchar(100) DEFAULT NULL,
  `account_id` int(5) DEFAULT NULL,
  `note` text DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `expense_currency_id` int(11) DEFAULT NULL,
  `exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `base_currency_amount` decimal(20,4) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_expense_category`
--

CREATE TABLE `db_expense_category` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `category_code` varchar(50) DEFAULT NULL,
  `category_name` varchar(50) DEFAULT NULL,
  `description` mediumtext DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_expiry_alerts`
--

CREATE TABLE `db_expiry_alerts` (
  `id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `batch_id` int(11) DEFAULT NULL,
  `store_id` int(11) NOT NULL,
  `expiry_date` date NOT NULL,
  `days_until_expiry` int(5) NOT NULL,
  `alert_sent` tinyint(1) DEFAULT 0,
  `alert_sent_date` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_fivemojo`
--

CREATE TABLE `db_fivemojo` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `token` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `instance_id` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` int(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_fivemojo`
--

INSERT INTO `db_fivemojo` (`id`, `store_id`, `url`, `token`, `instance_id`, `status`) VALUES
(4, 2, 'https://app.fivemojo.com/api/send.php', '', '', 0);

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

--
-- Table structure for table `db_hold`
--

CREATE TABLE `db_hold` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `warehouse_id` int(5) DEFAULT NULL,
  `reference_id` varchar(50) DEFAULT NULL COMMENT 'Temprary',
  `reference_no` varchar(50) DEFAULT NULL,
  `sales_date` date DEFAULT NULL,
  `sales_status` varchar(50) DEFAULT NULL,
  `customer_id` int(5) DEFAULT NULL,
  `other_charges_input` double(20,2) DEFAULT NULL,
  `other_charges_tax_id` int(5) DEFAULT NULL,
  `other_charges_amt` double(20,2) DEFAULT NULL,
  `discount_to_all_input` double(20,2) DEFAULT NULL,
  `discount_to_all_type` varchar(50) DEFAULT NULL,
  `tot_discount_to_all_amt` double(20,2) DEFAULT NULL,
  `subtotal` double(20,2) DEFAULT NULL,
  `round_off` double(20,2) DEFAULT NULL,
  `grand_total` double(20,4) DEFAULT NULL,
  `sales_note` text DEFAULT NULL,
  `pos` int(1) DEFAULT NULL COMMENT '1=yes 0=no'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_holditems`
--

CREATE TABLE `db_holditems` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `hold_id` int(5) DEFAULT NULL,
  `item_id` int(5) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `sales_qty` double(20,2) DEFAULT NULL,
  `price_per_unit` double(20,4) DEFAULT NULL,
  `tax_type` varchar(50) DEFAULT NULL,
  `tax_id` int(5) DEFAULT NULL,
  `tax_amt` double(20,4) DEFAULT NULL,
  `discount_type` varchar(50) DEFAULT NULL,
  `discount_input` double(20,4) DEFAULT NULL,
  `discount_amt` double(20,4) DEFAULT NULL,
  `unit_total_cost` double(20,4) DEFAULT NULL,
  `total_cost` double(20,4) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_instamojo`
--

CREATE TABLE `db_instamojo` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `sandbox` int(1) DEFAULT NULL,
  `api_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `api_token` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `updated_at` date DEFAULT NULL,
  `updated_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_instamojo`
--

INSERT INTO `db_instamojo` (`id`, `store_id`, `sandbox`, `api_key`, `api_token`, `updated_at`, `updated_by`, `status`) VALUES
(1, 1, 1, '', '', '2021-02-22', 'Admin', 1);

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

--
-- Table structure for table `db_instamojopayments`
--

CREATE TABLE `db_instamojopayments` (
  `id` int(10) UNSIGNED NOT NULL,
  `phone` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `buyer_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `amount` decimal(16,2) NOT NULL,
  `purpose` text CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `expires_at` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `send_sms` varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'false',
  `send_email` varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'false',
  `sms_status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `email_status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `shorturl` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `longurl` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `redirect_url` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `webhook` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `allow_repeated_payments` varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'false',
  `customer_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `created_at` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `modified_at` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_items`
--

CREATE TABLE `db_items` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `count_id` int(10) DEFAULT NULL COMMENT 'Use to create ITEM Code',
  `item_code` varchar(50) DEFAULT NULL,
  `item_name` varchar(100) DEFAULT NULL,
  `category_id` int(10) DEFAULT NULL,
  `sku` varchar(50) DEFAULT NULL,
  `hsn` varchar(50) DEFAULT NULL,
  `sac` varchar(50) DEFAULT NULL,
  `unit_id` int(10) DEFAULT NULL,
  `alert_qty` int(10) DEFAULT NULL,
  `brand_id` int(5) DEFAULT NULL,
  `lot_number` varchar(50) DEFAULT NULL,
  `expire_date` date DEFAULT NULL,
  `price` double(20,4) DEFAULT NULL,
  `tax_id` int(5) DEFAULT NULL,
  `purchase_price` double(20,4) DEFAULT NULL,
  `cost_price` decimal(20,4) DEFAULT NULL,
  `wholesale_price` decimal(20,4) DEFAULT NULL,
  `retail_price` decimal(20,4) DEFAULT NULL,
  `wholesale_margin_type` enum('percentage','fixed') NOT NULL DEFAULT 'percentage',
  `wholesale_margin_value` decimal(10,2) NOT NULL DEFAULT 0.00,
  `retail_margin_type` enum('percentage','fixed') NOT NULL DEFAULT 'percentage',
  `retail_margin_value` decimal(10,2) NOT NULL DEFAULT 0.00,
  `auto_calculate_prices` tinyint(1) NOT NULL DEFAULT 1,
  `tax_type` varchar(50) DEFAULT NULL,
  `profit_margin` double(20,2) DEFAULT NULL,
  `sales_price` double(20,4) DEFAULT NULL,
  `stock` double(20,2) DEFAULT NULL,
  `item_image` text DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `company_id` int(5) DEFAULT NULL,
  `status` int(5) DEFAULT NULL,
  `item_currency_id` int(11) DEFAULT NULL,
  `base_price` decimal(20,4) DEFAULT NULL,
  `discount_type` varchar(100) DEFAULT 'Percentage',
  `discount` double(20,2) DEFAULT 0.00,
  `service_bit` int(1) DEFAULT 0,
  `seller_points` double(20,2) DEFAULT 0.00,
  `custom_barcode` varchar(100) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `item_group` varchar(50) DEFAULT NULL,
  `parent_id` int(5) DEFAULT NULL,
  `variant_id` int(5) DEFAULT NULL,
  `child_bit` int(1) DEFAULT 0,
  `mrp` double(20,4) DEFAULT NULL,
  `track_expiry` tinyint(1) DEFAULT 0,
  `manufacturing_date` date DEFAULT NULL,
  `expiry_date` date DEFAULT NULL,
  `tracking_type` enum('none','expiry_only','mfg_only','both') DEFAULT 'none',
  `minimum_stock_level` int(11) DEFAULT 0,
  `reorder_level` int(11) DEFAULT 0,
  `expiry_enabled` tinyint(1) DEFAULT 0 COMMENT 'Enable expiry date tracking for this item',
  `batch_tracking_enabled` tinyint(1) DEFAULT 0 COMMENT 'Enable batch tracking for this item',
  `expiry_notification_days` int(5) DEFAULT 30 COMMENT 'Days before expiry to send notifications'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_item_batches`
--

CREATE TABLE `db_item_batches` (
  `id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `batch_number` varchar(100) NOT NULL,
  `manufacturing_date` date DEFAULT NULL,
  `expiry_date` date DEFAULT NULL,
  `quantity` decimal(20,2) DEFAULT 0.00,
  `remaining_quantity` decimal(20,2) DEFAULT 0.00,
  `purchase_price` decimal(20,4) DEFAULT 0.0000,
  `store_id` int(11) NOT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `created_date` date NOT NULL,
  `created_time` varchar(50) NOT NULL,
  `created_by` varchar(50) NOT NULL,
  `status` int(1) DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_languages`
--

CREATE TABLE `db_languages` (
  `id` int(5) NOT NULL,
  `language` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_languages`
--

INSERT INTO `db_languages` (`id`, `language`, `status`) VALUES
(1, 'English', 1),
(2, 'Russian', 1),
(3, 'Spanish', 1),
(4, 'Arabic', 1),
(5, 'French', 1),
(6, 'Swahili', 1);

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

--
-- Table structure for table `db_leads`
--

CREATE TABLE `db_leads` (
  `id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `lead_code` varchar(50) NOT NULL,
  `first_name` varchar(100) NOT NULL,
  `last_name` varchar(100) NOT NULL,
  `company_name` varchar(200) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `mobile` varchar(20) DEFAULT NULL,
  `website` varchar(200) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `state` varchar(100) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `postcode` varchar(20) DEFAULT NULL,
  `lead_source` enum('website','referral','cold_call','email','social_media','advertisement','trade_show','other') DEFAULT 'website',
  `lead_status` enum('new','contacted','qualified','proposal','negotiation','closed_won','closed_lost') DEFAULT 'new',
  `lead_score` int(3) DEFAULT 0,
  `assigned_to` int(11) DEFAULT NULL,
  `expected_value` decimal(15,2) DEFAULT 0.00,
  `currency_id` int(11) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` time DEFAULT NULL,
  `updated_by` varchar(50) DEFAULT NULL,
  `updated_date` date DEFAULT NULL,
  `updated_time` time DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT 1,
  `delete_bit` int(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_leads`
--

INSERT INTO `db_leads` (`id`, `store_id`, `lead_code`, `first_name`, `last_name`, `company_name`, `email`, `phone`, `mobile`, `website`, `address`, `city`, `state`, `country`, `postcode`, `lead_source`, `lead_status`, `lead_score`, `assigned_to`, `expected_value`, `currency_id`, `notes`, `created_by`, `created_date`, `created_time`, `updated_by`, `updated_date`, `updated_time`, `system_ip`, `system_name`, `status`, `delete_bit`) VALUES
(1, 1, 'LEAD-001', 'John', 'Doe', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'website', 'new', 0, NULL, 0.00, NULL, NULL, 'admin', '2025-09-22', '07:16:49', NULL, NULL, NULL, NULL, NULL, 1, 0),
(2, 1, 'LEAD-001', 'John', 'Doe', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'website', 'new', 0, NULL, 0.00, NULL, NULL, 'admin', '2025-09-22', '07:17:34', NULL, NULL, NULL, NULL, NULL, 1, 0),
(3, 1, 'LEAD-001', 'John', 'Doe', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'website', 'new', 0, NULL, 0.00, NULL, NULL, 'admin', '2025-09-22', '07:20:05', NULL, NULL, NULL, NULL, NULL, 1, 0);

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

--
-- Table structure for table `db_lead_sources`
--

CREATE TABLE `db_lead_sources` (
  `id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `source_name` varchar(100) NOT NULL,
  `description` text DEFAULT NULL,
  `status` int(1) DEFAULT 1,
  `created_by` varchar(50) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` time DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_lead_sources`
--

INSERT INTO `db_lead_sources` (`id`, `store_id`, `source_name`, `description`, `status`, `created_by`, `created_date`, `created_time`, `system_ip`, `system_name`) VALUES
(1, 1, 'Website', 'Company website contact form', 1, 'System', '2025-09-21', '09:50:58', '127.0.0.1', 'localhost'),
(2, 1, 'Referral', 'Customer or partner referral', 1, 'System', '2025-09-21', '09:50:58', '127.0.0.1', 'localhost'),
(3, 1, 'Cold Call', 'Outbound cold calling', 1, 'System', '2025-09-21', '09:50:58', '127.0.0.1', 'localhost'),
(4, 1, 'Email Marketing', 'Email campaign response', 1, 'System', '2025-09-21', '09:50:58', '127.0.0.1', 'localhost'),
(5, 1, 'Social Media', 'Social media platforms', 1, 'System', '2025-09-21', '09:50:58', '127.0.0.1', 'localhost'),
(6, 1, 'Advertisement', 'Paid advertisements', 1, 'System', '2025-09-21', '09:50:58', '127.0.0.1', 'localhost'),
(7, 1, 'Trade Show', 'Trade show or exhibition', 1, 'System', '2025-09-21', '09:50:58', '127.0.0.1', 'localhost'),
(8, 1, 'Other', 'Other sources', 1, 'System', '2025-09-21', '09:50:58', '127.0.0.1', 'localhost'),
(9, 1, 'Website', 'Company website contact form', 1, 'System', '2025-09-21', '09:54:01', '127.0.0.1', 'localhost'),
(10, 1, 'Referral', 'Customer or partner referral', 1, 'System', '2025-09-21', '09:54:01', '127.0.0.1', 'localhost'),
(11, 1, 'Cold Call', 'Outbound cold calling', 1, 'System', '2025-09-21', '09:54:01', '127.0.0.1', 'localhost'),
(12, 1, 'Email Marketing', 'Email campaign response', 1, 'System', '2025-09-21', '09:54:01', '127.0.0.1', 'localhost'),
(13, 1, 'Social Media', 'Social media platforms', 1, 'System', '2025-09-21', '09:54:01', '127.0.0.1', 'localhost'),
(14, 1, 'Advertisement', 'Paid advertisements', 1, 'System', '2025-09-21', '09:54:01', '127.0.0.1', 'localhost'),
(15, 1, 'Trade Show', 'Trade show or exhibition', 1, 'System', '2025-09-21', '09:54:01', '127.0.0.1', 'localhost'),
(16, 1, 'Other', 'Other sources', 1, 'System', '2025-09-21', '09:54:01', '127.0.0.1', 'localhost');

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

--
-- Table structure for table `db_notifications`
--

CREATE TABLE `db_notifications` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `store_id` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `message` text DEFAULT NULL,
  `type` enum('info','warning','error','success') DEFAULT 'info',
  `notification_type` varchar(50) DEFAULT NULL COMMENT 'expiry_alert, low_stock, etc',
  `reference_id` int(11) DEFAULT NULL COMMENT 'ID of related record',
  `reference_table` varchar(50) DEFAULT NULL COMMENT 'Table name of related record',
  `is_read` tinyint(1) DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `read_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_opportunities`
--

CREATE TABLE `db_opportunities` (
  `id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `opportunity_code` varchar(50) NOT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `lead_id` int(11) DEFAULT NULL,
  `opportunity_name` varchar(200) NOT NULL,
  `description` text DEFAULT NULL,
  `stage` enum('prospecting','qualification','proposal','negotiation','closed_won','closed_lost') DEFAULT 'prospecting',
  `probability` int(3) DEFAULT 0,
  `expected_value` decimal(15,2) DEFAULT 0.00,
  `currency_id` int(11) DEFAULT NULL,
  `expected_close_date` date DEFAULT NULL,
  `actual_close_date` date DEFAULT NULL,
  `assigned_to` int(11) DEFAULT NULL,
  `competitor` varchar(200) DEFAULT NULL,
  `next_action` varchar(500) DEFAULT NULL,
  `next_action_date` date DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` time DEFAULT NULL,
  `updated_by` varchar(50) DEFAULT NULL,
  `updated_date` date DEFAULT NULL,
  `updated_time` time DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT 1,
  `delete_bit` int(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_opportunities`
--

INSERT INTO `db_opportunities` (`id`, `store_id`, `opportunity_code`, `customer_id`, `lead_id`, `opportunity_name`, `description`, `stage`, `probability`, `expected_value`, `currency_id`, `expected_close_date`, `actual_close_date`, `assigned_to`, `competitor`, `next_action`, `next_action_date`, `notes`, `created_by`, `created_date`, `created_time`, `updated_by`, `updated_date`, `updated_time`, `system_ip`, `system_name`, `status`, `delete_bit`) VALUES
(1, 1, 'OPP-001', NULL, NULL, 'Sample Opportunity', NULL, 'prospecting', 0, 10000.00, NULL, '2025-10-22', NULL, NULL, NULL, NULL, NULL, NULL, 'admin', '2025-09-22', '07:16:49', NULL, NULL, NULL, NULL, NULL, 1, 0),
(2, 1, 'OPP-001', NULL, NULL, 'Sample Opportunity', NULL, 'prospecting', 0, 10000.00, NULL, '2025-10-22', NULL, NULL, NULL, NULL, NULL, NULL, 'admin', '2025-09-22', '07:17:34', NULL, NULL, NULL, NULL, NULL, 1, 0),
(3, 1, 'OPP-001', NULL, NULL, 'Sample Opportunity', NULL, 'prospecting', 0, 10000.00, NULL, '2025-10-22', NULL, NULL, NULL, NULL, NULL, NULL, 'admin', '2025-09-22', '07:20:05', NULL, NULL, NULL, NULL, NULL, 1, 0);

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

--
-- Table structure for table `db_package`
--

CREATE TABLE `db_package` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `package_type` varchar(50) DEFAULT NULL,
  `package_code` varchar(20) DEFAULT NULL,
  `package_name` varchar(50) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `monthly_price` double(20,2) DEFAULT NULL,
  `annual_price` double(20,2) DEFAULT NULL,
  `trial_days` int(10) DEFAULT NULL,
  `max_users` int(10) DEFAULT NULL,
  `max_items` int(10) DEFAULT NULL,
  `max_invoices` int(10) DEFAULT NULL,
  `max_warehouses` int(10) DEFAULT NULL,
  `expire_date` date DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(30) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `plan_type` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_package`
--

INSERT INTO `db_package` (`id`, `store_id`, `package_type`, `package_code`, `package_name`, `description`, `monthly_price`, `annual_price`, `trial_days`, `max_users`, `max_items`, `max_invoices`, `max_warehouses`, `expire_date`, `system_ip`, `system_name`, `created_date`, `created_time`, `created_by`, `status`, `plan_type`) VALUES
(1, 1, 'Free', NULL, 'Free', 'Test description', 0.00, 0.00, 10, 2, 20, 20, 2, '2021-01-14', '127.0.0.1', 'LAPTOP-I5OUIM4R', '2021-01-13', '06:37:21 pm', 'admin', 1, NULL),
(2, 1, 'Paid', NULL, 'Regular', 'Test description', 250.00, 2000.00, 15, 20, 200, 200, 20, NULL, '127.0.0.1', 'LAPTOP-I5OUIM4R', '2021-01-13', '06:39:23 pm', 'admin', 1, NULL),
(3, 1, 'Paid', NULL, 'Ultimate', 'Description', 500.00, 5000.00, 15, -1, -1, -1, -1, NULL, '127.0.0.1', 'LAPTOP-I5OUIM4R', '2021-01-24', '12:35:30 pm', 'admin', 1, NULL);

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

--
-- Table structure for table `db_paymenttypes`
--

CREATE TABLE `db_paymenttypes` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `payment_type` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_paymenttypes`
--

INSERT INTO `db_paymenttypes` (`id`, `store_id`, `payment_type`, `status`) VALUES
(36, 2, 'Credit Sale', 1),
(37, 2, 'Cash', 1),
(39, 2, 'Visa Card', 1);

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

--
-- Table structure for table `db_paypal`
--

CREATE TABLE `db_paypal` (
  `id` int(5) NOT NULL,
  `store_id` int(10) DEFAULT NULL,
  `sandbox` int(1) DEFAULT NULL,
  `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `updated_at` date DEFAULT NULL,
  `updated_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_paypal`
--

INSERT INTO `db_paypal` (`id`, `store_id`, `sandbox`, `email`, `updated_at`, `updated_by`, `status`) VALUES
(1, 1, 1, '', '2021-02-22', 'Admin', 1);

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

--
-- Table structure for table `db_paypalpaylog`
--

CREATE TABLE `db_paypalpaylog` (
  `payment_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `txn_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `payment_gross` float(10,2) NOT NULL,
  `currency_code` varchar(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `payer_email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `payment_status` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_permissions`
--

CREATE TABLE `db_permissions` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `role_id` int(5) DEFAULT NULL,
  `permissions` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_permissions`
--

INSERT INTO `db_permissions` (`id`, `store_id`, `role_id`, `permissions`) VALUES
(4414, 1, 17, 'items_add'),
(4415, 1, 17, 'items_edit'),
(4416, 1, 17, 'items_delete'),
(4417, 1, 17, 'items_view'),
(4418, 1, 17, 'import_items'),
(4419, 1, 17, 'brand_add'),
(4420, 1, 17, 'brand_edit'),
(4421, 1, 17, 'brand_delete'),
(4422, 1, 17, 'brand_view'),
(4423, 1, 17, 'customers_add'),
(4424, 1, 17, 'customers_edit'),
(4425, 1, 17, 'customers_delete'),
(4426, 1, 17, 'customers_view'),
(4427, 1, 17, 'sales_add'),
(4428, 1, 17, 'sales_edit'),
(4429, 1, 17, 'sales_delete'),
(4430, 1, 17, 'sales_view'),
(4431, 1, 17, 'sales_payment_view'),
(4432, 1, 17, 'sales_payment_add'),
(4433, 1, 17, 'sales_payment_delete'),
(4434, 1, 17, 'sales_report'),
(4435, 1, 17, 'sales_payments_report'),
(4436, 1, 17, 'items_category_add'),
(4437, 1, 17, 'items_category_edit'),
(4438, 1, 17, 'items_category_delete'),
(4439, 1, 17, 'items_category_view'),
(4440, 1, 17, 'print_labels'),
(4441, 1, 17, 'dashboard_view'),
(4442, 1, 17, 'dashboard_info_box_1'),
(4443, 1, 17, 'dashboard_info_box_2'),
(4444, 1, 17, 'dashboard_pur_sal_chart'),
(4445, 1, 17, 'dashboard_recent_items'),
(4446, 1, 17, 'dashboard_stock_alert'),
(4447, 1, 17, 'dashboard_trending_items_chart'),
(4448, 1, 17, 'sales_return_add'),
(4449, 1, 17, 'sales_return_edit'),
(4450, 1, 17, 'sales_return_delete'),
(4451, 1, 17, 'sales_return_view'),
(4452, 1, 17, 'sales_return_report'),
(4453, 1, 17, 'sales_return_payment_view'),
(4454, 1, 17, 'sales_return_payment_add'),
(4455, 1, 17, 'sales_return_payment_delete'),
(4456, 1, 17, 'payment_types_add'),
(4457, 1, 17, 'payment_types_edit'),
(4458, 1, 17, 'payment_types_delete'),
(4459, 1, 17, 'payment_types_view'),
(4460, 1, 17, 'import_customers'),
(4461, 1, 17, 'stock_transfer_add'),
(4462, 1, 17, 'stock_transfer_edit'),
(4463, 1, 17, 'stock_transfer_delete'),
(4464, 1, 17, 'stock_transfer_view'),
(4465, 1, 17, 'seller_points_report'),
(4466, 1, 17, 'services_add'),
(4467, 1, 17, 'services_edit'),
(4468, 1, 17, 'services_delete'),
(4469, 1, 17, 'services_view'),
(4470, 1, 17, 'import_services'),
(4471, 1, 17, 'stock_adjustment_add'),
(4472, 1, 17, 'stock_adjustment_edit'),
(4473, 1, 17, 'stock_adjustment_delete'),
(4474, 1, 17, 'stock_adjustment_view'),
(4475, 1, 17, 'variant_add'),
(4476, 1, 17, 'variant_edit'),
(4477, 1, 17, 'variant_delete'),
(4478, 1, 17, 'variant_view'),
(4479, 1, 17, 'accounts_add'),
(4480, 1, 17, 'accounts_edit'),
(4481, 1, 17, 'accounts_delete'),
(4482, 1, 17, 'accounts_view'),
(4483, 1, 17, 'money_transfer_add'),
(4484, 1, 17, 'money_transfer_edit'),
(4485, 1, 17, 'money_transfer_delete'),
(4486, 1, 17, 'money_transfer_view'),
(4487, 1, 17, 'money_deposit_add'),
(4488, 1, 17, 'money_deposit_edit'),
(4489, 1, 17, 'money_deposit_delete'),
(4490, 1, 17, 'money_deposit_view'),
(4491, 1, 17, 'sales_tax_report'),
(4492, 1, 18, 'tax_add'),
(4493, 1, 18, 'tax_edit'),
(4494, 1, 18, 'tax_delete'),
(4495, 1, 18, 'tax_view'),
(4496, 1, 18, 'units_add'),
(4497, 1, 18, 'units_edit'),
(4498, 1, 18, 'units_delete'),
(4499, 1, 18, 'units_view'),
(4500, 1, 18, 'items_add'),
(4501, 1, 18, 'items_edit'),
(4502, 1, 18, 'items_delete'),
(4503, 1, 18, 'items_view'),
(4504, 1, 18, 'import_items'),
(4505, 1, 18, 'brand_add'),
(4506, 1, 18, 'brand_edit'),
(4507, 1, 18, 'brand_delete'),
(4508, 1, 18, 'brand_view'),
(4509, 1, 18, 'suppliers_add'),
(4510, 1, 18, 'suppliers_edit'),
(4511, 1, 18, 'suppliers_delete'),
(4512, 1, 18, 'suppliers_view'),
(4513, 1, 18, 'purchase_add'),
(4514, 1, 18, 'purchase_edit'),
(4515, 1, 18, 'purchase_delete'),
(4516, 1, 18, 'purchase_view'),
(4517, 1, 18, 'purchase_report'),
(4518, 1, 18, 'purchase_payments_report'),
(4519, 1, 18, 'items_category_add'),
(4520, 1, 18, 'items_category_edit'),
(4521, 1, 18, 'items_category_delete'),
(4522, 1, 18, 'items_category_view'),
(4523, 1, 18, 'print_labels'),
(4524, 1, 18, 'dashboard_view'),
(4525, 1, 18, 'dashboard_info_box_1'),
(4526, 1, 18, 'dashboard_info_box_2'),
(4527, 1, 18, 'dashboard_pur_sal_chart'),
(4528, 1, 18, 'dashboard_recent_items'),
(4529, 1, 18, 'dashboard_stock_alert'),
(4530, 1, 18, 'dashboard_trending_items_chart'),
(4531, 1, 18, 'purchase_return_add'),
(4532, 1, 18, 'purchase_return_edit'),
(4533, 1, 18, 'purchase_return_delete'),
(4534, 1, 18, 'purchase_return_view'),
(4535, 1, 18, 'purchase_return_report'),
(4536, 1, 18, 'purchase_return_payment_view'),
(4537, 1, 18, 'purchase_return_payment_add'),
(4538, 1, 18, 'purchase_return_payment_delete'),
(4539, 1, 18, 'purchase_payment_view'),
(4540, 1, 18, 'purchase_payment_add'),
(4541, 1, 18, 'purchase_payment_delete'),
(4542, 1, 18, 'payment_types_add'),
(4543, 1, 18, 'payment_types_edit'),
(4544, 1, 18, 'payment_types_delete'),
(4545, 1, 18, 'payment_types_view'),
(4546, 1, 18, 'import_suppliers'),
(4547, 1, 18, 'stock_transfer_add'),
(4548, 1, 18, 'stock_transfer_edit'),
(4549, 1, 18, 'stock_transfer_delete'),
(4550, 1, 18, 'stock_transfer_view'),
(4551, 1, 18, 'warehouse_add'),
(4552, 1, 18, 'warehouse_edit'),
(4553, 1, 18, 'warehouse_delete'),
(4554, 1, 18, 'warehouse_view'),
(4555, 1, 18, 'services_add'),
(4556, 1, 18, 'services_edit'),
(4557, 1, 18, 'services_delete'),
(4558, 1, 18, 'services_view'),
(4559, 1, 18, 'import_services'),
(4560, 1, 18, 'stock_adjustment_add'),
(4561, 1, 18, 'stock_adjustment_edit'),
(4562, 1, 18, 'stock_adjustment_delete'),
(4563, 1, 18, 'stock_adjustment_view'),
(4564, 1, 18, 'variant_add'),
(4565, 1, 18, 'variant_edit'),
(4566, 1, 18, 'variant_delete'),
(4567, 1, 18, 'variant_view'),
(4568, 1, 18, 'accounts_add'),
(4569, 1, 18, 'accounts_edit'),
(4570, 1, 18, 'accounts_delete'),
(4571, 1, 18, 'accounts_view'),
(4572, 1, 18, 'money_transfer_add'),
(4573, 1, 18, 'money_transfer_edit'),
(4574, 1, 18, 'money_transfer_delete'),
(4575, 1, 18, 'money_transfer_view'),
(4576, 1, 18, 'money_deposit_add'),
(4577, 1, 18, 'money_deposit_edit'),
(4578, 1, 18, 'money_deposit_delete'),
(4579, 1, 18, 'money_deposit_view'),
(4580, 1, 18, 'purchase_tax_report'),
(5818, 1, 2, 'users_add'),
(5819, 1, 2, 'users_edit'),
(5820, 1, 2, 'users_delete'),
(5821, 1, 2, 'users_view'),
(5822, 1, 2, 'tax_add'),
(5823, 1, 2, 'tax_edit'),
(5824, 1, 2, 'tax_delete'),
(5825, 1, 2, 'tax_view'),
(5826, 1, 2, 'store_edit'),
(5827, 1, 2, 'units_add'),
(5828, 1, 2, 'units_edit'),
(5829, 1, 2, 'units_delete'),
(5830, 1, 2, 'units_view'),
(5831, 1, 2, 'roles_add'),
(5832, 1, 2, 'roles_edit'),
(5833, 1, 2, 'roles_delete'),
(5834, 1, 2, 'roles_view'),
(5835, 1, 2, 'expense_add'),
(5836, 1, 2, 'expense_edit'),
(5837, 1, 2, 'expense_delete'),
(5838, 1, 2, 'expense_view'),
(5839, 1, 2, 'items_add'),
(5840, 1, 2, 'items_edit'),
(5841, 1, 2, 'items_delete'),
(5842, 1, 2, 'items_view'),
(5843, 1, 2, 'import_items'),
(5844, 1, 2, 'brand_add'),
(5845, 1, 2, 'brand_edit'),
(5846, 1, 2, 'brand_delete'),
(5847, 1, 2, 'brand_view'),
(5848, 1, 2, 'suppliers_add'),
(5849, 1, 2, 'suppliers_edit'),
(5850, 1, 2, 'suppliers_delete'),
(5851, 1, 2, 'suppliers_view'),
(5852, 1, 2, 'customers_add'),
(5853, 1, 2, 'customers_edit'),
(5854, 1, 2, 'customers_delete'),
(5855, 1, 2, 'customers_view'),
(5856, 1, 2, 'purchase_add'),
(5857, 1, 2, 'purchase_edit'),
(5858, 1, 2, 'purchase_delete'),
(5859, 1, 2, 'purchase_view'),
(5860, 1, 2, 'sales_add'),
(5861, 1, 2, 'sales_edit'),
(5862, 1, 2, 'sales_delete'),
(5863, 1, 2, 'sales_view'),
(5864, 1, 2, 'sales_payment_view'),
(5865, 1, 2, 'sales_payment_add'),
(5866, 1, 2, 'sales_payment_delete'),
(5867, 1, 2, 'sales_report'),
(5868, 1, 2, 'purchase_report'),
(5869, 1, 2, 'expense_report'),
(5870, 1, 2, 'profit_report'),
(5871, 1, 2, 'stock_report'),
(5872, 1, 2, 'item_sales_report'),
(5873, 1, 2, 'purchase_payments_report'),
(5874, 1, 2, 'sales_payments_report'),
(5875, 1, 2, 'items_category_add'),
(5876, 1, 2, 'items_category_edit'),
(5877, 1, 2, 'items_category_delete'),
(5878, 1, 2, 'items_category_view'),
(5879, 1, 2, 'print_labels'),
(5880, 1, 2, 'expense_category_add'),
(5881, 1, 2, 'expense_category_edit'),
(5882, 1, 2, 'expense_category_delete'),
(5883, 1, 2, 'expense_category_view'),
(5884, 1, 2, 'dashboard_view'),
(5885, 1, 2, 'dashboard_info_box_1'),
(5886, 1, 2, 'dashboard_info_box_2'),
(5887, 1, 2, 'dashboard_pur_sal_chart'),
(5888, 1, 2, 'dashboard_recent_items'),
(5889, 1, 2, 'dashboard_stock_alert'),
(5890, 1, 2, 'dashboard_trending_items_chart'),
(5891, 1, 2, 'send_sms'),
(5892, 1, 2, 'sms_template_edit'),
(5893, 1, 2, 'sms_template_view'),
(5894, 1, 2, 'sms_api_view'),
(5895, 1, 2, 'sms_api_edit'),
(5896, 1, 2, 'purchase_return_add'),
(5897, 1, 2, 'purchase_return_edit'),
(5898, 1, 2, 'purchase_return_delete'),
(5899, 1, 2, 'purchase_return_view'),
(5900, 1, 2, 'purchase_return_report'),
(5901, 1, 2, 'sales_return_add'),
(5902, 1, 2, 'sales_return_edit'),
(5903, 1, 2, 'sales_return_delete'),
(5904, 1, 2, 'sales_return_view'),
(5905, 1, 2, 'sales_return_report'),
(5906, 1, 2, 'sales_return_payment_view'),
(5907, 1, 2, 'sales_return_payment_add'),
(5908, 1, 2, 'sales_return_payment_delete'),
(5909, 1, 2, 'purchase_return_payment_view'),
(5910, 1, 2, 'purchase_return_payment_add'),
(5911, 1, 2, 'purchase_return_payment_delete'),
(5912, 1, 2, 'purchase_payment_view'),
(5913, 1, 2, 'purchase_payment_add'),
(5914, 1, 2, 'purchase_payment_delete'),
(5915, 1, 2, 'payment_types_add'),
(5916, 1, 2, 'payment_types_edit'),
(5917, 1, 2, 'payment_types_delete'),
(5918, 1, 2, 'payment_types_view'),
(5919, 1, 2, 'import_customers'),
(5920, 1, 2, 'import_suppliers'),
(5921, 1, 2, 'stock_transfer_add'),
(5922, 1, 2, 'stock_transfer_edit'),
(5923, 1, 2, 'stock_transfer_delete'),
(5924, 1, 2, 'stock_transfer_view'),
(5925, 1, 2, 'warehouse_add'),
(5926, 1, 2, 'warehouse_edit'),
(5927, 1, 2, 'warehouse_delete'),
(5928, 1, 2, 'warehouse_view'),
(5929, 1, 2, 'supplier_items_report'),
(5930, 1, 2, 'seller_points_report'),
(5931, 1, 2, 'services_add'),
(5932, 1, 2, 'services_edit'),
(5933, 1, 2, 'services_delete'),
(5934, 1, 2, 'services_view'),
(5935, 1, 2, 'quotation_add'),
(5936, 1, 2, 'quotation_edit'),
(5937, 1, 2, 'quotation_delete'),
(5938, 1, 2, 'quotation_view'),
(5939, 1, 2, 'import_services'),
(5940, 1, 2, 'stock_adjustment_add'),
(5941, 1, 2, 'stock_adjustment_edit'),
(5942, 1, 2, 'stock_adjustment_delete'),
(5943, 1, 2, 'stock_adjustment_view'),
(5944, 1, 2, 'variant_add'),
(5945, 1, 2, 'variant_edit'),
(5946, 1, 2, 'variant_delete'),
(5947, 1, 2, 'variant_view'),
(5948, 1, 2, 'accounts_add'),
(5949, 1, 2, 'accounts_edit'),
(5950, 1, 2, 'accounts_delete'),
(5951, 1, 2, 'accounts_view'),
(5952, 1, 2, 'money_transfer_add'),
(5953, 1, 2, 'money_transfer_edit'),
(5954, 1, 2, 'money_transfer_delete'),
(5955, 1, 2, 'money_transfer_view'),
(5956, 1, 2, 'money_deposit_add'),
(5957, 1, 2, 'money_deposit_edit'),
(5958, 1, 2, 'money_deposit_delete'),
(5959, 1, 2, 'money_deposit_view'),
(5960, 1, 2, 'sales_tax_report'),
(5961, 1, 2, 'purchase_tax_report'),
(5962, 1, 2, 'cash_transactions'),
(5963, 1, 2, 'show_all_users_sales_invoices'),
(5964, 1, 2, 'show_all_users_sales_return_invoices'),
(5965, 1, 2, 'show_all_users_purchase_invoices'),
(5966, 1, 2, 'show_all_users_purchase_return_invoices'),
(5967, 1, 2, 'show_all_users_expenses'),
(5968, 1, 2, 'show_all_users_quotations'),
(5970, 1, 2, 'smtp_settings'),
(5971, 1, 2, 'send_email'),
(5972, 1, 2, 'sms_settings'),
(5973, 1, 2, 'email_template_edit'),
(5974, 1, 2, 'email_template_view'),
(5975, 1, 2, 'cust_adv_payments_add'),
(5976, 1, 2, 'cust_adv_payments_edit'),
(5977, 1, 2, 'cust_adv_payments_delete'),
(5978, 1, 2, 'cust_adv_payments_view'),
(5999, 2, 28, 'cust_adv_payments_add'),
(6000, 2, 28, 'cust_adv_payments_edit'),
(6001, 2, 28, 'cust_adv_payments_delete'),
(6002, 2, 28, 'cust_adv_payments_view'),
(6011, 2, 29, 'users_add'),
(6012, 2, 29, 'users_edit'),
(6013, 2, 29, 'users_delete'),
(6014, 2, 29, 'users_view'),
(6015, 2, 29, 'tax_add'),
(6016, 2, 29, 'tax_edit'),
(6017, 2, 29, 'tax_delete'),
(6018, 2, 29, 'tax_view'),
(6019, 2, 29, 'store_edit'),
(6020, 2, 29, 'units_add'),
(6021, 2, 29, 'units_edit'),
(6022, 2, 29, 'units_delete'),
(6023, 2, 29, 'units_view'),
(6024, 2, 29, 'roles_add'),
(6025, 2, 29, 'roles_edit'),
(6026, 2, 29, 'roles_delete'),
(6027, 2, 29, 'roles_view'),
(6028, 2, 29, 'expense_add'),
(6029, 2, 29, 'expense_edit'),
(6030, 2, 29, 'expense_delete'),
(6031, 2, 29, 'expense_view'),
(6032, 2, 29, 'items_add'),
(6033, 2, 29, 'items_edit'),
(6034, 2, 29, 'items_delete'),
(6035, 2, 29, 'items_view'),
(6036, 2, 29, 'import_items'),
(6037, 2, 29, 'brand_add'),
(6038, 2, 29, 'brand_edit'),
(6039, 2, 29, 'brand_delete'),
(6040, 2, 29, 'brand_view'),
(6041, 2, 29, 'suppliers_add'),
(6042, 2, 29, 'suppliers_edit'),
(6043, 2, 29, 'suppliers_delete'),
(6044, 2, 29, 'suppliers_view'),
(6045, 2, 29, 'customers_add'),
(6046, 2, 29, 'customers_edit'),
(6047, 2, 29, 'customers_delete'),
(6048, 2, 29, 'customers_view'),
(6049, 2, 29, 'purchase_add'),
(6050, 2, 29, 'purchase_edit'),
(6051, 2, 29, 'purchase_delete'),
(6052, 2, 29, 'purchase_view'),
(6053, 2, 29, 'sales_add'),
(6054, 2, 29, 'sales_edit'),
(6055, 2, 29, 'sales_delete'),
(6056, 2, 29, 'sales_view'),
(6057, 2, 29, 'sales_payment_view'),
(6058, 2, 29, 'sales_payment_add'),
(6059, 2, 29, 'sales_payment_delete'),
(6060, 2, 29, 'sales_report'),
(6061, 2, 29, 'purchase_report'),
(6062, 2, 29, 'expense_report'),
(6063, 2, 29, 'profit_report'),
(6064, 2, 29, 'stock_report'),
(6065, 2, 29, 'item_sales_report'),
(6066, 2, 29, 'purchase_payments_report'),
(6067, 2, 29, 'sales_payments_report'),
(6068, 2, 29, 'items_category_add'),
(6069, 2, 29, 'items_category_edit'),
(6070, 2, 29, 'items_category_delete'),
(6071, 2, 29, 'items_category_view'),
(6072, 2, 29, 'print_labels'),
(6073, 2, 29, 'expense_category_add'),
(6074, 2, 29, 'expense_category_edit'),
(6075, 2, 29, 'expense_category_delete'),
(6076, 2, 29, 'expense_category_view'),
(6077, 2, 29, 'dashboard_view'),
(6078, 2, 29, 'dashboard_info_box_1'),
(6079, 2, 29, 'dashboard_info_box_2'),
(6080, 2, 29, 'dashboard_pur_sal_chart'),
(6081, 2, 29, 'dashboard_recent_items'),
(6082, 2, 29, 'dashboard_stock_alert'),
(6083, 2, 29, 'dashboard_trending_items_chart'),
(6084, 2, 29, 'send_sms'),
(6085, 2, 29, 'sms_template_edit'),
(6086, 2, 29, 'sms_template_view'),
(6087, 2, 29, 'sms_api_view'),
(6088, 2, 29, 'sms_api_edit'),
(6089, 2, 29, 'purchase_return_add'),
(6090, 2, 29, 'purchase_return_edit'),
(6091, 2, 29, 'purchase_return_delete'),
(6092, 2, 29, 'purchase_return_view'),
(6093, 2, 29, 'purchase_return_report'),
(6094, 2, 29, 'sales_return_add'),
(6095, 2, 29, 'sales_return_edit'),
(6096, 2, 29, 'sales_return_delete'),
(6097, 2, 29, 'sales_return_view'),
(6098, 2, 29, 'sales_return_report'),
(6099, 2, 29, 'sales_return_payment_view'),
(6100, 2, 29, 'sales_return_payment_add'),
(6101, 2, 29, 'sales_return_payment_delete'),
(6102, 2, 29, 'purchase_return_payment_view'),
(6103, 2, 29, 'purchase_return_payment_add'),
(6104, 2, 29, 'purchase_return_payment_delete'),
(6105, 2, 29, 'purchase_payment_view'),
(6106, 2, 29, 'purchase_payment_add'),
(6107, 2, 29, 'purchase_payment_delete'),
(6108, 2, 29, 'payment_types_add'),
(6109, 2, 29, 'payment_types_edit'),
(6110, 2, 29, 'payment_types_delete'),
(6111, 2, 29, 'payment_types_view'),
(6112, 2, 29, 'import_customers'),
(6113, 2, 29, 'import_suppliers'),
(6114, 2, 29, 'stock_transfer_add'),
(6115, 2, 29, 'stock_transfer_edit'),
(6116, 2, 29, 'stock_transfer_delete'),
(6117, 2, 29, 'stock_transfer_view'),
(6118, 2, 29, 'warehouse_add'),
(6119, 2, 29, 'warehouse_edit'),
(6120, 2, 29, 'warehouse_delete'),
(6121, 2, 29, 'warehouse_view'),
(6122, 2, 29, 'supplier_items_report'),
(6123, 2, 29, 'seller_points_report'),
(6124, 2, 29, 'services_add'),
(6125, 2, 29, 'services_edit'),
(6126, 2, 29, 'services_delete'),
(6127, 2, 29, 'services_view'),
(6128, 2, 29, 'quotation_add'),
(6129, 2, 29, 'quotation_edit'),
(6130, 2, 29, 'quotation_delete'),
(6131, 2, 29, 'quotation_view'),
(6132, 2, 29, 'import_services'),
(6133, 2, 29, 'stock_adjustment_add'),
(6134, 2, 29, 'stock_adjustment_edit'),
(6135, 2, 29, 'stock_adjustment_delete'),
(6136, 2, 29, 'stock_adjustment_view'),
(6137, 2, 29, 'variant_add'),
(6138, 2, 29, 'variant_edit'),
(6139, 2, 29, 'variant_delete'),
(6140, 2, 29, 'variant_view'),
(6141, 2, 29, 'accounts_add'),
(6142, 2, 29, 'accounts_edit'),
(6143, 2, 29, 'accounts_delete'),
(6144, 2, 29, 'accounts_view'),
(6145, 2, 29, 'money_transfer_add'),
(6146, 2, 29, 'money_transfer_edit'),
(6147, 2, 29, 'money_transfer_delete'),
(6148, 2, 29, 'money_transfer_view'),
(6149, 2, 29, 'money_deposit_add'),
(6150, 2, 29, 'money_deposit_edit'),
(6151, 2, 29, 'money_deposit_delete'),
(6152, 2, 29, 'money_deposit_view'),
(6153, 2, 29, 'sales_tax_report'),
(6154, 2, 29, 'purchase_tax_report'),
(6155, 2, 29, 'cash_transactions'),
(6156, 2, 29, 'show_all_users_sales_invoices'),
(6157, 2, 29, 'show_all_users_sales_return_invoices'),
(6158, 2, 29, 'show_all_users_purchase_invoices'),
(6159, 2, 29, 'show_all_users_purchase_return_invoices'),
(6160, 2, 29, 'show_all_users_expenses'),
(6161, 2, 29, 'show_all_users_quotations'),
(6162, 2, 29, 'smtp_settings'),
(6163, 2, 29, 'send_email'),
(6164, 2, 29, 'sms_settings'),
(6165, 2, 29, 'email_template_edit'),
(6166, 2, 29, 'email_template_view'),
(6167, 2, 29, 'cust_adv_payments_add'),
(6168, 2, 29, 'cust_adv_payments_edit'),
(6169, 2, 29, 'cust_adv_payments_delete'),
(6170, 2, 29, 'cust_adv_payments_view'),
(6179, 1, 2, 'gstr_1_report'),
(6180, 1, 2, 'gstr_2_report'),
(6181, 1, 2, 'delivery_sheet_report'),
(6182, 1, 2, 'load_sheet_report'),
(6183, 1, 2, 'show_purchase_price'),
(6184, 1, 2, 'customer_orders_report'),
(6185, 1, 2, 'discountCouponAdd'),
(6186, 1, 2, 'discountCouponEdit'),
(6187, 1, 2, 'discountCouponDelete'),
(6188, 1, 2, 'discountCouponView'),
(6189, 2, 2, 'sales_gst_report'),
(6190, 2, 2, 'purchase_gst_report'),
(6192, 1, 2, 'customerCouponAdd'),
(6193, 1, 2, 'customerCouponEdit'),
(6194, 1, 2, 'customerCouponDelete'),
(6195, 1, 2, 'customerCouponView'),
(6196, 1, 2, 'return_items_report'),
(6197, 1, 2, 'help_link'),
(6198, 2, 2, 'recent_sales_invoice_list'),
(6199, 1, 2, 'stock_transfer_report'),
(6200, 1, 2, 'pos'),
(6201, 1, 2, 'sales_summary_report'),
(6202, 1, 2, 'sales_return_payments'),
(6203, 1, 1, 'exchange_rates_add'),
(6204, 1, 1, 'exchange_rates_edit'),
(6205, 1, 1, 'exchange_rates_delete'),
(6206, 1, 1, 'exchange_rates_view'),
(6207, 1, 2, 'exchange_rates_add'),
(6208, 1, 2, 'exchange_rates_edit'),
(6209, 1, 2, 'exchange_rates_delete'),
(6210, 1, 2, 'exchange_rates_view'),
(6211, 1, 1, 'promotional_sms'),
(6212, 1, 2, 'promotional_sms'),
(6214, 1, 1, 'sms_template_add'),
(6215, 1, 2, 'sms_template_add'),
(6217, 1, 1, 'customer_statement_report'),
(6218, 1, 1, 'supplier_statement_report'),
(6219, 1, 2, 'customer_statement_report'),
(6220, 1, 2, 'supplier_statement_report'),
(6221, 1, 17, 'customer_statement_report'),
(6222, 1, 17, 'supplier_statement_report'),
(6223, 1, 18, 'customer_statement_report'),
(6224, 1, 18, 'supplier_statement_report'),
(6225, 1, 28, 'customer_statement_report'),
(6226, 1, 28, 'supplier_statement_report'),
(6227, 1, 29, 'customer_statement_report'),
(6228, 1, 29, 'supplier_statement_report'),
(6229, 1, 1, 'cash_flow_report'),
(6230, 1, 2, 'cash_flow_report'),
(6231, 1, 17, 'cash_flow_report'),
(6232, 1, 18, 'cash_flow_report'),
(6233, 1, 28, 'cash_flow_report'),
(6234, 1, 29, 'cash_flow_report'),
(6235, 1, 1, 'crm_view'),
(6236, 1, 1, 'leads_view'),
(6237, 1, 1, 'leads_add'),
(6238, 1, 1, 'leads_edit'),
(6239, 1, 1, 'leads_delete'),
(6240, 1, 1, 'leads_convert'),
(6241, 1, 1, 'opportunities_view'),
(6242, 1, 1, 'opportunities_add'),
(6243, 1, 1, 'opportunities_edit'),
(6244, 1, 1, 'opportunities_delete'),
(6245, 1, 1, 'opportunities_convert'),
(6246, 1, 1, 'activities_view'),
(6247, 1, 1, 'activities_add'),
(6248, 1, 1, 'activities_edit'),
(6249, 1, 1, 'activities_delete'),
(6250, 1, 1, 'activities_complete'),
(6251, 1, 1, 'campaigns_view'),
(6252, 1, 1, 'campaigns_add'),
(6253, 1, 1, 'campaigns_edit'),
(6254, 1, 1, 'campaigns_delete'),
(6255, 1, 17, 'crm_view'),
(6256, 1, 18, 'crm_view'),
(6257, 1, 2, 'crm_view'),
(6258, 1, 28, 'crm_view'),
(6259, 1, 29, 'crm_view'),
(6262, 1, 17, 'leads_view'),
(6263, 1, 18, 'leads_view'),
(6264, 1, 2, 'leads_view'),
(6265, 1, 28, 'leads_view'),
(6266, 1, 29, 'leads_view'),
(6269, 1, 17, 'opportunities_view'),
(6270, 1, 18, 'opportunities_view'),
(6271, 1, 2, 'opportunities_view'),
(6272, 1, 28, 'opportunities_view'),
(6273, 1, 29, 'opportunities_view'),
(6276, 1, 17, 'activities_view'),
(6277, 1, 18, 'activities_view'),
(6278, 1, 2, 'activities_view'),
(6279, 1, 28, 'activities_view'),
(6280, 1, 29, 'activities_view'),
(6283, 2, 2, 'crm_view'),
(6284, 2, 2, 'leads_view'),
(6285, 2, 2, 'leads_add'),
(6286, 2, 2, 'leads_edit'),
(6287, 2, 2, 'leads_delete'),
(6288, 2, 2, 'leads_convert'),
(6289, 2, 2, 'opportunities_view'),
(6290, 2, 2, 'opportunities_add'),
(6291, 2, 2, 'opportunities_edit'),
(6292, 2, 2, 'opportunities_delete'),
(6293, 2, 2, 'opportunities_convert'),
(6294, 2, 2, 'activities_view'),
(6295, 2, 2, 'activities_add'),
(6296, 2, 2, 'activities_edit'),
(6297, 2, 2, 'activities_delete'),
(6298, 2, 2, 'activities_complete'),
(6299, 2, 2, 'campaigns_view'),
(6300, 2, 2, 'campaigns_add'),
(6301, 2, 2, 'campaigns_edit'),
(6302, 2, 2, 'campaigns_delete'),
(6303, 1, 1, 'expiry_report'),
(6304, 1, 1, 'expiry_report'),
(6305, 1, 1, 'expiry_report'),
(6306, 1, 1, 'purchase_requisition_add'),
(6307, 1, 1, 'purchase_requisition_view'),
(6308, 1, 1, 'purchase_requisition_edit'),
(6309, 1, 1, 'purchase_requisition_delete'),
(6310, 1, 1, 'purchase_requisition_approve'),
(6311, 1, 1, 'purchase_requisition_convert'),
(6312, 1, 1, 'pro_settings_view'),
(6313, 1, 1, 'pro_settings_edit'),
(6314, 1, 1, 'purchase_requisition_add'),
(6315, 1, 1, 'purchase_requisition_view'),
(6316, 1, 1, 'purchase_requisition_edit'),
(6317, 1, 1, 'purchase_requisition_delete'),
(6318, 1, 1, 'purchase_requisition_approve'),
(6319, 1, 1, 'purchase_requisition_convert'),
(6320, 1, 1, 'pro_settings_view'),
(6321, 1, 1, 'pro_settings_edit'),
(6322, 1, 1, 'purchase_requisition_add'),
(6323, 1, 1, 'purchase_requisition_view'),
(6324, 1, 1, 'purchase_requisition_edit'),
(6325, 1, 1, 'purchase_requisition_delete'),
(6326, 1, 1, 'purchase_requisition_approve'),
(6327, 1, 1, 'purchase_requisition_convert'),
(6328, 1, 1, 'pro_settings_view'),
(6329, 1, 1, 'pro_settings_edit'),
(6330, 1, 1, 'purchase_requisition_add'),
(6331, 1, 1, 'purchase_requisition_view'),
(6332, 1, 1, 'purchase_requisition_edit'),
(6333, 1, 1, 'purchase_requisition_delete'),
(6334, 1, 1, 'purchase_requisition_approve'),
(6335, 1, 1, 'purchase_requisition_convert'),
(6336, 1, 1, 'pro_settings_view'),
(6337, 1, 1, 'pro_settings_edit'),
(6338, 1, 1, 'purchase_requisition_add'),
(6339, 1, 1, 'purchase_requisition_view'),
(6340, 1, 1, 'purchase_requisition_edit'),
(6341, 1, 1, 'purchase_requisition_delete'),
(6342, 1, 1, 'purchase_requisition_approve'),
(6343, 1, 1, 'purchase_requisition_convert'),
(6344, 1, 1, 'pro_settings_view'),
(6345, 1, 1, 'pro_settings_edit'),
(6346, 1, 1, 'purchase_requisition_add'),
(6347, 1, 1, 'purchase_requisition_view'),
(6348, 1, 1, 'purchase_requisition_edit'),
(6349, 1, 1, 'purchase_requisition_delete'),
(6350, 1, 1, 'purchase_requisition_approve'),
(6351, 1, 1, 'purchase_requisition_convert'),
(6352, 1, 1, 'pro_settings_view'),
(6353, 1, 1, 'pro_settings_edit'),
(6354, 1, 1, 'purchase_requisition_add'),
(6355, 1, 1, 'purchase_requisition_view'),
(6356, 1, 1, 'purchase_requisition_edit'),
(6357, 1, 1, 'purchase_requisition_delete'),
(6358, 1, 1, 'purchase_requisition_approve'),
(6359, 1, 1, 'purchase_requisition_convert'),
(6360, 1, 1, 'pro_settings_view'),
(6361, 1, 1, 'pro_settings_edit'),
(6362, 1, 1, 'purchase_requisition_add'),
(6363, 1, 1, 'purchase_requisition_view'),
(6364, 1, 1, 'purchase_requisition_edit'),
(6365, 1, 1, 'purchase_requisition_delete'),
(6366, 1, 1, 'purchase_requisition_approve'),
(6367, 1, 1, 'purchase_requisition_convert'),
(6368, 1, 1, 'pro_settings_view'),
(6369, 1, 1, 'pro_settings_edit'),
(6370, 1, 1, 'purchase_requisition_add'),
(6371, 1, 1, 'purchase_requisition_view'),
(6372, 1, 1, 'purchase_requisition_edit'),
(6373, 1, 1, 'purchase_requisition_delete'),
(6374, 1, 1, 'purchase_requisition_approve'),
(6375, 1, 1, 'purchase_requisition_convert'),
(6376, 1, 1, 'pro_settings_view'),
(6377, 1, 1, 'pro_settings_edit'),
(6378, 1, 1, 'purchase_requisition_add'),
(6379, 1, 1, 'purchase_requisition_view'),
(6380, 1, 1, 'purchase_requisition_edit'),
(6381, 1, 1, 'purchase_requisition_delete'),
(6382, 1, 1, 'purchase_requisition_approve'),
(6383, 1, 1, 'purchase_requisition_convert'),
(6384, 1, 1, 'pro_settings_view'),
(6385, 1, 1, 'pro_settings_edit'),
(6386, 1, 1, 'purchase_requisition_add'),
(6387, 1, 1, 'purchase_requisition_view'),
(6388, 1, 1, 'purchase_requisition_edit'),
(6389, 1, 1, 'purchase_requisition_delete'),
(6390, 1, 1, 'purchase_requisition_approve'),
(6391, 1, 1, 'purchase_requisition_convert'),
(6392, 1, 1, 'pro_settings_view'),
(6393, 1, 1, 'pro_settings_edit'),
(6394, 1, 2, 'purchase_requisition_add'),
(6395, 1, 2, 'purchase_requisition_view'),
(6396, 1, 2, 'purchase_requisition_edit'),
(6397, 1, 2, 'purchase_requisition_delete'),
(6398, 1, 2, 'purchase_requisition_approve'),
(6399, 1, 2, 'purchase_requisition_convert'),
(6400, 1, 2, 'pro_settings_view'),
(6401, 1, 2, 'pro_settings_edit'),
(6402, 1, 2, 'purchase_requisition_add'),
(6403, 1, 2, 'purchase_requisition_view'),
(6404, 1, 2, 'purchase_requisition_edit'),
(6405, 1, 2, 'purchase_requisition_delete'),
(6406, 1, 2, 'purchase_requisition_approve'),
(6407, 1, 2, 'purchase_requisition_convert'),
(6408, 1, 2, 'pro_settings_view'),
(6409, 1, 2, 'pro_settings_edit'),
(6410, 2, 2, 'purchase_requisition_add'),
(6411, 2, 2, 'purchase_requisition_view'),
(6412, 2, 2, 'purchase_requisition_edit'),
(6413, 2, 2, 'purchase_requisition_delete'),
(6414, 2, 2, 'purchase_requisition_approve'),
(6415, 2, 2, 'purchase_requisition_convert'),
(6416, 2, 2, 'pro_settings_view'),
(6417, 2, 2, 'pro_settings_edit'),
(6418, 2, 2, 'purchase_requisition_add'),
(6419, 2, 2, 'purchase_requisition_view'),
(6420, 2, 2, 'purchase_requisition_edit'),
(6421, 2, 2, 'purchase_requisition_delete'),
(6422, 2, 2, 'purchase_requisition_approve'),
(6423, 2, 2, 'purchase_requisition_convert'),
(6424, 2, 2, 'pro_settings_view'),
(6425, 2, 2, 'pro_settings_edit'),
(6426, 1, 2, 'purchase_requisition_add'),
(6427, 1, 2, 'purchase_requisition_view'),
(6428, 1, 2, 'purchase_requisition_edit'),
(6429, 1, 2, 'purchase_requisition_delete'),
(6430, 1, 2, 'purchase_requisition_approve'),
(6431, 1, 2, 'purchase_requisition_convert'),
(6432, 1, 2, 'pro_settings_view'),
(6433, 1, 2, 'pro_settings_edit'),
(6434, 1, 2, 'purchase_requisition_add'),
(6435, 1, 2, 'purchase_requisition_view'),
(6436, 1, 2, 'purchase_requisition_edit'),
(6437, 1, 2, 'purchase_requisition_delete'),
(6438, 1, 2, 'purchase_requisition_approve'),
(6439, 1, 2, 'purchase_requisition_convert'),
(6440, 1, 2, 'pro_settings_view'),
(6441, 1, 2, 'pro_settings_edit'),
(6442, 1, 2, 'purchase_requisition_add'),
(6443, 1, 2, 'purchase_requisition_view'),
(6444, 1, 2, 'purchase_requisition_edit'),
(6445, 1, 2, 'purchase_requisition_delete'),
(6446, 1, 2, 'purchase_requisition_approve'),
(6447, 1, 2, 'purchase_requisition_convert'),
(6448, 1, 2, 'pro_settings_view'),
(6449, 1, 2, 'pro_settings_edit'),
(6450, 1, 2, 'purchase_requisition_add'),
(6451, 1, 2, 'purchase_requisition_view'),
(6452, 1, 2, 'purchase_requisition_edit'),
(6453, 1, 2, 'purchase_requisition_delete'),
(6454, 1, 2, 'purchase_requisition_approve'),
(6455, 1, 2, 'purchase_requisition_convert'),
(6456, 1, 2, 'pro_settings_view'),
(6457, 1, 2, 'pro_settings_edit'),
(6458, 1, 1, 'pro_approval_users_view'),
(6459, 1, 1, 'pro_approval_users_add'),
(6460, 1, 1, 'pro_approval_users_edit'),
(6461, 1, 1, 'pro_approval_users_delete'),
(6632, 1, 1, 'purchase_requisition_add'),
(6633, 1, 1, 'purchase_requisition_view'),
(6634, 1, 1, 'purchase_requisition_edit'),
(6635, 1, 1, 'purchase_requisition_delete'),
(6636, 1, 1, 'purchase_requisition_approve'),
(6637, 1, 1, 'purchase_requisition_convert'),
(6638, 1, 1, 'pro_settings_view'),
(6639, 1, 1, 'pro_settings_edit'),
(6640, 1, 1, 'pro_approval_users_view'),
(6641, 1, 1, 'pro_approval_users_add'),
(6642, 1, 1, 'pro_approval_users_edit'),
(6643, 1, 1, 'pro_approval_users_delete'),
(6644, 1, 2, 'purchase_requisition_add'),
(6645, 1, 2, 'purchase_requisition_view'),
(6646, 1, 2, 'purchase_requisition_edit'),
(6647, 1, 2, 'purchase_requisition_delete'),
(6648, 1, 2, 'purchase_requisition_approve'),
(6649, 1, 2, 'purchase_requisition_convert'),
(6650, 1, 2, 'pro_settings_view'),
(6651, 1, 2, 'pro_settings_edit'),
(6652, 1, 2, 'pro_approval_users_view'),
(6653, 1, 2, 'pro_approval_users_add'),
(6654, 1, 2, 'pro_approval_users_edit'),
(6655, 1, 2, 'pro_approval_users_delete'),
(6656, 1, 3, 'purchase_requisition_add'),
(6657, 1, 3, 'purchase_requisition_view'),
(6658, 1, 3, 'purchase_requisition_edit'),
(6662, 1, 3, 'pro_settings_view'),
(6663, 1, 3, 'pro_settings_edit'),
(6664, 1, 3, 'pro_approval_users_view'),
(6665, 1, 3, 'pro_approval_users_add'),
(6666, 1, 3, 'pro_approval_users_edit'),
(6667, 1, 3, 'pro_approval_users_delete'),
(6668, 1, 4, 'purchase_requisition_add'),
(6669, 1, 4, 'purchase_requisition_view'),
(6670, 1, 4, 'purchase_requisition_edit'),
(6671, 1, 4, 'purchase_requisition_delete'),
(6672, 1, 4, 'purchase_requisition_approve'),
(6673, 1, 4, 'purchase_requisition_convert'),
(6674, 1, 4, 'pro_settings_view'),
(6675, 1, 4, 'pro_settings_edit'),
(6676, 1, 4, 'pro_approval_users_view'),
(6677, 1, 4, 'pro_approval_users_add'),
(6678, 1, 4, 'pro_approval_users_edit'),
(6679, 1, 4, 'pro_approval_users_delete'),
(6680, 1, 1, 'purchase_requisition_add'),
(6681, 1, 1, 'purchase_requisition_view'),
(6682, 1, 1, 'purchase_requisition_edit'),
(6683, 1, 1, 'purchase_requisition_delete'),
(6684, 1, 1, 'purchase_requisition_approve'),
(6685, 1, 1, 'purchase_requisition_convert'),
(6686, 1, 1, 'pro_settings_view'),
(6687, 1, 1, 'pro_settings_edit'),
(6688, 1, 1, 'pro_approval_users_view'),
(6689, 1, 1, 'pro_approval_users_add'),
(6690, 1, 1, 'pro_approval_users_edit'),
(6691, 1, 1, 'pro_approval_users_delete'),
(6692, 1, 2, 'purchase_requisition_add'),
(6693, 1, 2, 'purchase_requisition_view'),
(6694, 1, 2, 'purchase_requisition_edit'),
(6695, 1, 2, 'purchase_requisition_delete'),
(6696, 1, 2, 'purchase_requisition_approve'),
(6697, 1, 2, 'purchase_requisition_convert'),
(6698, 1, 2, 'pro_settings_view'),
(6699, 1, 2, 'pro_settings_edit'),
(6700, 1, 3, 'purchase_requisition_add'),
(6701, 1, 3, 'purchase_requisition_view'),
(6702, 1, 4, 'purchase_requisition_view'),
(6703, 1, 8, 'purchase_requisition_view'),
(6704, 1, 8, 'purchase_requisition_approve'),
(7569, 2, 31, 'tax_add'),
(7570, 2, 31, 'tax_edit'),
(7571, 2, 31, 'tax_delete'),
(7572, 2, 31, 'tax_view'),
(7573, 2, 31, 'units_add'),
(7574, 2, 31, 'units_edit'),
(7575, 2, 31, 'units_delete'),
(7576, 2, 31, 'units_view'),
(7577, 2, 31, 'expense_add'),
(7578, 2, 31, 'expense_edit'),
(7579, 2, 31, 'expense_delete'),
(7580, 2, 31, 'expense_view'),
(7581, 2, 31, 'items_add'),
(7582, 2, 31, 'items_edit'),
(7583, 2, 31, 'items_delete'),
(7584, 2, 31, 'items_view'),
(7585, 2, 31, 'import_items'),
(7586, 2, 31, 'brand_add'),
(7587, 2, 31, 'brand_edit'),
(7588, 2, 31, 'brand_delete'),
(7589, 2, 31, 'brand_view'),
(7590, 2, 31, 'suppliers_add'),
(7591, 2, 31, 'suppliers_edit'),
(7592, 2, 31, 'suppliers_delete'),
(7593, 2, 31, 'suppliers_view'),
(7594, 2, 31, 'customers_add'),
(7595, 2, 31, 'customers_edit'),
(7596, 2, 31, 'customers_delete'),
(7597, 2, 31, 'customers_view'),
(7598, 2, 31, 'purchase_add'),
(7599, 2, 31, 'purchase_edit'),
(7600, 2, 31, 'purchase_delete'),
(7601, 2, 31, 'purchase_view'),
(7602, 2, 31, 'sales_add'),
(7603, 2, 31, 'sales_edit'),
(7604, 2, 31, 'sales_delete'),
(7605, 2, 31, 'sales_view'),
(7606, 2, 31, 'sales_payment_view'),
(7607, 2, 31, 'sales_payment_add'),
(7608, 2, 31, 'sales_payment_delete'),
(7609, 2, 31, 'sales_report'),
(7610, 2, 31, 'purchase_report'),
(7611, 2, 31, 'expense_report'),
(7612, 2, 31, 'profit_report'),
(7613, 2, 31, 'stock_report'),
(7614, 2, 31, 'item_sales_report'),
(7615, 2, 31, 'purchase_payments_report'),
(7616, 2, 31, 'sales_payments_report'),
(7617, 2, 31, 'expired_items_report'),
(7618, 2, 31, 'expiry_report'),
(7619, 2, 31, 'items_category_add'),
(7620, 2, 31, 'items_category_edit'),
(7621, 2, 31, 'items_category_delete'),
(7622, 2, 31, 'items_category_view'),
(7623, 2, 31, 'print_labels'),
(7624, 2, 31, 'expense_category_add'),
(7625, 2, 31, 'expense_category_edit'),
(7626, 2, 31, 'expense_category_delete'),
(7627, 2, 31, 'expense_category_view'),
(7628, 2, 31, 'dashboard_view'),
(7629, 2, 31, 'dashboard_info_box_1'),
(7630, 2, 31, 'dashboard_info_box_2'),
(7631, 2, 31, 'dashboard_pur_sal_chart'),
(7632, 2, 31, 'dashboard_recent_items'),
(7633, 2, 31, 'dashboard_stock_alert'),
(7634, 2, 31, 'dashboard_trending_items_chart'),
(7635, 2, 31, 'purchase_return_add'),
(7636, 2, 31, 'purchase_return_edit'),
(7637, 2, 31, 'purchase_return_delete'),
(7638, 2, 31, 'purchase_return_view'),
(7639, 2, 31, 'purchase_return_report'),
(7640, 2, 31, 'sales_return_add'),
(7641, 2, 31, 'sales_return_edit'),
(7642, 2, 31, 'sales_return_delete'),
(7643, 2, 31, 'sales_return_view'),
(7644, 2, 31, 'sales_return_report'),
(7645, 2, 31, 'sales_return_payment_view'),
(7646, 2, 31, 'sales_return_payment_add'),
(7647, 2, 31, 'sales_return_payment_delete'),
(7648, 2, 31, 'purchase_return_payment_view'),
(7649, 2, 31, 'purchase_return_payment_add'),
(7650, 2, 31, 'purchase_return_payment_delete'),
(7651, 2, 31, 'purchase_payment_view'),
(7652, 2, 31, 'purchase_payment_add'),
(7653, 2, 31, 'purchase_payment_delete'),
(7654, 2, 31, 'payment_types_add'),
(7655, 2, 31, 'payment_types_edit'),
(7656, 2, 31, 'payment_types_delete'),
(7657, 2, 31, 'payment_types_view'),
(7658, 2, 31, 'import_customers'),
(7659, 2, 31, 'import_suppliers'),
(7660, 2, 31, 'stock_transfer_add'),
(7661, 2, 31, 'stock_transfer_edit'),
(7662, 2, 31, 'stock_transfer_delete'),
(7663, 2, 31, 'stock_transfer_view'),
(7664, 2, 31, 'warehouse_add'),
(7665, 2, 31, 'warehouse_edit'),
(7666, 2, 31, 'warehouse_delete'),
(7667, 2, 31, 'warehouse_view'),
(7668, 2, 31, 'supplier_items_report'),
(7669, 2, 31, 'seller_points_report'),
(7670, 2, 31, 'services_add'),
(7671, 2, 31, 'services_edit'),
(7672, 2, 31, 'services_delete'),
(7673, 2, 31, 'services_view'),
(7674, 2, 31, 'quotation_add'),
(7675, 2, 31, 'quotation_edit'),
(7676, 2, 31, 'quotation_delete'),
(7677, 2, 31, 'quotation_view'),
(7678, 2, 31, 'import_services'),
(7679, 2, 31, 'stock_adjustment_add'),
(7680, 2, 31, 'stock_adjustment_edit'),
(7681, 2, 31, 'stock_adjustment_delete'),
(7682, 2, 31, 'stock_adjustment_view'),
(7683, 2, 31, 'variant_add'),
(7684, 2, 31, 'variant_edit'),
(7685, 2, 31, 'variant_delete'),
(7686, 2, 31, 'variant_view'),
(7687, 2, 31, 'accounts_add'),
(7688, 2, 31, 'accounts_edit'),
(7689, 2, 31, 'accounts_delete'),
(7690, 2, 31, 'accounts_view'),
(7691, 2, 31, 'money_transfer_add'),
(7692, 2, 31, 'money_transfer_edit'),
(7693, 2, 31, 'money_transfer_delete'),
(7694, 2, 31, 'money_transfer_view'),
(7695, 2, 31, 'money_deposit_add'),
(7696, 2, 31, 'money_deposit_edit'),
(7697, 2, 31, 'money_deposit_delete'),
(7698, 2, 31, 'money_deposit_view'),
(7699, 2, 31, 'sales_tax_report'),
(7700, 2, 31, 'purchase_tax_report'),
(7701, 2, 31, 'cash_transactions'),
(7702, 2, 31, 'show_all_users_sales_invoices'),
(7703, 2, 31, 'show_all_users_sales_return_invoices'),
(7704, 2, 31, 'show_all_users_purchase_invoices'),
(7705, 2, 31, 'show_all_users_purchase_return_invoices'),
(7706, 2, 31, 'show_all_users_expenses'),
(7707, 2, 31, 'show_all_users_quotations'),
(7708, 2, 31, 'cust_adv_payments_add'),
(7709, 2, 31, 'cust_adv_payments_edit'),
(7710, 2, 31, 'cust_adv_payments_delete'),
(7711, 2, 31, 'cust_adv_payments_view'),
(7712, 2, 31, 'gstr_1_report'),
(7713, 2, 31, 'gstr_2_report'),
(7714, 2, 31, 'customer_orders_report'),
(7715, 2, 31, 'load_sheet_report'),
(7716, 2, 31, 'delivery_sheet_report'),
(7717, 2, 31, 'show_purchase_price'),
(7718, 2, 31, 'discountCouponAdd'),
(7719, 2, 31, 'discountCouponEdit'),
(7720, 2, 31, 'discountCouponDelete'),
(7721, 2, 31, 'discountCouponView'),
(7722, 2, 31, 'sales_gst_report'),
(7723, 2, 31, 'purchase_gst_report'),
(7724, 2, 31, 'customerCouponAdd'),
(7725, 2, 31, 'customerCouponEdit'),
(7726, 2, 31, 'customerCouponDelete'),
(7727, 2, 31, 'customerCouponView'),
(7728, 2, 31, 'exchange_rates_add'),
(7729, 2, 31, 'exchange_rates_edit'),
(7730, 2, 31, 'exchange_rates_delete'),
(7731, 2, 31, 'exchange_rates_view'),
(7732, 2, 31, 'return_items_report'),
(7733, 2, 31, 'recent_sales_invoice_list'),
(7734, 2, 31, 'stock_transfer_report'),
(7735, 2, 31, 'pos'),
(7736, 2, 31, 'sales_summary_report'),
(7737, 2, 31, 'sales_return_payments'),
(7738, 2, 31, 'purchase_requisition_add'),
(7739, 2, 31, 'purchase_requisition_view'),
(7740, 2, 31, 'purchase_requisition_approve'),
(7741, 2, 31, 'purchase_requisition_convert'),
(7742, 2, 31, 'payment_method_breakdown_report'),
(7743, 2, 31, 'customer_statement_report'),
(7744, 2, 31, 'supplier_statement_report'),
(7745, 2, 31, 'cash_flow_statement'),
(7746, 2, 31, 'expiry_report'),
(7834, 2, 32, 'expense_add'),
(7835, 2, 32, 'expense_edit'),
(7836, 2, 32, 'expense_view'),
(7837, 2, 32, 'items_add'),
(7838, 2, 32, 'items_edit'),
(7839, 2, 32, 'items_view'),
(7840, 2, 32, 'import_items'),
(7841, 2, 32, 'suppliers_add'),
(7842, 2, 32, 'suppliers_edit'),
(7843, 2, 32, 'suppliers_view'),
(7844, 2, 32, 'customers_add'),
(7845, 2, 32, 'customers_edit'),
(7846, 2, 32, 'customers_view'),
(7847, 2, 32, 'purchase_add'),
(7848, 2, 32, 'purchase_edit'),
(7849, 2, 32, 'purchase_view'),
(7850, 2, 32, 'sales_add'),
(7851, 2, 32, 'sales_edit'),
(7852, 2, 32, 'sales_view'),
(7853, 2, 32, 'sales_payment_view'),
(7854, 2, 32, 'sales_payment_add'),
(7855, 2, 32, 'sales_payment_delete'),
(7856, 2, 32, 'items_category_add'),
(7857, 2, 32, 'items_category_edit'),
(7858, 2, 32, 'items_category_delete'),
(7859, 2, 32, 'items_category_view'),
(7860, 2, 32, 'print_labels'),
(7861, 2, 32, 'expense_category_add'),
(7862, 2, 32, 'expense_category_edit'),
(7863, 2, 32, 'expense_category_view'),
(7864, 2, 32, 'dashboard_view'),
(7865, 2, 32, 'dashboard_info_box_1'),
(7866, 2, 32, 'dashboard_info_box_2'),
(7867, 2, 32, 'dashboard_pur_sal_chart'),
(7868, 2, 32, 'dashboard_recent_items'),
(7869, 2, 32, 'dashboard_stock_alert'),
(7870, 2, 32, 'dashboard_trending_items_chart'),
(7871, 2, 32, 'sales_return_view'),
(7872, 2, 32, 'purchase_payment_view'),
(7873, 2, 32, 'purchase_payment_add'),
(7874, 2, 32, 'purchase_payment_delete'),
(7875, 2, 32, 'payment_types_add'),
(7876, 2, 32, 'payment_types_edit'),
(7877, 2, 32, 'payment_types_delete'),
(7878, 2, 32, 'payment_types_view'),
(7879, 2, 32, 'import_customers'),
(7880, 2, 32, 'import_suppliers'),
(7881, 2, 32, 'stock_transfer_add'),
(7882, 2, 32, 'stock_transfer_edit'),
(7883, 2, 32, 'stock_transfer_view'),
(7884, 2, 32, 'services_add'),
(7885, 2, 32, 'services_edit'),
(7886, 2, 32, 'services_view'),
(7887, 2, 32, 'quotation_add'),
(7888, 2, 32, 'quotation_edit'),
(7889, 2, 32, 'quotation_view'),
(7890, 2, 32, 'import_services'),
(7891, 2, 32, 'accounts_add'),
(7892, 2, 32, 'accounts_edit'),
(7893, 2, 32, 'accounts_view'),
(7894, 2, 32, 'money_transfer_add'),
(7895, 2, 32, 'money_transfer_edit'),
(7896, 2, 32, 'money_transfer_delete'),
(7897, 2, 32, 'money_transfer_view'),
(7898, 2, 32, 'money_deposit_add'),
(7899, 2, 32, 'money_deposit_edit'),
(7900, 2, 32, 'money_deposit_delete'),
(7901, 2, 32, 'money_deposit_view'),
(7902, 2, 32, 'cash_transactions'),
(7903, 2, 32, 'show_all_users_sales_invoices'),
(7904, 2, 32, 'show_all_users_purchase_invoices'),
(7905, 2, 32, 'show_all_users_expenses'),
(7906, 2, 32, 'show_all_users_quotations'),
(7907, 2, 32, 'cust_adv_payments_add'),
(7908, 2, 32, 'cust_adv_payments_edit'),
(7909, 2, 32, 'cust_adv_payments_view'),
(7910, 2, 32, 'show_purchase_price'),
(7911, 2, 32, 'discountCouponAdd'),
(7912, 2, 32, 'discountCouponEdit'),
(7913, 2, 32, 'discountCouponView'),
(7914, 2, 32, 'customerCouponAdd'),
(7915, 2, 32, 'customerCouponEdit'),
(7916, 2, 32, 'customerCouponView'),
(7917, 2, 32, 'exchange_rates_add'),
(7918, 2, 32, 'exchange_rates_edit'),
(7919, 2, 32, 'exchange_rates_view'),
(7920, 2, 32, 'recent_sales_invoice_list'),
(7921, 2, 32, 'pos');

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

--
-- Table structure for table `db_promotional_sms_log`
--

CREATE TABLE `db_promotional_sms_log` (
  `id` int(11) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `send_type` varchar(50) DEFAULT NULL,
  `message` text DEFAULT NULL,
  `success_count` int(11) DEFAULT 0,
  `failed_count` int(11) DEFAULT 0,
  `failed_recipients` text DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(30) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_pro_approval_users`
--

CREATE TABLE `db_pro_approval_users` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `min_amount` decimal(15,2) DEFAULT 0.00 COMMENT 'Minimum amount this user can approve',
  `max_amount` decimal(15,2) DEFAULT 0.00 COMMENT 'Maximum amount this user can approve (0 = no limit)',
  `is_active` tinyint(1) DEFAULT 1 COMMENT 'Whether this approval user is active',
  `created_date` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_date` datetime DEFAULT NULL ON UPDATE current_timestamp(),
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_pro_approval_users`
--


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

--
-- Table structure for table `db_pro_settings`
--

CREATE TABLE `db_pro_settings` (
  `id` int(11) NOT NULL,
  `setting_name` varchar(100) NOT NULL,
  `setting_value` text DEFAULT NULL,
  `setting_type` enum('text','number','decimal','boolean','json') DEFAULT 'text',
  `setting_description` text DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `created_date` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_date` datetime DEFAULT NULL ON UPDATE current_timestamp(),
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_pro_settings`
--

INSERT INTO `db_pro_settings` (`id`, `setting_name`, `setting_value`, `setting_type`, `setting_description`, `is_active`, `created_date`, `updated_date`, `created_by`, `updated_by`) VALUES
(1, 'pro_auto_approve_amount', '1000.00', 'decimal', 'Amount below which requisitions are auto-approved (0 = disabled)', 1, '2025-10-22 06:56:02', '2025-10-23 18:11:17', 1, 2),
(2, 'pro_require_approval_amount', '500.00', 'decimal', 'Amount above which requisitions require approval (0 = always require)', 1, '2025-10-22 06:56:02', '2025-10-23 18:11:17', 1, 2),
(3, 'pro_max_requisition_amount', '10000.00', 'decimal', 'Maximum amount allowed for a single requisition (0 = no limit)', 1, '2025-10-22 06:56:02', '2025-10-23 18:11:17', 1, 2),
(7, 'pro_approval_workflow', 'single', 'text', 'Approval workflow type: single, multi_level, department_based', 1, '2025-10-22 06:56:02', '2025-10-23 18:11:17', 1, 2),
(8, 'pro_auto_convert_approved', '0', 'boolean', 'Automatically convert approved requisitions to purchases (1 = enabled, 0 = disabled)', 1, '2025-10-22 06:56:02', '2025-10-23 18:11:17', 1, 2),
(9, 'pro_require_supplier', '0', 'boolean', 'Require supplier selection for requisition items (1 = required, 0 = optional)', 1, '2025-10-22 06:56:02', '2025-10-23 18:11:17', 1, 2),
(10, 'pro_allow_edit_after_submit', '0', 'boolean', 'Allow editing requisitions after submission (1 = allowed, 0 = not allowed)', 1, '2025-10-22 06:56:02', '2025-10-23 18:11:17', 1, 2),
(11, 'pro_approval_timeout_days', '7', 'number', 'Days after which pending requisitions are considered expired (0 = no timeout)', 1, '2025-10-22 06:56:02', '2025-10-23 18:11:17', 1, 2),
(12, 'pro_notification_recipients', '[]', 'json', 'JSON array of user IDs who should receive PRO notifications', 1, '2025-10-22 06:56:02', '2025-10-23 18:11:17', 1, 2),
(74, 'pro_approval_workflow_enabled', '1', 'boolean', 'Enable approval workflow for purchase requisitions (1 = enabled, 0 = disabled)', 1, '2025-10-23 18:10:02', '2025-10-23 18:11:17', 1, 2),
(76, 'pro_sms_notifications', '0', 'boolean', 'Send SMS notifications for PRO status changes (1 = enabled, 0 = disabled)', 1, '2025-10-23 18:11:17', NULL, 2, NULL);

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

--
-- Table structure for table `db_purchase`
--

CREATE TABLE `db_purchase` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `warehouse_id` int(5) DEFAULT NULL,
  `count_id` int(10) DEFAULT NULL COMMENT 'Use to create Purchase Code',
  `purchase_code` varchar(50) DEFAULT NULL,
  `reference_no` varchar(50) DEFAULT NULL,
  `purchase_date` date DEFAULT NULL,
  `purchase_status` varchar(50) DEFAULT NULL,
  `transaction_currency_id` int(11) DEFAULT NULL,
  `exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `base_currency_total` decimal(20,4) DEFAULT NULL,
  `supplier_id` int(5) DEFAULT NULL,
  `other_charges_input` double(20,4) DEFAULT NULL,
  `other_charges_tax_id` int(5) DEFAULT NULL,
  `other_charges_amt` double(20,4) DEFAULT NULL,
  `discount_to_all_input` double(20,4) DEFAULT NULL,
  `discount_to_all_type` varchar(50) DEFAULT NULL,
  `tot_discount_to_all_amt` double(20,4) DEFAULT NULL,
  `subtotal` double(20,4) DEFAULT NULL COMMENT 'Purchased qty',
  `round_off` double(20,4) DEFAULT NULL COMMENT 'Pending Qty',
  `grand_total` double(20,4) DEFAULT NULL,
  `purchase_note` text DEFAULT NULL,
  `payment_status` varchar(50) DEFAULT NULL,
  `paid_amount` double(20,4) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `system_ip` varchar(100) DEFAULT NULL,
  `system_name` varchar(100) DEFAULT NULL,
  `company_id` int(5) DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `return_bit` int(1) DEFAULT NULL COMMENT 'Purchase return raised'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_purchaseitems`
--

CREATE TABLE `db_purchaseitems` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `purchase_id` int(5) DEFAULT NULL,
  `purchase_status` varchar(50) DEFAULT NULL,
  `item_currency_id` int(11) DEFAULT NULL,
  `item_exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `base_currency_price` decimal(20,4) DEFAULT NULL,
  `item_id` int(5) DEFAULT NULL,
  `purchase_qty` double(20,2) DEFAULT NULL,
  `price_per_unit` double(20,4) DEFAULT NULL,
  `tax_type` varchar(50) DEFAULT NULL,
  `tax_id` int(5) DEFAULT NULL,
  `tax_amt` double(20,4) DEFAULT NULL,
  `discount_type` varchar(50) DEFAULT NULL,
  `discount_input` double(20,4) DEFAULT NULL,
  `discount_amt` double(20,4) DEFAULT NULL,
  `unit_total_cost` double(20,4) DEFAULT NULL,
  `total_cost` double(20,4) DEFAULT NULL,
  `profit_margin_per` double(20,4) DEFAULT NULL,
  `unit_sales_price` double(20,4) DEFAULT NULL,
  `status` int(5) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `batch_number` varchar(100) DEFAULT NULL,
  `manufacturing_date` date DEFAULT NULL,
  `expiry_date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_purchaseitemsreturn`
--

CREATE TABLE `db_purchaseitemsreturn` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `purchase_id` int(5) DEFAULT NULL,
  `return_id` int(5) DEFAULT NULL,
  `return_status` varchar(50) DEFAULT NULL,
  `item_id` int(5) DEFAULT NULL,
  `return_qty` double(20,2) DEFAULT NULL,
  `price_per_unit` double(20,4) DEFAULT NULL,
  `tax_id` int(5) DEFAULT NULL,
  `tax_amt` double(20,4) DEFAULT NULL,
  `tax_type` varchar(50) DEFAULT NULL,
  `discount_input` double(20,4) DEFAULT NULL,
  `discount_amt` double(20,4) DEFAULT NULL,
  `discount_type` varchar(50) DEFAULT NULL,
  `unit_total_cost` double(20,4) DEFAULT NULL,
  `total_cost` double(20,4) DEFAULT NULL,
  `profit_margin_per` double(20,4) DEFAULT NULL,
  `unit_sales_price` double(20,4) DEFAULT NULL,
  `status` int(5) DEFAULT NULL,
  `description` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_purchasepayments`
--

CREATE TABLE `db_purchasepayments` (
  `id` int(5) NOT NULL,
  `count_id` int(5) DEFAULT NULL,
  `payment_code` varchar(50) DEFAULT NULL,
  `store_id` int(11) DEFAULT NULL,
  `purchase_id` int(5) DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `payment_type` varchar(50) DEFAULT NULL,
  `payment_currency_id` int(11) DEFAULT NULL,
  `exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `base_currency_amount` decimal(20,4) DEFAULT NULL,
  `payment` double(20,4) DEFAULT NULL,
  `payment_note` text DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `created_time` time DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `account_id` int(5) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `short_code` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_purchasepaymentsreturn`
--

CREATE TABLE `db_purchasepaymentsreturn` (
  `id` int(5) NOT NULL,
  `count_id` int(5) DEFAULT NULL,
  `payment_code` varchar(50) DEFAULT NULL,
  `store_id` int(11) DEFAULT NULL,
  `purchase_id` int(11) DEFAULT NULL,
  `return_id` int(5) DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `payment_type` varchar(50) DEFAULT NULL,
  `payment` double(20,4) DEFAULT NULL,
  `payment_note` text DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `created_time` time DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `account_id` int(5) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `short_code` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_purchasereturn`
--

CREATE TABLE `db_purchasereturn` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `count_id` int(10) DEFAULT NULL COMMENT 'Use to create Purchase Return Code',
  `warehouse_id` int(5) DEFAULT NULL,
  `purchase_id` int(11) DEFAULT NULL,
  `return_code` varchar(50) DEFAULT NULL,
  `reference_no` varchar(50) DEFAULT NULL,
  `return_date` date DEFAULT NULL,
  `return_status` varchar(50) DEFAULT NULL,
  `supplier_id` int(5) DEFAULT NULL,
  `currency_id` int(5) DEFAULT NULL,
  `currency_symbol` varchar(10) DEFAULT NULL,
  `exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `base_currency_total` decimal(20,4) DEFAULT NULL,
  `other_charges_input` double(20,4) DEFAULT NULL,
  `other_charges_tax_id` int(5) DEFAULT NULL,
  `other_charges_amt` double(20,4) DEFAULT NULL,
  `discount_to_all_input` double(20,4) DEFAULT NULL,
  `discount_to_all_type` varchar(50) DEFAULT NULL,
  `tot_discount_to_all_amt` double(20,4) DEFAULT NULL,
  `subtotal` double(20,4) DEFAULT NULL COMMENT 'Purchased qty',
  `round_off` double(20,4) DEFAULT NULL COMMENT 'Pending Qty',
  `grand_total` double(20,4) DEFAULT NULL,
  `return_note` text DEFAULT NULL,
  `payment_status` varchar(50) DEFAULT NULL,
  `paid_amount` double(20,4) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `system_ip` varchar(100) DEFAULT NULL,
  `system_name` varchar(100) DEFAULT NULL,
  `company_id` int(5) DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_purchase_requisitions`
--

CREATE TABLE `db_purchase_requisitions` (
  `id` int(11) NOT NULL,
  `requisition_code` varchar(50) NOT NULL,
  `requisition_date` date NOT NULL,
  `requested_by` int(11) NOT NULL,
  `requested_for` int(11) DEFAULT NULL COMMENT 'User ID who will receive the items',
  `department` varchar(100) DEFAULT NULL,
  `priority` enum('Low','Medium','High','Urgent') DEFAULT 'Medium',
  `status` enum('Draft','Pending','Approved','Rejected','Converted','Cancelled') DEFAULT 'Draft',
  `total_amount` decimal(15,2) DEFAULT 0.00,
  `currency_id` int(11) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `rejection_reason` text DEFAULT NULL,
  `approved_by` int(11) DEFAULT NULL,
  `approved_date` datetime DEFAULT NULL,
  `rejected_by` int(11) DEFAULT NULL,
  `rejected_date` datetime DEFAULT NULL,
  `converted_to_purchase_id` int(11) DEFAULT NULL COMMENT 'Purchase ID if converted',
  `store_id` int(11) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `created_date` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_date` datetime DEFAULT NULL ON UPDATE current_timestamp(),
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_purchase_requisition_approvals`
--

CREATE TABLE `db_purchase_requisition_approvals` (
  `id` int(11) NOT NULL,
  `requisition_id` int(11) NOT NULL,
  `approver_id` int(11) NOT NULL,
  `approval_level` int(11) DEFAULT 1,
  `status` enum('Pending','Approved','Rejected') DEFAULT 'Pending',
  `comments` text DEFAULT NULL,
  `action_date` datetime DEFAULT NULL,
  `created_date` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_purchase_requisition_items`
--

CREATE TABLE `db_purchase_requisition_items` (
  `id` int(11) NOT NULL,
  `requisition_id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `description` varchar(500) DEFAULT NULL,
  `requested_qty` decimal(15,2) NOT NULL,
  `unit_price` decimal(15,2) DEFAULT 0.00,
  `total_price` decimal(15,2) DEFAULT 0.00,
  `supplier_id` int(11) DEFAULT NULL COMMENT 'Preferred supplier',
  `notes` text DEFAULT NULL,
  `status` enum('Pending','Approved','Rejected','Partially_Approved') DEFAULT 'Pending',
  `approved_qty` decimal(15,2) DEFAULT NULL,
  `approved_unit_price` decimal(15,2) DEFAULT NULL,
  `approved_total_price` decimal(15,2) DEFAULT NULL,
  `rejection_reason` text DEFAULT NULL,
  `created_date` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_date` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Triggers `db_purchase_requisition_items`
--
CREATE TRIGGER `trg_requisition_items_total_price` BEFORE INSERT ON `db_purchase_requisition_items` FOR EACH ROW BEGIN
    SET NEW.total_price = NEW.requested_qty * NEW.unit_price;
END;

CREATE TRIGGER `trg_requisition_items_total_price_update` BEFORE UPDATE ON `db_purchase_requisition_items` FOR EACH ROW BEGIN
    SET NEW.total_price = NEW.requested_qty * NEW.unit_price;
END;

CREATE TRIGGER `trg_requisition_total_amount` AFTER INSERT ON `db_purchase_requisition_items` FOR EACH ROW BEGIN
    UPDATE `db_purchase_requisitions` 
    SET total_amount = (
        SELECT SUM(total_price) 
        FROM `db_purchase_requisition_items` 
        WHERE requisition_id = NEW.requisition_id
    )
    WHERE id = NEW.requisition_id;
END;

CREATE TRIGGER `trg_requisition_total_amount_delete` AFTER DELETE ON `db_purchase_requisition_items` FOR EACH ROW BEGIN
    UPDATE `db_purchase_requisitions` 
    SET total_amount = (
        SELECT COALESCE(SUM(total_price), 0) 
        FROM `db_purchase_requisition_items` 
        WHERE requisition_id = OLD.requisition_id
    )
    WHERE id = OLD.requisition_id;
END;

CREATE TRIGGER `trg_requisition_total_amount_update` AFTER UPDATE ON `db_purchase_requisition_items` FOR EACH ROW BEGIN
    UPDATE `db_purchase_requisitions` 
    SET total_amount = (
        SELECT SUM(total_price) 
        FROM `db_purchase_requisition_items` 
        WHERE requisition_id = NEW.requisition_id
    )
    WHERE id = NEW.requisition_id;
END;

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

--
-- Table structure for table `db_quotation`
--

CREATE TABLE `db_quotation` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `warehouse_id` int(5) DEFAULT NULL,
  `count_id` int(10) DEFAULT NULL COMMENT 'Use to create quotation Code',
  `quotation_code` varchar(50) DEFAULT NULL,
  `reference_no` varchar(50) DEFAULT NULL,
  `quotation_date` date DEFAULT NULL,
  `expire_date` date DEFAULT NULL,
  `quotation_status` varchar(50) DEFAULT NULL,
  `quotation_currency_id` int(11) DEFAULT NULL,
  `transaction_currency_id` int(11) DEFAULT NULL,
  `exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `base_currency_total` decimal(20,4) DEFAULT NULL,
  `customer_id` int(5) DEFAULT NULL,
  `other_charges_input` double(20,4) DEFAULT NULL,
  `other_charges_tax_id` int(5) DEFAULT NULL,
  `other_charges_amt` double(20,4) DEFAULT NULL,
  `discount_to_all_input` double(20,4) DEFAULT NULL,
  `discount_to_all_type` varchar(50) DEFAULT NULL,
  `tot_discount_to_all_amt` double(20,4) DEFAULT NULL,
  `subtotal` double(20,4) DEFAULT NULL,
  `round_off` double(20,4) DEFAULT NULL,
  `grand_total` double(20,4) DEFAULT NULL,
  `quotation_note` text DEFAULT NULL,
  `payment_status` varchar(50) DEFAULT NULL,
  `paid_amount` double(20,4) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `system_ip` varchar(100) DEFAULT NULL,
  `system_name` varchar(100) DEFAULT NULL,
  `company_id` int(5) DEFAULT NULL,
  `pos` int(1) DEFAULT NULL COMMENT '1=yes 0=no',
  `status` int(1) DEFAULT NULL,
  `return_bit` int(1) DEFAULT NULL COMMENT 'quotation return raised',
  `customer_previous_due` double(20,4) DEFAULT NULL,
  `customer_total_due` double(20,4) DEFAULT NULL,
  `sales_status` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_quotationitems`
--

CREATE TABLE `db_quotationitems` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `quotation_id` int(5) DEFAULT NULL,
  `quotation_status` varchar(50) DEFAULT NULL,
  `item_currency_id` int(11) DEFAULT NULL,
  `item_exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `base_currency_price` decimal(20,4) DEFAULT NULL,
  `item_id` int(5) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `quotation_qty` double(20,2) DEFAULT NULL,
  `price_per_unit` double(20,4) DEFAULT NULL,
  `tax_type` varchar(50) DEFAULT NULL,
  `tax_id` int(5) DEFAULT NULL,
  `tax_amt` double(20,4) DEFAULT NULL,
  `discount_type` varchar(50) DEFAULT NULL,
  `discount_input` double(20,4) DEFAULT NULL,
  `discount_amt` double(20,4) DEFAULT NULL,
  `unit_total_cost` double(20,4) DEFAULT NULL,
  `total_cost` double(20,4) DEFAULT NULL,
  `status` int(5) DEFAULT NULL,
  `seller_points` double(20,4) DEFAULT 0.0000
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_roles`
--

CREATE TABLE `db_roles` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `role_name` varchar(50) DEFAULT NULL,
  `description` mediumtext DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_roles`
--

INSERT INTO `db_roles` (`id`, `store_id`, `role_name`, `description`, `status`) VALUES
(1, 1, 'Admin', 'All Rights Permitted.', 1),
(2, 1, 'Store Admin', 'Note: Apply this role for New Store Admin. ', 1),
(8, NULL, 'Purchase Requisition Approver', 'Can approve purchase requisitions', NULL),
(31, 2, 'Manager', 'Manager Role', 1),
(32, 2, 'Cashier', 'Cashier Role', 1);

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

--
-- Table structure for table `db_sales`
--

CREATE TABLE `db_sales` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `warehouse_id` int(5) DEFAULT NULL,
  `init_code` varchar(100) DEFAULT NULL,
  `count_id` decimal(20,0) DEFAULT NULL COMMENT 'Use to create Sales Code',
  `sales_code` varchar(50) DEFAULT NULL,
  `reference_no` varchar(50) DEFAULT NULL,
  `sales_date` date DEFAULT NULL,
  `due_date` date DEFAULT NULL,
  `sales_status` varchar(50) DEFAULT NULL,
  `transaction_currency_id` int(11) DEFAULT NULL,
  `exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `base_currency_total` decimal(20,4) DEFAULT NULL,
  `customer_id` int(5) DEFAULT NULL,
  `other_charges_input` double(20,2) DEFAULT NULL,
  `other_charges_tax_id` int(5) DEFAULT NULL,
  `other_charges_amt` double(20,2) DEFAULT NULL,
  `discount_to_all_input` double(20,2) DEFAULT NULL,
  `discount_to_all_type` varchar(50) DEFAULT NULL,
  `tot_discount_to_all_amt` double(20,2) DEFAULT NULL,
  `subtotal` double(20,2) DEFAULT NULL,
  `round_off` double(20,2) DEFAULT NULL,
  `grand_total` double(20,4) DEFAULT NULL,
  `sales_note` text DEFAULT NULL,
  `payment_status` varchar(50) DEFAULT NULL,
  `paid_amount` double(20,4) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `system_ip` varchar(100) DEFAULT NULL,
  `system_name` varchar(100) DEFAULT NULL,
  `company_id` int(5) DEFAULT NULL,
  `pos` int(1) DEFAULT NULL COMMENT '1=yes 0=no',
  `status` int(1) DEFAULT NULL,
  `return_bit` int(1) DEFAULT NULL COMMENT 'sales return raised',
  `customer_previous_due` double(20,2) DEFAULT NULL,
  `customer_total_due` double(20,2) DEFAULT NULL,
  `quotation_id` int(5) DEFAULT NULL,
  `coupon_id` int(10) DEFAULT NULL,
  `coupon_amt` double(20,2) DEFAULT 0.00,
  `invoice_terms` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_salesitems`
--

CREATE TABLE `db_salesitems` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `sales_id` int(5) DEFAULT NULL,
  `sales_status` varchar(50) DEFAULT NULL,
  `item_currency_id` int(11) DEFAULT NULL,
  `item_exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `base_currency_price` decimal(20,4) DEFAULT NULL,
  `item_id` int(5) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `sales_qty` double(20,2) DEFAULT NULL,
  `price_per_unit` double(20,4) DEFAULT NULL,
  `tax_type` varchar(50) DEFAULT NULL,
  `tax_id` int(5) DEFAULT NULL,
  `tax_amt` double(20,4) DEFAULT NULL,
  `discount_type` varchar(50) DEFAULT NULL,
  `discount_input` double(20,4) DEFAULT NULL,
  `discount_amt` double(20,4) DEFAULT NULL,
  `unit_total_cost` double(20,4) DEFAULT NULL,
  `total_cost` double(20,4) DEFAULT NULL,
  `status` int(5) DEFAULT NULL,
  `seller_points` double(20,2) DEFAULT 0.00,
  `purchase_price` double(20,3) DEFAULT 0.000,
  `batch_number` varchar(100) DEFAULT NULL,
  `manufacturing_date` date DEFAULT NULL,
  `expiry_date` date DEFAULT NULL,
  `price_type` enum('retail','wholesale','purchase') NOT NULL DEFAULT 'retail'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_salesitemsreturn`
--

CREATE TABLE `db_salesitemsreturn` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `sales_id` int(5) DEFAULT NULL,
  `return_id` int(5) DEFAULT NULL,
  `return_status` varchar(50) DEFAULT NULL,
  `item_id` int(5) DEFAULT NULL,
  `return_qty` double(20,2) DEFAULT NULL,
  `price_per_unit` double(20,4) DEFAULT NULL,
  `tax_type` varchar(50) DEFAULT NULL,
  `tax_id` int(5) DEFAULT NULL,
  `tax_amt` double(20,4) DEFAULT NULL,
  `discount_input` double(20,4) DEFAULT NULL,
  `discount_amt` double(20,4) DEFAULT NULL,
  `discount_type` varchar(50) DEFAULT NULL,
  `unit_total_cost` double(20,4) DEFAULT NULL,
  `total_cost` double(20,4) DEFAULT NULL,
  `status` int(5) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `purchase_price` double(20,3) DEFAULT 0.000
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_salespayments`
--

CREATE TABLE `db_salespayments` (
  `id` int(5) NOT NULL,
  `count_id` int(5) DEFAULT NULL,
  `payment_code` varchar(50) DEFAULT NULL,
  `store_id` int(11) DEFAULT NULL,
  `sales_id` int(5) DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `payment_type` varchar(50) DEFAULT NULL,
  `payment_currency_id` int(11) DEFAULT NULL,
  `exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `base_currency_amount` decimal(20,4) DEFAULT NULL,
  `payment` double(20,4) DEFAULT NULL,
  `payment_note` text DEFAULT NULL,
  `change_return` double(20,4) DEFAULT NULL COMMENT 'Refunding the greater amount',
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `created_time` varchar(50) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `account_id` int(5) DEFAULT NULL,
  `customer_id` int(5) DEFAULT NULL,
  `short_code` varchar(50) DEFAULT NULL,
  `advance_adjusted` double(20,4) DEFAULT NULL,
  `cheque_number` varchar(100) DEFAULT NULL,
  `cheque_period` int(10) DEFAULT NULL,
  `cheque_status` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_salespaymentsreturn`
--

CREATE TABLE `db_salespaymentsreturn` (
  `id` int(5) NOT NULL,
  `count_id` int(5) DEFAULT NULL,
  `payment_code` varchar(50) DEFAULT NULL,
  `store_id` int(11) DEFAULT NULL,
  `sales_id` int(5) DEFAULT NULL,
  `return_id` int(5) DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `payment_type` varchar(50) DEFAULT NULL,
  `payment` double(20,4) DEFAULT NULL,
  `payment_note` text DEFAULT NULL,
  `change_return` double(20,4) DEFAULT NULL COMMENT 'Refunding the greater amount',
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `created_time` time DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `account_id` int(5) DEFAULT NULL,
  `customer_id` int(5) DEFAULT NULL,
  `short_code` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_salesreturn`
--

CREATE TABLE `db_salesreturn` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `count_id` int(10) DEFAULT NULL COMMENT 'Use to create Sales Return Code',
  `sales_id` int(5) DEFAULT NULL,
  `warehouse_id` int(5) DEFAULT NULL,
  `return_code` varchar(50) DEFAULT NULL,
  `reference_no` varchar(50) DEFAULT NULL,
  `return_date` date DEFAULT NULL,
  `return_status` varchar(50) DEFAULT NULL,
  `customer_id` int(5) DEFAULT NULL,
  `currency_id` int(5) DEFAULT NULL,
  `currency_symbol` varchar(10) DEFAULT NULL,
  `exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `base_currency_total` decimal(20,4) DEFAULT NULL,
  `other_charges_input` double(20,4) DEFAULT NULL,
  `other_charges_tax_id` int(5) DEFAULT NULL,
  `other_charges_amt` double(20,4) DEFAULT NULL,
  `discount_to_all_input` double(20,4) DEFAULT NULL,
  `discount_to_all_type` varchar(50) DEFAULT NULL,
  `tot_discount_to_all_amt` double(20,4) DEFAULT NULL,
  `subtotal` double(20,4) DEFAULT NULL,
  `round_off` double(20,4) DEFAULT NULL,
  `grand_total` double(20,4) DEFAULT NULL,
  `return_note` text DEFAULT NULL,
  `payment_status` varchar(50) DEFAULT NULL,
  `paid_amount` double(20,4) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `system_ip` varchar(100) DEFAULT NULL,
  `system_name` varchar(100) DEFAULT NULL,
  `company_id` int(5) DEFAULT NULL,
  `pos` int(1) DEFAULT NULL COMMENT '1=yes 0=no',
  `status` int(1) DEFAULT NULL,
  `return_bit` int(1) DEFAULT NULL COMMENT 'Return raised or not 1 or null',
  `coupon_id` int(11) DEFAULT NULL,
  `coupon_amt` double(20,2) DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_shippingaddress`
--

CREATE TABLE `db_shippingaddress` (
  `id` int(10) NOT NULL,
  `store_id` int(10) DEFAULT NULL,
  `country_id` int(10) DEFAULT NULL,
  `state_id` int(10) DEFAULT NULL,
  `city` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `postcode` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `address` text CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `customer_id` int(10) DEFAULT NULL,
  `location_link` text CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_shippingaddress`
--

INSERT INTO `db_shippingaddress` (`id`, `store_id`, `country_id`, `state_id`, `city`, `postcode`, `address`, `status`, `customer_id`, `location_link`) VALUES
(1, 1, 1, NULL, NULL, '', '', 1, 1, NULL);

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

--
-- Table structure for table `db_sitesettings`
--

CREATE TABLE `db_sitesettings` (
  `id` int(5) NOT NULL,
  `version` varchar(10) DEFAULT NULL,
  `site_name` varchar(100) DEFAULT NULL,
  `logo` mediumtext DEFAULT NULL COMMENT 'path',
  `machine_id` text DEFAULT NULL,
  `domain` text DEFAULT NULL,
  `unique_code` text DEFAULT NULL,
  `pwa_auto_refresh_enabled` tinyint(1) DEFAULT 0 COMMENT 'Enable/disable auto-refresh',
  `pwa_refresh_interval` int(11) DEFAULT 300000 COMMENT 'Refresh interval in milliseconds (default: 5 minutes)',
  `pwa_smart_refresh` tinyint(1) DEFAULT 1 COMMENT 'Enable smart refresh (only when data changes)',
  `pwa_enabled` tinyint(1) DEFAULT 0 COMMENT 'Enable/disable PWA functionality'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_sitesettings`
--

INSERT INTO `db_sitesettings` (`id`, `version`, `site_name`, `logo`, `machine_id`, `domain`, `unique_code`, `pwa_auto_refresh_enabled`, `pwa_refresh_interval`, `pwa_smart_refresh`, `pwa_enabled`) VALUES
(1, '3.4', 'NCS Billing System', '/uploads/site/billing-book2.png', '1', 'http://localhost/erpsystem', 'gnjedlqy0ohmfp47r5itvcx8ska3z9', 0, 300000, 1, 1);

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

--
-- Table structure for table `db_smsapi`
--

CREATE TABLE `db_smsapi` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `info` varchar(150) DEFAULT NULL,
  `key` varchar(600) DEFAULT NULL,
  `key_value` varchar(600) DEFAULT NULL,
  `delete_bit` int(5) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_smsapi`
--

INSERT INTO `db_smsapi` (`id`, `store_id`, `info`, `key`, `key_value`, `delete_bit`) VALUES
(37, 1, 'url', 'weblink', 'https://api.africastalking.com/version1/messaging', NULL),
(38, 1, 'mobile', 'to', '', NULL),
(39, 1, 'message', 'message', '', NULL),
(40, 1, 'username', 'username', 'YOUR_AFRICASTALKING_USERNAME', NULL),
(41, 1, 'apikey', 'apikey', 'YOUR_AFRICASTALKING_API_KEY', NULL),
(42, 1, 'sender', 'from', 'YOUR_SENDER_ID', NULL),
(43, 2, 'url', 'weblink', 'https://api.africastalking.com/restless/send', NULL),
(44, 2, 'mobile', 'to', '', NULL),
(45, 2, 'message', 'message', '', NULL),
(46, 2, 'username', 'username', 'YOUR_USERNAME', NULL),
(47, 2, 'apikey', 'Apikey', 'YOUR_API_KEY', NULL);

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

--
-- Table structure for table `db_smstemplates`
--

CREATE TABLE `db_smstemplates` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `template_name` varchar(100) DEFAULT NULL,
  `content` text DEFAULT NULL,
  `variables` text DEFAULT NULL,
  `status` int(5) DEFAULT NULL,
  `undelete_bit` int(5) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_smstemplates`
--

INSERT INTO `db_smstemplates` (`id`, `store_id`, `template_name`, `content`, `variables`, `status`, `undelete_bit`) VALUES
(1, 2, 'GREETING TO CUSTOMER ON SALES', 'Hi {{customer_name}}, Your sales Id is {{sales_id}}, Sales Date {{sales_date}}, Total amount {{sales_amount}}, You have paid {{paid_amt}}, and due amount is {{due_amt}}. Thank you Visit Again - {{store_name}}', 'customer_name,sales_id,sales_date,sales_amount,paid_amt,due_amt,store_name', 1, NULL),
(2, 2, 'GREETING TO CUSTOMER ON SALES RETURN', 'Hi {{customer_name}}, Your return Id is {{return_id}}, Return Date {{return_date}}, Return amount {{return_amount}}, You have received {{paid_amt}}, and due amount is {{due_amt}}. Thank you Visit Again - {{store_name}}', 'customer_name,return_id,return_date,return_amount,paid_amt,due_amt,store_name', 1, NULL);

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

--
-- Table structure for table `db_sobpayments`
--

CREATE TABLE `db_sobpayments` (
  `id` int(5) NOT NULL,
  `supplier_id` int(5) DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `payment_type` varchar(50) DEFAULT NULL,
  `payment` double(10,2) DEFAULT NULL,
  `payment_note` mediumtext DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `created_time` time DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_states`
--

CREATE TABLE `db_states` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `state_code` varchar(10) DEFAULT NULL,
  `state` varchar(4050) DEFAULT NULL,
  `country_code` varchar(15) DEFAULT NULL,
  `country_id` int(5) DEFAULT NULL,
  `country` varchar(15) DEFAULT NULL,
  `added_on` date DEFAULT NULL,
  `company_id` int(5) DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_states`
--

INSERT INTO `db_states` (`id`, `store_id`, `state_code`, `state`, `country_code`, `country_id`, `country`, `added_on`, `company_id`, `status`) VALUES
(1, NULL, NULL, 'Adrar', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(2, NULL, NULL, 'Chlef', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(3, NULL, NULL, 'Laghouat', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(4, NULL, NULL, 'Oum El Bouaghi', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(5, NULL, NULL, 'Batna', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(6, NULL, NULL, 'Béjaïa', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(7, NULL, NULL, 'Biskra', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(8, NULL, NULL, 'Béchar', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(9, NULL, NULL, 'Blida', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(10, NULL, NULL, 'Bouïra', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(11, NULL, NULL, 'Tamanrasset', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(12, NULL, NULL, 'Tébessa', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(13, NULL, NULL, 'Tlemcen', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(14, NULL, NULL, 'Tiaret', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(15, NULL, NULL, 'Tizi Ouzou', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(16, NULL, NULL, 'Algiers', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(17, NULL, NULL, 'Djelfa', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(18, NULL, NULL, 'Jijel', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(19, NULL, NULL, 'Sétif', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(20, NULL, NULL, 'Saïda', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(21, NULL, NULL, 'Skikda', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(22, NULL, NULL, 'Sidi Bel Abbès', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(23, NULL, NULL, 'Annaba', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(24, NULL, NULL, 'Guelma', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(25, NULL, NULL, 'Constantine', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(26, NULL, NULL, 'Médéa', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(27, NULL, NULL, 'Mostaganem', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(28, NULL, NULL, 'M\'Sila', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(29, NULL, NULL, 'Mascara', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(30, NULL, NULL, 'Ouargla', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(31, NULL, NULL, 'Oran', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(32, NULL, NULL, 'El Bayadh', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(33, NULL, NULL, 'Illizi', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(34, NULL, NULL, 'Bordj Bou Arréridj', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(35, NULL, NULL, 'Boumerdès', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(36, NULL, NULL, 'El Tarf', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(37, NULL, NULL, 'Tindouf', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(38, NULL, NULL, 'Tissemsilt', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(39, NULL, NULL, 'El Oued', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(40, NULL, NULL, 'Khenchela', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(41, NULL, NULL, 'Souk Ahras', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(42, NULL, NULL, 'Tipaza', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(43, NULL, NULL, 'Mila', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(44, NULL, NULL, 'Aïn Defla', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(45, NULL, NULL, 'Naâma', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(46, NULL, NULL, 'Aïn Témouchent', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(47, NULL, NULL, 'Ghardaïa', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(48, NULL, NULL, 'Relizane', NULL, 4, 'Algeria', '2025-09-07', 1, 1),
(49, NULL, NULL, 'Bengo', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(50, NULL, NULL, 'Benguela', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(51, NULL, NULL, 'Bié', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(52, NULL, NULL, 'Cabinda', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(53, NULL, NULL, 'Cuando Cubango', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(54, NULL, NULL, 'Cuanza Norte', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(55, NULL, NULL, 'Cuanza Sul', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(56, NULL, NULL, 'Cunene', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(57, NULL, NULL, 'Huambo', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(58, NULL, NULL, 'Huíla', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(59, NULL, NULL, 'Luanda', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(60, NULL, NULL, 'Lunda Norte', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(61, NULL, NULL, 'Lunda Sul', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(62, NULL, NULL, 'Malanje', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(63, NULL, NULL, 'Moxico', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(64, NULL, NULL, 'Namibe', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(65, NULL, NULL, 'Uíge', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(66, NULL, NULL, 'Zaire', NULL, 6, 'Angola', '2025-09-07', 1, 1),
(67, NULL, NULL, 'New South Wales', NULL, 10, 'Australia', '2025-09-07', 1, 1),
(68, NULL, NULL, 'Victoria', NULL, 10, 'Australia', '2025-09-07', 1, 1),
(69, NULL, NULL, 'Queensland', NULL, 10, 'Australia', '2025-09-07', 1, 1),
(70, NULL, NULL, 'Western Australia', NULL, 10, 'Australia', '2025-09-07', 1, 1),
(71, NULL, NULL, 'South Australia', NULL, 10, 'Australia', '2025-09-07', 1, 1),
(72, NULL, NULL, 'Tasmania', NULL, 10, 'Australia', '2025-09-07', 1, 1),
(73, NULL, NULL, 'Australian Capital Territory', NULL, 10, 'Australia', '2025-09-07', 1, 1),
(74, NULL, NULL, 'Northern Territory', NULL, 10, 'Australia', '2025-09-07', 1, 1),
(75, NULL, NULL, 'Central', NULL, 24, 'Botswana', '2025-09-07', 1, 1),
(76, NULL, NULL, 'Ghanzi', NULL, 24, 'Botswana', '2025-09-07', 1, 1),
(77, NULL, NULL, 'Kgalagadi', NULL, 24, 'Botswana', '2025-09-07', 1, 1),
(78, NULL, NULL, 'Kgatleng', NULL, 24, 'Botswana', '2025-09-07', 1, 1),
(79, NULL, NULL, 'Kweneng', NULL, 24, 'Botswana', '2025-09-07', 1, 1),
(80, NULL, NULL, 'North East', NULL, 24, 'Botswana', '2025-09-07', 1, 1),
(81, NULL, NULL, 'North West', NULL, 24, 'Botswana', '2025-09-07', 1, 1),
(82, NULL, NULL, 'South East', NULL, 24, 'Botswana', '2025-09-07', 1, 1),
(83, NULL, NULL, 'Southern', NULL, 24, 'Botswana', '2025-09-07', 1, 1),
(84, NULL, NULL, 'Boucle du Mouhoun', NULL, 28, 'Burkina Faso', '2025-09-07', 1, 1),
(85, NULL, NULL, 'Cascades', NULL, 28, 'Burkina Faso', '2025-09-07', 1, 1),
(86, NULL, NULL, 'Centre', NULL, 28, 'Burkina Faso', '2025-09-07', 1, 1),
(87, NULL, NULL, 'Centre-Est', NULL, 28, 'Burkina Faso', '2025-09-07', 1, 1),
(88, NULL, NULL, 'Centre-Nord', NULL, 28, 'Burkina Faso', '2025-09-07', 1, 1),
(89, NULL, NULL, 'Centre-Ouest', NULL, 28, 'Burkina Faso', '2025-09-07', 1, 1),
(90, NULL, NULL, 'Centre-Sud', NULL, 28, 'Burkina Faso', '2025-09-07', 1, 1),
(91, NULL, NULL, 'Est', NULL, 28, 'Burkina Faso', '2025-09-07', 1, 1),
(92, NULL, NULL, 'Hauts-Bassins', NULL, 28, 'Burkina Faso', '2025-09-07', 1, 1),
(93, NULL, NULL, 'Nord', NULL, 28, 'Burkina Faso', '2025-09-07', 1, 1),
(94, NULL, NULL, 'Plateau-Central', NULL, 28, 'Burkina Faso', '2025-09-07', 1, 1),
(95, NULL, NULL, 'Sahel', NULL, 28, 'Burkina Faso', '2025-09-07', 1, 1),
(96, NULL, NULL, 'Sud-Ouest', NULL, 28, 'Burkina Faso', '2025-09-07', 1, 1),
(97, NULL, NULL, 'Bubanza', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(98, NULL, NULL, 'Bujumbura Mairie', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(99, NULL, NULL, 'Bujumbura Rural', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(100, NULL, NULL, 'Bururi', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(101, NULL, NULL, 'Cankuzo', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(102, NULL, NULL, 'Cibitoke', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(103, NULL, NULL, 'Gitega', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(104, NULL, NULL, 'Karuzi', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(105, NULL, NULL, 'Kayanza', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(106, NULL, NULL, 'Kirundo', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(107, NULL, NULL, 'Makamba', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(108, NULL, NULL, 'Muramvya', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(109, NULL, NULL, 'Muyinga', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(110, NULL, NULL, 'Mwaro', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(111, NULL, NULL, 'Ngozi', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(112, NULL, NULL, 'Rumonge', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(113, NULL, NULL, 'Rutana', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(114, NULL, NULL, 'Ruyigi', NULL, 30, 'Burundi', '2025-09-07', 1, 1),
(115, NULL, NULL, 'Adamaoua', NULL, 32, 'Cameroon', '2025-09-07', 1, 1),
(116, NULL, NULL, 'Centre', NULL, 32, 'Cameroon', '2025-09-07', 1, 1),
(117, NULL, NULL, 'Est', NULL, 32, 'Cameroon', '2025-09-07', 1, 1),
(118, NULL, NULL, 'Extrême-Nord', NULL, 32, 'Cameroon', '2025-09-07', 1, 1),
(119, NULL, NULL, 'Littoral', NULL, 32, 'Cameroon', '2025-09-07', 1, 1),
(120, NULL, NULL, 'Nord', NULL, 32, 'Cameroon', '2025-09-07', 1, 1),
(121, NULL, NULL, 'Nord-Ouest', NULL, 32, 'Cameroon', '2025-09-07', 1, 1),
(122, NULL, NULL, 'Ouest', NULL, 32, 'Cameroon', '2025-09-07', 1, 1),
(123, NULL, NULL, 'Sud', NULL, 32, 'Cameroon', '2025-09-07', 1, 1),
(124, NULL, NULL, 'Sud-Ouest', NULL, 32, 'Cameroon', '2025-09-07', 1, 1),
(125, NULL, NULL, 'Alberta', NULL, 33, 'Canada', '2025-09-07', 1, 1),
(126, NULL, NULL, 'British Columbia', NULL, 33, 'Canada', '2025-09-07', 1, 1),
(127, NULL, NULL, 'Manitoba', NULL, 33, 'Canada', '2025-09-07', 1, 1),
(128, NULL, NULL, 'New Brunswick', NULL, 33, 'Canada', '2025-09-07', 1, 1),
(129, NULL, NULL, 'Newfoundland and Labrador', NULL, 33, 'Canada', '2025-09-07', 1, 1),
(130, NULL, NULL, 'Northwest Territories', NULL, 33, 'Canada', '2025-09-07', 1, 1),
(131, NULL, NULL, 'Nova Scotia', NULL, 33, 'Canada', '2025-09-07', 1, 1),
(132, NULL, NULL, 'Nunavut', NULL, 33, 'Canada', '2025-09-07', 1, 1),
(133, NULL, NULL, 'Ontario', NULL, 33, 'Canada', '2025-09-07', 1, 1),
(134, NULL, NULL, 'Prince Edward Island', NULL, 33, 'Canada', '2025-09-07', 1, 1),
(135, NULL, NULL, 'Quebec', NULL, 33, 'Canada', '2025-09-07', 1, 1),
(136, NULL, NULL, 'Saskatchewan', NULL, 33, 'Canada', '2025-09-07', 1, 1),
(137, NULL, NULL, 'Yukon', NULL, 33, 'Canada', '2025-09-07', 1, 1),
(138, NULL, NULL, 'Barlavento Islands', NULL, 34, 'Cape Verde', '2025-09-07', 1, 1),
(139, NULL, NULL, 'Sotavento Islands', NULL, 34, 'Cape Verde', '2025-09-07', 1, 1),
(140, NULL, NULL, 'Bamingui-Bangoran', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(141, NULL, NULL, 'Basse-Kotto', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(142, NULL, NULL, 'Haute-Kotto', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(143, NULL, NULL, 'Haut-Mbomou', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(144, NULL, NULL, 'Kémo', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(145, NULL, NULL, 'Lobaye', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(146, NULL, NULL, 'Mambéré-Kadéï', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(147, NULL, NULL, 'Mbomou', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(148, NULL, NULL, 'Nana-Grébizi', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(149, NULL, NULL, 'Ombella-M\'Poko', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(150, NULL, NULL, 'Ouaka', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(151, NULL, NULL, 'Ouham', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(152, NULL, NULL, 'Ouham-Pendé', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(153, NULL, NULL, 'Sangha-Mbaéré', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(154, NULL, NULL, 'Vakaga', NULL, 35, 'Central African', '2025-09-07', 1, 1),
(155, NULL, NULL, 'Batha', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(156, NULL, NULL, 'Chari-Baguirmi', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(157, NULL, NULL, 'Hadjer-Lamis', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(158, NULL, NULL, 'Wadi Fira', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(159, NULL, NULL, 'Bahr el Gazel', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(160, NULL, NULL, 'Borkou', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(161, NULL, NULL, 'Ennedi-Est', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(162, NULL, NULL, 'Ennedi-Ouest', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(163, NULL, NULL, 'Guéra', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(164, NULL, NULL, 'Kanem', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(165, NULL, NULL, 'Lac', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(166, NULL, NULL, 'Logone Occidental', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(167, NULL, NULL, 'Logone Oriental', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(168, NULL, NULL, 'Mandoul', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(169, NULL, NULL, 'Mayo-Kebbi Est', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(170, NULL, NULL, 'Mayo-Kebbi Ouest', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(171, NULL, NULL, 'Moyen-Chari', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(172, NULL, NULL, 'Ouaddaï', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(173, NULL, NULL, 'Salamat', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(174, NULL, NULL, 'Sila', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(175, NULL, NULL, 'Tandjilé', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(176, NULL, NULL, 'Tibesti', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(177, NULL, NULL, 'N\'Djamena', NULL, 36, 'Chad', '2025-09-07', 1, 1),
(178, NULL, NULL, 'Anjouan', NULL, 40, 'Comoros', '2025-09-07', 1, 1),
(179, NULL, NULL, 'Grande Comore', NULL, 40, 'Comoros', '2025-09-07', 1, 1),
(180, NULL, NULL, 'Mohéli', NULL, 40, 'Comoros', '2025-09-07', 1, 1),
(181, NULL, NULL, 'Ali Sabieh', NULL, 50, 'Djibouti', '2025-09-07', 1, 1),
(182, NULL, NULL, 'Arta', NULL, 50, 'Djibouti', '2025-09-07', 1, 1),
(183, NULL, NULL, 'Dikhil', NULL, 50, 'Djibouti', '2025-09-07', 1, 1),
(184, NULL, NULL, 'Djibouti', NULL, 50, 'Djibouti', '2025-09-07', 1, 1),
(185, NULL, NULL, 'Obock', NULL, 50, 'Djibouti', '2025-09-07', 1, 1),
(186, NULL, NULL, 'Tadjourah', NULL, 50, 'Djibouti', '2025-09-07', 1, 1),
(187, NULL, NULL, 'Cairo', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(188, NULL, NULL, 'Giza', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(189, NULL, NULL, 'Alexandria', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(190, NULL, NULL, 'Dakahlia', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(191, NULL, NULL, 'Red Sea', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(192, NULL, NULL, 'Beheira', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(193, NULL, NULL, 'Fayyum', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(194, NULL, NULL, 'Gharbia', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(195, NULL, NULL, 'Ismailia', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(196, NULL, NULL, 'Monufia', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(197, NULL, NULL, 'Minya', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(198, NULL, NULL, 'Qalyubia', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(199, NULL, NULL, 'New Valley', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(200, NULL, NULL, 'Suez', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(201, NULL, NULL, 'Aswan', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(202, NULL, NULL, 'Assiut', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(203, NULL, NULL, 'Beni Suef', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(204, NULL, NULL, 'Port Said', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(205, NULL, NULL, 'Damietta', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(206, NULL, NULL, 'Sharqia', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(207, NULL, NULL, 'South Sinai', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(208, NULL, NULL, 'Kafr el-Sheikh', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(209, NULL, NULL, 'Matrouh', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(210, NULL, NULL, 'Luxor', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(211, NULL, NULL, 'Qena', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(212, NULL, NULL, 'North Sinai', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(213, NULL, NULL, 'Sohag', NULL, 55, 'Egypt', '2025-09-07', 1, 1),
(214, NULL, NULL, 'Annobón', NULL, 57, 'Equatorial Guin', '2025-09-07', 1, 1),
(215, NULL, NULL, 'Bioko Norte', NULL, 57, 'Equatorial Guin', '2025-09-07', 1, 1),
(216, NULL, NULL, 'Bioko Sur', NULL, 57, 'Equatorial Guin', '2025-09-07', 1, 1),
(217, NULL, NULL, 'Centro Sur', NULL, 57, 'Equatorial Guin', '2025-09-07', 1, 1),
(218, NULL, NULL, 'Kié-Ntem', NULL, 57, 'Equatorial Guin', '2025-09-07', 1, 1),
(219, NULL, NULL, 'Litoral', NULL, 57, 'Equatorial Guin', '2025-09-07', 1, 1),
(220, NULL, NULL, 'Wele-Nzas', NULL, 57, 'Equatorial Guin', '2025-09-07', 1, 1),
(221, NULL, NULL, 'Anseba', NULL, 58, 'Eritrea', '2025-09-07', 1, 1),
(222, NULL, NULL, 'Debub', NULL, 58, 'Eritrea', '2025-09-07', 1, 1),
(223, NULL, NULL, 'Debub-Keih-Bahri', NULL, 58, 'Eritrea', '2025-09-07', 1, 1),
(224, NULL, NULL, 'Gash-Barka', NULL, 58, 'Eritrea', '2025-09-07', 1, 1),
(225, NULL, NULL, 'Ma\'akel', NULL, 58, 'Eritrea', '2025-09-07', 1, 1),
(226, NULL, NULL, 'Semenawi-Keih-Bahri', NULL, 58, 'Eritrea', '2025-09-07', 1, 1),
(227, NULL, NULL, 'Addis Ababa', NULL, 60, 'Ethiopia', '2025-09-07', 1, 1),
(228, NULL, NULL, 'Afar', NULL, 60, 'Ethiopia', '2025-09-07', 1, 1),
(229, NULL, NULL, 'Amhara', NULL, 60, 'Ethiopia', '2025-09-07', 1, 1),
(230, NULL, NULL, 'Benishangul-Gumuz', NULL, 60, 'Ethiopia', '2025-09-07', 1, 1),
(231, NULL, NULL, 'Dire Dawa', NULL, 60, 'Ethiopia', '2025-09-07', 1, 1),
(232, NULL, NULL, 'Gambela', NULL, 60, 'Ethiopia', '2025-09-07', 1, 1),
(233, NULL, NULL, 'Harari', NULL, 60, 'Ethiopia', '2025-09-07', 1, 1),
(234, NULL, NULL, 'Oromia', NULL, 60, 'Ethiopia', '2025-09-07', 1, 1),
(235, NULL, NULL, 'Sidama', NULL, 60, 'Ethiopia', '2025-09-07', 1, 1),
(236, NULL, NULL, 'Somali', NULL, 60, 'Ethiopia', '2025-09-07', 1, 1),
(237, NULL, NULL, 'South West Ethiopia Peoples', NULL, 60, 'Ethiopia', '2025-09-07', 1, 1),
(238, NULL, NULL, 'Southern Nations, Nationalities, and Peoples', NULL, 60, 'Ethiopia', '2025-09-07', 1, 1),
(239, NULL, NULL, 'Tigray', NULL, 60, 'Ethiopia', '2025-09-07', 1, 1),
(240, NULL, NULL, 'Auvergne-Rhône-Alpes', NULL, 63, 'France', '2025-09-07', 1, 1),
(241, NULL, NULL, 'Bourgogne-Franche-Comté', NULL, 63, 'France', '2025-09-07', 1, 1),
(242, NULL, NULL, 'Brittany', NULL, 63, 'France', '2025-09-07', 1, 1),
(243, NULL, NULL, 'Centre-Val de Loire', NULL, 63, 'France', '2025-09-07', 1, 1),
(244, NULL, NULL, 'Corsica', NULL, 63, 'France', '2025-09-07', 1, 1),
(245, NULL, NULL, 'Grand Est', NULL, 63, 'France', '2025-09-07', 1, 1),
(246, NULL, NULL, 'Hauts-de-France', NULL, 63, 'France', '2025-09-07', 1, 1),
(247, NULL, NULL, 'Île-de-France', NULL, 63, 'France', '2025-09-07', 1, 1),
(248, NULL, NULL, 'Normandy', NULL, 63, 'France', '2025-09-07', 1, 1),
(249, NULL, NULL, 'Nouvelle-Aquitaine', NULL, 63, 'France', '2025-09-07', 1, 1),
(250, NULL, NULL, 'Occitanie', NULL, 63, 'France', '2025-09-07', 1, 1),
(251, NULL, NULL, 'Pays de la Loire', NULL, 63, 'France', '2025-09-07', 1, 1),
(252, NULL, NULL, 'Provence-Alpes-Côte d\'Azur', NULL, 63, 'France', '2025-09-07', 1, 1),
(253, NULL, NULL, 'Banjul', NULL, 65, 'Gambia', '2025-09-07', 1, 1),
(254, NULL, NULL, 'Central River', NULL, 65, 'Gambia', '2025-09-07', 1, 1),
(255, NULL, NULL, 'Lower River', NULL, 65, 'Gambia', '2025-09-07', 1, 1),
(256, NULL, NULL, 'North Bank', NULL, 65, 'Gambia', '2025-09-07', 1, 1),
(257, NULL, NULL, 'Upper River', NULL, 65, 'Gambia', '2025-09-07', 1, 1),
(258, NULL, NULL, 'West Coast', NULL, 65, 'Gambia', '2025-09-07', 1, 1),
(259, NULL, NULL, 'Baden-Württemberg', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(260, NULL, NULL, 'Bavaria', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(261, NULL, NULL, 'Berlin', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(262, NULL, NULL, 'Brandenburg', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(263, NULL, NULL, 'Bremen', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(264, NULL, NULL, 'Hamburg', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(265, NULL, NULL, 'Hesse', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(266, NULL, NULL, 'Lower Saxony', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(267, NULL, NULL, 'Mecklenburg-Vorpommern', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(268, NULL, NULL, 'North Rhine-Westphalia', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(269, NULL, NULL, 'Rhineland-Palatinate', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(270, NULL, NULL, 'Saarland', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(271, NULL, NULL, 'Saxony', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(272, NULL, NULL, 'Saxony-Anhalt', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(273, NULL, NULL, 'Schleswig-Holstein', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(274, NULL, NULL, 'Thuringia', NULL, 67, 'Germany', '2025-09-07', 1, 1),
(275, NULL, NULL, 'Greater Accra', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(276, NULL, NULL, 'Ashanti', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(277, NULL, NULL, 'Western', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(278, NULL, NULL, 'Central', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(279, NULL, NULL, 'Volta', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(280, NULL, NULL, 'Eastern', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(281, NULL, NULL, 'Northern', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(282, NULL, NULL, 'Upper East', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(283, NULL, NULL, 'Upper West', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(284, NULL, NULL, 'Brong-Ahafo', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(285, NULL, NULL, 'Western North', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(286, NULL, NULL, 'Ahafo', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(287, NULL, NULL, 'Bono', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(288, NULL, NULL, 'Bono East', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(289, NULL, NULL, 'Oti', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(290, NULL, NULL, 'Savannah', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(291, NULL, NULL, 'North East', NULL, 68, 'Ghana', '2025-09-07', 1, 1),
(292, NULL, NULL, 'Boké', NULL, 72, 'Guinea', '2025-09-07', 1, 1),
(293, NULL, NULL, 'Conakry', NULL, 72, 'Guinea', '2025-09-07', 1, 1),
(294, NULL, NULL, 'Faranah', NULL, 72, 'Guinea', '2025-09-07', 1, 1),
(295, NULL, NULL, 'Kankan', NULL, 72, 'Guinea', '2025-09-07', 1, 1),
(296, NULL, NULL, 'Kindia', NULL, 72, 'Guinea', '2025-09-07', 1, 1),
(297, NULL, NULL, 'Labé', NULL, 72, 'Guinea', '2025-09-07', 1, 1),
(298, NULL, NULL, 'Mamou', NULL, 72, 'Guinea', '2025-09-07', 1, 1),
(299, NULL, NULL, 'Nzérékoré', NULL, 72, 'Guinea', '2025-09-07', 1, 1),
(300, NULL, NULL, 'Bafatá', NULL, 73, 'Guinea-Bissau', '2025-09-07', 1, 1),
(301, NULL, NULL, 'Biombo', NULL, 73, 'Guinea-Bissau', '2025-09-07', 1, 1),
(302, NULL, NULL, 'Bissau', NULL, 73, 'Guinea-Bissau', '2025-09-07', 1, 1),
(303, NULL, NULL, 'Bolama', NULL, 73, 'Guinea-Bissau', '2025-09-07', 1, 1),
(304, NULL, NULL, 'Cacheu', NULL, 73, 'Guinea-Bissau', '2025-09-07', 1, 1),
(305, NULL, NULL, 'Gabú', NULL, 73, 'Guinea-Bissau', '2025-09-07', 1, 1),
(306, NULL, NULL, 'Oio', NULL, 73, 'Guinea-Bissau', '2025-09-07', 1, 1),
(307, NULL, NULL, 'Quinara', NULL, 73, 'Guinea-Bissau', '2025-09-07', 1, 1),
(308, NULL, NULL, 'Tombali', NULL, 73, 'Guinea-Bissau', '2025-09-07', 1, 1),
(309, NULL, NULL, 'Andhra Pradesh', NULL, 79, 'India', '2025-09-07', 1, 1),
(310, NULL, NULL, 'Arunachal Pradesh', NULL, 79, 'India', '2025-09-07', 1, 1),
(311, NULL, NULL, 'Assam', NULL, 79, 'India', '2025-09-07', 1, 1),
(312, NULL, NULL, 'Bihar', NULL, 79, 'India', '2025-09-07', 1, 1),
(313, NULL, NULL, 'Chhattisgarh', NULL, 79, 'India', '2025-09-07', 1, 1),
(314, NULL, NULL, 'Goa', NULL, 79, 'India', '2025-09-07', 1, 1),
(315, NULL, NULL, 'Gujarat', NULL, 79, 'India', '2025-09-07', 1, 1),
(316, NULL, NULL, 'Haryana', NULL, 79, 'India', '2025-09-07', 1, 1),
(317, NULL, NULL, 'Himachal Pradesh', NULL, 79, 'India', '2025-09-07', 1, 1),
(318, NULL, NULL, 'Jharkhand', NULL, 79, 'India', '2025-09-07', 1, 1),
(319, NULL, NULL, 'Karnataka', NULL, 79, 'India', '2025-09-07', 1, 1),
(320, NULL, NULL, 'Kerala', NULL, 79, 'India', '2025-09-07', 1, 1),
(321, NULL, NULL, 'Madhya Pradesh', NULL, 79, 'India', '2025-09-07', 1, 1),
(322, NULL, NULL, 'Maharashtra', NULL, 79, 'India', '2025-09-07', 1, 1),
(323, NULL, NULL, 'Manipur', NULL, 79, 'India', '2025-09-07', 1, 1),
(324, NULL, NULL, 'Meghalaya', NULL, 79, 'India', '2025-09-07', 1, 1),
(325, NULL, NULL, 'Mizoram', NULL, 79, 'India', '2025-09-07', 1, 1),
(326, NULL, NULL, 'Nagaland', NULL, 79, 'India', '2025-09-07', 1, 1),
(327, NULL, NULL, 'Odisha', NULL, 79, 'India', '2025-09-07', 1, 1),
(328, NULL, NULL, 'Punjab', NULL, 79, 'India', '2025-09-07', 1, 1),
(329, NULL, NULL, 'Rajasthan', NULL, 79, 'India', '2025-09-07', 1, 1),
(330, NULL, NULL, 'Sikkim', NULL, 79, 'India', '2025-09-07', 1, 1),
(331, NULL, NULL, 'Tamil Nadu', NULL, 79, 'India', '2025-09-07', 1, 1),
(332, NULL, NULL, 'Telangana', NULL, 79, 'India', '2025-09-07', 1, 1),
(333, NULL, NULL, 'Tripura', NULL, 79, 'India', '2025-09-07', 1, 1),
(334, NULL, NULL, 'Uttar Pradesh', NULL, 79, 'India', '2025-09-07', 1, 1),
(335, NULL, NULL, 'Uttarakhand', NULL, 79, 'India', '2025-09-07', 1, 1),
(336, NULL, NULL, 'West Bengal', NULL, 79, 'India', '2025-09-07', 1, 1),
(337, NULL, NULL, 'Andaman and Nicobar Islands', NULL, 79, 'India', '2025-09-07', 1, 1),
(338, NULL, NULL, 'Chandigarh', NULL, 79, 'India', '2025-09-07', 1, 1),
(339, NULL, NULL, 'Dadra and Nagar Haveli', NULL, 79, 'India', '2025-09-07', 1, 1),
(340, NULL, NULL, 'Daman and Diu', NULL, 79, 'India', '2025-09-07', 1, 1),
(341, NULL, NULL, 'Delhi', NULL, 79, 'India', '2025-09-07', 1, 1),
(342, NULL, NULL, 'Jammu and Kashmir', NULL, 79, 'India', '2025-09-07', 1, 1),
(343, NULL, NULL, 'Ladakh', NULL, 79, 'India', '2025-09-07', 1, 1),
(344, NULL, NULL, 'Lakshadweep', NULL, 79, 'India', '2025-09-07', 1, 1),
(345, NULL, NULL, 'Puducherry', NULL, 79, 'India', '2025-09-07', 1, 1),
(346, NULL, NULL, 'Bas-Sassandra', NULL, 86, 'Ivory Coast', '2025-09-07', 1, 1),
(347, NULL, NULL, 'Comoé', NULL, 86, 'Ivory Coast', '2025-09-07', 1, 1),
(348, NULL, NULL, 'Denguélé', NULL, 86, 'Ivory Coast', '2025-09-07', 1, 1),
(349, NULL, NULL, 'Gôh-Djiboua', NULL, 86, 'Ivory Coast', '2025-09-07', 1, 1),
(350, NULL, NULL, 'Lacs', NULL, 86, 'Ivory Coast', '2025-09-07', 1, 1),
(351, NULL, NULL, 'Lagunes', NULL, 86, 'Ivory Coast', '2025-09-07', 1, 1),
(352, NULL, NULL, 'Montagnes', NULL, 86, 'Ivory Coast', '2025-09-07', 1, 1),
(353, NULL, NULL, 'Sassandra-Marahoué', NULL, 86, 'Ivory Coast', '2025-09-07', 1, 1),
(354, NULL, NULL, 'Savanes', NULL, 86, 'Ivory Coast', '2025-09-07', 1, 1),
(355, NULL, NULL, 'Vallée du Bandama', NULL, 86, 'Ivory Coast', '2025-09-07', 1, 1),
(356, NULL, NULL, 'Woroba', NULL, 86, 'Ivory Coast', '2025-09-07', 1, 1),
(357, NULL, NULL, 'Yamoussoukro', NULL, 86, 'Ivory Coast', '2025-09-07', 1, 1),
(358, NULL, NULL, 'Zanzan', NULL, 86, 'Ivory Coast', '2025-09-07', 1, 1),
(359, NULL, NULL, 'Nairobi', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(360, NULL, NULL, 'Mombasa', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(361, NULL, NULL, 'Kisumu', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(362, NULL, NULL, 'Nakuru', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(363, NULL, NULL, 'Eldoret', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(364, NULL, NULL, 'Thika', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(365, NULL, NULL, 'Malindi', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(366, NULL, NULL, 'Kitale', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(367, NULL, NULL, 'Garissa', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(368, NULL, NULL, 'Kakamega', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(369, NULL, NULL, 'Bungoma', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(370, NULL, NULL, 'Meru', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(371, NULL, NULL, 'Kilifi', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(372, NULL, NULL, 'Machakos', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(373, NULL, NULL, 'Kisii', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(374, NULL, NULL, 'Kitui', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(375, NULL, NULL, 'Homa Bay', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(376, NULL, NULL, 'Siaya', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(377, NULL, NULL, 'Busia', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(378, NULL, NULL, 'Vihiga', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(379, NULL, NULL, 'Bomet', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(380, NULL, NULL, 'Kericho', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(381, NULL, NULL, 'Nandi', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(382, NULL, NULL, 'Uasin Gishu', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(383, NULL, NULL, 'Trans Nzoia', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(384, NULL, NULL, 'West Pokot', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(385, NULL, NULL, 'Samburu', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(386, NULL, NULL, 'Turkana', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(387, NULL, NULL, 'Marsabit', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(388, NULL, NULL, 'Isiolo', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(389, NULL, NULL, 'Mandera', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(390, NULL, NULL, 'Wajir', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(391, NULL, NULL, 'Tana River', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(392, NULL, NULL, 'Lamu', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(393, NULL, NULL, 'Taita Taveta', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(394, NULL, NULL, 'Kwale', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(395, NULL, NULL, 'Kilifi', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(396, NULL, NULL, 'Mombasa', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(397, NULL, NULL, 'Kwale', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(398, NULL, NULL, 'Taita Taveta', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(399, NULL, NULL, 'Makueni', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(400, NULL, NULL, 'Kajiado', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(401, NULL, NULL, 'Narok', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(402, NULL, NULL, 'Baringo', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(403, NULL, NULL, 'Laikipia', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(404, NULL, NULL, 'Nyeri', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(405, NULL, NULL, 'Kirinyaga', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(406, NULL, NULL, 'Murang\'a', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(407, NULL, NULL, 'Kiambu', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(408, NULL, NULL, 'Nyandarua', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(409, NULL, NULL, 'Nakuru', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(410, NULL, NULL, 'Kericho', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(411, NULL, NULL, 'Bomet', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(412, NULL, NULL, 'Kisii', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(413, NULL, NULL, 'Nyamira', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(414, NULL, NULL, 'Migori', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(415, NULL, NULL, 'Kisumu', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(416, NULL, NULL, 'Siaya', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(417, NULL, NULL, 'Vihiga', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(418, NULL, NULL, 'Kakamega', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(419, NULL, NULL, 'Bungoma', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(420, NULL, NULL, 'Busia', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(421, NULL, NULL, 'Homa Bay', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(422, NULL, NULL, 'Migori', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(423, NULL, NULL, 'Kisii', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(424, NULL, NULL, 'Nyamira', NULL, 91, 'Kenya', '2025-09-07', 1, 1),
(425, NULL, NULL, 'Berea', NULL, 101, 'Lesotho', '2025-09-07', 1, 1),
(426, NULL, NULL, 'Butha-Buthe', NULL, 101, 'Lesotho', '2025-09-07', 1, 1),
(427, NULL, NULL, 'Leribe', NULL, 101, 'Lesotho', '2025-09-07', 1, 1),
(428, NULL, NULL, 'Mafeteng', NULL, 101, 'Lesotho', '2025-09-07', 1, 1),
(429, NULL, NULL, 'Maseru', NULL, 101, 'Lesotho', '2025-09-07', 1, 1),
(430, NULL, NULL, 'Mohale\'s Hoek', NULL, 101, 'Lesotho', '2025-09-07', 1, 1),
(431, NULL, NULL, 'Mokhotlong', NULL, 101, 'Lesotho', '2025-09-07', 1, 1),
(432, NULL, NULL, 'Qacha\'s Nek', NULL, 101, 'Lesotho', '2025-09-07', 1, 1),
(433, NULL, NULL, 'Quthing', NULL, 101, 'Lesotho', '2025-09-07', 1, 1),
(434, NULL, NULL, 'Thaba-Tseka', NULL, 101, 'Lesotho', '2025-09-07', 1, 1),
(435, NULL, NULL, 'Bomi', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(436, NULL, NULL, 'Bong', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(437, NULL, NULL, 'Gbarpolu', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(438, NULL, NULL, 'Grand Bassa', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(439, NULL, NULL, 'Grand Cape Mount', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(440, NULL, NULL, 'Grand Gedeh', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(441, NULL, NULL, 'Grand Kru', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(442, NULL, NULL, 'Lofa', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(443, NULL, NULL, 'Margibi', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(444, NULL, NULL, 'Maryland', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(445, NULL, NULL, 'Montserrado', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(446, NULL, NULL, 'Nimba', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(447, NULL, NULL, 'River Cess', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(448, NULL, NULL, 'River Gee', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(449, NULL, NULL, 'Sinoe', NULL, 102, 'Liberia', '2025-09-07', 1, 1),
(450, NULL, NULL, 'Tripoli', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(451, NULL, NULL, 'Benghazi', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(452, NULL, NULL, 'Misrata', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(453, NULL, NULL, 'Bayda', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(454, NULL, NULL, 'Zawiya', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(455, NULL, NULL, 'Zuwara', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(456, NULL, NULL, 'Sabha', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(457, NULL, NULL, 'Sirte', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(458, NULL, NULL, 'Tobruk', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(459, NULL, NULL, 'Ajdabiya', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(460, NULL, NULL, 'Derna', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(461, NULL, NULL, 'Gharyan', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(462, NULL, NULL, 'Kufra', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(463, NULL, NULL, 'Murzuq', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(464, NULL, NULL, 'Sabratha', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(465, NULL, NULL, 'Tajura', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(466, NULL, NULL, 'Tarhuna', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(467, NULL, NULL, 'Ubari', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(468, NULL, NULL, 'Yafran', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(469, NULL, NULL, 'Zliten', NULL, 103, 'Libya', '2025-09-07', 1, 1),
(470, NULL, NULL, 'Antananarivo', NULL, 108, 'Madagascar', '2025-09-07', 1, 1),
(471, NULL, NULL, 'Antsiranana', NULL, 108, 'Madagascar', '2025-09-07', 1, 1),
(472, NULL, NULL, 'Fianarantsoa', NULL, 108, 'Madagascar', '2025-09-07', 1, 1),
(473, NULL, NULL, 'Mahajanga', NULL, 108, 'Madagascar', '2025-09-07', 1, 1),
(474, NULL, NULL, 'Toamasina', NULL, 108, 'Madagascar', '2025-09-07', 1, 1),
(475, NULL, NULL, 'Toliara', NULL, 108, 'Madagascar', '2025-09-07', 1, 1),
(476, NULL, NULL, 'Central Region', NULL, 109, 'Malawi', '2025-09-07', 1, 1),
(477, NULL, NULL, 'Northern Region', NULL, 109, 'Malawi', '2025-09-07', 1, 1),
(478, NULL, NULL, 'Southern Region', NULL, 109, 'Malawi', '2025-09-07', 1, 1),
(479, NULL, NULL, 'Bamako', NULL, 112, 'Mali', '2025-09-07', 1, 1),
(480, NULL, NULL, 'Gao', NULL, 112, 'Mali', '2025-09-07', 1, 1),
(481, NULL, NULL, 'Kayes', NULL, 112, 'Mali', '2025-09-07', 1, 1),
(482, NULL, NULL, 'Kidal', NULL, 112, 'Mali', '2025-09-07', 1, 1),
(483, NULL, NULL, 'Koulikoro', NULL, 112, 'Mali', '2025-09-07', 1, 1),
(484, NULL, NULL, 'Ménaka', NULL, 112, 'Mali', '2025-09-07', 1, 1),
(485, NULL, NULL, 'Mopti', NULL, 112, 'Mali', '2025-09-07', 1, 1),
(486, NULL, NULL, 'Ségou', NULL, 112, 'Mali', '2025-09-07', 1, 1),
(487, NULL, NULL, 'Sikasso', NULL, 112, 'Mali', '2025-09-07', 1, 1),
(488, NULL, NULL, 'Taoudéni', NULL, 112, 'Mali', '2025-09-07', 1, 1),
(489, NULL, NULL, 'Agaléga', NULL, 116, 'Mauritius', '2025-09-07', 1, 1),
(490, NULL, NULL, 'Black River', NULL, 116, 'Mauritius', '2025-09-07', 1, 1),
(491, NULL, NULL, 'Flacq', NULL, 116, 'Mauritius', '2025-09-07', 1, 1),
(492, NULL, NULL, 'Grand Port', NULL, 116, 'Mauritius', '2025-09-07', 1, 1),
(493, NULL, NULL, 'Moka', NULL, 116, 'Mauritius', '2025-09-07', 1, 1),
(494, NULL, NULL, 'Pamplemousses', NULL, 116, 'Mauritius', '2025-09-07', 1, 1),
(495, NULL, NULL, 'Plaines Wilhems', NULL, 116, 'Mauritius', '2025-09-07', 1, 1),
(496, NULL, NULL, 'Port Louis', NULL, 116, 'Mauritius', '2025-09-07', 1, 1),
(497, NULL, NULL, 'Rivière du Rempart', NULL, 116, 'Mauritius', '2025-09-07', 1, 1),
(498, NULL, NULL, 'Rodrigues', NULL, 116, 'Mauritius', '2025-09-07', 1, 1),
(499, NULL, NULL, 'Savanne', NULL, 116, 'Mauritius', '2025-09-07', 1, 1),
(500, NULL, NULL, 'Tanger-Tétouan-Al Hoceïma', NULL, 123, 'Morocco', '2025-09-07', 1, 1),
(501, NULL, NULL, 'Oriental', NULL, 123, 'Morocco', '2025-09-07', 1, 1),
(502, NULL, NULL, 'Fès-Meknès', NULL, 123, 'Morocco', '2025-09-07', 1, 1),
(503, NULL, NULL, 'Rabat-Salé-Kénitra', NULL, 123, 'Morocco', '2025-09-07', 1, 1),
(504, NULL, NULL, 'Béni Mellal-Khénifra', NULL, 123, 'Morocco', '2025-09-07', 1, 1),
(505, NULL, NULL, 'Casablanca-Settat', NULL, 123, 'Morocco', '2025-09-07', 1, 1),
(506, NULL, NULL, 'Marrakech-Safi', NULL, 123, 'Morocco', '2025-09-07', 1, 1),
(507, NULL, NULL, 'Drâa-Tafilalet', NULL, 123, 'Morocco', '2025-09-07', 1, 1),
(508, NULL, NULL, 'Souss-Massa', NULL, 123, 'Morocco', '2025-09-07', 1, 1),
(509, NULL, NULL, 'Guelmim-Oued Noun', NULL, 123, 'Morocco', '2025-09-07', 1, 1),
(510, NULL, NULL, 'Laâyoune-Sakia El Hamra', NULL, 123, 'Morocco', '2025-09-07', 1, 1),
(511, NULL, NULL, 'Dakhla-Oued Ed-Dahab', NULL, 123, 'Morocco', '2025-09-07', 1, 1),
(512, NULL, NULL, 'Cabo Delgado', NULL, 124, 'Mozambique', '2025-09-07', 1, 1),
(513, NULL, NULL, 'Gaza', NULL, 124, 'Mozambique', '2025-09-07', 1, 1),
(514, NULL, NULL, 'Inhambane', NULL, 124, 'Mozambique', '2025-09-07', 1, 1),
(515, NULL, NULL, 'Manica', NULL, 124, 'Mozambique', '2025-09-07', 1, 1),
(516, NULL, NULL, 'Maputo', NULL, 124, 'Mozambique', '2025-09-07', 1, 1),
(517, NULL, NULL, 'Nampula', NULL, 124, 'Mozambique', '2025-09-07', 1, 1),
(518, NULL, NULL, 'Niassa', NULL, 124, 'Mozambique', '2025-09-07', 1, 1),
(519, NULL, NULL, 'Sofala', NULL, 124, 'Mozambique', '2025-09-07', 1, 1),
(520, NULL, NULL, 'Tete', NULL, 124, 'Mozambique', '2025-09-07', 1, 1),
(521, NULL, NULL, 'Zambézia', NULL, 124, 'Mozambique', '2025-09-07', 1, 1),
(522, NULL, NULL, 'Erongo', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(523, NULL, NULL, 'Hardap', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(524, NULL, NULL, 'Karas', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(525, NULL, NULL, 'Kavango East', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(526, NULL, NULL, 'Kavango West', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(527, NULL, NULL, 'Khomas', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(528, NULL, NULL, 'Kunene', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(529, NULL, NULL, 'Ohangwena', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(530, NULL, NULL, 'Omaheke', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(531, NULL, NULL, 'Omusati', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(532, NULL, NULL, 'Oshana', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(533, NULL, NULL, 'Oshikoto', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(534, NULL, NULL, 'Otjozondjupa', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(535, NULL, NULL, 'Zambezi', NULL, 127, 'Namibia', '2025-09-07', 1, 1),
(536, NULL, NULL, 'Agadez', NULL, 133, 'Niger', '2025-09-07', 1, 1),
(537, NULL, NULL, 'Diffa', NULL, 133, 'Niger', '2025-09-07', 1, 1),
(538, NULL, NULL, 'Dosso', NULL, 133, 'Niger', '2025-09-07', 1, 1),
(539, NULL, NULL, 'Maradi', NULL, 133, 'Niger', '2025-09-07', 1, 1),
(540, NULL, NULL, 'Tahoua', NULL, 133, 'Niger', '2025-09-07', 1, 1),
(541, NULL, NULL, 'Tillabéri', NULL, 133, 'Niger', '2025-09-07', 1, 1),
(542, NULL, NULL, 'Zinder', NULL, 133, 'Niger', '2025-09-07', 1, 1),
(543, NULL, NULL, 'Niamey', NULL, 133, 'Niger', '2025-09-07', 1, 1),
(544, NULL, NULL, 'Abia', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(545, NULL, NULL, 'Adamawa', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(546, NULL, NULL, 'Akwa Ibom', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(547, NULL, NULL, 'Anambra', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(548, NULL, NULL, 'Bauchi', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(549, NULL, NULL, 'Bayelsa', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(550, NULL, NULL, 'Benue', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(551, NULL, NULL, 'Borno', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(552, NULL, NULL, 'Cross River', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(553, NULL, NULL, 'Delta', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(554, NULL, NULL, 'Ebonyi', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(555, NULL, NULL, 'Edo', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(556, NULL, NULL, 'Ekiti', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(557, NULL, NULL, 'Enugu', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(558, NULL, NULL, 'Gombe', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(559, NULL, NULL, 'Imo', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(560, NULL, NULL, 'Jigawa', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(561, NULL, NULL, 'Kaduna', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(562, NULL, NULL, 'Kano', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(563, NULL, NULL, 'Katsina', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(564, NULL, NULL, 'Kebbi', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(565, NULL, NULL, 'Kogi', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(566, NULL, NULL, 'Kwara', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(567, NULL, NULL, 'Lagos', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(568, NULL, NULL, 'Nasarawa', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(569, NULL, NULL, 'Niger', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(570, NULL, NULL, 'Ogun', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(571, NULL, NULL, 'Ondo', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(572, NULL, NULL, 'Osun', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(573, NULL, NULL, 'Oyo', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(574, NULL, NULL, 'Plateau', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(575, NULL, NULL, 'Rivers', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(576, NULL, NULL, 'Sokoto', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(577, NULL, NULL, 'Taraba', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(578, NULL, NULL, 'Yobe', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(579, NULL, NULL, 'Zamfara', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(580, NULL, NULL, 'FCT', NULL, 134, 'Nigeria', '2025-09-07', 1, 1),
(581, NULL, NULL, 'Eastern Province', NULL, 152, 'Rwanda', '2025-09-07', 1, 1),
(582, NULL, NULL, 'Kigali', NULL, 152, 'Rwanda', '2025-09-07', 1, 1),
(583, NULL, NULL, 'Northern Province', NULL, 152, 'Rwanda', '2025-09-07', 1, 1),
(584, NULL, NULL, 'Southern Province', NULL, 152, 'Rwanda', '2025-09-07', 1, 1),
(585, NULL, NULL, 'Western Province', NULL, 152, 'Rwanda', '2025-09-07', 1, 1),
(586, NULL, NULL, 'Dakar', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(587, NULL, NULL, 'Diourbel', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(588, NULL, NULL, 'Fatick', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(589, NULL, NULL, 'Kaffrine', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(590, NULL, NULL, 'Kaolack', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(591, NULL, NULL, 'Kédougou', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(592, NULL, NULL, 'Kolda', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(593, NULL, NULL, 'Louga', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(594, NULL, NULL, 'Matam', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(595, NULL, NULL, 'Saint-Louis', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(596, NULL, NULL, 'Sédhiou', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(597, NULL, NULL, 'Tambacounda', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(598, NULL, NULL, 'Thiès', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(599, NULL, NULL, 'Ziguinchor', NULL, 160, 'Senegal', '2025-09-07', 1, 1),
(600, NULL, NULL, 'Anse aux Pins', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(601, NULL, NULL, 'Anse Boileau', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(602, NULL, NULL, 'Anse Etoile', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(603, NULL, NULL, 'Anse Royale', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(604, NULL, NULL, 'Au Cap', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(605, NULL, NULL, 'Baie Lazare', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(606, NULL, NULL, 'Baie Sainte Anne', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(607, NULL, NULL, 'Beau Vallon', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(608, NULL, NULL, 'Bel Air', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(609, NULL, NULL, 'Bel Ombre', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(610, NULL, NULL, 'Cascade', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(611, NULL, NULL, 'Glacis', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(612, NULL, NULL, 'Grand Anse Mahe', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(613, NULL, NULL, 'Grand Anse Praslin', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(614, NULL, NULL, 'La Digue', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(615, NULL, NULL, 'La Riviere Anglaise', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(616, NULL, NULL, 'Mont Buxton', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(617, NULL, NULL, 'Mont Fleuri', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(618, NULL, NULL, 'Plaisance', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(619, NULL, NULL, 'Pointe La Rue', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(620, NULL, NULL, 'Port Glaud', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(621, NULL, NULL, 'Roche Caiman', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(622, NULL, NULL, 'Saint Louis', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(623, NULL, NULL, 'Takamaka', NULL, 162, 'Seychelles', '2025-09-07', 1, 1),
(624, NULL, NULL, 'Eastern Province', NULL, 163, 'Sierra Leone', '2025-09-07', 1, 1),
(625, NULL, NULL, 'Northern Province', NULL, 163, 'Sierra Leone', '2025-09-07', 1, 1),
(626, NULL, NULL, 'North West Province', NULL, 163, 'Sierra Leone', '2025-09-07', 1, 1),
(627, NULL, NULL, 'Southern Province', NULL, 163, 'Sierra Leone', '2025-09-07', 1, 1),
(628, NULL, NULL, 'Western Area', NULL, 163, 'Sierra Leone', '2025-09-07', 1, 1),
(629, NULL, NULL, 'Awdal', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(630, NULL, NULL, 'Bakool', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(631, NULL, NULL, 'Banaadir', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(632, NULL, NULL, 'Bari', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(633, NULL, NULL, 'Bay', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(634, NULL, NULL, 'Galguduud', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(635, NULL, NULL, 'Gedo', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(636, NULL, NULL, 'Hiiraan', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(637, NULL, NULL, 'Jubbada Dhexe', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(638, NULL, NULL, 'Jubbada Hoose', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(639, NULL, NULL, 'Mudug', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(640, NULL, NULL, 'Nugaal', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(641, NULL, NULL, 'Sanaag', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(642, NULL, NULL, 'Shabeellaha Dhexe', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(643, NULL, NULL, 'Shabeellaha Hoose', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(644, NULL, NULL, 'Sool', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(645, NULL, NULL, 'Togdheer', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(646, NULL, NULL, 'Woqooyi Galbeed', NULL, 168, 'Somalia', '2025-09-07', 1, 1),
(647, NULL, NULL, 'Awdal', NULL, 169, 'Somaliland', '2025-09-07', 1, 1),
(648, NULL, NULL, 'Sahil', NULL, 169, 'Somaliland', '2025-09-07', 1, 1),
(649, NULL, NULL, 'Maroodi Jeex', NULL, 169, 'Somaliland', '2025-09-07', 1, 1),
(650, NULL, NULL, 'Togdheer', NULL, 169, 'Somaliland', '2025-09-07', 1, 1),
(651, NULL, NULL, 'Sanaag', NULL, 169, 'Somaliland', '2025-09-07', 1, 1),
(652, NULL, NULL, 'Sool', NULL, 169, 'Somaliland', '2025-09-07', 1, 1),
(653, NULL, NULL, 'Eastern Cape', NULL, 170, 'South Africa', '2025-09-07', 1, 1),
(654, NULL, NULL, 'Free State', NULL, 170, 'South Africa', '2025-09-07', 1, 1),
(655, NULL, NULL, 'Gauteng', NULL, 170, 'South Africa', '2025-09-07', 1, 1),
(656, NULL, NULL, 'KwaZulu-Natal', NULL, 170, 'South Africa', '2025-09-07', 1, 1),
(657, NULL, NULL, 'Limpopo', NULL, 170, 'South Africa', '2025-09-07', 1, 1),
(658, NULL, NULL, 'Mpumalanga', NULL, 170, 'South Africa', '2025-09-07', 1, 1),
(659, NULL, NULL, 'Northern Cape', NULL, 170, 'South Africa', '2025-09-07', 1, 1),
(660, NULL, NULL, 'North West', NULL, 170, 'South Africa', '2025-09-07', 1, 1),
(661, NULL, NULL, 'Western Cape', NULL, 170, 'South Africa', '2025-09-07', 1, 1),
(662, NULL, NULL, 'Khartoum', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(663, NULL, NULL, 'North Kordofan', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(664, NULL, NULL, 'South Kordofan', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(665, NULL, NULL, 'West Kordofan', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(666, NULL, NULL, 'Kassala', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(667, NULL, NULL, 'Al Qadarif', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(668, NULL, NULL, 'Blue Nile', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(669, NULL, NULL, 'White Nile', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(670, NULL, NULL, 'Sennar', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(671, NULL, NULL, 'North Darfur', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(672, NULL, NULL, 'South Darfur', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(673, NULL, NULL, 'West Darfur', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(674, NULL, NULL, 'Central Darfur', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(675, NULL, NULL, 'East Darfur', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(676, NULL, NULL, 'Red Sea', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(677, NULL, NULL, 'River Nile', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(678, NULL, NULL, 'Northern', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(679, NULL, NULL, 'Gedaref', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(680, NULL, NULL, 'Al Jazirah', NULL, 174, 'Sudan', '2025-09-07', 1, 1),
(681, NULL, NULL, 'Hhohho', NULL, 176, 'Swaziland', '2025-09-07', 1, 1),
(682, NULL, NULL, 'Lubombo', NULL, 176, 'Swaziland', '2025-09-07', 1, 1),
(683, NULL, NULL, 'Manzini', NULL, 176, 'Swaziland', '2025-09-07', 1, 1),
(684, NULL, NULL, 'Shiselweni', NULL, 176, 'Swaziland', '2025-09-07', 1, 1),
(685, NULL, NULL, 'Arusha', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(686, NULL, NULL, 'Dar es Salaam', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(687, NULL, NULL, 'Dodoma', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(688, NULL, NULL, 'Geita', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(689, NULL, NULL, 'Iringa', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(690, NULL, NULL, 'Kagera', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(691, NULL, NULL, 'Katavi', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(692, NULL, NULL, 'Kigoma', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(693, NULL, NULL, 'Kilimanjaro', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(694, NULL, NULL, 'Lindi', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(695, NULL, NULL, 'Manyara', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(696, NULL, NULL, 'Mara', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(697, NULL, NULL, 'Mbeya', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(698, NULL, NULL, 'Mjini Magharibi', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(699, NULL, NULL, 'Morogoro', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(700, NULL, NULL, 'Mtwara', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(701, NULL, NULL, 'Mwanza', NULL, 183, 'Tanzania', '2025-09-07', 1, 1);
INSERT INTO `db_states` (`id`, `store_id`, `state_code`, `state`, `country_code`, `country_id`, `country`, `added_on`, `company_id`, `status`) VALUES
(702, NULL, NULL, 'Njombe', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(703, NULL, NULL, 'Pemba North', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(704, NULL, NULL, 'Pemba South', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(705, NULL, NULL, 'Pwani', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(706, NULL, NULL, 'Rukwa', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(707, NULL, NULL, 'Ruvuma', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(708, NULL, NULL, 'Shinyanga', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(709, NULL, NULL, 'Simiyu', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(710, NULL, NULL, 'Singida', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(711, NULL, NULL, 'Songwe', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(712, NULL, NULL, 'Tabora', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(713, NULL, NULL, 'Tanga', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(714, NULL, NULL, 'Unguja North', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(715, NULL, NULL, 'Unguja South', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(716, NULL, NULL, 'Zanzibar Central/South', NULL, 183, 'Tanzania', '2025-09-07', 1, 1),
(717, NULL, NULL, 'Ariana', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(718, NULL, NULL, 'Béja', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(719, NULL, NULL, 'Ben Arous', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(720, NULL, NULL, 'Bizerte', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(721, NULL, NULL, 'Gabès', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(722, NULL, NULL, 'Gafsa', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(723, NULL, NULL, 'Jendouba', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(724, NULL, NULL, 'Kairouan', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(725, NULL, NULL, 'Kasserine', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(726, NULL, NULL, 'Kébili', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(727, NULL, NULL, 'Kef', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(728, NULL, NULL, 'Mahdia', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(729, NULL, NULL, 'Manouba', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(730, NULL, NULL, 'Médenine', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(731, NULL, NULL, 'Monastir', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(732, NULL, NULL, 'Nabeul', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(733, NULL, NULL, 'Sfax', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(734, NULL, NULL, 'Sidi Bouzid', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(735, NULL, NULL, 'Siliana', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(736, NULL, NULL, 'Sousse', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(737, NULL, NULL, 'Tataouine', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(738, NULL, NULL, 'Tozeur', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(739, NULL, NULL, 'Tunis', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(740, NULL, NULL, 'Zaghouan', NULL, 189, 'Tunisia', '2025-09-07', 1, 1),
(741, NULL, NULL, 'Central Region', NULL, 193, 'Uganda', '2025-09-07', 1, 1),
(742, NULL, NULL, 'Eastern Region', NULL, 193, 'Uganda', '2025-09-07', 1, 1),
(743, NULL, NULL, 'Northern Region', NULL, 193, 'Uganda', '2025-09-07', 1, 1),
(744, NULL, NULL, 'Western Region', NULL, 193, 'Uganda', '2025-09-07', 1, 1),
(745, NULL, NULL, 'England', NULL, 196, 'United Kingdom', '2025-09-07', 1, 1),
(746, NULL, NULL, 'Scotland', NULL, 196, 'United Kingdom', '2025-09-07', 1, 1),
(747, NULL, NULL, 'Wales', NULL, 196, 'United Kingdom', '2025-09-07', 1, 1),
(748, NULL, NULL, 'Northern Ireland', NULL, 196, 'United Kingdom', '2025-09-07', 1, 1),
(749, NULL, NULL, 'Alabama', NULL, 197, 'United States', '2025-09-07', 1, 1),
(750, NULL, NULL, 'Alaska', NULL, 197, 'United States', '2025-09-07', 1, 1),
(751, NULL, NULL, 'Arizona', NULL, 197, 'United States', '2025-09-07', 1, 1),
(752, NULL, NULL, 'Arkansas', NULL, 197, 'United States', '2025-09-07', 1, 1),
(753, NULL, NULL, 'California', NULL, 197, 'United States', '2025-09-07', 1, 1),
(754, NULL, NULL, 'Colorado', NULL, 197, 'United States', '2025-09-07', 1, 1),
(755, NULL, NULL, 'Connecticut', NULL, 197, 'United States', '2025-09-07', 1, 1),
(756, NULL, NULL, 'Delaware', NULL, 197, 'United States', '2025-09-07', 1, 1),
(757, NULL, NULL, 'Florida', NULL, 197, 'United States', '2025-09-07', 1, 1),
(758, NULL, NULL, 'Georgia', NULL, 197, 'United States', '2025-09-07', 1, 1),
(759, NULL, NULL, 'Hawaii', NULL, 197, 'United States', '2025-09-07', 1, 1),
(760, NULL, NULL, 'Idaho', NULL, 197, 'United States', '2025-09-07', 1, 1),
(761, NULL, NULL, 'Illinois', NULL, 197, 'United States', '2025-09-07', 1, 1),
(762, NULL, NULL, 'Indiana', NULL, 197, 'United States', '2025-09-07', 1, 1),
(763, NULL, NULL, 'Iowa', NULL, 197, 'United States', '2025-09-07', 1, 1),
(764, NULL, NULL, 'Kansas', NULL, 197, 'United States', '2025-09-07', 1, 1),
(765, NULL, NULL, 'Kentucky', NULL, 197, 'United States', '2025-09-07', 1, 1),
(766, NULL, NULL, 'Louisiana', NULL, 197, 'United States', '2025-09-07', 1, 1),
(767, NULL, NULL, 'Maine', NULL, 197, 'United States', '2025-09-07', 1, 1),
(768, NULL, NULL, 'Maryland', NULL, 197, 'United States', '2025-09-07', 1, 1),
(769, NULL, NULL, 'Massachusetts', NULL, 197, 'United States', '2025-09-07', 1, 1),
(770, NULL, NULL, 'Michigan', NULL, 197, 'United States', '2025-09-07', 1, 1),
(771, NULL, NULL, 'Minnesota', NULL, 197, 'United States', '2025-09-07', 1, 1),
(772, NULL, NULL, 'Mississippi', NULL, 197, 'United States', '2025-09-07', 1, 1),
(773, NULL, NULL, 'Missouri', NULL, 197, 'United States', '2025-09-07', 1, 1),
(774, NULL, NULL, 'Montana', NULL, 197, 'United States', '2025-09-07', 1, 1),
(775, NULL, NULL, 'Nebraska', NULL, 197, 'United States', '2025-09-07', 1, 1),
(776, NULL, NULL, 'Nevada', NULL, 197, 'United States', '2025-09-07', 1, 1),
(777, NULL, NULL, 'New Hampshire', NULL, 197, 'United States', '2025-09-07', 1, 1),
(778, NULL, NULL, 'New Jersey', NULL, 197, 'United States', '2025-09-07', 1, 1),
(779, NULL, NULL, 'New Mexico', NULL, 197, 'United States', '2025-09-07', 1, 1),
(780, NULL, NULL, 'New York', NULL, 197, 'United States', '2025-09-07', 1, 1),
(781, NULL, NULL, 'North Carolina', NULL, 197, 'United States', '2025-09-07', 1, 1),
(782, NULL, NULL, 'North Dakota', NULL, 197, 'United States', '2025-09-07', 1, 1),
(783, NULL, NULL, 'Ohio', NULL, 197, 'United States', '2025-09-07', 1, 1),
(784, NULL, NULL, 'Oklahoma', NULL, 197, 'United States', '2025-09-07', 1, 1),
(785, NULL, NULL, 'Oregon', NULL, 197, 'United States', '2025-09-07', 1, 1),
(786, NULL, NULL, 'Pennsylvania', NULL, 197, 'United States', '2025-09-07', 1, 1),
(787, NULL, NULL, 'Rhode Island', NULL, 197, 'United States', '2025-09-07', 1, 1),
(788, NULL, NULL, 'South Carolina', NULL, 197, 'United States', '2025-09-07', 1, 1),
(789, NULL, NULL, 'South Dakota', NULL, 197, 'United States', '2025-09-07', 1, 1),
(790, NULL, NULL, 'Tennessee', NULL, 197, 'United States', '2025-09-07', 1, 1),
(791, NULL, NULL, 'Texas', NULL, 197, 'United States', '2025-09-07', 1, 1),
(792, NULL, NULL, 'Utah', NULL, 197, 'United States', '2025-09-07', 1, 1),
(793, NULL, NULL, 'Vermont', NULL, 197, 'United States', '2025-09-07', 1, 1),
(794, NULL, NULL, 'Virginia', NULL, 197, 'United States', '2025-09-07', 1, 1),
(795, NULL, NULL, 'Washington', NULL, 197, 'United States', '2025-09-07', 1, 1),
(796, NULL, NULL, 'West Virginia', NULL, 197, 'United States', '2025-09-07', 1, 1),
(797, NULL, NULL, 'Wisconsin', NULL, 197, 'United States', '2025-09-07', 1, 1),
(798, NULL, NULL, 'Wyoming', NULL, 197, 'United States', '2025-09-07', 1, 1),
(799, NULL, NULL, 'District of Columbia', NULL, 197, 'United States', '2025-09-07', 1, 1),
(800, NULL, NULL, 'Central', NULL, 205, 'Zambia', '2025-09-07', 1, 1),
(801, NULL, NULL, 'Copperbelt', NULL, 205, 'Zambia', '2025-09-07', 1, 1),
(802, NULL, NULL, 'Eastern', NULL, 205, 'Zambia', '2025-09-07', 1, 1),
(803, NULL, NULL, 'Luapula', NULL, 205, 'Zambia', '2025-09-07', 1, 1),
(804, NULL, NULL, 'Lusaka', NULL, 205, 'Zambia', '2025-09-07', 1, 1),
(805, NULL, NULL, 'Muchinga', NULL, 205, 'Zambia', '2025-09-07', 1, 1),
(806, NULL, NULL, 'Northern', NULL, 205, 'Zambia', '2025-09-07', 1, 1),
(807, NULL, NULL, 'North-Western', NULL, 205, 'Zambia', '2025-09-07', 1, 1),
(808, NULL, NULL, 'Southern', NULL, 205, 'Zambia', '2025-09-07', 1, 1),
(809, NULL, NULL, 'Western', NULL, 205, 'Zambia', '2025-09-07', 1, 1),
(810, NULL, NULL, 'Bulawayo', NULL, 206, 'Zimbabwe', '2025-09-07', 1, 1),
(811, NULL, NULL, 'Harare', NULL, 206, 'Zimbabwe', '2025-09-07', 1, 1),
(812, NULL, NULL, 'Manicaland', NULL, 206, 'Zimbabwe', '2025-09-07', 1, 1),
(813, NULL, NULL, 'Mashonaland Central', NULL, 206, 'Zimbabwe', '2025-09-07', 1, 1),
(814, NULL, NULL, 'Mashonaland East', NULL, 206, 'Zimbabwe', '2025-09-07', 1, 1),
(815, NULL, NULL, 'Mashonaland West', NULL, 206, 'Zimbabwe', '2025-09-07', 1, 1),
(816, NULL, NULL, 'Masvingo', NULL, 206, 'Zimbabwe', '2025-09-07', 1, 1),
(817, NULL, NULL, 'Matabeleland North', NULL, 206, 'Zimbabwe', '2025-09-07', 1, 1),
(818, NULL, NULL, 'Matabeleland South', NULL, 206, 'Zimbabwe', '2025-09-07', 1, 1),
(819, NULL, NULL, 'Midlands', NULL, 206, 'Zimbabwe', '2025-09-07', 1, 1),
(820, NULL, NULL, 'Central Equatoria', NULL, 207, 'South Sudan', '2025-09-07', 1, 1),
(821, NULL, NULL, 'Eastern Equatoria', NULL, 207, 'South Sudan', '2025-09-07', 1, 1),
(822, NULL, NULL, 'Jonglei', NULL, 207, 'South Sudan', '2025-09-07', 1, 1),
(823, NULL, NULL, 'Lakes', NULL, 207, 'South Sudan', '2025-09-07', 1, 1),
(824, NULL, NULL, 'Northern Bahr el Ghazal', NULL, 207, 'South Sudan', '2025-09-07', 1, 1),
(825, NULL, NULL, 'Unity', NULL, 207, 'South Sudan', '2025-09-07', 1, 1),
(826, NULL, NULL, 'Upper Nile', NULL, 207, 'South Sudan', '2025-09-07', 1, 1),
(827, NULL, NULL, 'Warrap', NULL, 207, 'South Sudan', '2025-09-07', 1, 1),
(828, NULL, NULL, 'Western Bahr el Ghazal', NULL, 207, 'South Sudan', '2025-09-07', 1, 1),
(829, NULL, NULL, 'Western Equatoria', NULL, 207, 'South Sudan', '2025-09-07', 1, 1);

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

--
-- Table structure for table `db_stockadjustment`
--

CREATE TABLE `db_stockadjustment` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `warehouse_id` int(5) DEFAULT NULL,
  `reference_no` varchar(50) DEFAULT NULL,
  `adjustment_date` date DEFAULT NULL,
  `adjustment_note` mediumtext DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `system_ip` varchar(100) DEFAULT NULL,
  `system_name` varchar(100) DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_stockadjustmentitems`
--

CREATE TABLE `db_stockadjustmentitems` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `warehouse_id` int(5) DEFAULT NULL,
  `adjustment_id` int(5) DEFAULT NULL,
  `item_id` int(5) DEFAULT NULL,
  `adjustment_qty` double(20,2) DEFAULT NULL,
  `status` int(5) DEFAULT NULL,
  `description` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_stockentry`
--

CREATE TABLE `db_stockentry` (
  `id` int(5) NOT NULL,
  `entry_date` date DEFAULT NULL,
  `item_id` int(11) DEFAULT NULL,
  `qty` int(5) DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_stocktransfer`
--

CREATE TABLE `db_stocktransfer` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL COMMENT 'from store',
  `to_store_id` int(11) DEFAULT NULL COMMENT 'to store transfer',
  `warehouse_from` int(5) DEFAULT NULL,
  `warehouse_to` int(5) DEFAULT NULL,
  `transfer_date` date DEFAULT NULL,
  `note` text CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `created_by` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `system_ip` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `system_name` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_stocktransferitems`
--

CREATE TABLE `db_stocktransferitems` (
  `id` int(5) NOT NULL,
  `stocktransfer_id` int(5) DEFAULT NULL,
  `store_id` int(5) DEFAULT NULL COMMENT 'from store',
  `to_store_id` int(5) DEFAULT NULL COMMENT 'to store',
  `warehouse_from` int(5) DEFAULT NULL COMMENT 'warehouse ids',
  `warehouse_to` int(11) DEFAULT NULL COMMENT 'warehouse ids',
  `item_id` int(11) DEFAULT NULL,
  `transfer_qty` double(20,2) DEFAULT NULL,
  `status` int(5) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_store`
--

CREATE TABLE `db_store` (
  `id` int(5) NOT NULL,
  `store_code` varchar(150) DEFAULT NULL,
  `store_name` varchar(150) DEFAULT NULL,
  `store_website` varchar(150) DEFAULT NULL,
  `mobile` varchar(150) DEFAULT NULL,
  `phone` varchar(150) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `website` varchar(250) DEFAULT NULL,
  `store_logo` text DEFAULT NULL,
  `logo` mediumtext DEFAULT NULL,
  `upi_id` varchar(50) DEFAULT NULL,
  `upi_code` text DEFAULT NULL,
  `country` varchar(150) DEFAULT NULL,
  `state` varchar(150) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `address` varchar(300) DEFAULT NULL,
  `postcode` varchar(50) DEFAULT NULL,
  `gst_no` varchar(50) DEFAULT NULL,
  `vat_no` varchar(50) DEFAULT NULL,
  `pan_no` varchar(50) DEFAULT NULL,
  `bank_details` mediumtext DEFAULT NULL,
  `cid` int(50) DEFAULT NULL,
  `category_init` varchar(50) DEFAULT NULL,
  `item_init` varchar(50) DEFAULT NULL COMMENT 'INITAL CODE',
  `supplier_init` varchar(50) DEFAULT NULL COMMENT 'INITAL CODE',
  `purchase_init` varchar(50) DEFAULT NULL COMMENT 'INITAL CODE',
  `purchase_return_init` varchar(50) DEFAULT NULL,
  `customer_init` varchar(50) DEFAULT NULL COMMENT 'INITAL CODE',
  `sales_init` varchar(50) DEFAULT NULL COMMENT 'INITAL CODE',
  `sales_return_init` varchar(50) DEFAULT NULL,
  `expense_init` varchar(50) DEFAULT NULL,
  `accounts_init` varchar(50) DEFAULT NULL,
  `journal_init` varchar(50) DEFAULT NULL,
  `cust_advance_init` varchar(50) DEFAULT NULL,
  `invoice_view` int(5) DEFAULT NULL COMMENT '1=Standard,2=Indian GST',
  `sms_status` int(1) DEFAULT NULL COMMENT '1=Enable 0=Disable',
  `status` int(1) DEFAULT NULL,
  `language_id` int(5) DEFAULT NULL,
  `currency_id` int(5) DEFAULT NULL,
  `currency_placement` varchar(50) DEFAULT NULL,
  `timezone` varchar(50) DEFAULT NULL,
  `date_format` varchar(50) DEFAULT NULL,
  `time_format` int(5) DEFAULT NULL,
  `sales_discount` double(20,4) DEFAULT NULL,
  `default_price_type` enum('retail','wholesale') NOT NULL DEFAULT 'retail',
  `enable_wholesale_pricing` tinyint(1) NOT NULL DEFAULT 0,
  `default_pricing_type` enum('wholesale','retail') NOT NULL DEFAULT 'retail',
  `wholesale_profit_margin` decimal(5,2) DEFAULT 20.00,
  `retail_profit_margin` decimal(5,2) DEFAULT 30.00,
  `currencysymbol_id` int(5) DEFAULT NULL,
  `regno_key` varchar(50) DEFAULT NULL,
  `fav_icon` text DEFAULT NULL,
  `purchase_code` text DEFAULT NULL,
  `change_return` int(2) DEFAULT NULL,
  `sales_invoice_format_id` int(5) DEFAULT NULL,
  `pos_invoice_format_id` int(5) DEFAULT NULL,
  `sales_invoice_footer_text` text DEFAULT NULL,
  `round_off` int(1) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `quotation_init` varchar(50) DEFAULT NULL,
  `decimals` int(1) DEFAULT 2,
  `money_transfer_init` varchar(50) DEFAULT NULL,
  `sales_payment_init` varchar(50) DEFAULT NULL,
  `sales_return_payment_init` varchar(50) DEFAULT NULL,
  `purchase_payment_init` varchar(50) DEFAULT NULL,
  `purchase_return_payment_init` varchar(50) DEFAULT NULL,
  `expense_payment_init` varchar(50) DEFAULT NULL,
  `current_subscriptionlist_id` int(10) DEFAULT 0,
  `smtp_host` varchar(250) DEFAULT NULL,
  `smtp_port` varchar(250) DEFAULT NULL,
  `smtp_user` varchar(250) DEFAULT NULL,
  `smtp_pass` varchar(250) DEFAULT NULL,
  `smtp_status` int(1) DEFAULT 0,
  `sms_url` text DEFAULT NULL,
  `user_id` int(5) NOT NULL,
  `mrp_column` int(1) DEFAULT 0,
  `qty_decimals` int(5) DEFAULT 2,
  `signature` text DEFAULT NULL,
  `show_signature` int(1) DEFAULT 0,
  `invoice_terms` text DEFAULT NULL,
  `previous_balance_bit` int(1) DEFAULT 1 COMMENT '1=Show, 0=Hide - Shows on sales invoice',
  `t_and_c_status` int(1) DEFAULT 1 COMMENT '1=Show, 0=Hide - Shows on sales invoice',
  `t_and_c_status_pos` int(1) DEFAULT 1,
  `number_to_words` varchar(250) DEFAULT 'Default',
  `default_account_id` int(10) DEFAULT NULL,
  `expiry_tracking_enabled` tinyint(1) DEFAULT 0,
  `sell_expired_items` tinyint(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_store`
--

INSERT INTO `db_store` (`id`, `store_code`, `store_name`, `store_website`, `mobile`, `phone`, `email`, `website`, `store_logo`, `logo`, `upi_id`, `upi_code`, `country`, `state`, `city`, `address`, `postcode`, `gst_no`, `vat_no`, `pan_no`, `bank_details`, `cid`, `category_init`, `item_init`, `supplier_init`, `purchase_init`, `purchase_return_init`, `customer_init`, `sales_init`, `sales_return_init`, `expense_init`, `accounts_init`, `journal_init`, `cust_advance_init`, `invoice_view`, `sms_status`, `status`, `language_id`, `currency_id`, `currency_placement`, `timezone`, `date_format`, `time_format`, `sales_discount`, `default_price_type`, `enable_wholesale_pricing`, `default_pricing_type`, `wholesale_profit_margin`, `retail_profit_margin`, `currencysymbol_id`, `regno_key`, `fav_icon`, `purchase_code`, `change_return`, `sales_invoice_format_id`, `pos_invoice_format_id`, `sales_invoice_footer_text`, `round_off`, `created_date`, `created_time`, `created_by`, `system_ip`, `system_name`, `quotation_init`, `decimals`, `money_transfer_init`, `sales_payment_init`, `sales_return_payment_init`, `purchase_payment_init`, `purchase_return_payment_init`, `expense_payment_init`, `current_subscriptionlist_id`, `smtp_host`, `smtp_port`, `smtp_user`, `smtp_pass`, `smtp_status`, `sms_url`, `user_id`, `mrp_column`, `qty_decimals`, `signature`, `show_signature`, `invoice_terms`, `previous_balance_bit`, `t_and_c_status`, `t_and_c_status_pos`, `number_to_words`, `default_account_id`, `expiry_tracking_enabled`, `sell_expired_items`) VALUES
(1, 'ST0001', 'SAAS ADMIN', '', '+919999999999', '', 'admin@example.com', 'www', 'uploads/store/company_logo.png', NULL, NULL, NULL, 'India', 'Karnataka', 'Bengalore', 'Gandhi Road', '', '', '', '', '', NULL, 'CT/01/', 'IT01', 'SU/01/', 'PU/2020/01', 'PR/2020/01/', 'CU/01/', 'SL/2020/01/', 'SR/2020/01/', 'EX/2020/01/', 'AC/01/', 'JE', 'ADV', 1, 1, 1, 1, 1, 'Left', 'Asia/Kolkata\r\n', 'dd-mm-yyyy', 12, 0.0000, 'retail', 0, 'retail', 20.00, 30.00, NULL, NULL, NULL, NULL, 1, 3, 1, 'Its Footer, You can change it from Store Settings.', 0, NULL, NULL, NULL, NULL, NULL, 'QT/2020/01/', 2, 'MT/01/', 'SP/2020/01/', 'SRP/2020/01/', 'PP/2020/01/', 'PRP/2020/01/', 'XP/2020/01/', 26, '', '', '', '', 1, '', 0, 0, 2, NULL, 0, NULL, 1, 1, 1, 'Default', NULL, 1, 1),
(2, 'ST0002', 'NCS BILLING BOOK', '', '9999999999', '', 'ncsbillingbook@email.com', NULL, NULL, NULL, NULL, NULL, 'Uganda', 'Central Region', 'Kampala', '123 Main Street, New York, NY 10001', '', '', '', '', '', NULL, 'CT/02/', 'IT02', 'SU/02/', 'PU/2021/02/', 'PR/2021/02/', 'CU/02/', 'SL/2021/02/', 'SR/2021/02/', 'EX/2021/02/', 'AC/02/', NULL, 'ADV', 1, 0, 1, 1, 148, 'Left', 'Africa/Kampala\r\n', 'dd-mm-yyyy', 12, 0.0000, 'retail', 1, 'retail', 20.00, 30.00, NULL, NULL, NULL, NULL, 1, 3, 1, 'This is footer text. It is in Store Management.', 1, '2021-02-12', '05:53:37 pm', '', '127.0.0.1', 'LAPTOP-I5OUIM4R', 'QT/2021/02/', 0, 'MT/02/', 'SP/2021/02/', 'SRP/2021/02/', 'PP/2021/02/', 'PRP/2021/02/', 'XP/2021/02/', 28, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, 0, NULL, 0, '', 1, 1, 1, 'Default', 3, 1, 1);

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

--
-- Table structure for table `db_stripe`
--

CREATE TABLE `db_stripe` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `sandbox` int(1) DEFAULT NULL,
  `publishable_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `api_secret` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `updated_at` date DEFAULT NULL,
  `updated_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_stripepayments`
--

CREATE TABLE `db_stripepayments` (
  `id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `buyer_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `buyer_email` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `paid_amount` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `paid_amount_currency` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `txn_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `payment_status` varchar(25) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `created` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_subscription`
--

CREATE TABLE `db_subscription` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `payment_id` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `package_id` int(5) DEFAULT NULL,
  `package_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `package_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `subscription_date` date DEFAULT NULL,
  `expire_date` date DEFAULT NULL,
  `trial_days` int(10) DEFAULT NULL,
  `max_users` int(10) DEFAULT NULL,
  `max_warehouses` int(10) DEFAULT NULL,
  `max_items` int(10) DEFAULT NULL,
  `max_invoices` int(10) DEFAULT NULL,
  `payment_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `txn_id` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `payment_gross` double(10,2) DEFAULT NULL,
  `currency_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `payer_email` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `payment_status` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `system_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `system_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `package_status` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `payment_type` varchar(250) DEFAULT NULL COMMENT 'manual subscription only',
  `package_count` int(10) DEFAULT NULL COMMENT 'manual subscription only'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_subscription`
--

INSERT INTO `db_subscription` (`id`, `store_id`, `payment_id`, `package_id`, `package_type`, `package_name`, `description`, `subscription_date`, `expire_date`, `trial_days`, `max_users`, `max_warehouses`, `max_items`, `max_invoices`, `payment_by`, `txn_id`, `payment_gross`, `currency_code`, `payer_email`, `payment_status`, `created_date`, `created_time`, `created_by`, `system_ip`, `system_name`, `package_status`, `payment_type`, `package_count`) VALUES
(13, 22, NULL, 2, NULL, 'Regular', 'Test description', '2021-01-25', NULL, 15, 20, 20, 200, 200, 'PayPal', '48R18927X78299709', 250.00, 'USD', 'sb-9fy504805522@business.example.com', 'Pending', '2021-01-25', '01:30:45 pm', 'Tester', '127.0.0.1', 'LAPTOP-I5OUIM4R', NULL, NULL, NULL),
(14, 22, NULL, 2, 'Paid', 'Regular', 'Test description', '2021-01-25', NULL, 15, 20, 20, 200, 200, 'PayPal', '9M838440FH9266015', 250.00, 'USD', 'sb-9fy504805522@business.example.com', 'Pending', '2021-01-25', '01:32:28 pm', 'Tester', '127.0.0.1', 'LAPTOP-I5OUIM4R', NULL, NULL, NULL),
(16, 22, NULL, 2, 'Paid', 'Regular', 'Test description', '2021-01-25', '2021-02-25', 15, 20, 20, 200, 200, 'PayPal', '2PT61144W90213341', 250.00, 'USD', 'sb-9fy504805522@business.example.com', 'Pending', '2021-01-25', '02:00:38 pm', 'Tester', '127.0.0.1', 'LAPTOP-I5OUIM4R', NULL, NULL, NULL),
(26, 1, NULL, 1, 'Free', 'Free', 'Test description', '2021-01-25', '2021-02-04', 10, 2, 2, 20, 20, 'Self', '', 0.00, '', '', '', '2021-01-25', '06:32:32 pm', 'admin', '127.0.0.1', 'LAPTOP-I5OUIM4R', NULL, NULL, NULL),
(27, 24, NULL, 1, 'Free', 'Free', 'Test description', '2021-02-11', '2021-02-21', 10, 2, 2, 20, 20, 'Self', '', 0.00, '', '', '', '2021-02-11', '03:09:47 pm', 'Tester', '127.0.0.1', 'LAPTOP-I5OUIM4R', NULL, NULL, NULL),
(28, 2, NULL, 1, 'Free', 'Free', 'Test description', '2021-02-12', '2021-02-22', 10, 2, 2, 20, 20, 'Self', '', 0.00, '', '', '', '2021-02-12', '06:57:18 pm', 'Tester', '127.0.0.1', 'LAPTOP-I5OUIM4R', NULL, NULL, NULL);

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

--
-- Table structure for table `db_suppliers`
--

CREATE TABLE `db_suppliers` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `count_id` int(10) DEFAULT NULL COMMENT 'Use to create supplier Code',
  `supplier_code` varchar(20) DEFAULT NULL,
  `supplier_name` varchar(50) DEFAULT NULL,
  `mobile` varchar(15) DEFAULT NULL,
  `phone` varchar(15) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `gstin` varchar(100) DEFAULT NULL,
  `tax_number` varchar(50) DEFAULT NULL,
  `vatin` varchar(100) DEFAULT NULL,
  `opening_balance` double(20,4) DEFAULT NULL,
  `purchase_due` double(20,4) DEFAULT NULL,
  `purchase_return_due` double(20,4) DEFAULT NULL,
  `country_id` int(5) DEFAULT NULL,
  `trading_currency_id` int(11) DEFAULT NULL,
  `currency_exchange_rate` decimal(20,6) DEFAULT 1.000000,
  `state_id` int(5) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `postcode` varchar(10) DEFAULT NULL,
  `address` varchar(250) DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(30) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `company_id` int(5) DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_suppliers`
--

INSERT INTO `db_suppliers` (`id`, `store_id`, `count_id`, `supplier_code`, `supplier_name`, `mobile`, `phone`, `email`, `gstin`, `tax_number`, `vatin`, `opening_balance`, `purchase_due`, `purchase_return_due`, `country_id`, `trading_currency_id`, `currency_exchange_rate`, `state_id`, `city`, `postcode`, `address`, `system_ip`, `system_name`, `created_date`, `created_time`, `created_by`, `company_id`, `status`) VALUES
(1, 2, 1, 'SU/02/0001', 'Default Supplier', '', '', '', '', '', NULL, 0.0000, 0.0000, NULL, 0, 148, 1.000000, 0, '', '', '', '::1', 'DESKTOP-8R56H6J', '2025-10-25', '01:24:10 pm', 'admin', NULL, 1);

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

--
-- Table structure for table `db_supplier_payments`
--

CREATE TABLE `db_supplier_payments` (
  `id` int(5) NOT NULL,
  `purchasepayment_id` int(5) DEFAULT NULL,
  `supplier_id` int(5) DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `payment_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `payment` double(10,2) DEFAULT NULL,
  `payment_note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `system_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `system_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_date` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_system_settings`
--

CREATE TABLE `db_system_settings` (
  `id` int(11) UNSIGNED NOT NULL,
  `setting_key` varchar(100) NOT NULL,
  `setting_value` text DEFAULT NULL,
  `setting_type` enum('string','integer','boolean','json') DEFAULT 'string',
  `description` text DEFAULT NULL,
  `is_public` tinyint(1) DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `db_system_settings`
--

INSERT INTO `db_system_settings` (`id`, `setting_key`, `setting_value`, `setting_type`, `description`, `is_public`, `created_at`, `updated_at`) VALUES
(1, 'maintenance_mode', '0', 'boolean', 'Enable/disable maintenance mode', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32'),
(2, 'backup_retention_days', '30', 'integer', 'Number of days to retain backups', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32'),
(3, 'email_notifications', '1', 'boolean', 'Enable email notifications', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32'),
(4, 'database_mode', 'offline', 'string', 'Current database mode: offline or online', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32'),
(5, 'installation_mode', 'dual', 'string', 'Installation mode: single or dual', 0, '2025-10-24 22:19:32', '2025-10-25 10:14:37'),
(6, 'offline_database_config', '{}', 'json', 'Offline database configuration', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32'),
(7, 'online_database_config', '{}', 'json', 'Online database configuration', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32'),
(8, 'offline_url', '', 'string', 'Offline site URL', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32'),
(9, 'online_url', '', 'string', 'Online site URL', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32'),
(10, 'mode_switch_count', '0', 'integer', 'Number of times mode has been switched', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32'),
(11, 'last_mode_switch', NULL, 'string', 'Last mode switch timestamp', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32'),
(12, 'sync_enabled', '0', 'boolean', 'Enable data synchronization between modes', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32'),
(13, 'last_sync_time', NULL, 'string', 'Last synchronization timestamp', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32'),
(14, 'sync_frequency', '300', 'integer', 'Synchronization frequency in seconds (default: 5 minutes)', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32'),
(15, 'auto_sync_on_online', '1', 'boolean', 'Automatically sync when switching to online mode', 0, '2025-10-24 22:19:32', '2025-10-24 22:19:32');

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

--
-- Table structure for table `db_tax`
--

CREATE TABLE `db_tax` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `tax_name` varchar(50) DEFAULT NULL,
  `tax` double(20,4) DEFAULT NULL,
  `group_bit` int(1) DEFAULT NULL COMMENT '1=Yes, 0=No',
  `subtax_ids` varchar(10) DEFAULT NULL COMMENT 'Tax groups IDs',
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_tax`
--

INSERT INTO `db_tax` (`id`, `store_id`, `tax_name`, `tax`, `group_bit`, `subtax_ids`, `status`) VALUES
(1, 2, 'None', 0.0000, NULL, NULL, 1);

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

--
-- Table structure for table `db_timezone`
--

CREATE TABLE `db_timezone` (
  `id` int(5) NOT NULL,
  `timezone` varchar(100) DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_timezone`
--

INSERT INTO `db_timezone` (`id`, `timezone`, `status`) VALUES
(1, 'Africa/Abidjan\r', 1),
(2, 'Africa/Accra\r', 1),
(3, 'Africa/Addis_Ababa\r', 1),
(4, 'Africa/Algiers\r', 1),
(5, 'Africa/Asmara\r', 1),
(6, 'Africa/Asmera\r', 1),
(7, 'Africa/Bamako\r', 1),
(8, 'Africa/Bangui\r', 1),
(9, 'Africa/Banjul\r', 1),
(10, 'Africa/Bissau\r', 1),
(11, 'Africa/Blantyre\r', 1),
(12, 'Africa/Brazzaville\r', 1),
(13, 'Africa/Bujumbura\r', 1),
(14, 'Africa/Cairo\r', 1),
(15, 'Africa/Casablanca\r', 1),
(16, 'Africa/Ceuta\r', 1),
(17, 'Africa/Conakry\r', 1),
(18, 'Africa/Dakar\r', 1),
(19, 'Africa/Dar_es_Salaam\r', 1),
(20, 'Africa/Djibouti\r', 1),
(21, 'Africa/Douala\r', 1),
(22, 'Africa/El_Aaiun\r', 1),
(23, 'Africa/Freetown\r', 1),
(24, 'Africa/Gaborone\r', 1),
(25, 'Africa/Harare\r', 1),
(26, 'Africa/Johannesburg\r', 1),
(27, 'Africa/Juba\r', 1),
(28, 'Africa/Kampala\r', 1),
(29, 'Africa/Khartoum\r', 1),
(30, 'Africa/Kigali\r', 1),
(31, 'Africa/Kinshasa\r', 1),
(32, 'Africa/Lagos\r', 1),
(33, 'Africa/Libreville\r', 1),
(34, 'Africa/Lome\r', 1),
(35, 'Africa/Luanda\r', 1),
(36, 'Africa/Lubumbashi\r', 1),
(37, 'Africa/Lusaka\r', 1),
(38, 'Africa/Malabo\r', 1),
(39, 'Africa/Maputo\r', 1),
(40, 'Africa/Maseru\r', 1),
(41, 'Africa/Mbabane\r', 1),
(42, 'Africa/Mogadishu\r', 1),
(43, 'Africa/Monrovia\r', 1),
(44, 'Africa/Nairobi\r', 1),
(45, 'Africa/Ndjamena\r', 1),
(46, 'Africa/Niamey\r', 1),
(47, 'Africa/Nouakchott\r', 1),
(48, 'Africa/Ouagadougou\r', 1),
(49, 'Africa/Porto-Novo\r', 1),
(50, 'Africa/Sao_Tome\r', 1),
(51, 'Africa/Timbuktu\r', 1),
(52, 'Africa/Tripoli\r', 1),
(53, 'Africa/Tunis\r', 1),
(54, 'Africa/Windhoek\r', 1),
(55, 'AKST9AKDT\r', 1),
(56, 'America/Adak\r', 1),
(57, 'America/Anchorage\r', 1),
(58, 'America/Anguilla\r', 1),
(59, 'America/Antigua\r', 1),
(60, 'America/Araguaina\r', 1),
(61, 'America/Argentina/Buenos_Aires\r', 1),
(62, 'America/Argentina/Catamarca\r', 1),
(63, 'America/Argentina/ComodRivadavia\r', 1),
(64, 'America/Argentina/Cordoba\r', 1),
(65, 'America/Argentina/Jujuy\r', 1),
(66, 'America/Argentina/La_Rioja\r', 1),
(67, 'America/Argentina/Mendoza\r', 1),
(68, 'America/Argentina/Rio_Gallegos\r', 1),
(69, 'America/Argentina/Salta\r', 1),
(70, 'America/Argentina/San_Juan\r', 1),
(71, 'America/Argentina/San_Luis\r', 1),
(72, 'America/Argentina/Tucuman\r', 1),
(73, 'America/Argentina/Ushuaia\r', 1),
(74, 'America/Aruba\r', 1),
(75, 'America/Asuncion\r', 1),
(76, 'America/Atikokan\r', 1),
(77, 'America/Atka\r', 1),
(78, 'America/Bahia\r', 1),
(79, 'America/Bahia_Banderas\r', 1),
(80, 'America/Barbados\r', 1),
(81, 'America/Belem\r', 1),
(82, 'America/Belize\r', 1),
(83, 'America/Blanc-Sablon\r', 1),
(84, 'America/Boa_Vista\r', 1),
(85, 'America/Bogota\r', 1),
(86, 'America/Boise\r', 1),
(87, 'America/Buenos_Aires\r', 1),
(88, 'America/Cambridge_Bay\r', 1),
(89, 'America/Campo_Grande\r', 1),
(90, 'America/Cancun\r', 1),
(91, 'America/Caracas\r', 1),
(92, 'America/Catamarca\r', 1),
(93, 'America/Cayenne\r', 1),
(94, 'America/Cayman\r', 1),
(95, 'America/Chicago\r', 1),
(96, 'America/Chihuahua\r', 1),
(97, 'America/Coral_Harbour\r', 1),
(98, 'America/Cordoba\r', 1),
(99, 'America/Costa_Rica\r', 1),
(100, 'America/Creston\r', 1),
(101, 'America/Cuiaba\r', 1),
(102, 'America/Curacao\r', 1),
(103, 'America/Danmarkshavn\r', 1),
(104, 'America/Dawson\r', 1),
(105, 'America/Dawson_Creek\r', 1),
(106, 'America/Denver\r', 1),
(107, 'America/Detroit\r', 1),
(108, 'America/Dominica\r', 1),
(109, 'America/Edmonton\r', 1),
(110, 'America/Eirunepe\r', 1),
(111, 'America/El_Salvador\r', 1),
(112, 'America/Ensenada\r', 1),
(113, 'America/Fort_Wayne\r', 1),
(114, 'America/Fortaleza\r', 1),
(115, 'America/Glace_Bay\r', 1),
(116, 'America/Godthab\r', 1),
(117, 'America/Goose_Bay\r', 1),
(118, 'America/Grand_Turk\r', 1),
(119, 'America/Grenada\r', 1),
(120, 'America/Guadeloupe\r', 1),
(121, 'America/Guatemala\r', 1),
(122, 'America/Guayaquil\r', 1),
(123, 'America/Guyana\r', 1),
(124, 'America/Halifax\r', 1),
(125, 'America/Havana\r', 1),
(126, 'America/Hermosillo\r', 1),
(127, 'America/Indiana/Indianapolis\r', 1),
(128, 'America/Indiana/Knox\r', 1),
(129, 'America/Indiana/Marengo\r', 1),
(130, 'America/Indiana/Petersburg\r', 1),
(131, 'America/Indiana/Tell_City\r', 1),
(132, 'America/Indiana/Vevay\r', 1),
(133, 'America/Indiana/Vincennes\r', 1),
(134, 'America/Indiana/Winamac\r', 1),
(135, 'America/Indianapolis\r', 1),
(136, 'America/Inuvik\r', 1),
(137, 'America/Iqaluit\r', 1),
(138, 'America/Jamaica\r', 1),
(139, 'America/Jujuy\r', 1),
(140, 'America/Juneau\r', 1),
(141, 'America/Kentucky/Louisville\r', 1),
(142, 'America/Kentucky/Monticello\r', 1),
(143, 'America/Knox_IN\r', 1),
(144, 'America/Kralendijk\r', 1),
(145, 'America/La_Paz\r', 1),
(146, 'America/Lima\r', 1),
(147, 'America/Los_Angeles\r', 1),
(148, 'America/Louisville\r', 1),
(149, 'America/Lower_Princes\r', 1),
(150, 'America/Maceio\r', 1),
(151, 'America/Managua\r', 1),
(152, 'America/Manaus\r', 1),
(153, 'America/Marigot\r', 1),
(154, 'America/Martinique\r', 1),
(155, 'America/Matamoros\r', 1),
(156, 'America/Mazatlan\r', 1),
(157, 'America/Mendoza\r', 1),
(158, 'America/Menominee\r', 1),
(159, 'America/Merida\r', 1),
(160, 'America/Metlakatla\r', 1),
(161, 'America/Mexico_City\r', 1),
(162, 'America/Miquelon\r', 1),
(163, 'America/Moncton\r', 1),
(164, 'America/Monterrey\r', 1),
(165, 'America/Montevideo\r', 1),
(166, 'America/Montreal\r', 1),
(167, 'America/Montserrat\r', 1),
(168, 'America/Nassau\r', 1),
(169, 'America/New_York\r', 1),
(170, 'America/Nipigon\r', 1),
(171, 'America/Nome\r', 1),
(172, 'America/Noronha\r', 1),
(173, 'America/North_Dakota/Beulah\r', 1),
(174, 'America/North_Dakota/Center\r', 1),
(175, 'America/North_Dakota/New_Salem\r', 1),
(176, 'America/Ojinaga\r', 1),
(177, 'America/Panama\r', 1),
(178, 'America/Pangnirtung\r', 1),
(179, 'America/Paramaribo\r', 1),
(180, 'America/Phoenix\r', 1),
(181, 'America/Port_of_Spain\r', 1),
(182, 'America/Port-au-Prince\r', 1),
(183, 'America/Porto_Acre\r', 1),
(184, 'America/Porto_Velho\r', 1),
(185, 'America/Puerto_Rico\r', 1),
(186, 'America/Rainy_River\r', 1),
(187, 'America/Rankin_Inlet\r', 1),
(188, 'America/Recife\r', 1),
(189, 'America/Regina\r', 1),
(190, 'America/Resolute\r', 1),
(191, 'America/Rio_Branco\r', 1),
(192, 'America/Rosario\r', 1),
(193, 'America/Santa_Isabel\r', 1),
(194, 'America/Santarem\r', 1),
(195, 'America/Santiago\r', 1),
(196, 'America/Santo_Domingo\r', 1),
(197, 'America/Sao_Paulo\r', 1),
(198, 'America/Scoresbysund\r', 1),
(199, 'America/Shiprock\r', 1),
(200, 'America/Sitka\r', 1),
(201, 'America/St_Barthelemy\r', 1),
(202, 'America/St_Johns\r', 1),
(203, 'America/St_Kitts\r', 1),
(204, 'America/St_Lucia\r', 1),
(205, 'America/St_Thomas\r', 1),
(206, 'America/St_Vincent\r', 1),
(207, 'America/Swift_Current\r', 1),
(208, 'America/Tegucigalpa\r', 1),
(209, 'America/Thule\r', 1),
(210, 'America/Thunder_Bay\r', 1),
(211, 'America/Tijuana\r', 1),
(212, 'America/Toronto\r', 1),
(213, 'America/Tortola\r', 1),
(214, 'America/Vancouver\r', 1),
(215, 'America/Virgin\r', 1),
(216, 'America/Whitehorse\r', 1),
(217, 'America/Winnipeg\r', 1),
(218, 'America/Yakutat\r', 1),
(219, 'America/Yellowknife\r', 1),
(220, 'Antarctica/Casey\r', 1),
(221, 'Antarctica/Davis\r', 1),
(222, 'Antarctica/DumontDUrville\r', 1),
(223, 'Antarctica/Macquarie\r', 1),
(224, 'Antarctica/Mawson\r', 1),
(225, 'Antarctica/McMurdo\r', 1),
(226, 'Antarctica/Palmer\r', 1),
(227, 'Antarctica/Rothera\r', 1),
(228, 'Antarctica/South_Pole\r', 1),
(229, 'Antarctica/Syowa\r', 1),
(230, 'Antarctica/Vostok\r', 1),
(231, 'Arctic/Longyearbyen\r', 1),
(232, 'Asia/Aden\r', 1),
(233, 'Asia/Almaty\r', 1),
(234, 'Asia/Amman\r', 1),
(235, 'Asia/Anadyr\r', 1),
(236, 'Asia/Aqtau\r', 1),
(237, 'Asia/Aqtobe\r', 1),
(238, 'Asia/Ashgabat\r', 1),
(239, 'Asia/Ashkhabad\r', 1),
(240, 'Asia/Baghdad\r', 1),
(241, 'Asia/Bahrain\r', 1),
(242, 'Asia/Baku\r', 1),
(243, 'Asia/Bangkok\r', 1),
(244, 'Asia/Beirut\r', 1),
(245, 'Asia/Bishkek\r', 1),
(246, 'Asia/Brunei\r', 1),
(247, 'Asia/Calcutta\r', 1),
(248, 'Asia/Choibalsan\r', 1),
(249, 'Asia/Chongqing\r', 1),
(250, 'Asia/Chungking\r', 1),
(251, 'Asia/Colombo\r', 1),
(252, 'Asia/Dacca\r', 1),
(253, 'Asia/Damascus\r', 1),
(254, 'Asia/Dhaka\r', 1),
(255, 'Asia/Dili\r', 1),
(256, 'Asia/Dubai\r', 1),
(257, 'Asia/Dushanbe\r', 1),
(258, 'Asia/Gaza\r', 1),
(259, 'Asia/Harbin\r', 1),
(260, 'Asia/Hebron\r', 1),
(261, 'Asia/Ho_Chi_Minh\r', 1),
(262, 'Asia/Hong_Kong\r', 1),
(263, 'Asia/Hovd\r', 1),
(264, 'Asia/Irkutsk\r', 1),
(265, 'Asia/Istanbul\r', 1),
(266, 'Asia/Jakarta\r', 1),
(267, 'Asia/Jayapura\r', 1),
(268, 'Asia/Jerusalem\r', 1),
(269, 'Asia/Kabul\r', 1),
(270, 'Asia/Kamchatka\r', 1),
(271, 'Asia/Karachi\r', 1),
(272, 'Asia/Kashgar\r', 1),
(273, 'Asia/Kathmandu\r', 1),
(274, 'Asia/Katmandu\r', 1),
(275, 'Asia/Kolkata\r', 1),
(276, 'Asia/Krasnoyarsk\r', 1),
(277, 'Asia/Kuala_Lumpur\r', 1),
(278, 'Asia/Kuching\r', 1),
(279, 'Asia/Kuwait\r', 1),
(280, 'Asia/Macao\r', 1),
(281, 'Asia/Macau\r', 1),
(282, 'Asia/Magadan\r', 1),
(283, 'Asia/Makassar\r', 1),
(284, 'Asia/Manila\r', 1),
(285, 'Asia/Muscat\r', 1),
(286, 'Asia/Nicosia\r', 1),
(287, 'Asia/Novokuznetsk\r', 1),
(288, 'Asia/Novosibirsk\r', 1),
(289, 'Asia/Omsk\r', 1),
(290, 'Asia/Oral\r', 1),
(291, 'Asia/Phnom_Penh\r', 1),
(292, 'Asia/Pontianak\r', 1),
(293, 'Asia/Pyongyang\r', 1),
(294, 'Asia/Qatar\r', 1),
(295, 'Asia/Qyzylorda\r', 1),
(296, 'Asia/Rangoon\r', 1),
(297, 'Asia/Riyadh\r', 1),
(298, 'Asia/Saigon\r', 1),
(299, 'Asia/Sakhalin\r', 1),
(300, 'Asia/Samarkand\r', 1),
(301, 'Asia/Seoul\r', 1),
(302, 'Asia/Shanghai\r', 1),
(303, 'Asia/Singapore\r', 1),
(304, 'Asia/Taipei\r', 1),
(305, 'Asia/Tashkent\r', 1),
(306, 'Asia/Tbilisi\r', 1),
(307, 'Asia/Tehran\r', 1),
(308, 'Asia/Tel_Aviv\r', 1),
(309, 'Asia/Thimbu\r', 1),
(310, 'Asia/Thimphu\r', 1),
(311, 'Asia/Tokyo\r', 1),
(312, 'Asia/Ujung_Pandang\r', 1),
(313, 'Asia/Ulaanbaatar\r', 1),
(314, 'Asia/Ulan_Bator\r', 1),
(315, 'Asia/Urumqi\r', 1),
(316, 'Asia/Vientiane\r', 1),
(317, 'Asia/Vladivostok\r', 1),
(318, 'Asia/Yakutsk\r', 1),
(319, 'Asia/Yekaterinburg\r', 1),
(320, 'Asia/Yerevan\r', 1),
(321, 'Atlantic/Azores\r', 1),
(322, 'Atlantic/Bermuda\r', 1),
(323, 'Atlantic/Canary\r', 1),
(324, 'Atlantic/Cape_Verde\r', 1),
(325, 'Atlantic/Faeroe\r', 1),
(326, 'Atlantic/Faroe\r', 1),
(327, 'Atlantic/Jan_Mayen\r', 1),
(328, 'Atlantic/Madeira\r', 1),
(329, 'Atlantic/Reykjavik\r', 1),
(330, 'Atlantic/South_Georgia\r', 1),
(331, 'Atlantic/St_Helena\r', 1),
(332, 'Atlantic/Stanley\r', 1),
(333, 'Australia/ACT\r', 1),
(334, 'Australia/Adelaide\r', 1),
(335, 'Australia/Brisbane\r', 1),
(336, 'Australia/Broken_Hill\r', 1),
(337, 'Australia/Canberra\r', 1),
(338, 'Australia/Currie\r', 1),
(339, 'Australia/Darwin\r', 1),
(340, 'Australia/Eucla\r', 1),
(341, 'Australia/Hobart\r', 1),
(342, 'Australia/LHI\r', 1),
(343, 'Australia/Lindeman\r', 1),
(344, 'Australia/Lord_Howe\r', 1),
(345, 'Australia/Melbourne\r', 1),
(346, 'Australia/North\r', 1),
(347, 'Australia/NSW\r', 1),
(348, 'Australia/Perth\r', 1),
(349, 'Australia/Queensland\r', 1),
(350, 'Australia/South\r', 1),
(351, 'Australia/Sydney\r', 1),
(352, 'Australia/Tasmania\r', 1),
(353, 'Australia/Victoria\r', 1),
(354, 'Australia/West\r', 1),
(355, 'Australia/Yancowinna\r', 1),
(356, 'Brazil/Acre\r', 1),
(357, 'Brazil/DeNoronha\r', 1),
(358, 'Brazil/East\r', 1),
(359, 'Brazil/West\r', 1),
(360, 'Canada/Atlantic\r', 1),
(361, 'Canada/Central\r', 1),
(362, 'Canada/Eastern\r', 1),
(363, 'Canada/East-Saskatchewan\r', 1),
(364, 'Canada/Mountain\r', 1),
(365, 'Canada/Newfoundland\r', 1),
(366, 'Canada/Pacific\r', 1),
(367, 'Canada/Saskatchewan\r', 1),
(368, 'Canada/Yukon\r', 1),
(369, 'CET\r', 1),
(370, 'Chile/Continental\r', 1),
(371, 'Chile/EasterIsland\r', 1),
(372, 'CST6CDT\r', 1),
(373, 'Cuba\r', 1),
(374, 'EET\r', 1),
(375, 'Egypt\r', 1),
(376, 'Eire\r', 1),
(377, 'EST\r', 1),
(378, 'EST5EDT\r', 1),
(379, 'Etc./GMT\r', 1),
(380, 'Etc./GMT+0\r', 1),
(381, 'Etc./UCT\r', 1),
(382, 'Etc./Universal\r', 1),
(383, 'Etc./UTC\r', 1),
(384, 'Etc./Zulu\r', 1),
(385, 'Europe/Amsterdam\r', 1),
(386, 'Europe/Andorra\r', 1),
(387, 'Europe/Athens\r', 1),
(388, 'Europe/Belfast\r', 1),
(389, 'Europe/Belgrade\r', 1),
(390, 'Europe/Berlin\r', 1),
(391, 'Europe/Bratislava\r', 1),
(392, 'Europe/Brussels\r', 1),
(393, 'Europe/Bucharest\r', 1),
(394, 'Europe/Budapest\r', 1),
(395, 'Europe/Chisinau\r', 1),
(396, 'Europe/Copenhagen\r', 1),
(397, 'Europe/Dublin\r', 1),
(398, 'Europe/Gibraltar\r', 1),
(399, 'Europe/Guernsey\r', 1),
(400, 'Europe/Helsinki\r', 1),
(401, 'Europe/Isle_of_Man\r', 1),
(402, 'Europe/Istanbul\r', 1),
(403, 'Europe/Jersey\r', 1),
(404, 'Europe/Kaliningrad\r', 1),
(405, 'Europe/Kiev\r', 1),
(406, 'Europe/Lisbon\r', 1),
(407, 'Europe/Ljubljana\r', 1),
(408, 'Europe/London\r', 1),
(409, 'Europe/Luxembourg\r', 1),
(410, 'Europe/Madrid\r', 1),
(411, 'Europe/Malta\r', 1),
(412, 'Europe/Mariehamn\r', 1),
(413, 'Europe/Minsk\r', 1),
(414, 'Europe/Monaco\r', 1),
(415, 'Europe/Moscow\r', 1),
(416, 'Europe/Nicosia\r', 1),
(417, 'Europe/Oslo\r', 1),
(418, 'Europe/Paris\r', 1),
(419, 'Europe/Podgorica\r', 1),
(420, 'Europe/Prague\r', 1),
(421, 'Europe/Riga\r', 1),
(422, 'Europe/Rome\r', 1),
(423, 'Europe/Samara\r', 1),
(424, 'Europe/San_Marino\r', 1),
(425, 'Europe/Sarajevo\r', 1),
(426, 'Europe/Simferopol\r', 1),
(427, 'Europe/Skopje\r', 1),
(428, 'Europe/Sofia\r', 1),
(429, 'Europe/Stockholm\r', 1),
(430, 'Europe/Tallinn\r', 1),
(431, 'Europe/Tirane\r', 1),
(432, 'Europe/Tiraspol\r', 1),
(433, 'Europe/Uzhgorod\r', 1),
(434, 'Europe/Vaduz\r', 1),
(435, 'Europe/Vatican\r', 1),
(436, 'Europe/Vienna\r', 1),
(437, 'Europe/Vilnius\r', 1),
(438, 'Europe/Volgograd\r', 1),
(439, 'Europe/Warsaw\r', 1),
(440, 'Europe/Zagreb\r', 1),
(441, 'Europe/Zaporozhye\r', 1),
(442, 'Europe/Zurich\r', 1),
(443, 'GB\r', 1),
(444, 'GB-Eire\r', 1),
(445, 'GMT\r', 1),
(446, 'GMT+0\r', 1),
(447, 'GMT0\r', 1),
(448, 'GMT-0\r', 1),
(449, 'Greenwich\r', 1),
(450, 'Hong Kong\r', 1),
(451, 'HST\r', 1),
(452, 'Iceland\r', 1),
(453, 'Indian/Antananarivo\r', 1),
(454, 'Indian/Chagos\r', 1),
(455, 'Indian/Christmas\r', 1),
(456, 'Indian/Cocos\r', 1),
(457, 'Indian/Comoro\r', 1),
(458, 'Indian/Kerguelen\r', 1),
(459, 'Indian/Mahe\r', 1),
(460, 'Indian/Maldives\r', 1),
(461, 'Indian/Mauritius\r', 1),
(462, 'Indian/Mayotte\r', 1),
(463, 'Indian/Reunion\r', 1),
(464, 'Iran\r', 1),
(465, 'Israel\r', 1),
(466, 'Jamaica\r', 1),
(467, 'Japan\r', 1),
(468, 'JST-9\r', 1),
(469, 'Kwajalein\r', 1),
(470, 'Libya\r', 1),
(471, 'MET\r', 1),
(472, 'Mexico/BajaNorte\r', 1),
(473, 'Mexico/BajaSur\r', 1),
(474, 'Mexico/General\r', 1),
(475, 'MST\r', 1),
(476, 'MST7MDT\r', 1),
(477, 'Navajo\r', 1),
(478, 'NZ\r', 1),
(479, 'NZ-CHAT\r', 1),
(480, 'Pacific/Apia\r', 1),
(481, 'Pacific/Auckland\r', 1),
(482, 'Pacific/Chatham\r', 1),
(483, 'Pacific/Chuuk\r', 1),
(484, 'Pacific/Easter\r', 1),
(485, 'Pacific/Efate\r', 1),
(486, 'Pacific/Enderbury\r', 1),
(487, 'Pacific/Fakaofo\r', 1),
(488, 'Pacific/Fiji\r', 1),
(489, 'Pacific/Funafuti\r', 1),
(490, 'Pacific/Galapagos\r', 1),
(491, 'Pacific/Gambier\r', 1),
(492, 'Pacific/Guadalcanal\r', 1),
(493, 'Pacific/Guam\r', 1),
(494, 'Pacific/Honolulu\r', 1),
(495, 'Pacific/Johnston\r', 1),
(496, 'Pacific/Kiritimati\r', 1),
(497, 'Pacific/Kosrae\r', 1),
(498, 'Pacific/Kwajalein\r', 1),
(499, 'Pacific/Majuro\r', 1),
(500, 'Pacific/Marquesas\r', 1),
(501, 'Pacific/Midway\r', 1),
(502, 'Pacific/Nauru\r', 1),
(503, 'Pacific/Niue\r', 1),
(504, 'Pacific/Norfolk\r', 1),
(505, 'Pacific/Noumea\r', 1),
(506, 'Pacific/Pago_Pago\r', 1),
(507, 'Pacific/Palau\r', 1),
(508, 'Pacific/Pitcairn\r', 1),
(509, 'Pacific/Pohnpei\r', 1),
(510, 'Pacific/Ponape\r', 1),
(511, 'Pacific/Port_Moresby\r', 1),
(512, 'Pacific/Rarotonga\r', 1),
(513, 'Pacific/Saipan\r', 1),
(514, 'Pacific/Samoa\r', 1),
(515, 'Pacific/Tahiti\r', 1),
(516, 'Pacific/Tarawa\r', 1),
(517, 'Pacific/Tongatapu\r', 1),
(518, 'Pacific/Truk\r', 1),
(519, 'Pacific/Wake\r', 1),
(520, 'Pacific/Wallis\r', 1),
(521, 'Pacific/Yap\r', 1),
(522, 'Poland\r', 1),
(523, 'Portugal\r', 1),
(524, 'PRC\r', 1),
(525, 'PST8PDT\r', 1),
(526, 'ROC\r', 1),
(527, 'ROK\r', 1),
(528, 'Singapore\r', 1),
(529, 'Turkey\r', 1),
(530, 'UCT\r', 1),
(531, 'Universal\r', 1),
(532, 'US/Alaska\r', 1),
(533, 'US/Aleutian\r', 1),
(534, 'US/Arizona\r', 1),
(535, 'US/Central\r', 1),
(536, 'US/Eastern\r', 1),
(537, 'US/East-Indiana\r', 1),
(538, 'US/Hawaii\r', 1),
(539, 'US/Indiana-Starke\r', 1),
(540, 'US/Michigan\r', 1),
(541, 'US/Mountain\r', 1),
(542, 'US/Pacific\r', 1),
(543, 'US/Pacific-New\r', 1),
(544, 'US/Samoa\r', 1),
(545, 'UTC\r', 1),
(546, 'WET\r', 1),
(547, 'W-SU\r', 1),
(548, 'Zulu\r', 1);

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

--
-- Table structure for table `db_twilio`
--

CREATE TABLE `db_twilio` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `account_sid` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `auth_token` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `twilio_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` int(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_twilio`
--

INSERT INTO `db_twilio` (`id`, `store_id`, `account_sid`, `auth_token`, `twilio_phone`, `status`) VALUES
(1, 1, '', '', '', 0),
(3, 2, '', '', '', 0);

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

--
-- Table structure for table `db_units`
--

CREATE TABLE `db_units` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `unit_name` varchar(50) DEFAULT NULL,
  `description` mediumtext DEFAULT NULL,
  `company_id` int(5) DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_units`
--

INSERT INTO `db_units` (`id`, `store_id`, `unit_name`, `description`, `company_id`, `status`) VALUES
(1, 2, 'Pcs', 'Pieces', NULL, 1),
(2, 2, 'Bags', 'Bags', NULL, 1),
(3, 2, 'Pkts', 'Packets', NULL, 1),
(4, 2, 'Kgs', 'Kilograms', NULL, 1);

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

--
-- Table structure for table `db_users`
--

CREATE TABLE `db_users` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `username` varchar(50) DEFAULT NULL,
  `first_name` varchar(100) DEFAULT NULL,
  `last_name` varchar(100) DEFAULT NULL,
  `password` blob DEFAULT NULL,
  `member_of` varchar(50) DEFAULT NULL,
  `firstname` varchar(50) DEFAULT NULL,
  `lastname` varchar(50) DEFAULT NULL,
  `mobile` varchar(50) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `photo` blob DEFAULT NULL,
  `gender` varchar(50) DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `country` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `address` blob DEFAULT NULL,
  `postcode` varchar(50) DEFAULT NULL,
  `role_name` varchar(50) DEFAULT NULL,
  `role_id` int(5) DEFAULT NULL,
  `profile_picture` text DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `system_ip` varchar(100) DEFAULT NULL,
  `system_name` varchar(100) DEFAULT NULL,
  `status` double DEFAULT NULL,
  `creater_id` int(5) DEFAULT NULL,
  `updater_id` int(5) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `default_warehouse_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_users`
--

INSERT INTO `db_users` (`id`, `store_id`, `username`, `first_name`, `last_name`, `password`, `member_of`, `firstname`, `lastname`, `mobile`, `email`, `photo`, `gender`, `dob`, `country`, `state`, `city`, `address`, `postcode`, `role_name`, `role_id`, `profile_picture`, `created_date`, `created_time`, `created_by`, `system_ip`, `system_name`, `status`, `creater_id`, `updater_id`, `updated_at`, `default_warehouse_id`) VALUES
(1, 1, 'super', 'Admin', 'Power', 0x6531306164633339343962613539616262653536653035376632306638383365, '', NULL, NULL, '', 'super@example.com', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 'uploads/users/admin.png', '2018-11-27', '::1', NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL),
(2, 2, 'admin', 'Chris', 'Morris', 0x6531306164633339343962613539616262653536653035376632306638383365, NULL, NULL, NULL, '9999999999', 'admin@example.com', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, 'uploads/users/avatar1.png', '2021-02-12', '05:53:37 pm', '', '127.0.0.1', 'LAPTOP-I5OUIM4R', 1, NULL, NULL, NULL, 0),
(3, 2, 'Manager', 'Store', 'Manager', 0x6531306164633339343962613539616262653536653035376632306638383365, NULL, NULL, NULL, '', 'manager@example.com', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 31, NULL, '2025-10-23', '11:13:50 pm', 'admin', '::1', 'DESKTOP-8R56H6J', 1, NULL, NULL, NULL, 2),
(4, 2, 'Cashier', 'Cashier', 'Manager', 0x6531306164633339343962613539616262653536653035376632306638383365, NULL, NULL, NULL, '', 'cashier@example.com', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 32, NULL, '2025-10-24', '06:48:21 pm', 'admin', '::1', 'DESKTOP-8R56H6J', 1, NULL, NULL, NULL, 2);

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

--
-- Table structure for table `db_userswarehouses`
--

CREATE TABLE `db_userswarehouses` (
  `id` int(5) NOT NULL,
  `user_id` int(5) DEFAULT NULL,
  `warehouse_id` int(5) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_userswarehouses`
--

INSERT INTO `db_userswarehouses` (`id`, `user_id`, `warehouse_id`) VALUES
(75, 2, 2),
(76, 3, 2),
(78, 4, 2);

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

--
-- Table structure for table `db_variants`
--

CREATE TABLE `db_variants` (
  `id` int(5) NOT NULL,
  `store_id` int(11) DEFAULT NULL,
  `variant_code` varchar(50) DEFAULT NULL,
  `variant_name` varchar(100) DEFAULT NULL,
  `description` mediumtext DEFAULT NULL,
  `status` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `db_warehouse`
--

CREATE TABLE `db_warehouse` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `warehouse_type` varchar(50) DEFAULT NULL,
  `warehouse_name` varchar(50) DEFAULT NULL,
  `mobile` varchar(20) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `created_date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `db_warehouse`
--

INSERT INTO `db_warehouse` (`id`, `store_id`, `warehouse_type`, `warehouse_name`, `mobile`, `email`, `status`, `created_date`) VALUES
(1, 1, 'System', 'Warehouse-A', '', 'warehouse_a@example.com', 1, NULL),
(2, 2, 'System', 'System Warehouse', '', '', 1, NULL);

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

--
-- Table structure for table `db_warehouseitems`
--

CREATE TABLE `db_warehouseitems` (
  `id` int(5) NOT NULL,
  `store_id` int(5) DEFAULT NULL,
  `warehouse_id` int(5) DEFAULT NULL,
  `item_id` int(5) DEFAULT NULL,
  `available_qty` double(20,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `temp_holdinvoice`
--

CREATE TABLE `temp_holdinvoice` (
  `id` int(5) NOT NULL,
  `invoice_id` int(5) DEFAULT NULL,
  `invoice_date` date DEFAULT NULL,
  `reference_id` varchar(50) DEFAULT NULL,
  `item_id` int(5) DEFAULT NULL,
  `item_qty` int(5) DEFAULT NULL,
  `item_price` double(10,2) DEFAULT NULL,
  `tax` double(10,2) DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `created_time` varchar(50) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `system_ip` varchar(50) DEFAULT NULL,
  `system_name` varchar(50) DEFAULT NULL,
  `pos` int(5) DEFAULT NULL,
  `status` int(5) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Stand-in structure for view `view_purchase_requisitions_summary`
-- (See below for the actual view)
--
CREATE TABLE `view_purchase_requisitions_summary` (
`id` int(11)
,`requisition_code` varchar(50)
,`requisition_date` date
,`priority` enum('Low','Medium','High','Urgent')
,`status` enum('Draft','Pending','Approved','Rejected','Converted','Cancelled')
,`total_amount` decimal(15,2)
,`notes` text
,`rejection_reason` text
,`created_date` datetime
,`updated_date` datetime
,`requested_by_name` varchar(50)
,`approved_by_name` varchar(50)
,`rejected_by_name` varchar(50)
,`store_name` varchar(150)
,`warehouse_name` varchar(50)
,`currency_name` varchar(50)
,`total_items` bigint(21)
,`total_requested_qty` decimal(37,2)
);

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

--
-- Structure for view `view_purchase_requisitions_summary`
--
DROP TABLE IF EXISTS `view_purchase_requisitions_summary`;

CREATE VIEW `view_purchase_requisitions_summary` AS 
SELECT `pr`.`id` AS `id`, `pr`.`requisition_code` AS `requisition_code`, `pr`.`requisition_date` AS `requisition_date`, `pr`.`priority` AS `priority`, `pr`.`status` AS `status`, `pr`.`total_amount` AS `total_amount`, `pr`.`notes` AS `notes`, `pr`.`rejection_reason` AS `rejection_reason`, `pr`.`created_date` AS `created_date`, `pr`.`updated_date` AS `updated_date`, `u1`.`username` AS `requested_by_name`, `u2`.`username` AS `approved_by_name`, `u3`.`username` AS `rejected_by_name`, `s`.`store_name` AS `store_name`, `w`.`warehouse_name` AS `warehouse_name`, `c`.`currency_name` AS `currency_name`, count(`pri`.`id`) AS `total_items`, sum(`pri`.`requested_qty`) AS `total_requested_qty` 
FROM (((((((`db_purchase_requisitions` `pr` left join `db_users` `u1` on(`pr`.`requested_by` = `u1`.`id`)) left join `db_users` `u2` on(`pr`.`approved_by` = `u2`.`id`)) left join `db_users` `u3` on(`pr`.`rejected_by` = `u3`.`id`)) left join `db_store` `s` on(`pr`.`store_id` = `s`.`id`)) left join `db_warehouse` `w` on(`pr`.`warehouse_id` = `w`.`id`)) left join `db_currency` `c` on(`pr`.`currency_id` = `c`.`id`)) left join `db_purchase_requisition_items` `pri` on(`pr`.`id` = `pri`.`requisition_id`)) 
GROUP BY `pr`.`id` ;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `ac_accounts`
--
ALTER TABLE `ac_accounts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `paymenttypes_id` (`paymenttypes_id`),
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `supplier_id` (`supplier_id`),
  ADD KEY `expense_id` (`expense_id`),
  ADD KEY `fk_ac_accounts_currency` (`currency_id`);

--
-- Indexes for table `ac_moneydeposits`
--
ALTER TABLE `ac_moneydeposits`
  ADD PRIMARY KEY (`id`),
  ADD KEY `from_account_id` (`debit_account_id`),
  ADD KEY `to_account_id` (`credit_account_id`),
  ADD KEY `db_moneydeposits_ibfk_3` (`store_id`),
  ADD KEY `idx_deposit_currency_id` (`deposit_currency_id`);

--
-- Indexes for table `ac_moneytransfer`
--
ALTER TABLE `ac_moneytransfer`
  ADD PRIMARY KEY (`id`),
  ADD KEY `from_account_id` (`debit_account_id`),
  ADD KEY `to_account_id` (`credit_account_id`),
  ADD KEY `db_moneytransfer_ibfk_3` (`store_id`),
  ADD KEY `idx_transfer_currency_id` (`transfer_currency_id`);

--
-- Indexes for table `ac_transactions`
--
ALTER TABLE `ac_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `journal_id` (`transaction_type`),
  ADD KEY `account_id` (`debit_account_id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `ac_accounts_id` (`ref_accounts_id`),
  ADD KEY `ac_moneytransfer_id` (`ref_moneytransfer_id`),
  ADD KEY `ac_moneydeposits_id` (`ref_moneydeposits_id`),
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `ref_salespayments_id` (`ref_salespayments_id`),
  ADD KEY `ref_purchasepayments_id` (`ref_purchasepayments_id`),
  ADD KEY `ref_purchasepaymentsreturn_id` (`ref_purchasepaymentsreturn_id`),
  ADD KEY `ac_transactions_ibfk_9` (`ref_salespaymentsreturn_id`),
  ADD KEY `supplier_id` (`supplier_id`),
  ADD KEY `ref_expense_id` (`ref_expense_id`),
  ADD KEY `idx_transaction_currency_id` (`transaction_currency_id`);

--
-- Indexes for table `ci_sessions`
--
ALTER TABLE `ci_sessions`
  ADD KEY `ci_sessions_timestamp` (`timestamp`);

--
-- Indexes for table `db_activities`
--
ALTER TABLE `db_activities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `assigned_to` (`assigned_to`),
  ADD KEY `related_type` (`related_type`),
  ADD KEY `related_id` (`related_id`),
  ADD KEY `activity_type` (`activity_type`),
  ADD KEY `status` (`status`),
  ADD KEY `idx_activities_due` (`due_date`,`status`),
  ADD KEY `idx_activities_related` (`related_type`,`related_id`);

--
-- Indexes for table `db_bankdetails`
--
ALTER TABLE `db_bankdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_brands`
--
ALTER TABLE `db_brands`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_campaigns`
--
ALTER TABLE `db_campaigns`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `currency_id` (`currency_id`),
  ADD KEY `campaign_type` (`campaign_type`),
  ADD KEY `status` (`status`),
  ADD KEY `idx_campaigns_status` (`status`,`store_id`);

--
-- Indexes for table `db_category`
--
ALTER TABLE `db_category`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

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

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

--
-- Indexes for table `db_coupons`
--
ALTER TABLE `db_coupons`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

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

--
-- Indexes for table `db_currency_conversion_log`
--
ALTER TABLE `db_currency_conversion_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_transaction` (`transaction_type`,`transaction_id`),
  ADD KEY `idx_conversion_date` (`conversion_date`);

--
-- Indexes for table `db_custadvance`
--
ALTER TABLE `db_custadvance`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_customers`
--
ALTER TABLE `db_customers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `idx_trading_currency` (`trading_currency_id`);

--
-- Indexes for table `db_customer_coupons`
--
ALTER TABLE `db_customer_coupons`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `coupon_id` (`coupon_id`);

--
-- Indexes for table `db_customer_payments`
--
ALTER TABLE `db_customer_payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `salespayment_id` (`salespayment_id`);

--
-- Indexes for table `db_emailtemplates`
--
ALTER TABLE `db_emailtemplates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_exchange_rates`
--
ALTER TABLE `db_exchange_rates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `from_currency_id` (`from_currency_id`),
  ADD KEY `to_currency_id` (`to_currency_id`),
  ADD KEY `effective_date` (`effective_date`),
  ADD KEY `rate_type` (`rate_type`),
  ADD KEY `status` (`status`);

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

--
-- Indexes for table `db_expense_category`
--
ALTER TABLE `db_expense_category`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_expiry_alerts`
--
ALTER TABLE `db_expiry_alerts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `item_id` (`item_id`),
  ADD KEY `batch_id` (`batch_id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `expiry_date` (`expiry_date`),
  ADD KEY `alert_sent` (`alert_sent`);

--
-- Indexes for table `db_fivemojo`
--
ALTER TABLE `db_fivemojo`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_hold`
--
ALTER TABLE `db_hold`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `warehouse_id` (`warehouse_id`);

--
-- Indexes for table `db_holditems`
--
ALTER TABLE `db_holditems`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `sales_id` (`hold_id`),
  ADD KEY `item_id` (`item_id`);

--
-- Indexes for table `db_instamojo`
--
ALTER TABLE `db_instamojo`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

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

--
-- Indexes for table `db_items`
--
ALTER TABLE `db_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_item_batches`
--
ALTER TABLE `db_item_batches`
  ADD PRIMARY KEY (`id`),
  ADD KEY `item_id` (`item_id`),
  ADD KEY `batch_number` (`batch_number`),
  ADD KEY `expiry_date` (`expiry_date`),
  ADD KEY `store_id` (`store_id`);

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

--
-- Indexes for table `db_leads`
--
ALTER TABLE `db_leads`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `assigned_to` (`assigned_to`),
  ADD KEY `currency_id` (`currency_id`),
  ADD KEY `lead_status` (`lead_status`),
  ADD KEY `lead_source` (`lead_source`),
  ADD KEY `idx_leads_status` (`lead_status`,`store_id`),
  ADD KEY `idx_leads_assigned` (`assigned_to`,`store_id`);

--
-- Indexes for table `db_lead_sources`
--
ALTER TABLE `db_lead_sources`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_notifications`
--
ALTER TABLE `db_notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `is_read` (`is_read`),
  ADD KEY `notification_type` (`notification_type`),
  ADD KEY `created_at` (`created_at`);

--
-- Indexes for table `db_opportunities`
--
ALTER TABLE `db_opportunities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `lead_id` (`lead_id`),
  ADD KEY `assigned_to` (`assigned_to`),
  ADD KEY `currency_id` (`currency_id`),
  ADD KEY `stage` (`stage`),
  ADD KEY `idx_opportunities_stage` (`stage`,`store_id`),
  ADD KEY `idx_opportunities_assigned` (`assigned_to`,`store_id`);

--
-- Indexes for table `db_package`
--
ALTER TABLE `db_package`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_paymenttypes`
--
ALTER TABLE `db_paymenttypes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_paypal`
--
ALTER TABLE `db_paypal`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_paypalpaylog`
--
ALTER TABLE `db_paypalpaylog`
  ADD PRIMARY KEY (`payment_id`);

--
-- Indexes for table `db_permissions`
--
ALTER TABLE `db_permissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

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

--
-- Indexes for table `db_pro_approval_users`
--
ALTER TABLE `db_pro_approval_users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_id` (`user_id`),
  ADD KEY `is_active` (`is_active`),
  ADD KEY `amount_range` (`min_amount`,`max_amount`),
  ADD KEY `fk_pro_approval_users_created_by` (`created_by`),
  ADD KEY `fk_pro_approval_users_updated_by` (`updated_by`);

--
-- Indexes for table `db_pro_settings`
--
ALTER TABLE `db_pro_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `setting_name` (`setting_name`),
  ADD KEY `is_active` (`is_active`);

--
-- Indexes for table `db_purchase`
--
ALTER TABLE `db_purchase`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `supplier_id` (`supplier_id`),
  ADD KEY `idx_transaction_currency` (`transaction_currency_id`),
  ADD KEY `idx_purchase_currency` (`transaction_currency_id`,`purchase_date`);

--
-- Indexes for table `db_purchaseitems`
--
ALTER TABLE `db_purchaseitems`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `purchase_id` (`purchase_id`);

--
-- Indexes for table `db_purchaseitemsreturn`
--
ALTER TABLE `db_purchaseitemsreturn`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `return_id` (`return_id`),
  ADD KEY `purchase_id` (`purchase_id`);

--
-- Indexes for table `db_purchasepayments`
--
ALTER TABLE `db_purchasepayments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `purchase_id` (`purchase_id`),
  ADD KEY `supplier_id` (`supplier_id`);

--
-- Indexes for table `db_purchasepaymentsreturn`
--
ALTER TABLE `db_purchasepaymentsreturn`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `return_id` (`return_id`),
  ADD KEY `supplier_id` (`supplier_id`);

--
-- Indexes for table `db_purchasereturn`
--
ALTER TABLE `db_purchasereturn`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `purchase_id` (`purchase_id`);

--
-- Indexes for table `db_purchase_requisitions`
--
ALTER TABLE `db_purchase_requisitions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `requisition_code` (`requisition_code`),
  ADD KEY `requested_by` (`requested_by`),
  ADD KEY `requested_for` (`requested_for`),
  ADD KEY `approved_by` (`approved_by`),
  ADD KEY `rejected_by` (`rejected_by`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `warehouse_id` (`warehouse_id`),
  ADD KEY `status` (`status`),
  ADD KEY `created_date` (`created_date`),
  ADD KEY `idx_requisitions_status_date` (`status`,`requisition_date`),
  ADD KEY `idx_requisitions_requested_by` (`requested_by`,`status`);

--
-- Indexes for table `db_purchase_requisition_approvals`
--
ALTER TABLE `db_purchase_requisition_approvals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `requisition_id` (`requisition_id`),
  ADD KEY `approver_id` (`approver_id`),
  ADD KEY `status` (`status`);

--
-- Indexes for table `db_purchase_requisition_items`
--
ALTER TABLE `db_purchase_requisition_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `requisition_id` (`requisition_id`),
  ADD KEY `item_id` (`item_id`),
  ADD KEY `supplier_id` (`supplier_id`),
  ADD KEY `status` (`status`),
  ADD KEY `idx_requisition_items_status` (`status`,`requisition_id`);

--
-- Indexes for table `db_quotation`
--
ALTER TABLE `db_quotation`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `warehouse_id` (`warehouse_id`);

--
-- Indexes for table `db_quotationitems`
--
ALTER TABLE `db_quotationitems`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `quotation_id` (`quotation_id`);

--
-- Indexes for table `db_roles`
--
ALTER TABLE `db_roles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_sales`
--
ALTER TABLE `db_sales`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `warehouse_id` (`warehouse_id`),
  ADD KEY `coupon_id` (`coupon_id`),
  ADD KEY `idx_transaction_currency` (`transaction_currency_id`),
  ADD KEY `idx_sales_currency` (`transaction_currency_id`,`sales_date`);

--
-- Indexes for table `db_salesitems`
--
ALTER TABLE `db_salesitems`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `sales_id` (`sales_id`);

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

--
-- Indexes for table `db_salespayments`
--
ALTER TABLE `db_salespayments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `sales_id` (`sales_id`),
  ADD KEY `customer_id` (`customer_id`);

--
-- Indexes for table `db_salespaymentsreturn`
--
ALTER TABLE `db_salespaymentsreturn`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `return_id` (`return_id`),
  ADD KEY `db_salespaymentsreturn_ibfk_3` (`customer_id`);

--
-- Indexes for table `db_salesreturn`
--
ALTER TABLE `db_salesreturn`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `sales_id` (`sales_id`),
  ADD KEY `coupon_id` (`coupon_id`);

--
-- Indexes for table `db_shippingaddress`
--
ALTER TABLE `db_shippingaddress`
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `id` (`id`);

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

--
-- Indexes for table `db_smsapi`
--
ALTER TABLE `db_smsapi`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_smstemplates`
--
ALTER TABLE `db_smstemplates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

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

--
-- Indexes for table `db_states`
--
ALTER TABLE `db_states`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_stockadjustment`
--
ALTER TABLE `db_stockadjustment`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_stockadjustmentitems`
--
ALTER TABLE `db_stockadjustmentitems`
  ADD PRIMARY KEY (`id`),
  ADD KEY `purchase_id` (`adjustment_id`),
  ADD KEY `item_id` (`item_id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `warehouse_id` (`warehouse_id`);

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

--
-- Indexes for table `db_stocktransfer`
--
ALTER TABLE `db_stocktransfer`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `warehouse_id` (`warehouse_from`),
  ADD KEY `warehouse_to` (`warehouse_to`),
  ADD KEY `db_stocktransfer_ibfk_4` (`to_store_id`);

--
-- Indexes for table `db_stocktransferitems`
--
ALTER TABLE `db_stocktransferitems`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `warehouse_from` (`warehouse_from`),
  ADD KEY `warehouse_to` (`warehouse_to`),
  ADD KEY `stocktranfer_id` (`stocktransfer_id`),
  ADD KEY `item_id` (`item_id`),
  ADD KEY `db_stocktransferitems_ibfk_6` (`to_store_id`);

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

--
-- Indexes for table `db_stripe`
--
ALTER TABLE `db_stripe`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

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

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

--
-- Indexes for table `db_suppliers`
--
ALTER TABLE `db_suppliers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `idx_trading_currency` (`trading_currency_id`);

--
-- Indexes for table `db_supplier_payments`
--
ALTER TABLE `db_supplier_payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `supplier_id` (`supplier_id`),
  ADD KEY `purchasepayment_id` (`purchasepayment_id`);

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

--
-- Indexes for table `db_tax`
--
ALTER TABLE `db_tax`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

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

--
-- Indexes for table `db_twilio`
--
ALTER TABLE `db_twilio`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_units`
--
ALTER TABLE `db_units`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_users`
--
ALTER TABLE `db_users`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_userswarehouses`
--
ALTER TABLE `db_userswarehouses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `warehouse_id` (`warehouse_id`);

--
-- Indexes for table `db_variants`
--
ALTER TABLE `db_variants`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_warehouse`
--
ALTER TABLE `db_warehouse`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`);

--
-- Indexes for table `db_warehouseitems`
--
ALTER TABLE `db_warehouseitems`
  ADD PRIMARY KEY (`id`),
  ADD KEY `store_id` (`store_id`),
  ADD KEY `warehouse_id` (`warehouse_id`),
  ADD KEY `item_id` (`item_id`);

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `ac_accounts`
--
ALTER TABLE `ac_accounts`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `ac_moneydeposits`
--
ALTER TABLE `ac_moneydeposits`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ac_moneytransfer`
--
ALTER TABLE `ac_moneytransfer`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ac_transactions`
--
ALTER TABLE `ac_transactions`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

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

--
-- AUTO_INCREMENT for table `db_bankdetails`
--
ALTER TABLE `db_bankdetails`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `db_brands`
--
ALTER TABLE `db_brands`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_campaigns`
--
ALTER TABLE `db_campaigns`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_category`
--
ALTER TABLE `db_category`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `db_cobpayments`
--
ALTER TABLE `db_cobpayments`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_country`
--
ALTER TABLE `db_country`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=210;

--
-- AUTO_INCREMENT for table `db_coupons`
--
ALTER TABLE `db_coupons`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_currency`
--
ALTER TABLE `db_currency`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=177;

--
-- AUTO_INCREMENT for table `db_currency_conversion_log`
--
ALTER TABLE `db_currency_conversion_log`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_custadvance`
--
ALTER TABLE `db_custadvance`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_customers`
--
ALTER TABLE `db_customers`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `db_customer_coupons`
--
ALTER TABLE `db_customer_coupons`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `db_customer_payments`
--
ALTER TABLE `db_customer_payments`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_emailtemplates`
--
ALTER TABLE `db_emailtemplates`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `db_exchange_rates`
--
ALTER TABLE `db_exchange_rates`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_expense`
--
ALTER TABLE `db_expense`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_expense_category`
--
ALTER TABLE `db_expense_category`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_expiry_alerts`
--
ALTER TABLE `db_expiry_alerts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_fivemojo`
--
ALTER TABLE `db_fivemojo`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `db_hold`
--
ALTER TABLE `db_hold`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_holditems`
--
ALTER TABLE `db_holditems`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_instamojo`
--
ALTER TABLE `db_instamojo`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

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

--
-- AUTO_INCREMENT for table `db_items`
--
ALTER TABLE `db_items`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `db_item_batches`
--
ALTER TABLE `db_item_batches`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_languages`
--
ALTER TABLE `db_languages`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

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

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

--
-- AUTO_INCREMENT for table `db_notifications`
--
ALTER TABLE `db_notifications`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `db_package`
--
ALTER TABLE `db_package`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `db_paymenttypes`
--
ALTER TABLE `db_paymenttypes`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40;

--
-- AUTO_INCREMENT for table `db_paypal`
--
ALTER TABLE `db_paypal`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `db_paypalpaylog`
--
ALTER TABLE `db_paypalpaylog`
  MODIFY `payment_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_permissions`
--
ALTER TABLE `db_permissions`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7922;

--
-- AUTO_INCREMENT for table `db_promotional_sms_log`
--
ALTER TABLE `db_promotional_sms_log`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

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

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

--
-- AUTO_INCREMENT for table `db_purchase`
--
ALTER TABLE `db_purchase`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `db_purchaseitems`
--
ALTER TABLE `db_purchaseitems`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT for table `db_purchaseitemsreturn`
--
ALTER TABLE `db_purchaseitemsreturn`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_purchasepayments`
--
ALTER TABLE `db_purchasepayments`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_purchasepaymentsreturn`
--
ALTER TABLE `db_purchasepaymentsreturn`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_purchasereturn`
--
ALTER TABLE `db_purchasereturn`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `db_purchase_requisition_approvals`
--
ALTER TABLE `db_purchase_requisition_approvals`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `db_quotation`
--
ALTER TABLE `db_quotation`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_quotationitems`
--
ALTER TABLE `db_quotationitems`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_roles`
--
ALTER TABLE `db_roles`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

--
-- AUTO_INCREMENT for table `db_sales`
--
ALTER TABLE `db_sales`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `db_salesitems`
--
ALTER TABLE `db_salesitems`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;

--
-- AUTO_INCREMENT for table `db_salesitemsreturn`
--
ALTER TABLE `db_salesitemsreturn`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_salespayments`
--
ALTER TABLE `db_salespayments`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;

--
-- AUTO_INCREMENT for table `db_salespaymentsreturn`
--
ALTER TABLE `db_salespaymentsreturn`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_salesreturn`
--
ALTER TABLE `db_salesreturn`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_shippingaddress`
--
ALTER TABLE `db_shippingaddress`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `db_sitesettings`
--
ALTER TABLE `db_sitesettings`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `db_smsapi`
--
ALTER TABLE `db_smsapi`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;

--
-- AUTO_INCREMENT for table `db_smstemplates`
--
ALTER TABLE `db_smstemplates`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `db_sobpayments`
--
ALTER TABLE `db_sobpayments`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_states`
--
ALTER TABLE `db_states`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=830;

--
-- AUTO_INCREMENT for table `db_stockadjustment`
--
ALTER TABLE `db_stockadjustment`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_stockadjustmentitems`
--
ALTER TABLE `db_stockadjustmentitems`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_stockentry`
--
ALTER TABLE `db_stockentry`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_stocktransfer`
--
ALTER TABLE `db_stocktransfer`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_stocktransferitems`
--
ALTER TABLE `db_stocktransferitems`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_store`
--
ALTER TABLE `db_store`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `db_stripe`
--
ALTER TABLE `db_stripe`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `db_stripepayments`
--
ALTER TABLE `db_stripepayments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_subscription`
--
ALTER TABLE `db_subscription`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- AUTO_INCREMENT for table `db_suppliers`
--
ALTER TABLE `db_suppliers`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `db_supplier_payments`
--
ALTER TABLE `db_supplier_payments`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `db_tax`
--
ALTER TABLE `db_tax`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `db_timezone`
--
ALTER TABLE `db_timezone`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=549;

--
-- AUTO_INCREMENT for table `db_twilio`
--
ALTER TABLE `db_twilio`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `db_units`
--
ALTER TABLE `db_units`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `db_users`
--
ALTER TABLE `db_users`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `db_userswarehouses`
--
ALTER TABLE `db_userswarehouses`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=79;

--
-- AUTO_INCREMENT for table `db_variants`
--
ALTER TABLE `db_variants`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `db_warehouse`
--
ALTER TABLE `db_warehouse`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=86;

--
-- AUTO_INCREMENT for table `db_warehouseitems`
--
ALTER TABLE `db_warehouseitems`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4366;

--
-- AUTO_INCREMENT for table `temp_holdinvoice`
--
ALTER TABLE `temp_holdinvoice`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `ac_accounts`
--
ALTER TABLE `ac_accounts`
  ADD CONSTRAINT `ac_accounts_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_accounts_ibfk_2` FOREIGN KEY (`paymenttypes_id`) REFERENCES `db_paymenttypes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_accounts_ibfk_3` FOREIGN KEY (`customer_id`) REFERENCES `db_customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_accounts_ibfk_4` FOREIGN KEY (`supplier_id`) REFERENCES `db_suppliers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_accounts_ibfk_5` FOREIGN KEY (`expense_id`) REFERENCES `db_expense` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_ac_accounts_currency` FOREIGN KEY (`currency_id`) REFERENCES `db_currency` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `ac_moneydeposits`
--
ALTER TABLE `ac_moneydeposits`
  ADD CONSTRAINT `ac_moneydeposits_ibfk_1` FOREIGN KEY (`debit_account_id`) REFERENCES `ac_accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_moneydeposits_ibfk_2` FOREIGN KEY (`credit_account_id`) REFERENCES `ac_accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_moneydeposits_ibfk_3` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_ac_moneydeposits_currency` FOREIGN KEY (`deposit_currency_id`) REFERENCES `db_currency` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `ac_moneytransfer`
--
ALTER TABLE `ac_moneytransfer`
  ADD CONSTRAINT `ac_moneytransfer_ibfk_1` FOREIGN KEY (`debit_account_id`) REFERENCES `ac_accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_moneytransfer_ibfk_2` FOREIGN KEY (`credit_account_id`) REFERENCES `ac_accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_moneytransfer_ibfk_3` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_ac_moneytransfer_currency` FOREIGN KEY (`transfer_currency_id`) REFERENCES `db_currency` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `ac_transactions`
--
ALTER TABLE `ac_transactions`
  ADD CONSTRAINT `ac_transactions_ibfk_10` FOREIGN KEY (`ref_purchasepayments_id`) REFERENCES `db_purchasepayments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_transactions_ibfk_11` FOREIGN KEY (`ref_purchasepaymentsreturn_id`) REFERENCES `db_purchasepaymentsreturn` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_transactions_ibfk_12` FOREIGN KEY (`supplier_id`) REFERENCES `db_suppliers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_transactions_ibfk_13` FOREIGN KEY (`ref_expense_id`) REFERENCES `db_expense` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_transactions_ibfk_3` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_transactions_ibfk_4` FOREIGN KEY (`ref_accounts_id`) REFERENCES `ac_accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_transactions_ibfk_5` FOREIGN KEY (`ref_moneytransfer_id`) REFERENCES `ac_moneytransfer` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_transactions_ibfk_6` FOREIGN KEY (`ref_moneydeposits_id`) REFERENCES `ac_moneydeposits` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_transactions_ibfk_7` FOREIGN KEY (`customer_id`) REFERENCES `db_customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_transactions_ibfk_8` FOREIGN KEY (`ref_salespayments_id`) REFERENCES `db_salespayments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ac_transactions_ibfk_9` FOREIGN KEY (`ref_salespaymentsreturn_id`) REFERENCES `db_salespaymentsreturn` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_ac_transactions_currency` FOREIGN KEY (`transaction_currency_id`) REFERENCES `db_currency` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `db_activities`
--
ALTER TABLE `db_activities`
  ADD CONSTRAINT `db_activities_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `db_activities_ibfk_2` FOREIGN KEY (`assigned_to`) REFERENCES `db_users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `db_bankdetails`
--
ALTER TABLE `db_bankdetails`
  ADD CONSTRAINT `db_bankdetails_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON UPDATE CASCADE;

--
-- Constraints for table `db_brands`
--
ALTER TABLE `db_brands`
  ADD CONSTRAINT `db_brands_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_brands_ibfk_2` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_campaigns`
--
ALTER TABLE `db_campaigns`
  ADD CONSTRAINT `db_campaigns_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `db_campaigns_ibfk_2` FOREIGN KEY (`currency_id`) REFERENCES `db_currency` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `db_category`
--
ALTER TABLE `db_category`
  ADD CONSTRAINT `db_category_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_coupons`
--
ALTER TABLE `db_coupons`
  ADD CONSTRAINT `db_coupons_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_coupons_ibfk_2` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_custadvance`
--
ALTER TABLE `db_custadvance`
  ADD CONSTRAINT `db_custadvance_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `db_customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_custadvance_ibfk_2` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_customers`
--
ALTER TABLE `db_customers`
  ADD CONSTRAINT `db_customers_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_customer_trading_currency` FOREIGN KEY (`trading_currency_id`) REFERENCES `db_currency` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `db_customer_coupons`
--
ALTER TABLE `db_customer_coupons`
  ADD CONSTRAINT `db_customer_coupons_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_customer_coupons_ibfk_2` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_customer_coupons_ibfk_3` FOREIGN KEY (`customer_id`) REFERENCES `db_customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_customer_coupons_ibfk_4` FOREIGN KEY (`coupon_id`) REFERENCES `db_coupons` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_customer_payments`
--
ALTER TABLE `db_customer_payments`
  ADD CONSTRAINT `db_customer_payments_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `db_customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_customer_payments_ibfk_2` FOREIGN KEY (`salespayment_id`) REFERENCES `db_salespayments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_emailtemplates`
--
ALTER TABLE `db_emailtemplates`
  ADD CONSTRAINT `db_emailtemplates_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_expense`
--
ALTER TABLE `db_expense`
  ADD CONSTRAINT `db_expense_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_expense_ibfk_2` FOREIGN KEY (`account_id`) REFERENCES `ac_accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_expense_category`
--
ALTER TABLE `db_expense_category`
  ADD CONSTRAINT `db_expense_category_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_fivemojo`
--
ALTER TABLE `db_fivemojo`
  ADD CONSTRAINT `db_fivemojo_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_hold`
--
ALTER TABLE `db_hold`
  ADD CONSTRAINT `db_hold_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_hold_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `db_customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_hold_ibfk_3` FOREIGN KEY (`warehouse_id`) REFERENCES `db_warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_holditems`
--
ALTER TABLE `db_holditems`
  ADD CONSTRAINT `db_holditems_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_holditems_ibfk_2` FOREIGN KEY (`hold_id`) REFERENCES `db_hold` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_holditems_ibfk_3` FOREIGN KEY (`item_id`) REFERENCES `db_items` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_instamojo`
--
ALTER TABLE `db_instamojo`
  ADD CONSTRAINT `db_instamojo_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_items`
--
ALTER TABLE `db_items`
  ADD CONSTRAINT `db_items_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_leads`
--
ALTER TABLE `db_leads`
  ADD CONSTRAINT `db_leads_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `db_leads_ibfk_2` FOREIGN KEY (`assigned_to`) REFERENCES `db_users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `db_leads_ibfk_3` FOREIGN KEY (`currency_id`) REFERENCES `db_currency` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `db_lead_sources`
--
ALTER TABLE `db_lead_sources`
  ADD CONSTRAINT `db_lead_sources_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `db_opportunities`
--
ALTER TABLE `db_opportunities`
  ADD CONSTRAINT `db_opportunities_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `db_opportunities_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `db_customers` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `db_opportunities_ibfk_3` FOREIGN KEY (`lead_id`) REFERENCES `db_leads` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `db_opportunities_ibfk_4` FOREIGN KEY (`assigned_to`) REFERENCES `db_users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `db_opportunities_ibfk_5` FOREIGN KEY (`currency_id`) REFERENCES `db_currency` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `db_package`
--
ALTER TABLE `db_package`
  ADD CONSTRAINT `db_package_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_paymenttypes`
--
ALTER TABLE `db_paymenttypes`
  ADD CONSTRAINT `db_paymenttypes_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_paypal`
--
ALTER TABLE `db_paypal`
  ADD CONSTRAINT `db_paypal_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_permissions`
--
ALTER TABLE `db_permissions`
  ADD CONSTRAINT `db_permissions_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_pro_approval_users`
--
ALTER TABLE `db_pro_approval_users`
  ADD CONSTRAINT `fk_pro_approval_users_created_by` FOREIGN KEY (`created_by`) REFERENCES `db_users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_pro_approval_users_updated_by` FOREIGN KEY (`updated_by`) REFERENCES `db_users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_pro_approval_users_user` FOREIGN KEY (`user_id`) REFERENCES `db_users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `db_purchase`
--
ALTER TABLE `db_purchase`
  ADD CONSTRAINT `db_purchase_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_purchase_ibfk_2` FOREIGN KEY (`supplier_id`) REFERENCES `db_suppliers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_purchaseitems`
--
ALTER TABLE `db_purchaseitems`
  ADD CONSTRAINT `db_purchaseitems_ibfk_1` FOREIGN KEY (`purchase_id`) REFERENCES `db_purchase` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_purchaseitemsreturn`
--
ALTER TABLE `db_purchaseitemsreturn`
  ADD CONSTRAINT `db_purchaseitemsreturn_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_purchaseitemsreturn_ibfk_2` FOREIGN KEY (`return_id`) REFERENCES `db_purchasereturn` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_purchasepayments`
--
ALTER TABLE `db_purchasepayments`
  ADD CONSTRAINT `db_purchasepayments_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_purchasepayments_ibfk_2` FOREIGN KEY (`purchase_id`) REFERENCES `db_purchase` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_purchasepayments_ibfk_3` FOREIGN KEY (`supplier_id`) REFERENCES `db_suppliers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_purchasepaymentsreturn`
--
ALTER TABLE `db_purchasepaymentsreturn`
  ADD CONSTRAINT `db_purchasepaymentsreturn_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_purchasepaymentsreturn_ibfk_2` FOREIGN KEY (`return_id`) REFERENCES `db_purchasereturn` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_purchasepaymentsreturn_ibfk_3` FOREIGN KEY (`supplier_id`) REFERENCES `db_suppliers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_purchasereturn`
--
ALTER TABLE `db_purchasereturn`
  ADD CONSTRAINT `db_purchasereturn_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_purchasereturn_ibfk_2` FOREIGN KEY (`purchase_id`) REFERENCES `db_purchase` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_purchase_requisition_approvals`
--
ALTER TABLE `db_purchase_requisition_approvals`
  ADD CONSTRAINT `fk_requisition_approvals_approver` FOREIGN KEY (`approver_id`) REFERENCES `db_users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_requisition_approvals_requisition` FOREIGN KEY (`requisition_id`) REFERENCES `db_purchase_requisitions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `db_purchase_requisition_items`
--
ALTER TABLE `db_purchase_requisition_items`
  ADD CONSTRAINT `fk_requisition_items_item` FOREIGN KEY (`item_id`) REFERENCES `db_items` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_requisition_items_requisition` FOREIGN KEY (`requisition_id`) REFERENCES `db_purchase_requisitions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_requisition_items_supplier` FOREIGN KEY (`supplier_id`) REFERENCES `db_suppliers` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `db_quotation`
--
ALTER TABLE `db_quotation`
  ADD CONSTRAINT `db_quotation_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_quotation_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `db_customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_quotation_ibfk_3` FOREIGN KEY (`warehouse_id`) REFERENCES `db_warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_quotationitems`
--
ALTER TABLE `db_quotationitems`
  ADD CONSTRAINT `db_quotationitems_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_quotationitems_ibfk_2` FOREIGN KEY (`quotation_id`) REFERENCES `db_quotation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_roles`
--
ALTER TABLE `db_roles`
  ADD CONSTRAINT `db_roles_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_sales`
--
ALTER TABLE `db_sales`
  ADD CONSTRAINT `db_sales_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_sales_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `db_customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_sales_ibfk_3` FOREIGN KEY (`warehouse_id`) REFERENCES `db_warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_sales_ibfk_4` FOREIGN KEY (`coupon_id`) REFERENCES `db_customer_coupons` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_salesitems`
--
ALTER TABLE `db_salesitems`
  ADD CONSTRAINT `db_salesitems_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_salesitems_ibfk_2` FOREIGN KEY (`sales_id`) REFERENCES `db_sales` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_salesitemsreturn`
--
ALTER TABLE `db_salesitemsreturn`
  ADD CONSTRAINT `db_salesitemsreturn_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_salesitemsreturn_ibfk_2` FOREIGN KEY (`return_id`) REFERENCES `db_salesreturn` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_salespayments`
--
ALTER TABLE `db_salespayments`
  ADD CONSTRAINT `db_salespayments_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_salespayments_ibfk_2` FOREIGN KEY (`sales_id`) REFERENCES `db_sales` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_salespayments_ibfk_3` FOREIGN KEY (`customer_id`) REFERENCES `db_customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_salespaymentsreturn`
--
ALTER TABLE `db_salespaymentsreturn`
  ADD CONSTRAINT `db_salespaymentsreturn_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_salespaymentsreturn_ibfk_2` FOREIGN KEY (`return_id`) REFERENCES `db_salesreturn` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_salespaymentsreturn_ibfk_3` FOREIGN KEY (`customer_id`) REFERENCES `db_customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_salesreturn`
--
ALTER TABLE `db_salesreturn`
  ADD CONSTRAINT `db_salesreturn_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_salesreturn_ibfk_2` FOREIGN KEY (`sales_id`) REFERENCES `db_sales` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_salesreturn_ibfk_3` FOREIGN KEY (`coupon_id`) REFERENCES `db_customer_coupons` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_shippingaddress`
--
ALTER TABLE `db_shippingaddress`
  ADD CONSTRAINT `db_shippingaddress_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `db_customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_shippingaddress_ibfk_2` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_smsapi`
--
ALTER TABLE `db_smsapi`
  ADD CONSTRAINT `db_smsapi_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_smstemplates`
--
ALTER TABLE `db_smstemplates`
  ADD CONSTRAINT `db_smstemplates_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_states`
--
ALTER TABLE `db_states`
  ADD CONSTRAINT `db_states_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_stockadjustment`
--
ALTER TABLE `db_stockadjustment`
  ADD CONSTRAINT `db_stockadjustment_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_stockadjustmentitems`
--
ALTER TABLE `db_stockadjustmentitems`
  ADD CONSTRAINT `db_stockadjustmentitems_ibfk_1` FOREIGN KEY (`adjustment_id`) REFERENCES `db_stockadjustment` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_stockadjustmentitems_ibfk_2` FOREIGN KEY (`item_id`) REFERENCES `db_items` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_stockadjustmentitems_ibfk_3` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_stockadjustmentitems_ibfk_4` FOREIGN KEY (`warehouse_id`) REFERENCES `db_warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_stocktransfer`
--
ALTER TABLE `db_stocktransfer`
  ADD CONSTRAINT `db_stocktransfer_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_stocktransfer_ibfk_2` FOREIGN KEY (`warehouse_from`) REFERENCES `db_warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_stocktransfer_ibfk_3` FOREIGN KEY (`warehouse_to`) REFERENCES `db_warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_stocktransfer_ibfk_4` FOREIGN KEY (`to_store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_stocktransferitems`
--
ALTER TABLE `db_stocktransferitems`
  ADD CONSTRAINT `db_stocktransferitems_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_stocktransferitems_ibfk_2` FOREIGN KEY (`warehouse_from`) REFERENCES `db_warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_stocktransferitems_ibfk_3` FOREIGN KEY (`warehouse_to`) REFERENCES `db_warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_stocktransferitems_ibfk_4` FOREIGN KEY (`stocktransfer_id`) REFERENCES `db_stocktransfer` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_stocktransferitems_ibfk_5` FOREIGN KEY (`item_id`) REFERENCES `db_items` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_stocktransferitems_ibfk_6` FOREIGN KEY (`to_store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_stripe`
--
ALTER TABLE `db_stripe`
  ADD CONSTRAINT `db_stripe_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_suppliers`
--
ALTER TABLE `db_suppliers`
  ADD CONSTRAINT `db_suppliers_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_supplier_trading_currency` FOREIGN KEY (`trading_currency_id`) REFERENCES `db_currency` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `db_supplier_payments`
--
ALTER TABLE `db_supplier_payments`
  ADD CONSTRAINT `db_supplier_payments_ibfk_1` FOREIGN KEY (`supplier_id`) REFERENCES `db_suppliers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_supplier_payments_ibfk_2` FOREIGN KEY (`purchasepayment_id`) REFERENCES `db_purchasepayments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_tax`
--
ALTER TABLE `db_tax`
  ADD CONSTRAINT `db_tax_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_twilio`
--
ALTER TABLE `db_twilio`
  ADD CONSTRAINT `db_twilio_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_units`
--
ALTER TABLE `db_units`
  ADD CONSTRAINT `db_units_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_users`
--
ALTER TABLE `db_users`
  ADD CONSTRAINT `db_users_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_userswarehouses`
--
ALTER TABLE `db_userswarehouses`
  ADD CONSTRAINT `db_userswarehouses_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `db_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_userswarehouses_ibfk_2` FOREIGN KEY (`warehouse_id`) REFERENCES `db_warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_variants`
--
ALTER TABLE `db_variants`
  ADD CONSTRAINT `db_variants_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_variants_ibfk_2` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_warehouse`
--
ALTER TABLE `db_warehouse`
  ADD CONSTRAINT `db_warehouse_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `db_warehouseitems`
--
ALTER TABLE `db_warehouseitems`
  ADD CONSTRAINT `db_warehouseitems_ibfk_1` FOREIGN KEY (`store_id`) REFERENCES `db_store` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_warehouseitems_ibfk_2` FOREIGN KEY (`warehouse_id`) REFERENCES `db_warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `db_warehouseitems_ibfk_3` FOREIGN KEY (`item_id`) REFERENCES `db_items` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Performance Optimization: Add indexes for faster login queries
--
-- Add index on email for login queries
ALTER TABLE `db_users` ADD INDEX `idx_email` (`email`);

-- Add index on username for login queries  
ALTER TABLE `db_users` ADD INDEX `idx_username` (`username`);

-- Add composite index on status for login queries
ALTER TABLE `db_users` ADD INDEX `idx_status` (`status`);

-- Optional: Add composite indexes for common queries
ALTER TABLE `db_users` ADD INDEX `idx_email_status` (`email`, `status`);
ALTER TABLE `db_users` ADD INDEX `idx_username_status` (`username`, `status`);

-- Add index on db_store status for faster lookups
ALTER TABLE `db_store` ADD INDEX `idx_status` (`status`);

-- Optimize ci_sessions table for faster lookups
ALTER TABLE `ci_sessions` ADD INDEX `idx_timestamp` (`timestamp`);

-- Removed COMMIT to avoid SUPER privilege requirement on shared hosting
-- Removed SET @OLD... statements to avoid SUPER privilege requirement on shared hosting
