-- Table structure for table `crm_upload_inventory`
--

CREATE TABLE `crm_upload_inventory` (
  `id` int NOT NULL,
  `uploadfile` varchar(255) NOT NULL,
  `created_by` int NOT NULL,
  `created_date_time` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `crm_upload_inventory`
--

INSERT INTO `crm_upload_inventory` (`id`, `uploadfile`, `created_by`, `created_date_time`) VALUES
(1, 't1.csv', 30, '2018-04-07 14:19:57'),
(2, 'UPLOAD_INVENTORY-OMN.csv', 61, '2018-04-08 09:30:41'),
(3, 'UPLOAD_INVENTORY-LEV-Apr2018.csv', 61, '2018-04-22 19:30:14'),
(4, 'FNET Items.csv', 61, '2018-04-25 07:44:45'),
(5, 'Netcab.csv', 61, '2018-04-29 19:20:45'),
(6, '3onedata Items.csv', 61, '2018-06-19 20:08:02'),
(7, '3onedata Items19.csv', 61, '2018-06-19 20:09:49'),
(8, '3onedata Items85.csv', 61, '2018-06-19 20:12:28'),
(9, 'NTI Itemcsv.csv', 61, '2018-06-20 05:59:11'),
(10, 'Omnitron - OmniConverter AC items.csv', 61, '2018-08-04 19:46:28'),
(11, 'Omnitron - miConverternver.csv', 61, '2018-08-05 17:44:49'),
(12, 'Omnitron SFP.csv', 61, '2018-08-05 18:07:12'),
(13, 'Omnitron SFP91.csv', 61, '2018-08-05 18:10:16'),
(14, 'CPI.csv', 61, '2018-12-05 02:42:21'),
(15, '2019-01 FNET New items.csv', 61, '2019-01-02 11:27:51'),
(16, '2019-11-16 Advantech.csv', 61, '2019-11-16 19:30:51'),
(17, '2019-11-24 Leviton Pre-term.csv', 61, '2019-11-24 19:47:15'),
(18, '2020-02 3one New items.csv', 61, '2020-02-03 06:00:44'),
(19, '2020-02 Adv New items.csv', 61, '2020-02-03 06:01:03'),
(20, '2020-02 3one New items74.csv', 61, '2020-02-08 11:09:52'),
(21, '2020-02 Adv Price List.csv', 61, '2020-02-08 11:10:31'),
(22, '2020-02 Leviton Price List.csv', 61, '2020-02-08 11:10:56'),
(23, '2020-02 NTI Price List.csv', 61, '2020-02-08 11:11:40'),
(24, '2020-02 Missing Price List 3one_Adv_Lev_NTI-CSV.csv', 61, '2020-02-08 19:02:00'),
(25, '2020-02 Missing Price List 3one_Adv_Lev_NTI-CSV97.csv', 61, '2020-02-08 19:07:35'),
(26, '2020-02 Missing Price List 3one_Adv_Lev_NTI-CSV76.csv', 61, '2020-02-08 19:16:50'),
(27, '2020-02-28 FNET Rev17.csv', 61, '2020-02-28 07:32:09'),
(28, '2020-03-03 SIQURA PRODUCT LIST.csv', 61, '2020-03-03 13:50:22'),
(29, '2020-03-08 Rraitan Items.csv', 61, '2020-03-08 19:42:14'),
(30, '2020-03-03 SIQURA PRODUCT LIST49.csv', 61, '2020-03-21 10:58:18'),
(31, '2020-03-03 SIQURA PRODUCT LIST88.csv', 61, '2020-03-21 11:01:55'),
(32, '2020-05-20 Sunbird Items PWIQ.csv', 61, '2020-05-20 09:07:09'),
(33, '2020-06-27 Upsite Items.csv', 61, '2020-06-27 10:33:01'),
(34, 'NSGate.csv', 61, '2020-09-28 19:50:16'),
(35, 'NSGate32.csv', 61, '2020-09-28 19:51:44'),
(36, '2020-12 NTI VPI items with weight.csv', 61, '2020-12-06 19:09:42'),
(37, '2020-12-13 BICSI Mobile Lab Kit.csv', 61, '2020-12-13 13:41:40'),
(38, '2021-02-07 Leviton.csv', 61, '2021-02-07 06:47:32'),
(39, '2021-02 Sunbird-CSV.csv', 61, '2021-02-14 19:53:15'),
(40, '2021-05-08 NTI new items.csv', 61, '2021-05-08 10:04:53'),
(41, '2021-05-12 D-Link Items.csv', 61, '2021-05-12 06:49:38'),
(42, '2021-05-12 D-Link Items2.csv', 61, '2021-05-12 07:10:59'),
(43, '2021-05-12 D-Link Items76.csv', 61, '2021-05-12 07:22:33'),
(44, '2021-05-21 Training Items.csv', 61, '2021-05-21 19:23:15'),
(45, '2021-05-21 Training Items98.csv', 61, '2021-05-21 19:24:56'),
(46, '2021-05-21 Training Items32.csv', 61, '2021-05-21 19:30:51'),
(47, '2021-05-21 Add TRNG Items.csv', 61, '2021-05-21 19:32:20'),
(48, '2021-06-02 D-Link ALL.csv', 61, '2021-06-02 02:56:01'),
(49, '2021-06-06 Siqura Items.csv', 61, '2021-06-06 12:17:47'),
(50, '2021-07-21 Fluke New Items.csv', 61, '2021-07-21 17:59:37'),
(51, '2021-07-21 Fluke New Items56.csv', 61, '2021-07-21 18:11:46'),
(52, '2021-07-21 Fluke New Items31.csv', 61, '2021-07-21 18:17:37'),
(53, '2021-07-29 SCHROFF New Items.csv', 61, '2021-07-29 13:23:23'),
(54, '2021-08-15 NSGate Items.csv', 61, '2021-08-15 22:25:04'),
(55, '2021-08-15 NSGate Items2.csv', 61, '2021-08-15 22:34:07'),
(56, '2021-08-15 NSGate Items235.csv', 61, '2021-08-15 22:37:34'),
(57, '2021-08-15 NSGate Items254.csv', 61, '2021-08-15 22:45:00'),
(58, '2021-08 Leviton items.csv', 61, '2021-08-17 04:08:49'),
(59, '2021-09-15 SCHROFF New Items.csv', 61, '2021-09-15 09:50:55'),
(60, '2021-10 Netcab Item.csv', 61, '2021-10-16 20:21:57'),
(61, '2021-10 Fluke EMEA_Obsolete_Replacement-Oct2021.csv', 61, '2021-10-27 12:32:17'),
(62, '2021-12 Leviton pre-term Item.csv', 61, '2021-12-14 17:44:05'),
(63, '2022-01-28 Training LLC FO -14 Boxes.csv', 61, '2022-01-28 07:57:36'),
(64, '2022-01-28 Training LLC FO -14 Boxes14.csv', 61, '2022-01-28 08:08:07'),
(65, '2022-01-29 Training LLC Misc -88 Boxes.csv', 61, '2022-01-29 13:39:01'),
(66, '2022-01-29 Training LLC Misc -88 Boxes-one item.csv', 61, '2022-01-29 15:41:19'),
(67, '2022-01-29 Training LLC Misc -88 Boxes-TEMP.csv', 61, '2022-01-29 15:44:40'),
(68, '2022-01-29 Training LLC Misc -88 Boxes-one item87.csv', 61, '2022-01-29 15:47:08'),
(69, '2022-01-29 Training LLC Misc -88 Boxes-TEMP78.csv', 61, '2022-01-29 17:43:28'),
(70, '2022-01-29 Training LLC Misc -88 Boxes-MMC.csv', 61, '2022-01-29 18:07:23'),
(71, '2022-01-29 Training LLC Misc -88 Boxes-one item40.csv', 61, '2022-01-29 18:24:44'),
(72, '2022-02 Fluke Gold Spares.csv', 61, '2022-02-15 13:35:57'),
(73, '2022-03 Training.csv', 61, '2022-03-03 04:41:13'),
(74, '2023-03 FlukeNetworks.csv', 61, '2023-03-18 18:21:28'),
(75, '2023-03 Leviton.csv', 61, '2023-03-18 18:22:28'),
(76, '2023-06-24 SUP.csv', 61, '2023-06-26 06:55:56'),
(77, '2023-07 Netcab cabinets.csv', 61, '2023-07-18 12:29:51'),
(78, '2023-09-19 ADV items.csv', 61, '2023-09-19 06:18:46'),
(79, '2024-02-22 FiberFox.csv', 61, '2024-04-01 07:27:42'),
(80, '2023-06-24 SUP57.csv', 61, '2024-04-01 07:28:13'),
(81, '2023-07-03 SPSXCables-2.csv', 61, '2024-04-01 07:28:40'),
(82, '2023-06-24 Netcab-items.csv', 61, '2024-04-01 07:29:00'),
(83, '2023-08-28 Netcab all items2.csv', 61, '2024-04-01 07:29:21'),
(84, '2024-01-23 Fluke additional.csv', 61, '2024-04-01 07:29:49'),
(85, '2023-09-19 ADV items19.csv', 61, '2024-04-01 07:30:18'),
(86, '2023-04 SPSXCables.csv', 61, '2024-04-01 07:30:45'),
(87, '2024-11 Training.csv', 61, '2024-11-27 11:36:18'),
(88, '2024-11 Training74.csv', 61, '2024-11-27 12:13:41');

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

--
-- Table structure for table `crm_vendor`
--

CREATE TABLE `crm_vendor` (
  `id` bigint NOT NULL,
  `vendor_name` varchar(255) NOT NULL,
  `vendor_currency_id` int NOT NULL,
  `vendor_address` text NOT NULL,
  `vendor_city` varchar(255) NOT NULL,
  `vendor_postal_code` varchar(255) NOT NULL,
  `vendor_state` varchar(255) NOT NULL,
  `vendor_country` varchar(255) NOT NULL,
  `vendor_emirates_name` int NOT NULL,
  `vendor_pin_zip` varchar(255) NOT NULL,
  `vendor_bank_tax_id` varchar(255) NOT NULL,
  `vendor_bank_account_no` varchar(255) NOT NULL,
  `vendor_bank_swift` varchar(255) NOT NULL,
  `vendor_bank_account_name` varchar(255) NOT NULL,
  `vendor_bank_id` int NOT NULL,
  `vendor_bank_name` varchar(255) NOT NULL,
  `vendor_bank_branch_name` varchar(255) NOT NULL,
  `vendor_bank_iban` varchar(255) NOT NULL,
  `vendor_bank_ifsc` varchar(255) NOT NULL,
  `vendor_bank_others` varchar(255) NOT NULL,
  `vendor_phone_no` varchar(255) NOT NULL,
  `vendor_email_id` varchar(255) NOT NULL,
  `vendor_location` varchar(255) NOT NULL,
  `vendor_payment_term` varchar(255) NOT NULL,
  `vendor_fax` varchar(255) NOT NULL,
  `vendor_web` varchar(255) NOT NULL,
  `vendor_industry` varchar(255) NOT NULL,
  `vendor_trn_no` varchar(255) NOT NULL,
  `is_approved` enum('Y','N') NOT NULL DEFAULT 'N',
  `isActive` enum('Y','N') NOT NULL DEFAULT 'Y',
  `created_date_time` datetime NOT NULL,
  `created_by` int NOT NULL,
  `updated_date_time` datetime NOT NULL,
  `updated_by` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `crm_vendor`
--

INSERT INTO `crm_vendor` (`id`, `vendor_name`, `vendor_currency_id`, `vendor_address`, `vendor_city`, `vendor_postal_code`, `vendor_state`, `vendor_country`, `vendor_emirates_name`, `vendor_pin_zip`, `vendor_bank_tax_id`, `vendor_bank_account_no`, `vendor_bank_swift`, `vendor_bank_account_name`, `vendor_bank_id`, `vendor_bank_name`, `vendor_bank_branch_name`, `vendor_bank_iban`, `vendor_bank_ifsc`, `vendor_bank_others`, `vendor_phone_no`, `vendor_email_id`, `vendor_location`, `vendor_payment_term`, `vendor_fax`, `vendor_web`, `vendor_industry`, `vendor_trn_no`, `is_approved`, `isActive`, `created_date_time`, `created_by`, `updated_date_time`, `updated_by`) VALUES
(2001, 'TOPNET DISTRIBUTION FZCO', 23, 'TOPNET DISTRIBUTION FZCO', 'DUBAI ', '54791', 'DUBAI ', '143', 0, '', '', '', '', '', 0, '', '', '', '', '', 'P: +971-4-2991162', '-', 'Dubai Airport Free zone', '47', 'F: +971-4-2991163', 'www.topnet.ae', '', '100227074000003', 'N', 'Y', '2022-03-08 10:59:45', 30, '2022-03-08 10:59:45', 30),
(2002, 'NETWORK LOGIC SECURITY SYSTEMS & EQUIPMENT TRADING CO LLC', 23, 'UNIT # 908, GROSVENOR BUSINESS TOWER, \r\nAl Thanyah First, \r\nP.O. Box: 452087, Dubai, U.A.E', '', '', '', '143', 0, '', '', '', '', '', 0, '', '', '', '', '', '+971 4 852 527', 'order@networklogic.ae', '', '42', '', '', '', '', 'N', 'Y', '2023-03-27 10:53:22', 162, '2023-03-27 10:53:22', 162),
(2003, 'MICROSENS GmbH & Co. KG', 24, 'Kuferstr. 16 D-59067\r\nHamm', 'Hamm', '', 'Germany', '72', 0, '', '', '', '', '', 0, '', '', '', '', '', '+49 2381-9452-256', 'NReschke@microsens.de', 'GERMANY', '109', '0049 23819452', 'www.microsens.com', '', '', 'N', 'Y', '2023-04-24 05:49:00', 163, '2023-04-24 05:49:00', 163),
(2004, 'ENPOWER ELCTRONICS L.L.C', 23, 'Office No M1, Al Marri 7\r\nRas Al Khor Industrial 1\r\nDubai', 'DUBAI', '126081', '', '143', 0, '', '', '', '', '', 0, '', '', '', '', '', '+9714 3977274', 'sales@enpower.ae', 'DUBAI', '35', '+9714 3977275', '', '', '', 'N', 'Y', '2023-04-27 07:14:23', 163, '2023-04-27 07:14:23', 163),
(2005, 'Mercantile Information & Telecommunication Technology Co. LLC ', 23, '404, Digital Print House Building,\r\nSalam Street, Tourist Club Area.', 'ABU DHABI', '41175', '', '143', 0, '', '', '', '', '', 0, '', '', '', '', '', '+971-2-6458909', 'dheeraj@mittco.ae', 'ABU DHABI', '109', '', 'www.mittco.com', '', '', 'N', 'Y', '2023-09-12 12:19:14', 163, '2023-09-12 12:19:14', 163),
(2006, 'SYNERGIX INTERNATIONAL LLC', 23, 'Suite No. 2305, Palace Tower,\r\nDubai Silicon Oasis,\r\nP.O. Box 29187, Dubai', '', '29187', '', '143', 0, '', '', '', '', '', 0, '', '', '', '', '', '+971 4320 6053', 'edwin@synergix.ae', 'DUBAI', '37', '+971 43558445 ', 'www.synergix-int.com', '', '', 'N', 'Y', '2024-10-21 06:56:42', 177, '2024-10-21 06:56:42', 177);

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

--
-- Table structure for table `crm_vendor_contact`
--

CREATE TABLE `crm_vendor_contact` (
  `id` int NOT NULL,
  `vendor_id` bigint NOT NULL,
  `prefix` varchar(50) NOT NULL DEFAULT 'Mr',
  `person_name` varchar(255) NOT NULL,
  `designation` varchar(255) NOT NULL,
  `contact_phone_no` varchar(255) NOT NULL,
  `department` varchar(255) NOT NULL,
  `contact_mobile_no` varchar(255) NOT NULL,
  `contact_email_id` varchar(255) NOT NULL,
  `dob` varchar(5) NOT NULL,
  `notes` text NOT NULL,
  `isActive` enum('Y','N') NOT NULL DEFAULT 'Y',
  `created_date_time` datetime NOT NULL,
  `created_by` int NOT NULL,
  `updated_date_time` datetime NOT NULL,
  `updated_by` int NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `crm_vendor_contact`
--

INSERT INTO `crm_vendor_contact` (`id`, `vendor_id`, `prefix`, `person_name`, `designation`, `contact_phone_no`, `department`, `contact_mobile_no`, `contact_email_id`, `dob`, `notes`, `isActive`, `created_date_time`, `created_by`, `updated_date_time`, `updated_by`) VALUES
(1, 2001, 'Mr', 'TOPNET DISTRIBUTION FZCO', '', 'P: +971-4-2991162', '', '', '', '', '', 'Y', '2022-03-08 10:59:45', 30, '2022-03-08 10:59:45', 30),
(2, 2002, 'Mr', 'NETWORK LOGIC SECURITY SYSTEMS & EQUIPMENT TRADING CO LLC', '', '+971 4 852 527', '', '', '', '', '', 'Y', '2023-03-27 10:53:22', 162, '2023-03-27 10:53:22', 162),
(3, 2003, 'Mr', 'MICROSENS GmbH & Co. KG', '', '+49 2381-9452-256', '', '', '', '', '', 'Y', '2023-04-24 05:49:00', 163, '2023-04-24 05:49:00', 163),
(4, 2004, 'Mr', 'ENPOWER ELCTRONICS L.L.C', '', '+9714 3977274', '', '', '', '', '', 'Y', '2023-04-27 07:14:23', 163, '2023-04-27 07:14:23', 163),
(5, 2005, 'Mr', 'Mercantile Information & Telecommunication Technology Co. LLC ', '', '+971-2-6458909', '', '', '', '', '', 'Y', '2023-09-12 12:19:14', 163, '2023-09-12 12:19:14', 163),
(6, 2006, 'Mr', 'SYNERGIX INTERNATIONAL LLC', '', '+971 4320 6053', '', '', '', '', '', 'Y', '2024-10-21 06:56:42', 177, '2024-10-21 06:56:42', 177);

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

--
-- Table structure for table `crm_vendor_shipping_details`
--

CREATE TABLE `crm_vendor_shipping_details` (
  `id` int NOT NULL,
  `vendor_id` int NOT NULL,
  `state` varchar(255) NOT NULL,
  `city` varchar(255) NOT NULL,
  `street_address` text NOT NULL,
  `po_box` varchar(255) NOT NULL,
  `postal_code` varchar(255) NOT NULL,
  `country_id` int NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `crm_vendor_shipping_details`
--

INSERT INTO `crm_vendor_shipping_details` (`id`, `vendor_id`, `state`, `city`, `street_address`, `po_box`, `postal_code`, `country_id`) VALUES
(1, 2001, 'DUBAI ', 'DUBAI ', 'TOPNET DISTRIBUTION FZCO', '54791', '', 143),
(2, 2002, '', 'Dubai', 'UNIT # 908, GROSVENOR BUSINESS TOWER, \r\nAl Thanyah First, \r\nP.O. Box: 452087, Dubai, U.A.E', '', '', 143),
(3, 2003, 'Germany', 'Hamm', 'Kuferstr. 16 D-59067\r\nHamm', '', '', 72),
(4, 2004, '', 'DUBAI', 'Office No M1, Al Marri 7\r\nRas Al Khor Industrial 1\r\nDubai', '126081', '', 143),
(5, 2005, '', 'ABU DHABI', '404, Digital Print House Building,\r\nSalam Street, Tourist Club Area.', '41175', '', 143),
(6, 2006, '', '', 'Suite No. 2305, Palace Tower,\r\nDubai Silicon Oasis,\r\nP.O. Box 29187, Dubai', '29187', '', 143);

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

--
-- Table structure for table `crm_whatapp_message`
--

CREATE TABLE `crm_whatapp_message` (
  `id` int NOT NULL,
  `to_list` text NOT NULL,
  `message` text NOT NULL,
  `send` enum('N','Y') NOT NULL,
  `event` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `crm_working_progress`
--

CREATE TABLE `crm_working_progress` (
  `id` int NOT NULL,
  `production_goods_issue_id` int NOT NULL,
  `product_id` int NOT NULL,
  `file_id` int NOT NULL,
  `count` int NOT NULL,
  `goods_issue_date` date NOT NULL,
  `created_by` int NOT NULL,
  `updated_by` int NOT NULL,
  `created_datetime` datetime NOT NULL,
  `updated_datetime` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_allocation`
--

CREATE TABLE `erp_finance_allocation` (
  `id` int NOT NULL,
  `allocation_date` date NOT NULL,
  `ledger_id` int NOT NULL,
  `subledger_id` int NOT NULL,
  `amount` decimal(20,2) NOT NULL,
  `created_by` int NOT NULL,
  `created_date_time` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_allocation_items`
--

CREATE TABLE `erp_finance_allocation_items` (
  `id` int NOT NULL,
  `header_id` int NOT NULL,
  `voucher_id` int NOT NULL,
  `voucher_item_id` int NOT NULL,
  `amount` decimal(20,2) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_audit_close`
--

CREATE TABLE `erp_finance_audit_close` (
  `id` int NOT NULL,
  `year` year NOT NULL,
  `closed` enum('PRE','FINAL') NOT NULL DEFAULT 'PRE',
  `voucher_id` int NOT NULL,
  `created_by` int NOT NULL,
  `created_datetime` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_emi`
--

CREATE TABLE `erp_finance_emi` (
  `id` int NOT NULL,
  `reference` varchar(500) NOT NULL,
  `starting_date` date NOT NULL,
  `name` varchar(500) NOT NULL,
  `amount` decimal(15,3) NOT NULL,
  `type_id` int NOT NULL,
  `category` int NOT NULL,
  `Num_of_installment` int NOT NULL,
  `current_installment` int NOT NULL,
  `updated_date_time` datetime NOT NULL,
  `updated_by` int NOT NULL,
  `created_by` int NOT NULL,
  `created_date_time` datetime NOT NULL,
  `isActive` enum('Y','N') NOT NULL DEFAULT 'Y'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_emi_category`
--

CREATE TABLE `erp_finance_emi_category` (
  `id` int NOT NULL,
  `name` varchar(300) NOT NULL,
  `type` enum('I','E') NOT NULL,
  `isActive` enum('Y','N') NOT NULL,
  `created_date_time` datetime NOT NULL,
  `updated_date_time` datetime NOT NULL,
  `updated_by` int NOT NULL,
  `created_by` int NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_emi_installment`
--

CREATE TABLE `erp_finance_emi_installment` (
  `id` int NOT NULL,
  `emi_id` int NOT NULL,
  `due_date` date NOT NULL,
  `amount` decimal(15,3) NOT NULL,
  `isActive` enum('Y','N') NOT NULL DEFAULT 'Y',
  `created_by` int NOT NULL,
  `updated_by` int NOT NULL,
  `created_date_time` datetime NOT NULL,
  `updated_date_time` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_emi_type`
--

CREATE TABLE `erp_finance_emi_type` (
  `id` int NOT NULL,
  `name` varchar(100) NOT NULL,
  `period` int NOT NULL COMMENT 'period in month',
  `created_by` int NOT NULL,
  `created_date_time` datetime NOT NULL,
  `updated_date_time` datetime NOT NULL,
  `updated_by` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_footer_mapping`
--

CREATE TABLE `erp_finance_footer_mapping` (
  `id` int NOT NULL,
  `footer_id` int NOT NULL,
  `account_id` int NOT NULL,
  `subledger_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_legder`
--

CREATE TABLE `erp_finance_legder` (
  `id` int NOT NULL,
  `account_no` bigint NOT NULL,
  `description` varchar(255) NOT NULL,
  `type_of_account` enum('P','B','Y') NOT NULL DEFAULT 'P' COMMENT 'P -Profit or loss, B -Balance sheet, Y- Year close',
  `main_account_type` enum('A','L','I','E','NONE') NOT NULL DEFAULT 'E',
  `parent_account` int NOT NULL,
  `root` varchar(255) DEFAULT NULL,
  `level` int NOT NULL,
  `sort_order` varchar(45) NOT NULL,
  `classification` varchar(45) NOT NULL DEFAULT 'NORMAL',
  `isParent` enum('Y','N') NOT NULL DEFAULT 'N',
  `haveSubledger` enum('Y','N') NOT NULL DEFAULT 'N',
  `subledger_types` varchar(255) DEFAULT NULL,
  `system_generated` enum('Y','N') NOT NULL DEFAULT 'N',
  `parent_id` int NOT NULL,
  `created_by` int NOT NULL,
  `created_datetime` datetime NOT NULL,
  `account_order` decimal(15,6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_reconciliation`
--

CREATE TABLE `erp_finance_reconciliation` (
  `id` int NOT NULL,
  `statement_date` date NOT NULL,
  `ledger_id` int NOT NULL,
  `subledger_id` int NOT NULL,
  `funds_in_ids` text NOT NULL,
  `funds_out_ids` text NOT NULL,
  `created_by` int NOT NULL,
  `created_date_time` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_security_cheque`
--

CREATE TABLE `erp_finance_security_cheque` (
  `id` int NOT NULL,
  `transaction_type` enum('I','R') NOT NULL COMMENT 'I-Issued,R-Received',
  `bank_name` varchar(700) NOT NULL,
  `cheque_payee` varchar(700) NOT NULL,
  `cheque_no` varchar(500) NOT NULL,
  `cheque_date` date NOT NULL,
  `cheque_amount` decimal(15,2) NOT NULL,
  `transaction_date` date NOT NULL,
  `transaction_done_by` int NOT NULL,
  `transaction_return_by` int NOT NULL,
  `transaction_return_date` date NOT NULL,
  `location` varchar(700) NOT NULL,
  `notes` text NOT NULL,
  `created_by` int NOT NULL,
  `created_date_time` datetime NOT NULL,
  `updated_by` int NOT NULL,
  `updated_date_time` datetime NOT NULL,
  `isActive` enum('Y','N') NOT NULL DEFAULT 'Y'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_settings`
--

CREATE TABLE `erp_finance_settings` (
  `id` int NOT NULL,
  `attribute` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `status` enum('Y','N') CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL DEFAULT 'Y'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_subledger`
--

CREATE TABLE `erp_finance_subledger` (
  `id` int NOT NULL,
  `description` varchar(255) NOT NULL,
  `address` varchar(500) NOT NULL,
  `phone` varchar(255) NOT NULL,
  `account_no` bigint NOT NULL,
  `subledger_type_id` int NOT NULL,
  `parent_id` int NOT NULL,
  `industry` int NOT NULL,
  `emirates_id` int NOT NULL,
  `lead_owner` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_subledger_type`
--

CREATE TABLE `erp_finance_subledger_type` (
  `id` int NOT NULL,
  `description` varchar(255) NOT NULL,
  `staring_series` bigint DEFAULT NULL,
  `last_account_no` bigint NOT NULL DEFAULT '0',
  `system_generated` enum('Y','N') NOT NULL DEFAULT 'N',
  `table_model` varchar(255) DEFAULT NULL,
  `value_field` varchar(255) DEFAULT NULL,
  `address_field` varchar(255) DEFAULT NULL,
  `phone_field` varchar(255) DEFAULT NULL,
  `currency_field` varchar(45) NOT NULL,
  `update_field` varchar(255) DEFAULT NULL,
  `last_sync_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_system_accounts_mapping`
--

CREATE TABLE `erp_finance_system_accounts_mapping` (
  `id` int NOT NULL,
  `attribute` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `account_id` bigint NOT NULL,
  `subledger_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_voucher_head`
--

CREATE TABLE `erp_finance_voucher_head` (
  `id` bigint NOT NULL,
  `voucher_type` int NOT NULL,
  `voucher_no` bigint NOT NULL,
  `voucher_date` date NOT NULL,
  `due_date` date NOT NULL,
  `header_table_id` bigint NOT NULL,
  `reference_no` varchar(255) NOT NULL,
  `general_narration` text NOT NULL,
  `paid_or_received` varchar(255) NOT NULL COMMENT 'Received From  or Paid o',
  `related_subledger` int NOT NULL COMMENT 'used to save customer subledger_id and vendor subledger_id',
  `emp_subledger` int NOT NULL COMMENT 'used to calculate cogs in profit report',
  `bank_name` varchar(255) NOT NULL,
  `payment_method` int NOT NULL,
  `card_no` varchar(255) NOT NULL,
  `cvv_no` int NOT NULL,
  `cheque_no` varchar(255) NOT NULL,
  `cheque_date` date NOT NULL,
  `realisation_date` date NOT NULL,
  `cheque_cleared` enum('Y','N') NOT NULL DEFAULT 'Y',
  `total_voucher_amount` decimal(20,2) NOT NULL,
  `is_posted` enum('Y','N') NOT NULL DEFAULT 'N',
  `is_allocated` enum('Y','N') NOT NULL DEFAULT 'N',
  `created_by` int NOT NULL,
  `created_datetime` datetime NOT NULL,
  `cheque_bounced` enum('N','Y') NOT NULL DEFAULT 'N',
  `account_payee` enum('N','Y') NOT NULL DEFAULT 'N'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_voucher_items`
--

CREATE TABLE `erp_finance_voucher_items` (
  `id` bigint NOT NULL,
  `header_id` int NOT NULL,
  `brand_id` int NOT NULL COMMENT 'For ace centro this id belogs to the hiring order table',
  `ledger_id` int NOT NULL,
  `subledger_id` int NOT NULL,
  `narration` text NOT NULL,
  `amount` decimal(20,2) NOT NULL,
  `reconciled` enum('Y','N') NOT NULL DEFAULT 'N',
  `reconciled_date` date NOT NULL,
  `opening_cheque_cleared` enum('Y','N') NOT NULL DEFAULT 'N' COMMENT 'only used to clear opening balance voucher',
  `emirate_id` int NOT NULL,
  `currency_id` int NOT NULL,
  `currency_code` varchar(40) NOT NULL,
  `exchange_rate` float NOT NULL,
  `reconciliation_id` int NOT NULL,
  `cheque_bounced` enum('N','Y') NOT NULL DEFAULT 'N',
  `no_bounced` int NOT NULL,
  `employee_id` int NOT NULL,
  `product_id` int NOT NULL,
  `detail_table_id` int NOT NULL,
  `generic_id` int NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_voucher_type`
--

CREATE TABLE `erp_finance_voucher_type` (
  `id` int NOT NULL,
  `code` varchar(45) NOT NULL,
  `description` varchar(255) NOT NULL,
  `system_generated` enum('Y','N') NOT NULL DEFAULT 'N',
  `have_mappings` enum('Y','N') NOT NULL DEFAULT 'N',
  `have_footer_mappings` enum('Y','N') NOT NULL DEFAULT 'N',
  `footer_addition_items` varchar(255) NOT NULL COMMENT 'array',
  `footer_deduction_items` varchar(255) NOT NULL COMMENT 'array',
  `footer_addition_type` varchar(255) NOT NULL,
  `footer_deduction_type` varchar(255) NOT NULL,
  `footer_id_field` varchar(255) NOT NULL,
  `footer_value_field` varchar(255) NOT NULL,
  `starting_series` bigint DEFAULT NULL,
  `last_voucher_no` bigint DEFAULT NULL,
  `isActive` enum('Y','N') NOT NULL DEFAULT 'Y',
  `header_table` varchar(255) DEFAULT NULL,
  `date_field` varchar(255) DEFAULT NULL,
  `label_field` varchar(255) NOT NULL,
  `project_field` varchar(255) NOT NULL,
  `voucher_reference` varchar(255) NOT NULL,
  `support_rcm` enum('Y','N') NOT NULL DEFAULT 'N',
  `rcm_compare_field` varchar(255) DEFAULT NULL,
  `rcm_true_value` varchar(255) DEFAULT NULL,
  `currency_field` varchar(255) NOT NULL,
  `exchange_rate_field` varchar(255) NOT NULL,
  `grand_total_value` varchar(255) NOT NULL,
  `sales_value` varchar(255) DEFAULT NULL,
  `sales_wo_tax` varchar(255) DEFAULT NULL,
  `vat_value` varchar(255) DEFAULT NULL,
  `cost_value` varchar(255) DEFAULT NULL,
  `status_field` varchar(255) DEFAULT NULL,
  `pdf_layout` varchar(255) NOT NULL DEFAULT 'entries'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `erp_finance_voucher_type_mappings`
--

CREATE TABLE `erp_finance_voucher_type_mappings` (
  `id` int NOT NULL,
  `voucher_type` int NOT NULL,
  `rcm_comparison` enum('NORMAL','RTRUE','RFALSE') NOT NULL DEFAULT 'NORMAL',
  `account_id` int NOT NULL,
  `dynamic_subledger` enum('Y','N') CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL DEFAULT 'N',
  `dynamic_subledger_type` int NOT NULL,
  `dynamic_subledger_field` varchar(255) DEFAULT NULL,
  `subledger_id` bigint NOT NULL,
  `credit_field` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `debit_field` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `narration` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `trail_balance_tbl`
--

CREATE TABLE `trail_balance_tbl` (
  `sort_order` decimal(15,4) NOT NULL,
  `opening_bal` decimal(15,2) NOT NULL,
  `type` varchar(10) NOT NULL,
  `account_no` varchar(50) NOT NULL,
  `description` varchar(255) NOT NULL,
  `level` int NOT NULL,
  `account_type` varchar(50) NOT NULL,
  `debit` decimal(15,2) NOT NULL,
  `credit` decimal(15,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `crm_activity`
--
ALTER TABLE `crm_activity`
  ADD PRIMARY KEY (`id`),
  ADD KEY `contact_id` (`contact_id`),
  ADD KEY `typ_of_activity` (`typ_of_activity`),
  ADD KEY `date_to_do` (`date_to_do`),
  ADD KEY `date_of_activity` (`date_of_activity`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `date_to_do_2` (`date_to_do`);

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

--
-- Indexes for table `crm_allocated_materials`
--
ALTER TABLE `crm_allocated_materials`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_id` (`product_id`),
  ADD KEY `file_id` (`file_id`),
  ADD KEY `allocation_date` (`allocation_date`),
  ADD KEY `allocation_end_date` (`allocation_end_date`),
  ADD KEY `allocated_from` (`allocated_from`);

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

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

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

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

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

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

--
-- Indexes for table `crm_company`
--
ALTER TABLE `crm_company`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `pricing_group` (`pricing_group`),
  ADD KEY `company_name` (`company_name`),
  ADD KEY `isActive` (`isActive`);

--
-- Indexes for table `crm_company_contact`
--
ALTER TABLE `crm_company_contact`
  ADD PRIMARY KEY (`id`),
  ADD KEY `company_id` (`company_id`),
  ADD KEY `id` (`id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `person_name` (`person_name`),
  ADD KEY `isActive` (`isActive`);

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

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

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

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

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

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

--
-- Indexes for table `crm_creditnote`
--
ALTER TABLE `crm_creditnote`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `company_id` (`company_id`),
  ADD KEY `file_id` (`file_id`),
  ADD KEY `contact_id` (`contact_id`),
  ADD KEY `sales_group` (`sales_group`),
  ADD KEY `isActive` (`isActive`),
  ADD KEY `credit_date` (`credit_date`);

--
-- Indexes for table `crm_creditnote_addition`
--
ALTER TABLE `crm_creditnote_addition`
  ADD PRIMARY KEY (`id`),
  ADD KEY `creditnote_id` (`creditnote_id`);

--
-- Indexes for table `crm_creditnote_deduction`
--
ALTER TABLE `crm_creditnote_deduction`
  ADD PRIMARY KEY (`id`),
  ADD KEY `creditnote_id` (`creditnote_id`);

--
-- Indexes for table `crm_creditnote_item`
--
ALTER TABLE `crm_creditnote_item`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_id` (`product_id`),
  ADD KEY `creditnote_id` (`creditnote_id`),
  ADD KEY `deliverynote_id` (`deliverynote_id`);

--
-- Indexes for table `crm_customer`
--
ALTER TABLE `crm_customer`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crm_user_id` (`lead_owner_id`);

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `crm_delivery_note`
--
ALTER TABLE `crm_delivery_note`
  ADD PRIMARY KEY (`id`),
  ADD KEY `company_id` (`company_id`,`contact_id`),
  ADD KEY `contact_id` (`contact_id`),
  ADD KEY `order_id` (`order_id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `isActive` (`isActive`),
  ADD KEY `invoiced` (`invoiced`),
  ADD KEY `sales_group` (`sales_group`),
  ADD KEY `delivery_date` (`delivery_date`),
  ADD KEY `file_id` (`file_id`);

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

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

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

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

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

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

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

--
-- Indexes for table `crm_direct_order`
--
ALTER TABLE `crm_direct_order`
  ADD PRIMARY KEY (`id`),
  ADD KEY `file_id` (`invoice_id`,`customer_id`,`contact_id`),
  ADD KEY `company_id` (`customer_id`),
  ADD KEY `order_date` (`order_date`);

--
-- Indexes for table `crm_direct_order_addition`
--
ALTER TABLE `crm_direct_order_addition`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`order_id`);

--
-- Indexes for table `crm_direct_order_deduction`
--
ALTER TABLE `crm_direct_order_deduction`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`order_id`);

--
-- Indexes for table `crm_direct_order_item`
--
ALTER TABLE `crm_direct_order_item`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`order_id`),
  ADD KEY `product_id` (`product_id`);

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

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

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

--
-- Indexes for table `crm_direct_purchasing_order_addition`
--
ALTER TABLE `crm_direct_purchasing_order_addition`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`purchasing_order_id`);

--
-- Indexes for table `crm_direct_purchasing_order_deduction`
--
ALTER TABLE `crm_direct_purchasing_order_deduction`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`purchasing_order_id`);

--
-- Indexes for table `crm_document`
--
ALTER TABLE `crm_document`
  ADD PRIMARY KEY (`id`),
  ADD KEY `process_id` (`file_id`),
  ADD KEY `uploaded_from` (`uploaded_from`),
  ADD KEY `isActive` (`isActive`);

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `crm_fin_general_ledger`
--
ALTER TABLE `crm_fin_general_ledger`
  ADD PRIMARY KEY (`id`),
  ADD KEY `date` (`date`,`account_id`,`voucher_no`,`subledger`,`isAllocated`);

--
-- Indexes for table `crm_fin_general_ledger_head`
--
ALTER TABLE `crm_fin_general_ledger_head`
  ADD PRIMARY KEY (`id`),
  ADD KEY `voucher_date` (`voucher_date`);

--
-- Indexes for table `crm_fin_general_ledger_head_delete`
--
ALTER TABLE `crm_fin_general_ledger_head_delete`
  ADD KEY `voucher_date` (`voucher_date`);

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

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

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

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

--
-- Indexes for table `crm_fin_subledger`
--
ALTER TABLE `crm_fin_subledger`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `account_no` (`account_no`),
  ADD KEY `account_no_2` (`account_no`);

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

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

--
-- Indexes for table `crm_fin_voucher_allocation`
--
ALTER TABLE `crm_fin_voucher_allocation`
  ADD PRIMARY KEY (`id`),
  ADD KEY `voucher_no` (`voucher_no`,`invoice_id`,`allocate_date`);

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

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

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

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

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

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

--
-- Indexes for table `crm_goods_return`
--
ALTER TABLE `crm_goods_return`
  ADD PRIMARY KEY (`id`),
  ADD KEY `invoice_id` (`invoice_id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `company_id` (`company_id`),
  ADD KEY `return_date` (`return_date`),
  ADD KEY `isActive` (`isActive`);

--
-- Indexes for table `crm_goods_return_item`
--
ALTER TABLE `crm_goods_return_item`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_id` (`product_id`),
  ADD KEY `goods_return_id` (`goods_return_id`),
  ADD KEY `product_id_2` (`product_id`);

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

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

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

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

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

--
-- Indexes for table `crm_hr_attendance_manager`
--
ALTER TABLE `crm_hr_attendance_manager`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `bank_name` (`employee_id`);

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `crm_hr_department`
--
ALTER TABLE `crm_hr_department`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `bank_name` (`department_name`);

--
-- Indexes for table `crm_hr_designation`
--
ALTER TABLE `crm_hr_designation`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `bank_name` (`designation_name`);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `crm_hr_mas_certificate_name`
--
ALTER TABLE `crm_hr_mas_certificate_name`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `bank_name` (`certificate_name`);

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

--
-- Indexes for table `crm_hr_mas_company_wps_details`
--
ALTER TABLE `crm_hr_mas_company_wps_details`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `bank_name` (`company_name`);

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

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

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

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

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

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

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

--
-- Indexes for table `crm_hr_mas_inout_document`
--
ALTER TABLE `crm_hr_mas_inout_document`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `bank_name` (`document_name`);

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `crm_hr_mas_salarytype`
--
ALTER TABLE `crm_hr_mas_salarytype`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `currency` (`salary_name`);

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

--
-- Indexes for table `crm_hr_mas_training_course`
--
ALTER TABLE `crm_hr_mas_training_course`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `bank_name` (`course_name`);

--
-- Indexes for table `crm_hr_mas_training_course_detail`
--
ALTER TABLE `crm_hr_mas_training_course_detail`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `bank_name` (`training_course`);

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

--
-- Indexes for table `crm_hr_monthly_salary_sif`
--
ALTER TABLE `crm_hr_monthly_salary_sif`
  ADD PRIMARY KEY (`id`),
  ADD KEY `voucher_no` (`voucher_id`),
  ADD KEY `posted` (`posted`),
  ADD KEY `salary_processing_id` (`salary_processing_id`),
  ADD KEY `wpscompany_id` (`wpscompany_id`),
  ADD KEY `branch_id` (`branch_id`),
  ADD KEY `legder_id` (`legder_id`),
  ADD KEY `sublegder_id` (`sublegder_id`);

--
-- Indexes for table `crm_hr_monthly_salary_sif_details`
--
ALTER TABLE `crm_hr_monthly_salary_sif_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sif_file_id` (`sif_file_id`),
  ADD KEY `employee_id` (`employee_id`);

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `crm_hr_reporting_manager`
--
ALTER TABLE `crm_hr_reporting_manager`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `bank_name` (`employee_id`);

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

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

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

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

--
-- Indexes for table `crm_hr_salary_processing`
--
ALTER TABLE `crm_hr_salary_processing`
  ADD PRIMARY KEY (`id`),
  ADD KEY `voucher_id` (`voucher_id`),
  ADD KEY `posted` (`posted`);

--
-- Indexes for table `crm_hr_salary_slip`
--
ALTER TABLE `crm_hr_salary_slip`
  ADD PRIMARY KEY (`id`),
  ADD KEY `salary_processing_id` (`salary_processing_id`),
  ADD KEY `employee_id` (`employee_id`);

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `crm_inventory_direct_transfer`
--
ALTER TABLE `crm_inventory_direct_transfer`
  ADD PRIMARY KEY (`id`),
  ADD KEY `from_warehouse_id` (`from_warehouse_id`),
  ADD KEY `to_warehouse_id` (`to_warehouse_id`),
  ADD KEY `transfer_date` (`transfer_date`);

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

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

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

--
-- Indexes for table `crm_inventory_goods_issue`
--
ALTER TABLE `crm_inventory_goods_issue`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `isActive` (`isActive`),
  ADD KEY `file_id` (`file_id`),
  ADD KEY `goods_issue_date` (`goods_issue_date`);

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

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

--
-- Indexes for table `crm_inventory_goods_receipt`
--
ALTER TABLE `crm_inventory_goods_receipt`
  ADD PRIMARY KEY (`id`),
  ADD KEY `goods_receipt_date` (`goods_receipt_date`),
  ADD KEY `file_id` (`file_id`),
  ADD KEY `isActive` (`isActive`),
  ADD KEY `customer_id` (`customer_id`);

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

--
-- Indexes for table `crm_inventory_indirect_received`
--
ALTER TABLE `crm_inventory_indirect_received`
  ADD PRIMARY KEY (`id`),
  ADD KEY `from_warehouse_id` (`indirect_transfer_id`),
  ADD KEY `to_warehouse_id` (`to_warehouse_id`),
  ADD KEY `transfer_date` (`transfer_date`);

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

--
-- Indexes for table `crm_inventory_indirect_transfer`
--
ALTER TABLE `crm_inventory_indirect_transfer`
  ADD PRIMARY KEY (`id`),
  ADD KEY `from_warehouse_id` (`from_warehouse_id`),
  ADD KEY `to_warehouse_id` (`to_warehouse_id`),
  ADD KEY `transfer_date` (`transfer_date`);

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

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

--
-- Indexes for table `crm_inventory_items`
--
ALTER TABLE `crm_inventory_items`
  ADD PRIMARY KEY (`stock_id`);

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

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

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

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

--
-- Indexes for table `crm_inventory_log`
--
ALTER TABLE `crm_inventory_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_id` (`product_id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `date` (`date`);

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

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

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

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

--
-- Indexes for table `crm_inventory_transfer`
--
ALTER TABLE `crm_inventory_transfer`
  ADD PRIMARY KEY (`id`),
  ADD KEY `stock_id` (`stock_id`),
  ADD KEY `from_warehouse_id` (`from_warehouse_id`),
  ADD KEY `to_warehouse_id` (`to_warehouse_id`),
  ADD KEY `to_bin_id` (`to_bin_id`),
  ADD KEY `to_rack_id` (`to_rack_id`),
  ADD KEY `transfer_date` (`transfer_date`);

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

--
-- Indexes for table `crm_invoice`
--
ALTER TABLE `crm_invoice`
  ADD PRIMARY KEY (`id`),
  ADD KEY `company_id` (`company_id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `file_id` (`file_id`),
  ADD KEY `order_id` (`order_id`),
  ADD KEY `sales_group` (`sales_group`),
  ADD KEY `invoice_date` (`invoice_date`),
  ADD KEY `isActive` (`isActive`);

--
-- Indexes for table `crm_invoice_21_02_2020`
--
ALTER TABLE `crm_invoice_21_02_2020`
  ADD PRIMARY KEY (`id`),
  ADD KEY `company_id` (`company_id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `file_id` (`file_id`),
  ADD KEY `order_id` (`order_id`),
  ADD KEY `sales_group` (`sales_group`),
  ADD KEY `invoice_date` (`invoice_date`),
  ADD KEY `isActive` (`isActive`);

--
-- Indexes for table `crm_invoice_addition`
--
ALTER TABLE `crm_invoice_addition`
  ADD PRIMARY KEY (`id`),
  ADD KEY `invoice_id` (`invoice_id`),
  ADD KEY `invoice_id_2` (`invoice_id`);

--
-- Indexes for table `crm_invoice_deduction`
--
ALTER TABLE `crm_invoice_deduction`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`invoice_id`);

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

--
-- Indexes for table `crm_lead`
--
ALTER TABLE `crm_lead`
  ADD PRIMARY KEY (`id`),
  ADD KEY `company_id` (`customer_id`,`contact_id`),
  ADD KEY `file_id` (`file_id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `closing_date` (`closing_date`),
  ADD KEY `enq_date` (`enq_date`),
  ADD KEY `contact_id` (`contact_id`);

--
-- Indexes for table `crm_lead_08_03_2022`
--
ALTER TABLE `crm_lead_08_03_2022`
  ADD PRIMARY KEY (`id`),
  ADD KEY `company_id` (`customer_id`,`contact_id`),
  ADD KEY `file_id` (`file_id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `closing_date` (`closing_date`),
  ADD KEY `enq_date` (`enq_date`),
  ADD KEY `contact_id` (`contact_id`);

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

--
-- Indexes for table `crm_master_file`
--
ALTER TABLE `crm_master_file`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `lead_owner_id` (`lead_owner_id`),
  ADD KEY `start_from` (`start_from`),
  ADD KEY `current_process_status` (`current_process_status`),
  ADD KEY `approved_by` (`approved_by`),
  ADD KEY `is_approved` (`is_approved`);

--
-- Indexes for table `crm_master_file_08_03_2022`
--
ALTER TABLE `crm_master_file_08_03_2022`
  ADD PRIMARY KEY (`id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `lead_owner_id` (`lead_owner_id`),
  ADD KEY `start_from` (`start_from`),
  ADD KEY `current_process_status` (`current_process_status`),
  ADD KEY `approved_by` (`approved_by`),
  ADD KEY `is_approved` (`is_approved`);

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `crm_mas_inv_bin`
--
ALTER TABLE `crm_mas_inv_bin`
  ADD PRIMARY KEY (`id`),
  ADD KEY `rack_id` (`rack_id`);

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

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

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

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

--
-- Indexes for table `crm_mas_inv_warehouse`
--
ALTER TABLE `crm_mas_inv_warehouse`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name` (`warehouse_name`);

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

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

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

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

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

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

--
-- Indexes for table `crm_mas_quotation_validity`
--
ALTER TABLE `crm_mas_quotation_validity`
  ADD PRIMARY KEY (`ld`);

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `crm_material_receipt_stock_details`
--
ALTER TABLE `crm_material_receipt_stock_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `transaction_type` (`transaction_type`);

--
-- Indexes for table `crm_material_receipt_stock_details_11_01_2021`
--
ALTER TABLE `crm_material_receipt_stock_details_11_01_2021`
  ADD PRIMARY KEY (`id`),
  ADD KEY `transaction_type` (`transaction_type`);

--
-- Indexes for table `crm_meeting`
--
ALTER TABLE `crm_meeting`
  ADD PRIMARY KEY (`activity_id`),
  ADD KEY `start_date` (`start_date`),
  ADD KEY `end_date` (`end_date`);

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

--
-- Indexes for table `crm_order`
--
ALTER TABLE `crm_order`
  ADD PRIMARY KEY (`id`),
  ADD KEY `file_id` (`file_id`,`company_id`,`contact_id`),
  ADD KEY `company_id` (`company_id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `delivery_date` (`delivery_date`),
  ADD KEY `order_date` (`order_date`);

--
-- Indexes for table `crm_order_addition`
--
ALTER TABLE `crm_order_addition`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`order_id`);

--
-- Indexes for table `crm_order_deduction`
--
ALTER TABLE `crm_order_deduction`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`order_id`);

--
-- Indexes for table `crm_order_item`
--
ALTER TABLE `crm_order_item`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`order_id`),
  ADD KEY `product_id` (`product_id`);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `crm_production_goods_receipt_addition`
--
ALTER TABLE `crm_production_goods_receipt_addition`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`production_goods_receipt_id`);

--
-- Indexes for table `crm_production_goods_receipt_deduction`
--
ALTER TABLE `crm_production_goods_receipt_deduction`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`production_goods_receipt_id`);

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

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

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

--
-- Indexes for table `crm_product_brand_class`
--
ALTER TABLE `crm_product_brand_class`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `product_class` (`brand_class_name`);

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

--
-- Indexes for table `crm_product_location`
--
ALTER TABLE `crm_product_location`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quantity` (`quantity`),
  ADD KEY `quantity_2` (`quantity`),
  ADD KEY `stock_id` (`stock_id`),
  ADD KEY `bin` (`bin`),
  ADD KEY `rack` (`rack`),
  ADD KEY `warehouse_id` (`warehouse_id`);

--
-- Indexes for table `crm_product_location_11_1_2021`
--
ALTER TABLE `crm_product_location_11_1_2021`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quantity` (`quantity`),
  ADD KEY `quantity_2` (`quantity`),
  ADD KEY `stock_id` (`stock_id`),
  ADD KEY `bin` (`bin`),
  ADD KEY `rack` (`rack`),
  ADD KEY `warehouse_id` (`warehouse_id`);

--
-- Indexes for table `crm_product_location_change_rackbin`
--
ALTER TABLE `crm_product_location_change_rackbin`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quantity` (`quantity`),
  ADD KEY `quantity_2` (`quantity`);

--
-- Indexes for table `crm_product_location_duplicate`
--
ALTER TABLE `crm_product_location_duplicate`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quantity` (`quantity`),
  ADD KEY `quantity_2` (`quantity`);

--
-- Indexes for table `crm_profit_calc`
--
ALTER TABLE `crm_profit_calc`
  ADD PRIMARY KEY (`id`),
  ADD KEY `file_id` (`file_id`),
  ADD KEY `crm_user_id` (`crm_user_id`);

--
-- Indexes for table `crm_profit_calc_item`
--
ALTER TABLE `crm_profit_calc_item`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`profit_calc_id`),
  ADD KEY `product_id` (`product_id`);

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

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

--
-- Indexes for table `crm_purchasinginvoice_item`
--
ALTER TABLE `crm_purchasinginvoice_item`
  ADD PRIMARY KEY (`id`),
  ADD KEY `invoice_id` (`purchasing_invoice_id`),
  ADD KEY `product_id` (`product_id`);

--
-- Indexes for table `crm_purchasing_debit_note`
--
ALTER TABLE `crm_purchasing_debit_note`
  ADD PRIMARY KEY (`id`),
  ADD KEY `invoice_id` (`purchasing_invoice_id`,`vendor_id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `company_id` (`vendor_id`),
  ADD KEY `file_id` (`file_id`),
  ADD KEY `contact_id` (`contact_id`);

--
-- Indexes for table `crm_purchasing_debit_note_addition`
--
ALTER TABLE `crm_purchasing_debit_note_addition`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`purchasing_debit_note_id`);

--
-- Indexes for table `crm_purchasing_debit_note_deduction`
--
ALTER TABLE `crm_purchasing_debit_note_deduction`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`purchasing_debit_note_id`);

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

--
-- Indexes for table `crm_purchasing_debit_note_item`
--
ALTER TABLE `crm_purchasing_debit_note_item`
  ADD PRIMARY KEY (`id`),
  ADD KEY `goods_return_id` (`purchasing_debitnote_id`,`product_id`),
  ADD KEY `product_id` (`product_id`);

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

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

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

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

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

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

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

--
-- Indexes for table `crm_purchasing_invoice_addition`
--
ALTER TABLE `crm_purchasing_invoice_addition`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`purchasing_invoice_id`);

--
-- Indexes for table `crm_purchasing_invoice_deduction`
--
ALTER TABLE `crm_purchasing_invoice_deduction`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`purchasing_invoice_id`);

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

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

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

--
-- Indexes for table `crm_purchasing_order_addition`
--
ALTER TABLE `crm_purchasing_order_addition`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`purchasing_order_id`);

--
-- Indexes for table `crm_purchasing_order_deduction`
--
ALTER TABLE `crm_purchasing_order_deduction`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`purchasing_order_id`);

--
-- Indexes for table `crm_purchasing_order_item`
--
ALTER TABLE `crm_purchasing_order_item`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`purchasing_order_id`),
  ADD KEY `product_id` (`product_id`);

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `crm_quotes`
--
ALTER TABLE `crm_quotes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `file_id` (`file_id`,`company_id`,`contact_id`),
  ADD KEY `company_id` (`company_id`),
  ADD KEY `contact_id` (`contact_id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `probability` (`probability`),
  ADD KEY `qtn_validity` (`qtn_validity`);

--
-- Indexes for table `crm_quotes_08_03_2022`
--
ALTER TABLE `crm_quotes_08_03_2022`
  ADD PRIMARY KEY (`id`),
  ADD KEY `file_id` (`file_id`,`company_id`,`contact_id`),
  ADD KEY `company_id` (`company_id`),
  ADD KEY `contact_id` (`contact_id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `probability` (`probability`),
  ADD KEY `qtn_validity` (`qtn_validity`);

--
-- Indexes for table `crm_quotes_12-07-20`
--
ALTER TABLE `crm_quotes_12-07-20`
  ADD PRIMARY KEY (`id`),
  ADD KEY `file_id` (`file_id`,`company_id`,`contact_id`),
  ADD KEY `company_id` (`company_id`),
  ADD KEY `contact_id` (`contact_id`),
  ADD KEY `crm_user_id` (`crm_user_id`),
  ADD KEY `probability` (`probability`),
  ADD KEY `qtn_validity` (`qtn_validity`);

--
-- Indexes for table `crm_quotes_addition`
--
ALTER TABLE `crm_quotes_addition`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`quotes_id`);

--
-- Indexes for table `crm_quotes_deduction`
--
ALTER TABLE `crm_quotes_deduction`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotes_id` (`quotes_id`);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `crm_store`
--
ALTER TABLE `crm_store`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `part_number` (`part_number`),
  ADD KEY `unit_id` (`unit_id`),
  ADD KEY `unit_id_2` (`unit_id`),
  ADD KEY `tax_code` (`tax_code`),
  ADD KEY `description` (`description`),
  ADD KEY `part_number_2` (`part_number`),
  ADD KEY `generic_name` (`generic_name`),
  ADD KEY `generic_name_2` (`generic_name`),
  ADD KEY `generic_name_3` (`generic_name`),
  ADD KEY `generic_name_4` (`generic_name`),
  ADD KEY `description_2` (`description`),
  ADD KEY `product_class_id` (`brand_class_id`),
  ADD KEY `non_stock_item` (`inventory_item_type`),
  ADD KEY `id_2` (`part_number`,`generic_name`,`description`,`brand_class_id`,`inventory_item_type`),
  ADD KEY `rate` (`rate`);

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `crm_vendor_contact`
--
ALTER TABLE `crm_vendor_contact`
  ADD PRIMARY KEY (`id`),
  ADD KEY `company_id` (`vendor_id`),
  ADD KEY `id` (`id`);

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

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

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

--
-- Indexes for table `erp_finance_allocation`
--
ALTER TABLE `erp_finance_allocation`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ledger_id` (`ledger_id`),
  ADD KEY `subledger_id` (`subledger_id`),
  ADD KEY `allocation_date` (`allocation_date`);

--
-- Indexes for table `erp_finance_allocation_items`
--
ALTER TABLE `erp_finance_allocation_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `voucher_id` (`voucher_id`),
  ADD KEY `voucher_item_id` (`voucher_item_id`),
  ADD KEY `header_id` (`header_id`);

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

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

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

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

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

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

--
-- Indexes for table `erp_finance_legder`
--
ALTER TABLE `erp_finance_legder`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `account_no` (`account_no`),
  ADD KEY `type_of_account` (`type_of_account`),
  ADD KEY `sort_order` (`sort_order`),
  ADD KEY `sublegder_types` (`subledger_types`),
  ADD KEY `parent_account` (`parent_account`);

--
-- Indexes for table `erp_finance_reconciliation`
--
ALTER TABLE `erp_finance_reconciliation`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ledger_id` (`ledger_id`),
  ADD KEY `subledger_id` (`subledger_id`);

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

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

--
-- Indexes for table `erp_finance_subledger`
--
ALTER TABLE `erp_finance_subledger`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subledger_type_id` (`subledger_type_id`),
  ADD KEY `parent_id` (`parent_id`);

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

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

--
-- Indexes for table `erp_finance_voucher_head`
--
ALTER TABLE `erp_finance_voucher_head`
  ADD PRIMARY KEY (`id`),
  ADD KEY `voucher_date` (`voucher_date`),
  ADD KEY `due_date` (`due_date`),
  ADD KEY `header_table_id` (`header_table_id`),
  ADD KEY `is_posted` (`is_posted`),
  ADD KEY `is_allocated` (`is_allocated`),
  ADD KEY `voucher_type` (`voucher_type`);

--
-- Indexes for table `erp_finance_voucher_items`
--
ALTER TABLE `erp_finance_voucher_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `header_id` (`header_id`),
  ADD KEY `ledger_id` (`ledger_id`),
  ADD KEY `subledger_id` (`subledger_id`),
  ADD KEY `project_id` (`brand_id`),
  ADD KEY `currency_id` (`currency_id`),
  ADD KEY `reconciliation_id` (`reconciliation_id`);

--
-- Indexes for table `erp_finance_voucher_type`
--
ALTER TABLE `erp_finance_voucher_type`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`),
  ADD UNIQUE KEY `description` (`description`);

--
-- Indexes for table `erp_finance_voucher_type_mappings`
--
ALTER TABLE `erp_finance_voucher_type_mappings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `voucher_type` (`voucher_type`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `crm_activity`
--
ALTER TABLE `crm_activity`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=460;

--
-- AUTO_INCREMENT for table `crm_advance_payment`
--
ALTER TABLE `crm_advance_payment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_allocated_materials`
--
ALTER TABLE `crm_allocated_materials`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `crm_approval_history`
--
ALTER TABLE `crm_approval_history`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_approval_level_details`
--
ALTER TABLE `crm_approval_level_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_approval_level_general`
--
ALTER TABLE `crm_approval_level_general`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_balancesheet_sort_order`
--
ALTER TABLE `crm_balancesheet_sort_order`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_bank_reconciliation`
--
ALTER TABLE `crm_bank_reconciliation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_change_rack_bin`
--
ALTER TABLE `crm_change_rack_bin`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3181;

--
-- AUTO_INCREMENT for table `crm_company`
--
ALTER TABLE `crm_company`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_company_contact`
--
ALTER TABLE `crm_company_contact`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_company_settings`
--
ALTER TABLE `crm_company_settings`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `crm_company_shipping_details`
--
ALTER TABLE `crm_company_shipping_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2742;

--
-- AUTO_INCREMENT for table `crm_company_temp`
--
ALTER TABLE `crm_company_temp`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_company_terms_conditions`
--
ALTER TABLE `crm_company_terms_conditions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `crm_cost_price_group`
--
ALTER TABLE `crm_cost_price_group`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_cost_price_group_name`
--
ALTER TABLE `crm_cost_price_group_name`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_creditnote`
--
ALTER TABLE `crm_creditnote`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50021;

--
-- AUTO_INCREMENT for table `crm_creditnote_addition`
--
ALTER TABLE `crm_creditnote_addition`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=147;

--
-- AUTO_INCREMENT for table `crm_creditnote_deduction`
--
ALTER TABLE `crm_creditnote_deduction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=145;

--
-- AUTO_INCREMENT for table `crm_creditnote_item`
--
ALTER TABLE `crm_creditnote_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=799;

--
-- AUTO_INCREMENT for table `crm_customer`
--
ALTER TABLE `crm_customer`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6880;

--
-- AUTO_INCREMENT for table `crm_customer_contact`
--
ALTER TABLE `crm_customer_contact`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30731;

--
-- AUTO_INCREMENT for table `crm_customer_docs`
--
ALTER TABLE `crm_customer_docs`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `crm_customer_feedback`
--
ALTER TABLE `crm_customer_feedback`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_customer_feedback_details`
--
ALTER TABLE `crm_customer_feedback_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_customer_pricing_group`
--
ALTER TABLE `crm_customer_pricing_group`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=397449;

--
-- AUTO_INCREMENT for table `crm_customer_temp`
--
ALTER TABLE `crm_customer_temp`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_custom_changes`
--
ALTER TABLE `crm_custom_changes`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_daily_closing_stock`
--
ALTER TABLE `crm_daily_closing_stock`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT for table `crm_deleted_rack_bin_history`
--
ALTER TABLE `crm_deleted_rack_bin_history`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=128;

--
-- AUTO_INCREMENT for table `crm_delivery_item`
--
ALTER TABLE `crm_delivery_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3376;

--
-- AUTO_INCREMENT for table `crm_delivery_material_details`
--
ALTER TABLE `crm_delivery_material_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13858;

--
-- AUTO_INCREMENT for table `crm_delivery_note`
--
ALTER TABLE `crm_delivery_note`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31076;

--
-- AUTO_INCREMENT for table `crm_demo_item_details`
--
ALTER TABLE `crm_demo_item_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_demo_item_details_return`
--
ALTER TABLE `crm_demo_item_details_return`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_demo_item_general`
--
ALTER TABLE `crm_demo_item_general`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_dim1`
--
ALTER TABLE `crm_dim1`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_dim2`
--
ALTER TABLE `crm_dim2`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_dim3`
--
ALTER TABLE `crm_dim3`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_direct_items_temp`
--
ALTER TABLE `crm_direct_items_temp`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_direct_order`
--
ALTER TABLE `crm_direct_order`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_direct_order_addition`
--
ALTER TABLE `crm_direct_order_addition`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_direct_order_deduction`
--
ALTER TABLE `crm_direct_order_deduction`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_direct_order_item`
--
ALTER TABLE `crm_direct_order_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_direct_order_item_details`
--
ALTER TABLE `crm_direct_order_item_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_direct_purchase_order_general`
--
ALTER TABLE `crm_direct_purchase_order_general`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_direct_purchase_order_items`
--
ALTER TABLE `crm_direct_purchase_order_items`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_direct_purchasing_order_addition`
--
ALTER TABLE `crm_direct_purchasing_order_addition`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_direct_purchasing_order_deduction`
--
ALTER TABLE `crm_direct_purchasing_order_deduction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_document`
--
ALTER TABLE `crm_document`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `crm_emaillog`
--
ALTER TABLE `crm_emaillog`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_email_coverletter`
--
ALTER TABLE `crm_email_coverletter`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_file_note`
--
ALTER TABLE `crm_file_note`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `crm_file_tasks`
--
ALTER TABLE `crm_file_tasks`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_file_tasks_head`
--
ALTER TABLE `crm_file_tasks_head`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_file_task_items`
--
ALTER TABLE `crm_file_task_items`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_finance_year_close`
--
ALTER TABLE `crm_finance_year_close`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_fin_accounts`
--
ALTER TABLE `crm_fin_accounts`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=496;

--
-- AUTO_INCREMENT for table `crm_fin_cost_center`
--
ALTER TABLE `crm_fin_cost_center`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_fin_cost_center_sales`
--
ALTER TABLE `crm_fin_cost_center_sales`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_fin_customer_account`
--
ALTER TABLE `crm_fin_customer_account`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_fin_form`
--
ALTER TABLE `crm_fin_form`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `crm_fin_form_old`
--
ALTER TABLE `crm_fin_form_old`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_fin_general_ledger`
--
ALTER TABLE `crm_fin_general_ledger`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=140;

--
-- AUTO_INCREMENT for table `crm_fin_general_ledger_head`
--
ALTER TABLE `crm_fin_general_ledger_head`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49;

--
-- AUTO_INCREMENT for table `crm_fin_general_ledger_old`
--
ALTER TABLE `crm_fin_general_ledger_old`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_fin_opening_balance`
--
ALTER TABLE `crm_fin_opening_balance`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_fin_outstanding_invoices`
--
ALTER TABLE `crm_fin_outstanding_invoices`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_fin_settings`
--
ALTER TABLE `crm_fin_settings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `crm_fin_subledger`
--
ALTER TABLE `crm_fin_subledger`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5980;

--
-- AUTO_INCREMENT for table `crm_fin_subledger_type`
--
ALTER TABLE `crm_fin_subledger_type`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `crm_fin_vendor_account`
--
ALTER TABLE `crm_fin_vendor_account`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_fin_voucher_allocation`
--
ALTER TABLE `crm_fin_voucher_allocation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `crm_fin_voucher_allocation_head`
--
ALTER TABLE `crm_fin_voucher_allocation_head`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `crm_footer_items`
--
ALTER TABLE `crm_footer_items`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=151;

--
-- AUTO_INCREMENT for table `crm_form_boq_general`
--
ALTER TABLE `crm_form_boq_general`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_form_boq_general_item`
--
ALTER TABLE `crm_form_boq_general_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_form_boq_item_schedule`
--
ALTER TABLE `crm_form_boq_item_schedule`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_form_boq_schedule`
--
ALTER TABLE `crm_form_boq_schedule`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_goods_return`
--
ALTER TABLE `crm_goods_return`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_goods_return_item`
--
ALTER TABLE `crm_goods_return_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_appraisal`
--
ALTER TABLE `crm_hr_appraisal`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_appraisal_analysis`
--
ALTER TABLE `crm_hr_appraisal_analysis`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_appraisal_questions`
--
ALTER TABLE `crm_hr_appraisal_questions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_appraisal_type`
--
ALTER TABLE `crm_hr_appraisal_type`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_attendance_log`
--
ALTER TABLE `crm_hr_attendance_log`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_attendance_manager`
--
ALTER TABLE `crm_hr_attendance_manager`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_audit_log`
--
ALTER TABLE `crm_hr_audit_log`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_audit_log_functionality`
--
ALTER TABLE `crm_hr_audit_log_functionality`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_bank`
--
ALTER TABLE `crm_hr_bank`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_calendar_notification`
--
ALTER TABLE `crm_hr_calendar_notification`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_company_catalogue`
--
ALTER TABLE `crm_hr_company_catalogue`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_company_circular`
--
ALTER TABLE `crm_hr_company_circular`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_company_document`
--
ALTER TABLE `crm_hr_company_document`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_company_inprocess_document`
--
ALTER TABLE `crm_hr_company_inprocess_document`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_company_templates`
--
ALTER TABLE `crm_hr_company_templates`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_department`
--
ALTER TABLE `crm_hr_department`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_designation`
--
ALTER TABLE `crm_hr_designation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee`
--
ALTER TABLE `crm_hr_employee`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_approve_level`
--
ALTER TABLE `crm_hr_employee_approve_level`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_asset`
--
ALTER TABLE `crm_hr_employee_asset`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_attendance`
--
ALTER TABLE `crm_hr_employee_attendance`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_attendance_warning`
--
ALTER TABLE `crm_hr_employee_attendance_warning`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_biometric_exclude`
--
ALTER TABLE `crm_hr_employee_biometric_exclude`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_branch`
--
ALTER TABLE `crm_hr_employee_branch`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_brand_salary_percent`
--
ALTER TABLE `crm_hr_employee_brand_salary_percent`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_certificate`
--
ALTER TABLE `crm_hr_employee_certificate`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_complaint_suggestion`
--
ALTER TABLE `crm_hr_employee_complaint_suggestion`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_contacts`
--
ALTER TABLE `crm_hr_employee_contacts`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_department`
--
ALTER TABLE `crm_hr_employee_department`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_dependants`
--
ALTER TABLE `crm_hr_employee_dependants`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_designation`
--
ALTER TABLE `crm_hr_employee_designation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_documents`
--
ALTER TABLE `crm_hr_employee_documents`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_document_expiry`
--
ALTER TABLE `crm_hr_employee_document_expiry`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_eos`
--
ALTER TABLE `crm_hr_employee_eos`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_eos_clearance_details`
--
ALTER TABLE `crm_hr_employee_eos_clearance_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_eos_details`
--
ALTER TABLE `crm_hr_employee_eos_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_eos_payment`
--
ALTER TABLE `crm_hr_employee_eos_payment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_expense`
--
ALTER TABLE `crm_hr_employee_expense`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_expense_details`
--
ALTER TABLE `crm_hr_employee_expense_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_inout_document`
--
ALTER TABLE `crm_hr_employee_inout_document`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_inprocess_document`
--
ALTER TABLE `crm_hr_employee_inprocess_document`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_leave`
--
ALTER TABLE `crm_hr_employee_leave`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_leavesettlement`
--
ALTER TABLE `crm_hr_employee_leavesettlement`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_leave_detail`
--
ALTER TABLE `crm_hr_employee_leave_detail`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_leave_encashment`
--
ALTER TABLE `crm_hr_employee_leave_encashment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_leave_excuse`
--
ALTER TABLE `crm_hr_employee_leave_excuse`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_leave_ledger`
--
ALTER TABLE `crm_hr_employee_leave_ledger`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_leave_migrated`
--
ALTER TABLE `crm_hr_employee_leave_migrated`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_loan`
--
ALTER TABLE `crm_hr_employee_loan`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_loan_detail`
--
ALTER TABLE `crm_hr_employee_loan_detail`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_notes`
--
ALTER TABLE `crm_hr_employee_notes`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_notice_conduct`
--
ALTER TABLE `crm_hr_employee_notice_conduct`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_offboard`
--
ALTER TABLE `crm_hr_employee_offboard`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_overtime`
--
ALTER TABLE `crm_hr_employee_overtime`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_pension`
--
ALTER TABLE `crm_hr_employee_pension`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_purchase`
--
ALTER TABLE `crm_hr_employee_purchase`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_purchase_detail`
--
ALTER TABLE `crm_hr_employee_purchase_detail`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_qualification`
--
ALTER TABLE `crm_hr_employee_qualification`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_resignation`
--
ALTER TABLE `crm_hr_employee_resignation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_salary`
--
ALTER TABLE `crm_hr_employee_salary`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_salary_advance`
--
ALTER TABLE `crm_hr_employee_salary_advance`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_salary_advance_payment`
--
ALTER TABLE `crm_hr_employee_salary_advance_payment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_salary_deduction_leave`
--
ALTER TABLE `crm_hr_employee_salary_deduction_leave`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_shift`
--
ALTER TABLE `crm_hr_employee_shift`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_target`
--
ALTER TABLE `crm_hr_employee_target`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_ticket`
--
ALTER TABLE `crm_hr_employee_ticket`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_ticket_encashment`
--
ALTER TABLE `crm_hr_employee_ticket_encashment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_ticket_entitlement`
--
ALTER TABLE `crm_hr_employee_ticket_entitlement`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_ticket_setting`
--
ALTER TABLE `crm_hr_employee_ticket_setting`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_employee_wps_company`
--
ALTER TABLE `crm_hr_employee_wps_company`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_eos_gratuity_details`
--
ALTER TABLE `crm_hr_eos_gratuity_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_expense`
--
ALTER TABLE `crm_hr_expense`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_expense_detail`
--
ALTER TABLE `crm_hr_expense_detail`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_expense_master`
--
ALTER TABLE `crm_hr_expense_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_holiday_allowance`
--
ALTER TABLE `crm_hr_holiday_allowance`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_initial_password_reset`
--
ALTER TABLE `crm_hr_initial_password_reset`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_leavesettlement`
--
ALTER TABLE `crm_hr_leavesettlement`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mail_settings`
--
ALTER TABLE `crm_hr_mail_settings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mail_status`
--
ALTER TABLE `crm_hr_mail_status`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_master_function`
--
ALTER TABLE `crm_hr_master_function`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `crm_hr_master_mail_detail`
--
ALTER TABLE `crm_hr_master_mail_detail`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

--
-- AUTO_INCREMENT for table `crm_hr_master_salary_lock`
--
ALTER TABLE `crm_hr_master_salary_lock`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_master_salary_procedure`
--
ALTER TABLE `crm_hr_master_salary_procedure`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_appraisal`
--
ALTER TABLE `crm_hr_mas_appraisal`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_appraisal_type`
--
ALTER TABLE `crm_hr_mas_appraisal_type`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `crm_hr_mas_approve_setting`
--
ALTER TABLE `crm_hr_mas_approve_setting`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_business_unit`
--
ALTER TABLE `crm_hr_mas_business_unit`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_certificate_name`
--
ALTER TABLE `crm_hr_mas_certificate_name`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_company_branch_sponsor`
--
ALTER TABLE `crm_hr_mas_company_branch_sponsor`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_company_wps_details`
--
ALTER TABLE `crm_hr_mas_company_wps_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_document`
--
ALTER TABLE `crm_hr_mas_document`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40;

--
-- AUTO_INCREMENT for table `crm_hr_mas_eos_clearance`
--
ALTER TABLE `crm_hr_mas_eos_clearance`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_eos_payment`
--
ALTER TABLE `crm_hr_mas_eos_payment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `crm_hr_mas_expiry_status`
--
ALTER TABLE `crm_hr_mas_expiry_status`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_gratuity`
--
ALTER TABLE `crm_hr_mas_gratuity`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_holiday`
--
ALTER TABLE `crm_hr_mas_holiday`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_incentive_structure`
--
ALTER TABLE `crm_hr_mas_incentive_structure`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `crm_hr_mas_inout_document`
--
ALTER TABLE `crm_hr_mas_inout_document`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_job_contract`
--
ALTER TABLE `crm_hr_mas_job_contract`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_leave`
--
ALTER TABLE `crm_hr_mas_leave`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_noticeperiod`
--
ALTER TABLE `crm_hr_mas_noticeperiod`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_notification`
--
ALTER TABLE `crm_hr_mas_notification`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_offboarding`
--
ALTER TABLE `crm_hr_mas_offboarding`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_onboarding`
--
ALTER TABLE `crm_hr_mas_onboarding`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `crm_hr_mas_pension`
--
ALTER TABLE `crm_hr_mas_pension`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_product`
--
ALTER TABLE `crm_hr_mas_product`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_relation`
--
ALTER TABLE `crm_hr_mas_relation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `crm_hr_mas_religion`
--
ALTER TABLE `crm_hr_mas_religion`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `crm_hr_mas_salarytype`
--
ALTER TABLE `crm_hr_mas_salarytype`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_shift`
--
ALTER TABLE `crm_hr_mas_shift`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_training_course`
--
ALTER TABLE `crm_hr_mas_training_course`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_mas_training_course_detail`
--
ALTER TABLE `crm_hr_mas_training_course_detail`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_monthly_gratuity`
--
ALTER TABLE `crm_hr_monthly_gratuity`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_monthly_salary_sif`
--
ALTER TABLE `crm_hr_monthly_salary_sif`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_monthly_salary_sif_details`
--
ALTER TABLE `crm_hr_monthly_salary_sif_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_notification`
--
ALTER TABLE `crm_hr_notification`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_outsource_overtime`
--
ALTER TABLE `crm_hr_outsource_overtime`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_pdf_settings`
--
ALTER TABLE `crm_hr_pdf_settings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `crm_hr_questions`
--
ALTER TABLE `crm_hr_questions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_question_type`
--
ALTER TABLE `crm_hr_question_type`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_recruitment`
--
ALTER TABLE `crm_hr_recruitment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_recruitment_analysis`
--
ALTER TABLE `crm_hr_recruitment_analysis`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_recruitment_documents`
--
ALTER TABLE `crm_hr_recruitment_documents`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_recruitment_note`
--
ALTER TABLE `crm_hr_recruitment_note`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_recruitment_onboard`
--
ALTER TABLE `crm_hr_recruitment_onboard`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_reporting_manager`
--
ALTER TABLE `crm_hr_reporting_manager`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_room_allocation`
--
ALTER TABLE `crm_hr_room_allocation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_room_bedspace`
--
ALTER TABLE `crm_hr_room_bedspace`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_room_setting`
--
ALTER TABLE `crm_hr_room_setting`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_room_setting_details`
--
ALTER TABLE `crm_hr_room_setting_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_salary_processing`
--
ALTER TABLE `crm_hr_salary_processing`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_salary_slip`
--
ALTER TABLE `crm_hr_salary_slip`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_salary_slip_details`
--
ALTER TABLE `crm_hr_salary_slip_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_salary_slip_leavedetails`
--
ALTER TABLE `crm_hr_salary_slip_leavedetails`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_sale_target`
--
ALTER TABLE `crm_hr_sale_target`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_sale_target_details`
--
ALTER TABLE `crm_hr_sale_target_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_settings`
--
ALTER TABLE `crm_hr_settings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_todolist`
--
ALTER TABLE `crm_hr_todolist`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_training`
--
ALTER TABLE `crm_hr_training`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_training_details`
--
ALTER TABLE `crm_hr_training_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_hr_workinghours`
--
ALTER TABLE `crm_hr_workinghours`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_incentive_calculation`
--
ALTER TABLE `crm_incentive_calculation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_inventory_direct_transfer`
--
ALTER TABLE `crm_inventory_direct_transfer`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50001;

--
-- AUTO_INCREMENT for table `crm_inventory_direct_transfer_item`
--
ALTER TABLE `crm_inventory_direct_transfer_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_inventory_direct_transfer_item_details`
--
ALTER TABLE `crm_inventory_direct_transfer_item_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_inventory_generic_name`
--
ALTER TABLE `crm_inventory_generic_name`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `crm_inventory_goods_issue`
--
ALTER TABLE `crm_inventory_goods_issue`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20002;

--
-- AUTO_INCREMENT for table `crm_inventory_goods_issue_item`
--
ALTER TABLE `crm_inventory_goods_issue_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `crm_inventory_goods_issue_material_details`
--
ALTER TABLE `crm_inventory_goods_issue_material_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `crm_inventory_goods_receipt`
--
ALTER TABLE `crm_inventory_goods_receipt`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10012;

--
-- AUTO_INCREMENT for table `crm_inventory_goods_receipt_item`
--
ALTER TABLE `crm_inventory_goods_receipt_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `crm_inventory_indirect_received`
--
ALTER TABLE `crm_inventory_indirect_received`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_inventory_indirect_received_items`
--
ALTER TABLE `crm_inventory_indirect_received_items`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_inventory_indirect_transfer`
--
ALTER TABLE `crm_inventory_indirect_transfer`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30001;

--
-- AUTO_INCREMENT for table `crm_inventory_indirect_transfer_item`
--
ALTER TABLE `crm_inventory_indirect_transfer_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_inventory_indirect_transfer_item_details`
--
ALTER TABLE `crm_inventory_indirect_transfer_item_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_inventory_kit`
--
ALTER TABLE `crm_inventory_kit`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_inventory_kit_items`
--
ALTER TABLE `crm_inventory_kit_items`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_inventory_level1_category`
--
ALTER TABLE `crm_inventory_level1_category`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `crm_inventory_level2_category`
--
ALTER TABLE `crm_inventory_level2_category`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `crm_inventory_log`
--
ALTER TABLE `crm_inventory_log`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_inventory_material_distribution`
--
ALTER TABLE `crm_inventory_material_distribution`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_inventory_mtom_transfer`
--
ALTER TABLE `crm_inventory_mtom_transfer`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `crm_inventory_mtom_transfer_details`
--
ALTER TABLE `crm_inventory_mtom_transfer_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `crm_inventory_settings`
--
ALTER TABLE `crm_inventory_settings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_inventory_transfer`
--
ALTER TABLE `crm_inventory_transfer`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_inventory_uploaded_stock`
--
ALTER TABLE `crm_inventory_uploaded_stock`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_invoice`
--
ALTER TABLE `crm_invoice`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=41076;

--
-- AUTO_INCREMENT for table `crm_invoice_21_02_2020`
--
ALTER TABLE `crm_invoice_21_02_2020`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=405724;

--
-- AUTO_INCREMENT for table `crm_invoice_addition`
--
ALTER TABLE `crm_invoice_addition`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1078;

--
-- AUTO_INCREMENT for table `crm_invoice_deduction`
--
ALTER TABLE `crm_invoice_deduction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1076;

--
-- AUTO_INCREMENT for table `crm_invoice_item`
--
ALTER TABLE `crm_invoice_item`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3226;

--
-- AUTO_INCREMENT for table `crm_lead`
--
ALTER TABLE `crm_lead`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3430;

--
-- AUTO_INCREMENT for table `crm_lead_08_03_2022`
--
ALTER TABLE `crm_lead_08_03_2022`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=100005;

--
-- AUTO_INCREMENT for table `crm_log_for_form_edit`
--
ALTER TABLE `crm_log_for_form_edit`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_master_file`
--
ALTER TABLE `crm_master_file`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4936;

--
-- AUTO_INCREMENT for table `crm_master_file_08_03_2022`
--
ALTER TABLE `crm_master_file_08_03_2022`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1005;

--
-- AUTO_INCREMENT for table `crm_mas_availability`
--
ALTER TABLE `crm_mas_availability`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `crm_mas_bank`
--
ALTER TABLE `crm_mas_bank`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=139;

--
-- AUTO_INCREMENT for table `crm_mas_code`
--
ALTER TABLE `crm_mas_code`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_mas_company_bank_details`
--
ALTER TABLE `crm_mas_company_bank_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_mas_company_type`
--
ALTER TABLE `crm_mas_company_type`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `crm_mas_country`
--
ALTER TABLE `crm_mas_country`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=184;

--
-- AUTO_INCREMENT for table `crm_mas_currency`
--
ALTER TABLE `crm_mas_currency`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;

--
-- AUTO_INCREMENT for table `crm_mas_custom_duties`
--
ALTER TABLE `crm_mas_custom_duties`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_mas_emirates_list`
--
ALTER TABLE `crm_mas_emirates_list`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `crm_mas_industry`
--
ALTER TABLE `crm_mas_industry`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `crm_mas_invoice_type`
--
ALTER TABLE `crm_mas_invoice_type`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `crm_mas_inv_bin`
--
ALTER TABLE `crm_mas_inv_bin`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=208;

--
-- AUTO_INCREMENT for table `crm_mas_inv_rack`
--
ALTER TABLE `crm_mas_inv_rack`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=156;

--
-- AUTO_INCREMENT for table `crm_mas_inv_status`
--
ALTER TABLE `crm_mas_inv_status`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `crm_mas_inv_tax`
--
ALTER TABLE `crm_mas_inv_tax`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=197;

--
-- AUTO_INCREMENT for table `crm_mas_inv_unit`
--
ALTER TABLE `crm_mas_inv_unit`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_mas_inv_warehouse`
--
ALTER TABLE `crm_mas_inv_warehouse`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `crm_mas_number_settings`
--
ALTER TABLE `crm_mas_number_settings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `crm_mas_payment_term`
--
ALTER TABLE `crm_mas_payment_term`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=111;

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

--
-- AUTO_INCREMENT for table `crm_mas_probability`
--
ALTER TABLE `crm_mas_probability`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;

--
-- AUTO_INCREMENT for table `crm_mas_project`
--
ALTER TABLE `crm_mas_project`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_mas_quotation_close_reason`
--
ALTER TABLE `crm_mas_quotation_close_reason`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT for table `crm_mas_sales_group`
--
ALTER TABLE `crm_mas_sales_group`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=52;

--
-- AUTO_INCREMENT for table `crm_mas_setting`
--
ALTER TABLE `crm_mas_setting`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_mas_settings`
--
ALTER TABLE `crm_mas_settings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;

--
-- AUTO_INCREMENT for table `crm_mas_settings_login`
--
ALTER TABLE `crm_mas_settings_login`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `crm_mas_shipping`
--
ALTER TABLE `crm_mas_shipping`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=52;

--
-- AUTO_INCREMENT for table `crm_mas_source_of_lead`
--
ALTER TABLE `crm_mas_source_of_lead`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `crm_mas_tbl`
--
ALTER TABLE `crm_mas_tbl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `crm_mas_terms_and_conditions`
--
ALTER TABLE `crm_mas_terms_and_conditions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `crm_mas_user_group`
--
ALTER TABLE `crm_mas_user_group`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT for table `crm_mas_user_relations`
--
ALTER TABLE `crm_mas_user_relations`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_mas_validity`
--
ALTER TABLE `crm_mas_validity`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_material_movement_issue`
--
ALTER TABLE `crm_material_movement_issue`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_material_receipt_stock_details`
--
ALTER TABLE `crm_material_receipt_stock_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3079;

--
-- AUTO_INCREMENT for table `crm_material_receipt_stock_details_11_01_2021`
--
ALTER TABLE `crm_material_receipt_stock_details_11_01_2021`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10949;

--
-- AUTO_INCREMENT for table `crm_opening_balance`
--
ALTER TABLE `crm_opening_balance`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2646;

--
-- AUTO_INCREMENT for table `crm_order`
--
ALTER TABLE `crm_order`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21059;

--
-- AUTO_INCREMENT for table `crm_order_addition`
--
ALTER TABLE `crm_order_addition`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4632;

--
-- AUTO_INCREMENT for table `crm_order_deduction`
--
ALTER TABLE `crm_order_deduction`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4628;

--
-- AUTO_INCREMENT for table `crm_order_item`
--
ALTER TABLE `crm_order_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17086;

--
-- AUTO_INCREMENT for table `crm_owner_bank_details`
--
ALTER TABLE `crm_owner_bank_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT for table `crm_paid_invoices`
--
ALTER TABLE `crm_paid_invoices`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_pdc`
--
ALTER TABLE `crm_pdc`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_points_redeemed`
--
ALTER TABLE `crm_points_redeemed`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `crm_price_list`
--
ALTER TABLE `crm_price_list`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_pricing_group`
--
ALTER TABLE `crm_pricing_group`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `crm_pricing_group_product_relation`
--
ALTER TABLE `crm_pricing_group_product_relation`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10868;

--
-- AUTO_INCREMENT for table `crm_production_billofmaterial`
--
ALTER TABLE `crm_production_billofmaterial`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_production_billofmaterial_item`
--
ALTER TABLE `crm_production_billofmaterial_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_production_goods_issue`
--
ALTER TABLE `crm_production_goods_issue`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1001;

--
-- AUTO_INCREMENT for table `crm_production_goods_issues_return_item`
--
ALTER TABLE `crm_production_goods_issues_return_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_production_goods_issue_item`
--
ALTER TABLE `crm_production_goods_issue_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_production_goods_issue_item_details`
--
ALTER TABLE `crm_production_goods_issue_item_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_production_goods_receipt`
--
ALTER TABLE `crm_production_goods_receipt`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=100001;

--
-- AUTO_INCREMENT for table `crm_production_goods_receipt_addition`
--
ALTER TABLE `crm_production_goods_receipt_addition`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_production_goods_receipt_deduction`
--
ALTER TABLE `crm_production_goods_receipt_deduction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_production_goods_receipt_item`
--
ALTER TABLE `crm_production_goods_receipt_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_production_order`
--
ALTER TABLE `crm_production_order`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1001;

--
-- AUTO_INCREMENT for table `crm_production_order_item`
--
ALTER TABLE `crm_production_order_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_product_brand_class`
--
ALTER TABLE `crm_product_brand_class`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_product_class`
--
ALTER TABLE `crm_product_class`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=496;

--
-- AUTO_INCREMENT for table `crm_product_location`
--
ALTER TABLE `crm_product_location`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3661;

--
-- AUTO_INCREMENT for table `crm_product_location_11_1_2021`
--
ALTER TABLE `crm_product_location_11_1_2021`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31063;

--
-- AUTO_INCREMENT for table `crm_product_location_change_rackbin`
--
ALTER TABLE `crm_product_location_change_rackbin`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6129;

--
-- AUTO_INCREMENT for table `crm_product_location_duplicate`
--
ALTER TABLE `crm_product_location_duplicate`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20698;

--
-- AUTO_INCREMENT for table `crm_profit_calc`
--
ALTER TABLE `crm_profit_calc`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_profit_calc_item`
--
ALTER TABLE `crm_profit_calc_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchase_analysis_items`
--
ALTER TABLE `crm_purchase_analysis_items`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasinginvoice`
--
ALTER TABLE `crm_purchasinginvoice`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=80459;

--
-- AUTO_INCREMENT for table `crm_purchasinginvoice_item`
--
ALTER TABLE `crm_purchasinginvoice_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2839;

--
-- AUTO_INCREMENT for table `crm_purchasing_debit_note`
--
ALTER TABLE `crm_purchasing_debit_note`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=90004;

--
-- AUTO_INCREMENT for table `crm_purchasing_debit_note_addition`
--
ALTER TABLE `crm_purchasing_debit_note_addition`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_debit_note_deduction`
--
ALTER TABLE `crm_purchasing_debit_note_deduction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `crm_purchasing_debit_note_item`
--
ALTER TABLE `crm_purchasing_debit_note_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;

--
-- AUTO_INCREMENT for table `crm_purchasing_enquiry`
--
ALTER TABLE `crm_purchasing_enquiry`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50001;

--
-- AUTO_INCREMENT for table `crm_purchasing_enquiry_item`
--
ALTER TABLE `crm_purchasing_enquiry_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_enquiry_non_stock_item`
--
ALTER TABLE `crm_purchasing_enquiry_non_stock_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_enquiry_non_stock_item_temp`
--
ALTER TABLE `crm_purchasing_enquiry_non_stock_item_temp`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_enquiry_stock_item`
--
ALTER TABLE `crm_purchasing_enquiry_stock_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_enquiry_stock_item_temp`
--
ALTER TABLE `crm_purchasing_enquiry_stock_item_temp`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_enquiry_temp`
--
ALTER TABLE `crm_purchasing_enquiry_temp`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_invoice_addition`
--
ALTER TABLE `crm_purchasing_invoice_addition`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=607;

--
-- AUTO_INCREMENT for table `crm_purchasing_invoice_deduction`
--
ALTER TABLE `crm_purchasing_invoice_deduction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=458;

--
-- AUTO_INCREMENT for table `crm_purchasing_material_receipt`
--
ALTER TABLE `crm_purchasing_material_receipt`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT '(MRV number)', AUTO_INCREMENT=70458;

--
-- AUTO_INCREMENT for table `crm_purchasing_material_receipt_item`
--
ALTER TABLE `crm_purchasing_material_receipt_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3118;

--
-- AUTO_INCREMENT for table `crm_purchasing_order`
--
ALTER TABLE `crm_purchasing_order`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=60452;

--
-- AUTO_INCREMENT for table `crm_purchasing_order_addition`
--
ALTER TABLE `crm_purchasing_order_addition`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `crm_purchasing_order_deduction`
--
ALTER TABLE `crm_purchasing_order_deduction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_order_item`
--
ALTER TABLE `crm_purchasing_order_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_order_nonstock_addition`
--
ALTER TABLE `crm_purchasing_order_nonstock_addition`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_order_nonstock_deduction`
--
ALTER TABLE `crm_purchasing_order_nonstock_deduction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_order_non_stock_item`
--
ALTER TABLE `crm_purchasing_order_non_stock_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_order_stock_item`
--
ALTER TABLE `crm_purchasing_order_stock_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7994;

--
-- AUTO_INCREMENT for table `crm_purchasing_order_stock_item_temp`
--
ALTER TABLE `crm_purchasing_order_stock_item_temp`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_order_temp`
--
ALTER TABLE `crm_purchasing_order_temp`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_receipt_numbering`
--
ALTER TABLE `crm_purchasing_receipt_numbering`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_requisition`
--
ALTER TABLE `crm_purchasing_requisition`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10001;

--
-- AUTO_INCREMENT for table `crm_purchasing_requisition_non_stock_item`
--
ALTER TABLE `crm_purchasing_requisition_non_stock_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_purchasing_requisition_stock_item`
--
ALTER TABLE `crm_purchasing_requisition_stock_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_qns_category`
--
ALTER TABLE `crm_qns_category`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_qns_subcategory`
--
ALTER TABLE `crm_qns_subcategory`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_quotes`
--
ALTER TABLE `crm_quotes`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13462;

--
-- AUTO_INCREMENT for table `crm_quotes_08_03_2022`
--
ALTER TABLE `crm_quotes_08_03_2022`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=100005;

--
-- AUTO_INCREMENT for table `crm_quotes_12-07-20`
--
ALTER TABLE `crm_quotes_12-07-20`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=122991;

--
-- AUTO_INCREMENT for table `crm_quotes_addition`
--
ALTER TABLE `crm_quotes_addition`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34080;

--
-- AUTO_INCREMENT for table `crm_quotes_deduction`
--
ALTER TABLE `crm_quotes_deduction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34035;

--
-- AUTO_INCREMENT for table `crm_quotes_item`
--
ALTER TABLE `crm_quotes_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=219336;

--
-- AUTO_INCREMENT for table `crm_quotes_item_08_03_2022`
--
ALTER TABLE `crm_quotes_item_08_03_2022`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=207;

--
-- AUTO_INCREMENT for table `crm_rcpt_of_payment`
--
ALTER TABLE `crm_rcpt_of_payment`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_received_invoices`
--
ALTER TABLE `crm_received_invoices`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_rma_master_file`
--
ALTER TABLE `crm_rma_master_file`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_rma_receipt`
--
ALTER TABLE `crm_rma_receipt`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_rma_receipt_items`
--
ALTER TABLE `crm_rma_receipt_items`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_rma_receipt_items_return`
--
ALTER TABLE `crm_rma_receipt_items_return`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `crm_rma_send_vendor`
--
ALTER TABLE `crm_rma_send_vendor`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_rma_send_vendor_items`
--
ALTER TABLE `crm_rma_send_vendor_items`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_rma_send_vendor_items_return`
--
ALTER TABLE `crm_rma_send_vendor_items_return`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_salespricegroup_brandorclass_master`
--
ALTER TABLE `crm_salespricegroup_brandorclass_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_sales_man_target`
--
ALTER TABLE `crm_sales_man_target`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_sales_price_group`
--
ALTER TABLE `crm_sales_price_group`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_sales_price_group_brandclass`
--
ALTER TABLE `crm_sales_price_group_brandclass`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_sales_price_group_name`
--
ALTER TABLE `crm_sales_price_group_name`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_sales_settings`
--
ALTER TABLE `crm_sales_settings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `crm_sales_target_master`
--
ALTER TABLE `crm_sales_target_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_stocks`
--
ALTER TABLE `crm_stocks`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_stock_history`
--
ALTER TABLE `crm_stock_history`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_stock_ledger`
--
ALTER TABLE `crm_stock_ledger`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50826;

--
-- AUTO_INCREMENT for table `crm_store`
--
ALTER TABLE `crm_store`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=96179;

--
-- AUTO_INCREMENT for table `crm_task`
--
ALTER TABLE `crm_task`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_task_items`
--
ALTER TABLE `crm_task_items`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_temp_direct_order`
--
ALTER TABLE `crm_temp_direct_order`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_tendering_details`
--
ALTER TABLE `crm_tendering_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_tendering_details_item`
--
ALTER TABLE `crm_tendering_details_item`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_tender_assign_team`
--
ALTER TABLE `crm_tender_assign_team`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_tender_enquirey_detals`
--
ALTER TABLE `crm_tender_enquirey_detals`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_tender_enquirey_list`
--
ALTER TABLE `crm_tender_enquirey_list`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_unit`
--
ALTER TABLE `crm_unit`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47;

--
-- AUTO_INCREMENT for table `crm_unit_of_measurement`
--
ALTER TABLE `crm_unit_of_measurement`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27745;

--
-- AUTO_INCREMENT for table `crm_upload_inventory`
--
ALTER TABLE `crm_upload_inventory`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=89;

--
-- AUTO_INCREMENT for table `crm_vendor`
--
ALTER TABLE `crm_vendor`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2007;

--
-- AUTO_INCREMENT for table `crm_vendor_contact`
--
ALTER TABLE `crm_vendor_contact`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `crm_vendor_shipping_details`
--
ALTER TABLE `crm_vendor_shipping_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `crm_whatapp_message`
--
ALTER TABLE `crm_whatapp_message`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `crm_working_progress`
--
ALTER TABLE `crm_working_progress`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_allocation`
--
ALTER TABLE `erp_finance_allocation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5033;

--
-- AUTO_INCREMENT for table `erp_finance_allocation_items`
--
ALTER TABLE `erp_finance_allocation_items`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24440;

--
-- AUTO_INCREMENT for table `erp_finance_audit_close`
--
ALTER TABLE `erp_finance_audit_close`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_emi`
--
ALTER TABLE `erp_finance_emi`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_emi_category`
--
ALTER TABLE `erp_finance_emi_category`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `erp_finance_emi_installment`
--
ALTER TABLE `erp_finance_emi_installment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_emi_type`
--
ALTER TABLE `erp_finance_emi_type`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_footer_mapping`
--
ALTER TABLE `erp_finance_footer_mapping`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_legder`
--
ALTER TABLE `erp_finance_legder`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_reconciliation`
--
ALTER TABLE `erp_finance_reconciliation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_security_cheque`
--
ALTER TABLE `erp_finance_security_cheque`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_settings`
--
ALTER TABLE `erp_finance_settings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_subledger`
--
ALTER TABLE `erp_finance_subledger`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_subledger_type`
--
ALTER TABLE `erp_finance_subledger_type`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_system_accounts_mapping`
--
ALTER TABLE `erp_finance_system_accounts_mapping`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_voucher_head`
--
ALTER TABLE `erp_finance_voucher_head`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27980;

--
-- AUTO_INCREMENT for table `erp_finance_voucher_items`
--
ALTER TABLE `erp_finance_voucher_items`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=128648;

--
-- AUTO_INCREMENT for table `erp_finance_voucher_type`
--
ALTER TABLE `erp_finance_voucher_type`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `erp_finance_voucher_type_mappings`
--
ALTER TABLE `erp_finance_voucher_type_mappings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;
COMMIT;

