
CREATE TABLE `accounts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `account_title` varchar(191) NOT NULL,
  `opening_date` date NOT NULL,
  `account_number` varchar(50) DEFAULT NULL,
  `account_currency` varchar(3) NOT NULL,
  `opening_balance` decimal(10,2) NOT NULL,
  `note` text DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `activity_logs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `related_to` varchar(20) DEFAULT NULL,
  `related_id` bigint(20) DEFAULT NULL,
  `activity` text NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `chart_of_accounts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `type` varchar(10) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `chat_group_users` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `group_id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `chat_groups` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `description` text DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_by` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `chat_messages` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `from` bigint(20) NOT NULL,
  `to` bigint(20) NOT NULL,
  `message` text NOT NULL,
  `attachment` text DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 0,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `cm_email_subscribers` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(191) NOT NULL,
  `ip_address` varchar(191) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `cm_faqs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `question` text NOT NULL,
  `answer` longtext NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO cm_faqs VALUES('1','a:1:{s:7:\"English\";s:53:\"1. What is Hisabat 365 Inventory Management Software?\";}','a:1:{s:7:\"English\";s:348:\"<p><strong>Hisabat 365</strong> is a cloud-based inventory management system designed to help businesses of all sizes track and manage their inventory efficiently. It offers features such as real-time inventory tracking, order management, stock forecasting, multi-location support, and detailed reporting to streamline your inventory processes.</p>\";}','2024-12-15 10:34:19','2024-12-15 10:35:09');
INSERT INTO cm_faqs VALUES('2','a:1:{s:7:\"English\";s:29:\"2. How does Hisabat 365 work?\";}','a:1:{s:7:\"English\";s:425:\"<p>Hisabat 365 allows you to manage your inventory from anywhere with an internet connection. You can add and track products, monitor stock levels, process orders, and generate detailed reports. The software integrates seamlessly with your existing business processes, providing a central hub for all your inventory-related tasks. Additionally, it offers barcode scanning for quick data entry and real-time stock updates.</p>\";}','2024-12-15 10:35:30','2024-12-15 10:35:30');
INSERT INTO cm_faqs VALUES('3','a:1:{s:7:\"English\";s:44:\"3. What are the key features of Hisabat 365?\";}','a:1:{s:7:\"English\";s:964:\"<ul>
<li><strong>Real-time Inventory Tracking</strong>: Keep track of stock levels and get automatic updates whenever items are added or sold.</li>
<li><strong>Multi-location Management</strong>: Manage inventory across different warehouses or store locations.</li>
<li><strong>Order Management</strong>: Streamline the process of creating, processing, and tracking orders.</li>
<li><strong>Barcode Scanning</strong>: Use barcode or QR code scanning for fast and accurate inventory updates.</li>
<li><strong>Stock Forecasting</strong>: Predict future stock requirements based on historical sales data.</li>
<li><strong>Detailed Reporting</strong>: Generate customizable reports on sales, stock movements, and more.</li>
<li><strong>Supplier Management</strong>: Manage suppliers and automate purchase orders based on stock levels.</li>
<li><strong>Mobile App</strong>: Access and manage your inventory on-the-go with the Hisabat 365 mobile app.</li>
</ul>\";}','2024-12-15 10:35:58','2024-12-15 10:35:58');
INSERT INTO cm_faqs VALUES('4','a:1:{s:7:\"English\";s:36:\"4. How do I sign up for Hisabat 365?\";}','a:1:{s:7:\"English\";s:284:\"<p>You can sign up for Hisabat 365 by visiting our website [insert link] and clicking on the \"Sign Up\" button. You will be asked to create an account by providing your email, business details, and payment information. Once you sign up, you can start using the software right away.</p>\";}','2024-12-15 10:36:37','2024-12-15 10:36:37');
INSERT INTO cm_faqs VALUES('5','a:1:{s:7:\"English\";s:35:\"5. Is there a free trial available?\";}','a:1:{s:7:\"English\";s:202:\"<p>Yes! We offer a <strong>14-day free trial</strong> so you can explore all the features of Hisabat 365 before committing to a subscription. No payment details are required to start the free trial.</p>\";}','2024-12-15 10:36:56','2024-12-15 10:36:56');
INSERT INTO cm_faqs VALUES('6','a:1:{s:7:\"English\";s:34:\"6. How much does Hisabat 365 cost?\";}','a:1:{s:7:\"English\";s:325:\"<p>Hisabat 365 offers several subscription plans, each designed to meet the needs of different business sizes and requirements. Pricing depends on factors such as the number of users, locations, and features needed. You can find detailed pricing information on our [Pricing Page](https://www.hisabat365.com/site/pricing).</p>\";}','2024-12-15 10:37:58','2024-12-15 10:37:58');
INSERT INTO cm_faqs VALUES('7','a:1:{s:7:\"English\";s:44:\"7. Can I cancel my subscription at any time?\";}','a:1:{s:7:\"English\";s:251:\"<p>Yes, you can cancel your subscription at any time through your account settings. If you cancel, you will continue to have access to the software until the end of your current billing cycle. Please note that subscription fees are non-refundable.</p>\";}','2024-12-15 10:38:21','2024-12-15 10:38:21');
INSERT INTO cm_faqs VALUES('8','a:1:{s:7:\"English\";s:52:\"8. Can I access my inventory data on mobile devices?\";}','a:1:{s:7:\"English\";s:35:\"<p><strong>COMING SOON</strong></p>\";}','2024-12-15 10:39:00','2024-12-15 10:39:00');
INSERT INTO cm_faqs VALUES('9','a:1:{s:7:\"English\";s:38:\"9. Is my data secure with Hisabat 365?\";}','a:1:{s:7:\"English\";s:267:\"<p>Yes, we take data security very seriously. Hisabat 365 uses industry-standard encryption and secure protocols to protect your data. Our cloud-based platform is hosted on secure servers with multiple layers of protection to ensure your information remains safe.</p>\";}','2024-12-15 10:39:16','2024-12-15 10:39:16');
INSERT INTO cm_faqs VALUES('10','a:1:{s:7:\"English\";s:59:\"11. How do I import my existing inventory into Hisabat 365?\";}','a:1:{s:7:\"English\";s:310:\"<p>You can easily import your existing inventory into Hisabat 365 by using our <strong>CSV import feature</strong>. Simply download our import template, fill in your inventory data, and upload the file to the platform. If you need assistance, our support team is available to guide you through the process.</p>\";}','2024-12-15 10:39:58','2024-12-15 10:39:58');
INSERT INTO cm_faqs VALUES('11','a:1:{s:7:\"English\";s:64:\"12. What happens if I reach my account\'s user or location limit?\";}','a:1:{s:7:\"English\";s:255:\"<p>If you reach the user or location limit of your current plan, you can upgrade to a higher-tier subscription that offers more users, locations, and additional features. You can view and manage your subscription options through your account settings.</p>\";}','2024-12-15 10:40:16','2024-12-15 10:40:16');
INSERT INTO cm_faqs VALUES('12','a:1:{s:7:\"English\";s:52:\"13. Can I track inventory across multiple locations?\";}','a:1:{s:7:\"English\";s:242:\"<p>Yes, Hisabat 365 supports <strong>multi-location inventory management</strong>. You can manage and track inventory across different warehouses, stores, or locations in real-time. You can also transfer stock between locations as needed.</p>\";}','2024-12-15 10:40:31','2024-12-15 10:40:31');
INSERT INTO cm_faqs VALUES('13','a:1:{s:7:\"English\";s:45:\"14. How do I generate reports in Hisabat 365?\";}','a:1:{s:7:\"English\";s:523:\"<p>Hisabat 365 offers a wide range of customizable <strong>reports</strong> that allow you to analyze sales, stock levels, product performance, and more. To generate reports:</p>
<ol>
<li>Go to the <strong>Reports</strong> section from the main dashboard.</li>
<li>Select the type of report you need (e.g., sales, stock levels, purchases).</li>
<li>Customize filters such as date ranges, product categories, and locations.</li>
<li>Click <strong>Generate Report</strong> and export it as a PDF or CSV file.</li>
</ol>\";}','2024-12-15 10:40:58','2024-12-15 10:40:58');
INSERT INTO cm_faqs VALUES('14','a:1:{s:7:\"English\";s:72:\"15. Can I manage my suppliers and create purchase orders in Hisabat 365?\";}','a:1:{s:7:\"English\";s:288:\"<p>Yes, you can manage your suppliers and automate the creation of <strong>purchase orders</strong> based on your inventory levels. The Software allows you to track supplier details, set reorder points, and automatically generate purchase orders when stock reaches a predefined level.</p>\";}','2024-12-15 10:41:15','2024-12-15 10:41:15');
INSERT INTO cm_faqs VALUES('15','a:1:{s:7:\"English\";s:45:\"16. What types of businesses use Hisabat 365?\";}','a:1:{s:7:\"English\";s:527:\"<p>Hisabat 365 is suitable for a wide range of businesses, including:</p>
<ul>
<li><strong>Retailers</strong> (physical stores and e-commerce).</li>
<li><strong>Wholesalers</strong> and <strong>distributors</strong>.</li>
<li><strong>Manufacturers</strong> who need to track raw materials and finished goods.</li>
<li><strong>Supply Chain Managers</strong> looking to streamline inventory and logistics.</li>
</ul>
<p>Whether you&rsquo;re a small startup or a large enterprise, Hisabat 365 can scale with your needs.</p>\";}','2024-12-15 10:41:39','2024-12-15 10:41:39');
INSERT INTO cm_faqs VALUES('16','a:1:{s:7:\"English\";s:63:\"17. How can I get support if I have an issue with the Software?\";}','a:1:{s:7:\"English\";s:476:\"<p>We offer 24/7 customer support to assist you with any issues. You can reach us through the following channels:</p>
<ul>
<li><strong>Live chat</strong> (available within the app and on our website).</li>
<li><strong>Email</strong>: support@hisabat365.com.</li>
<li><strong>Phone</strong>: [Insert phone number].</li>
</ul>
<p>We also provide a comprehensive <strong>Help Center</strong> with tutorials, FAQs, and guides to help you get the most out of Hisabat 365.</p>\";}','2024-12-15 10:42:00','2024-12-15 10:42:00');
INSERT INTO cm_faqs VALUES('17','a:1:{s:7:\"English\";s:66:\"18. Is there a limit to how many products I can add to the system?\";}','a:1:{s:7:\"English\";s:197:\"<p>No, there is no strict limit to the number of products you can add to Hisabat 365. The system is designed to handle large inventories, and you can track as many items as your business needs.</p>\";}','2024-12-15 10:42:22','2024-12-15 10:42:22');
INSERT INTO cm_faqs VALUES('18','a:1:{s:7:\"English\";s:45:\"19. How do I export my data from Hisabat 365?\";}','a:1:{s:7:\"English\";s:259:\"<p>You can export your data in various formats, including <strong>CSV</strong> and <strong>PDF</strong>, directly from the platform. Simply go to the <strong>Reports</strong> section, select the data you wish to export, and choose the desired file format.</p>\";}','2024-12-15 10:42:40','2024-12-15 10:42:40');
INSERT INTO cm_faqs VALUES('19','a:1:{s:7:\"English\";s:38:\"20. How often is the Software updated?\";}','a:1:{s:7:\"English\";s:292:\"<p>Hisabat 365 is updated regularly to introduce new features, improvements, and bug fixes. We strive to provide seamless updates without interrupting your use of the Software. Updates are automatically applied to your account, and we will notify you of any major changes or new features.</p>\";}','2024-12-15 10:42:59','2024-12-15 10:42:59');
INSERT INTO cm_faqs VALUES('20','a:1:{s:7:\"English\";s:21:\"Still have questions?\";}','a:1:{s:7:\"English\";s:159:\"<p>If you can&rsquo;t find an answer to your question here, feel free to reach out to our support team at support@hisabat365.com. We&rsquo;re here to help!</p>\";}','2024-12-15 10:43:18','2024-12-15 10:43:18');




CREATE TABLE `cm_features` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `icon` text NOT NULL,
  `title` text NOT NULL,
  `content` longtext NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO cm_features VALUES('1','<i class=\'lni lni-package\'></i>','Easy Accounting','Manage Account without any accounting knowledge','','');
INSERT INTO cm_features VALUES('2','<i class=\'lni lni-files\'></i>','Invoice','Create professional Invoice and accept online payments','','');
INSERT INTO cm_features VALUES('3','<i class=\'lni lni-user\'></i>','CRM','Contacts with Contact Group and Rich Customer Portal','','');
INSERT INTO cm_features VALUES('4','<i class=\'lni lni-phone-set\'></i>','Leads','Manage leads from different lead sources with kanban view','','');
INSERT INTO cm_features VALUES('5','<i class=\'lni lni-briefcase\'></i>','Projects','Manage different types of projects with milestone','','');
INSERT INTO cm_features VALUES('6','<i class=\'lni lni-alarm\'></i>','Tasks','Manage tasks with kanban view and assign task to staff','','');
INSERT INTO cm_features VALUES('7','<i class=\'lni lni-empty-file\'></i>','Quotation','Create Professional Quotation for getting customer attention','','');
INSERT INTO cm_features VALUES('8','<i class=\'lni lni-facebook-messenger\'></i>','Live Chat','Real time Chat with staffs, customers and private groups','','');
INSERT INTO cm_features VALUES('9','<i class=\'lni lni-credit-cards\'></i>','Online Payments','Accept Online Payments from Clients','','');




CREATE TABLE `companies` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `business_name` varchar(191) NOT NULL,
  `status` int(10) unsigned NOT NULL,
  `package_id` int(11) DEFAULT NULL,
  `package_type` varchar(10) DEFAULT NULL,
  `membership_type` varchar(10) DEFAULT NULL,
  `valid_to` date NOT NULL,
  `last_email` date DEFAULT NULL,
  `staff_limit` varchar(20) DEFAULT NULL,
  `contacts_limit` varchar(20) DEFAULT NULL,
  `invoice_limit` varchar(20) DEFAULT NULL,
  `quotation_limit` varchar(20) DEFAULT NULL,
  `recurring_transaction` varchar(3) DEFAULT NULL,
  `live_chat` varchar(3) DEFAULT NULL,
  `file_manager` varchar(3) DEFAULT NULL,
  `inventory_module` varchar(3) DEFAULT NULL,
  `pos_module` varchar(3) DEFAULT NULL,
  `hrm_module` varchar(3) DEFAULT NULL,
  `payroll_module` varchar(3) DEFAULT NULL,
  `project_management_module` varchar(3) DEFAULT NULL,
  `online_payment` varchar(3) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO companies VALUES('1','Al Thawra Computer LLC','1','1','monthly','member','2025-01-15','','3','10','20','20','No','No','No','No','','','','No','No','2024-12-15 10:08:02','2024-12-15 10:08:02');
INSERT INTO companies VALUES('2','RAJ INFOTECH','1','1','monthly','member','2025-01-15','','3','10','20','20','No','No','No','No','','','','No','No','2024-12-15 10:56:53','2024-12-15 10:56:53');




CREATE TABLE `company_email_template` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) NOT NULL,
  `subject` varchar(191) NOT NULL,
  `body` text NOT NULL,
  `related_to` varchar(191) DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `company_settings` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) NOT NULL,
  `value` longtext NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO company_settings VALUES('1','base_currency','AED','1','2024-12-15 10:10:39','2024-12-15 10:10:39');
INSERT INTO company_settings VALUES('2','currency_position','right','1','2024-12-15 10:10:39','2024-12-15 10:10:39');
INSERT INTO company_settings VALUES('3','backend_direction','ltr','1','2024-12-15 10:10:39','2024-12-15 10:10:39');
INSERT INTO company_settings VALUES('4','timezone','Asia/Dubai','1','2024-12-15 10:10:39','2024-12-15 10:10:39');
INSERT INTO company_settings VALUES('5','date_format','d-m-Y','1','2024-12-15 10:10:39','2024-12-15 10:10:39');
INSERT INTO company_settings VALUES('6','time_format','24','1','2024-12-15 10:10:39','2024-12-15 10:10:39');




CREATE TABLE `contact_groups` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `note` text DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `contacts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `profile_type` varchar(20) NOT NULL,
  `company_name` varchar(50) DEFAULT NULL,
  `contact_name` varchar(50) NOT NULL,
  `contact_email` varchar(100) NOT NULL,
  `vat_id` varchar(191) DEFAULT NULL,
  `reg_no` varchar(191) DEFAULT NULL,
  `contact_phone` varchar(20) DEFAULT NULL,
  `country` varchar(50) DEFAULT NULL,
  `currency` varchar(3) NOT NULL,
  `city` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `zip` varchar(20) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `facebook` varchar(191) DEFAULT NULL,
  `twitter` varchar(191) DEFAULT NULL,
  `linkedin` varchar(191) DEFAULT NULL,
  `remarks` text DEFAULT NULL,
  `contact_image` varchar(191) DEFAULT NULL,
  `group_id` bigint(20) DEFAULT NULL,
  `user_id` bigint(20) DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `custom_fields` longtext DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `currency_rates` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `currency` varchar(3) NOT NULL,
  `rate` decimal(10,6) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=169 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO currency_rates VALUES('1','AED','4.101083','','');
INSERT INTO currency_rates VALUES('2','AFN','85.378309','','');
INSERT INTO currency_rates VALUES('3','ALL','123.510844','','');
INSERT INTO currency_rates VALUES('4','AMD','548.849773','','');
INSERT INTO currency_rates VALUES('5','ANG','2.008050','','');
INSERT INTO currency_rates VALUES('6','AOA','556.155120','','');
INSERT INTO currency_rates VALUES('7','ARS','70.205746','','');
INSERT INTO currency_rates VALUES('8','AUD','1.809050','','');
INSERT INTO currency_rates VALUES('9','AWG','2.009782','','');
INSERT INTO currency_rates VALUES('10','AZN','1.833159','','');
INSERT INTO currency_rates VALUES('11','BAM','1.966840','','');
INSERT INTO currency_rates VALUES('12','BBD','2.245460','','');
INSERT INTO currency_rates VALUES('13','BDT','95.162306','','');
INSERT INTO currency_rates VALUES('14','BGN','1.952383','','');
INSERT INTO currency_rates VALUES('15','BHD','0.421787','','');
INSERT INTO currency_rates VALUES('16','BIF','2117.865003','','');
INSERT INTO currency_rates VALUES('17','BMD','1.116545','','');
INSERT INTO currency_rates VALUES('18','BND','1.583270','','');
INSERT INTO currency_rates VALUES('19','BOB','7.718004','','');
INSERT INTO currency_rates VALUES('20','BRL','5.425949','','');
INSERT INTO currency_rates VALUES('21','BSD','1.121775','','');
INSERT INTO currency_rates VALUES('22','BTC','0.000244','','');
INSERT INTO currency_rates VALUES('23','BTN','82.818317','','');
INSERT INTO currency_rates VALUES('24','BWP','12.683055','','');
INSERT INTO currency_rates VALUES('25','BYN','2.621037','','');
INSERT INTO currency_rates VALUES('26','BYR','9999.999999','','');
INSERT INTO currency_rates VALUES('27','BZD','2.261248','','');
INSERT INTO currency_rates VALUES('28','CAD','1.552879','','');
INSERT INTO currency_rates VALUES('29','CDF','1898.127343','','');
INSERT INTO currency_rates VALUES('30','CHF','1.056023','','');
INSERT INTO currency_rates VALUES('31','CLF','0.033950','','');
INSERT INTO currency_rates VALUES('32','CLP','936.781769','','');
INSERT INTO currency_rates VALUES('33','CNY','7.827878','','');
INSERT INTO currency_rates VALUES('34','COP','4491.872864','','');
INSERT INTO currency_rates VALUES('35','CRC','635.520417','','');
INSERT INTO currency_rates VALUES('36','CUC','1.116545','','');
INSERT INTO currency_rates VALUES('37','CUP','29.588450','','');
INSERT INTO currency_rates VALUES('38','CVE','110.887227','','');
INSERT INTO currency_rates VALUES('39','CZK','26.906059','','');
INSERT INTO currency_rates VALUES('40','DJF','198.432393','','');
INSERT INTO currency_rates VALUES('41','DKK','7.472892','','');
INSERT INTO currency_rates VALUES('42','DOP','60.196240','','');
INSERT INTO currency_rates VALUES('43','DZD','134.499489','','');
INSERT INTO currency_rates VALUES('44','EGP','17.585483','','');
INSERT INTO currency_rates VALUES('45','ERN','16.748349','','');
INSERT INTO currency_rates VALUES('46','ETB','36.696587','','');
INSERT INTO currency_rates VALUES('47','EUR','1.000000','','');
INSERT INTO currency_rates VALUES('48','FJD','2.549240','','');
INSERT INTO currency_rates VALUES('49','FKP','0.908257','','');
INSERT INTO currency_rates VALUES('50','GBP','0.907964','','');
INSERT INTO currency_rates VALUES('51','GEL','3.115301','','');
INSERT INTO currency_rates VALUES('52','GGP','0.908257','','');
INSERT INTO currency_rates VALUES('53','GHS','6.220337','','');
INSERT INTO currency_rates VALUES('54','GIP','0.908257','','');
INSERT INTO currency_rates VALUES('55','GMD','56.605069','','');
INSERT INTO currency_rates VALUES('56','GNF','9999.999999','','');
INSERT INTO currency_rates VALUES('57','GTQ','8.576324','','');
INSERT INTO currency_rates VALUES('58','GYD','234.489495','','');
INSERT INTO currency_rates VALUES('59','HKD','8.674753','','');
INSERT INTO currency_rates VALUES('60','HNL','27.678062','','');
INSERT INTO currency_rates VALUES('61','HRK','7.590196','','');
INSERT INTO currency_rates VALUES('62','HTG','106.356510','','');
INSERT INTO currency_rates VALUES('63','HUF','341.150311','','');
INSERT INTO currency_rates VALUES('64','IDR','9999.999999','','');
INSERT INTO currency_rates VALUES('65','ILS','4.159226','','');
INSERT INTO currency_rates VALUES('66','IMP','0.908257','','');
INSERT INTO currency_rates VALUES('67','INR','82.763894','','');
INSERT INTO currency_rates VALUES('68','IQD','1339.198712','','');
INSERT INTO currency_rates VALUES('69','IRR','9999.999999','','');
INSERT INTO currency_rates VALUES('70','ISK','151.202539','','');
INSERT INTO currency_rates VALUES('71','JEP','0.908257','','');
INSERT INTO currency_rates VALUES('72','JMD','151.606351','','');
INSERT INTO currency_rates VALUES('73','JOD','0.791685','','');
INSERT INTO currency_rates VALUES('74','JPY','118.278988','','');
INSERT INTO currency_rates VALUES('75','KES','115.283224','','');
INSERT INTO currency_rates VALUES('76','KGS','81.395812','','');
INSERT INTO currency_rates VALUES('77','KHR','4603.144194','','');
INSERT INTO currency_rates VALUES('78','KMF','495.355724','','');
INSERT INTO currency_rates VALUES('79','KPW','1004.922902','','');
INSERT INTO currency_rates VALUES('80','KRW','1372.190164','','');
INSERT INTO currency_rates VALUES('81','KWD','0.344879','','');
INSERT INTO currency_rates VALUES('82','KYD','0.934921','','');
INSERT INTO currency_rates VALUES('83','KZT','456.318281','','');
INSERT INTO currency_rates VALUES('84','LAK','9978.233671','','');
INSERT INTO currency_rates VALUES('85','LBP','1696.373291','','');
INSERT INTO currency_rates VALUES('86','LKR','206.967335','','');
INSERT INTO currency_rates VALUES('87','LRD','221.076044','','');
INSERT INTO currency_rates VALUES('88','LSL','18.121543','','');
INSERT INTO currency_rates VALUES('89','LTL','3.296868','','');
INSERT INTO currency_rates VALUES('90','LVL','0.675387','','');
INSERT INTO currency_rates VALUES('91','LYD','1.557311','','');
INSERT INTO currency_rates VALUES('92','MAD','10.730569','','');
INSERT INTO currency_rates VALUES('93','MDL','19.734707','','');
INSERT INTO currency_rates VALUES('94','MGA','4165.265277','','');
INSERT INTO currency_rates VALUES('95','MKD','61.516342','','');
INSERT INTO currency_rates VALUES('96','MMK','1566.586511','','');
INSERT INTO currency_rates VALUES('97','MNT','3088.650418','','');
INSERT INTO currency_rates VALUES('98','MOP','8.975925','','');
INSERT INTO currency_rates VALUES('99','MRO','398.607011','','');
INSERT INTO currency_rates VALUES('100','MUR','43.205754','','');
INSERT INTO currency_rates VALUES('101','MVR','17.250725','','');
INSERT INTO currency_rates VALUES('102','MWK','825.239292','','');
INSERT INTO currency_rates VALUES('103','MXN','24.963329','','');
INSERT INTO currency_rates VALUES('104','MYR','4.810633','','');
INSERT INTO currency_rates VALUES('105','MZN','73.591410','','');
INSERT INTO currency_rates VALUES('106','NAD','18.121621','','');
INSERT INTO currency_rates VALUES('107','NGN','408.099790','','');
INSERT INTO currency_rates VALUES('108','NIO','37.844015','','');
INSERT INTO currency_rates VALUES('109','NOK','11.405599','','');
INSERT INTO currency_rates VALUES('110','NPR','132.508354','','');
INSERT INTO currency_rates VALUES('111','NZD','1.847363','','');
INSERT INTO currency_rates VALUES('112','OMR','0.429801','','');
INSERT INTO currency_rates VALUES('113','PAB','1.121880','','');
INSERT INTO currency_rates VALUES('114','PEN','3.958258','','');
INSERT INTO currency_rates VALUES('115','PGK','3.838505','','');
INSERT INTO currency_rates VALUES('116','PHP','57.698037','','');
INSERT INTO currency_rates VALUES('117','PKR','176.121721','','');
INSERT INTO currency_rates VALUES('118','PLN','4.386058','','');
INSERT INTO currency_rates VALUES('119','PYG','7386.917924','','');
INSERT INTO currency_rates VALUES('120','QAR','4.065302','','');
INSERT INTO currency_rates VALUES('121','RON','4.826717','','');
INSERT INTO currency_rates VALUES('122','RSD','117.627735','','');
INSERT INTO currency_rates VALUES('123','RUB','83.568390','','');
INSERT INTO currency_rates VALUES('124','RWF','1067.822267','','');
INSERT INTO currency_rates VALUES('125','SAR','4.190432','','');
INSERT INTO currency_rates VALUES('126','SBD','9.235251','','');
INSERT INTO currency_rates VALUES('127','SCR','14.529548','','');
INSERT INTO currency_rates VALUES('128','SDG','61.772847','','');
INSERT INTO currency_rates VALUES('129','SEK','10.785247','','');
INSERT INTO currency_rates VALUES('130','SGD','1.587844','','');
INSERT INTO currency_rates VALUES('131','SHP','0.908257','','');
INSERT INTO currency_rates VALUES('132','SLL','9999.999999','','');
INSERT INTO currency_rates VALUES('133','SOS','653.732410','','');
INSERT INTO currency_rates VALUES('134','SRD','8.327212','','');
INSERT INTO currency_rates VALUES('135','STD','9999.999999','','');
INSERT INTO currency_rates VALUES('136','SVC','9.816821','','');
INSERT INTO currency_rates VALUES('137','SYP','575.019506','','');
INSERT INTO currency_rates VALUES('138','SZL','18.038821','','');
INSERT INTO currency_rates VALUES('139','THB','35.884679','','');
INSERT INTO currency_rates VALUES('140','TJS','10.875343','','');
INSERT INTO currency_rates VALUES('141','TMT','3.907909','','');
INSERT INTO currency_rates VALUES('142','TND','3.186636','','');
INSERT INTO currency_rates VALUES('143','TOP','2.635661','','');
INSERT INTO currency_rates VALUES('144','TRY','7.131927','','');
INSERT INTO currency_rates VALUES('145','TTD','7.585158','','');
INSERT INTO currency_rates VALUES('146','TWD','33.739208','','');
INSERT INTO currency_rates VALUES('147','TZS','2582.397529','','');
INSERT INTO currency_rates VALUES('148','UAH','29.335146','','');
INSERT INTO currency_rates VALUES('149','UGX','4169.685347','','');
INSERT INTO currency_rates VALUES('150','USD','1.116545','','');
INSERT INTO currency_rates VALUES('151','UYU','48.718630','','');
INSERT INTO currency_rates VALUES('152','UZS','9999.999999','','');
INSERT INTO currency_rates VALUES('153','VEF','11.151499','','');
INSERT INTO currency_rates VALUES('154','VND','9999.999999','','');
INSERT INTO currency_rates VALUES('155','VUV','133.944917','','');
INSERT INTO currency_rates VALUES('156','WST','3.074259','','');
INSERT INTO currency_rates VALUES('157','XAF','659.652615','','');
INSERT INTO currency_rates VALUES('158','XAG','0.088073','','');
INSERT INTO currency_rates VALUES('159','XAU','0.000756','','');
INSERT INTO currency_rates VALUES('160','XCD','3.017519','','');
INSERT INTO currency_rates VALUES('161','XDR','0.809234','','');
INSERT INTO currency_rates VALUES('162','XOF','659.646672','','');
INSERT INTO currency_rates VALUES('163','XPF','119.931356','','');
INSERT INTO currency_rates VALUES('164','YER','279.475009','','');
INSERT INTO currency_rates VALUES('165','ZAR','18.603040','','');
INSERT INTO currency_rates VALUES('166','ZMK','9999.999999','','');
INSERT INTO currency_rates VALUES('167','ZMW','17.892580','','');
INSERT INTO currency_rates VALUES('168','ZWL','359.527584','','');




CREATE TABLE `current_stocks` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `product_id` bigint(20) NOT NULL,
  `quantity` decimal(8,2) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `email_templates` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) NOT NULL,
  `subject` text NOT NULL,
  `body` longtext NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO email_templates VALUES('1','registration','Registration Sucessfully','<div style=\"padding: 15px 30px;\">
<h2 style=\"color: #555555;\">Registration Successful</h2>
<p style=\"color: #555555;\">Hi {name},<br /><span style=\"color: #555555;\">Welcome to ElitKit and thank you for joining with us. You can now sign in to your account using your email and password.<br /><br />Regards<br /><strong>Hisabat 365</strong><br /></span></p>
</div>','','2024-12-15 16:58:28');
INSERT INTO email_templates VALUES('2','premium_membership','Premium Membership','<div style=\"padding: 15px 30px;\">
<h2 style=\"color: #555555;\">Hisabat 365 Premium Subscription</h2>
<p style=\"color: #555555;\">Hi {name},<br /><span style=\"color: #555555;\"><strong>Congratulations</strong> your paymnet was made sucessfully. Your current membership is valid <strong>until</strong> <strong>{valid_to}</strong></span><span style=\"color: #555555;\"><strong>.</strong>&nbsp;</span></p>
<p><br style=\"color: #555555;\" /><span style=\"color: #555555;\">Thank You</span><br style=\"color: #555555;\" /><strong><span style=\"color: #555555;\">Hisabat 365</span></strong></p>
</div>','','2024-12-15 16:58:50');
INSERT INTO email_templates VALUES('3','alert_notification','Hisabat 365 Renewals','<div style=\"padding: 15px 30px;\">
<h2 style=\"color: #555555;\">Account Renew Notification</h2>
<p style=\"color: #555555;\">Hi {name},<br /><span style=\"color: #555555;\">Your package is due to <strong>expire on {valid_to}</strong> s</span><span style=\"color: #555555;\">o you will need to renew by then to keep your account active.</span></p>
<p><br style=\"color: #555555;\" /><span style=\"color: #555555;\">Regards</span><br style=\"color: #555555;\" /><strong><span style=\"color: #555555;\">Hisabat 365</span></strong></p>
</div>','','2024-12-15 16:59:02');




CREATE TABLE `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(191) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `file_manager` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `mime_type` varchar(191) DEFAULT NULL,
  `is_dir` varchar(3) NOT NULL DEFAULT 'no',
  `file` varchar(191) DEFAULT NULL,
  `parent_id` bigint(20) DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_by` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `files` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `related_to` varchar(20) DEFAULT NULL,
  `related_id` bigint(20) DEFAULT NULL,
  `file` text NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `group_chat_message_status` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `message_id` bigint(20) NOT NULL,
  `group_id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `group_chat_messages` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `group_id` bigint(20) NOT NULL,
  `message` text NOT NULL,
  `attachment` text DEFAULT NULL,
  `sender_id` bigint(20) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `invoice_item_taxes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `invoice_id` bigint(20) NOT NULL,
  `invoice_item_id` bigint(20) NOT NULL,
  `tax_id` bigint(20) NOT NULL,
  `name` varchar(100) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `invoice_items` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `invoice_id` bigint(20) NOT NULL,
  `item_id` bigint(20) NOT NULL,
  `description` text DEFAULT NULL,
  `quantity` decimal(10,2) NOT NULL,
  `unit_cost` decimal(10,2) NOT NULL,
  `discount` decimal(10,2) NOT NULL,
  `tax_method` varchar(10) DEFAULT NULL,
  `tax_id` bigint(20) DEFAULT NULL,
  `tax_amount` decimal(10,2) DEFAULT NULL,
  `sub_total` decimal(10,2) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `invoice_templates` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) NOT NULL,
  `body` longtext NOT NULL,
  `editor` longtext NOT NULL,
  `custom_css` text DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `invoices` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `invoice_number` varchar(191) NOT NULL,
  `invoice_date` date NOT NULL,
  `due_date` date NOT NULL,
  `grand_total` decimal(10,2) NOT NULL,
  `tax_total` decimal(10,2) NOT NULL,
  `paid` decimal(10,2) DEFAULT NULL,
  `converted_total` decimal(10,2) DEFAULT NULL,
  `status` varchar(20) NOT NULL,
  `template` varchar(100) DEFAULT NULL,
  `note` text DEFAULT NULL,
  `related_to` varchar(20) DEFAULT NULL,
  `related_id` bigint(20) DEFAULT NULL,
  `client_id` bigint(20) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `items` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `item_name` varchar(191) NOT NULL,
  `item_type` varchar(191) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `lead_sources` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(50) NOT NULL,
  `order` int(11) DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `lead_statuses` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(30) NOT NULL,
  `color` varchar(10) NOT NULL,
  `order` int(11) DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `leads` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `company_name` varchar(50) DEFAULT NULL,
  `email` varchar(191) DEFAULT NULL,
  `converted_lead` int(11) DEFAULT NULL,
  `lead_status_id` bigint(20) NOT NULL,
  `lead_source_id` bigint(20) NOT NULL,
  `assigned_user_id` bigint(20) NOT NULL,
  `created_user_id` bigint(20) NOT NULL,
  `contact_date` date NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `website` varchar(191) DEFAULT NULL,
  `country` varchar(50) DEFAULT NULL,
  `currency` varchar(3) NOT NULL,
  `vat_id` varchar(191) DEFAULT NULL,
  `reg_no` varchar(191) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `zip` varchar(20) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `custom_fields` longtext DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(191) NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO migrations VALUES('1','2014_10_12_000000_create_users_table','1');
INSERT INTO migrations VALUES('2','2014_10_12_100000_create_password_resets_table','1');
INSERT INTO migrations VALUES('3','2018_06_01_080940_create_settings_table','1');
INSERT INTO migrations VALUES('4','2018_08_29_084110_create_permissions_table','1');
INSERT INTO migrations VALUES('5','2018_10_28_101819_create_contact_groups_table','1');
INSERT INTO migrations VALUES('6','2018_10_28_104344_create_contacts_table','1');
INSERT INTO migrations VALUES('7','2018_10_28_151911_create_taxs_table','1');
INSERT INTO migrations VALUES('8','2018_10_29_095644_create_items_table','1');
INSERT INTO migrations VALUES('9','2018_10_29_100449_create_products_table','1');
INSERT INTO migrations VALUES('10','2018_10_29_101301_create_services_table','1');
INSERT INTO migrations VALUES('11','2018_10_29_101756_create_suppliers_table','1');
INSERT INTO migrations VALUES('12','2018_11_12_152015_create_email_templates_table','1');
INSERT INTO migrations VALUES('13','2018_11_13_063551_create_accounts_table','1');
INSERT INTO migrations VALUES('14','2018_11_13_082226_create_chart_of_accounts_table','1');
INSERT INTO migrations VALUES('15','2018_11_13_082512_create_payment_methods_table','1');
INSERT INTO migrations VALUES('16','2018_11_13_141249_create_transactions_table','1');
INSERT INTO migrations VALUES('17','2018_11_14_134254_create_repeating_transactions_table','1');
INSERT INTO migrations VALUES('18','2018_11_17_142037_create_payment_histories_table','1');
INSERT INTO migrations VALUES('19','2019_03_07_084028_create_purchase_orders_table','1');
INSERT INTO migrations VALUES('20','2019_03_07_085537_create_purchase_order_items_table','1');
INSERT INTO migrations VALUES('21','2019_03_19_070903_create_current_stocks_table','1');
INSERT INTO migrations VALUES('22','2019_03_19_123527_create_company_settings_table','1');
INSERT INTO migrations VALUES('23','2019_03_19_133922_create_product_units_table','1');
INSERT INTO migrations VALUES('24','2019_03_20_113605_create_invoices_table','1');
INSERT INTO migrations VALUES('25','2019_03_20_113618_create_invoice_items_table','1');
INSERT INTO migrations VALUES('26','2019_05_11_080519_create_purchase_return_table','1');
INSERT INTO migrations VALUES('27','2019_05_11_080546_create_purchase_return_items_table','1');
INSERT INTO migrations VALUES('28','2019_05_27_153656_create_quotations_table','1');
INSERT INTO migrations VALUES('29','2019_05_27_153712_create_quotation_items_table','1');
INSERT INTO migrations VALUES('30','2019_06_22_062221_create_sales_return_table','1');
INSERT INTO migrations VALUES('31','2019_06_22_062233_create_sales_return_items_table','1');
INSERT INTO migrations VALUES('32','2019_06_23_055645_create_company_email_template_table','1');
INSERT INTO migrations VALUES('33','2019_08_19_000000_create_failed_jobs_table','1');
INSERT INTO migrations VALUES('34','2019_10_31_172912_create_social_google_accounts_table','1');
INSERT INTO migrations VALUES('35','2019_11_04_133151_create_chat_messages_table','1');
INSERT INTO migrations VALUES('36','2019_11_07_105822_create_chat_groups_table','1');
INSERT INTO migrations VALUES('37','2019_11_08_063856_create_chat_group_users','1');
INSERT INTO migrations VALUES('38','2019_11_08_143329_create_group_chat_messages_table','1');
INSERT INTO migrations VALUES('39','2019_11_08_143607_create_group_chat_message_status_table','1');
INSERT INTO migrations VALUES('40','2019_11_11_170656_create_file_manager_table','1');
INSERT INTO migrations VALUES('41','2019_12_14_000001_create_personal_access_tokens_table','1');
INSERT INTO migrations VALUES('42','2020_03_15_154649_create_currency_rates_table','1');
INSERT INTO migrations VALUES('43','2020_03_21_052934_create_companies_table','1');
INSERT INTO migrations VALUES('44','2020_03_21_070022_create_packages_table','1');
INSERT INTO migrations VALUES('45','2020_04_02_155956_create_cm_features_table','1');
INSERT INTO migrations VALUES('46','2020_04_02_160209_create_cm_faqs_table','1');
INSERT INTO migrations VALUES('47','2020_04_02_160249_create_cm_email_subscribers_table','1');
INSERT INTO migrations VALUES('48','2020_05_18_104400_create_invoice_templates_table','1');
INSERT INTO migrations VALUES('49','2020_05_24_152947_create_lead_statuses_table','1');
INSERT INTO migrations VALUES('50','2020_05_24_153000_create_lead_sources_table','1');
INSERT INTO migrations VALUES('51','2020_05_24_153224_create_leads_table','1');
INSERT INTO migrations VALUES('52','2020_06_03_112519_create_files_table','1');
INSERT INTO migrations VALUES('53','2020_06_03_112538_create_notes_table','1');
INSERT INTO migrations VALUES('54','2020_06_03_112553_create_activity_logs_table','1');
INSERT INTO migrations VALUES('55','2020_06_22_083001_create_projects_table','1');
INSERT INTO migrations VALUES('56','2020_06_22_095143_create_project_members_table','1');
INSERT INTO migrations VALUES('57','2020_06_23_083455_create_project_milestones_table','1');
INSERT INTO migrations VALUES('58','2020_06_23_112159_create_task_statuses_table','1');
INSERT INTO migrations VALUES('59','2020_06_23_144512_create_tasks_table','1');
INSERT INTO migrations VALUES('60','2020_06_25_065937_create_timesheets_table','1');
INSERT INTO migrations VALUES('61','2020_06_27_152210_create_notifications_table','1');
INSERT INTO migrations VALUES('62','2020_08_21_063443_add_related_to_company_email_template','1');
INSERT INTO migrations VALUES('63','2020_10_19_082621_create_staff_roles_table','1');
INSERT INTO migrations VALUES('64','2020_10_20_080849_add_description_to_invoice_items','1');
INSERT INTO migrations VALUES('65','2020_12_13_150320_create_invoice_item_taxes_table','1');
INSERT INTO migrations VALUES('66','2020_12_15_055832_create_quotation_item_taxes_table','1');
INSERT INTO migrations VALUES('67','2020_12_15_102722_create_purchase_order_item_taxes_table','1');
INSERT INTO migrations VALUES('68','2020_12_16_070412_create_purchase_return_item_taxes_table','1');
INSERT INTO migrations VALUES('69','2020_12_17_065847_create_sales_return_item_taxes_table','1');




CREATE TABLE `notes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `related_to` varchar(20) DEFAULT NULL,
  `related_id` bigint(20) DEFAULT NULL,
  `note` text NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `notifications` (
  `id` char(36) NOT NULL,
  `type` varchar(191) NOT NULL,
  `notifiable_type` varchar(191) NOT NULL,
  `notifiable_id` bigint(20) unsigned NOT NULL,
  `data` text NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `read_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `packages` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `package_name` varchar(50) NOT NULL,
  `cost_per_month` decimal(10,2) NOT NULL,
  `cost_per_year` decimal(10,2) NOT NULL,
  `staff_limit` varchar(191) NOT NULL,
  `contacts_limit` varchar(191) NOT NULL,
  `invoice_limit` varchar(191) NOT NULL,
  `quotation_limit` varchar(191) NOT NULL,
  `recurring_transaction` varchar(191) NOT NULL,
  `live_chat` varchar(191) NOT NULL,
  `file_manager` varchar(191) NOT NULL,
  `inventory_module` varchar(191) DEFAULT NULL,
  `pos_module` varchar(191) DEFAULT NULL,
  `hrm_module` varchar(191) DEFAULT NULL,
  `payroll_module` varchar(191) DEFAULT NULL,
  `project_management_module` varchar(191) DEFAULT NULL,
  `online_payment` varchar(191) NOT NULL,
  `is_featured` tinyint(4) NOT NULL DEFAULT 0,
  `others` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO packages VALUES('1','Basic','10.00','99.00','a:2:{s:7:\"monthly\";s:1:\"3\";s:6:\"yearly\";s:2:\"10\";}','a:2:{s:7:\"monthly\";s:2:\"10\";s:6:\"yearly\";s:2:\"30\";}','a:2:{s:7:\"monthly\";s:2:\"20\";s:6:\"yearly\";s:3:\"300\";}','a:2:{s:7:\"monthly\";s:2:\"20\";s:6:\"yearly\";s:3:\"300\";}','a:2:{s:7:\"monthly\";s:2:\"No\";s:6:\"yearly\";s:2:\"No\";}','a:2:{s:7:\"monthly\";s:2:\"No\";s:6:\"yearly\";s:2:\"No\";}','a:2:{s:7:\"monthly\";s:2:\"No\";s:6:\"yearly\";s:2:\"No\";}','a:2:{s:7:\"monthly\";s:2:\"No\";s:6:\"yearly\";s:2:\"No\";}','','','','a:2:{s:7:\"monthly\";s:2:\"No\";s:6:\"yearly\";s:2:\"No\";}','a:2:{s:7:\"monthly\";s:2:\"No\";s:6:\"yearly\";s:2:\"No\";}','0','','','');
INSERT INTO packages VALUES('2','Standard','25.00','199.00','a:2:{s:7:\"monthly\";s:2:\"10\";s:6:\"yearly\";s:2:\"20\";}','a:2:{s:7:\"monthly\";s:2:\"30\";s:6:\"yearly\";s:2:\"50\";}','a:2:{s:7:\"monthly\";s:3:\"300\";s:6:\"yearly\";s:3:\"500\";}','a:2:{s:7:\"monthly\";s:3:\"300\";s:6:\"yearly\";s:3:\"500\";}','a:2:{s:7:\"monthly\";s:3:\"Yes\";s:6:\"yearly\";s:3:\"Yes\";}','a:2:{s:7:\"monthly\";s:3:\"Yes\";s:6:\"yearly\";s:3:\"Yes\";}','a:2:{s:7:\"monthly\";s:2:\"No\";s:6:\"yearly\";s:2:\"No\";}','a:2:{s:7:\"monthly\";s:3:\"Yes\";s:6:\"yearly\";s:3:\"Yes\";}','','','','a:2:{s:7:\"monthly\";s:3:\"Yes\";s:6:\"yearly\";s:3:\"Yes\";}','a:2:{s:7:\"monthly\";s:2:\"No\";s:6:\"yearly\";s:2:\"No\";}','1','','','');
INSERT INTO packages VALUES('3','Business Plus','40.00','399.00','a:2:{s:7:\"monthly\";s:2:\"30\";s:6:\"yearly\";s:9:\"Unlimited\";}','a:2:{s:7:\"monthly\";s:9:\"Unlimited\";s:6:\"yearly\";s:9:\"Unlimited\";}','a:2:{s:7:\"monthly\";s:3:\"300\";s:6:\"yearly\";s:9:\"Unlimited\";}','a:2:{s:7:\"monthly\";s:3:\"300\";s:6:\"yearly\";s:9:\"Unlimited\";}','a:2:{s:7:\"monthly\";s:3:\"Yes\";s:6:\"yearly\";s:3:\"Yes\";}','a:2:{s:7:\"monthly\";s:3:\"Yes\";s:6:\"yearly\";s:3:\"Yes\";}','a:2:{s:7:\"monthly\";s:3:\"Yes\";s:6:\"yearly\";s:3:\"Yes\";}','a:2:{s:7:\"monthly\";s:3:\"Yes\";s:6:\"yearly\";s:3:\"Yes\";}','','','','a:2:{s:7:\"monthly\";s:3:\"Yes\";s:6:\"yearly\";s:3:\"Yes\";}','a:2:{s:7:\"monthly\";s:3:\"Yes\";s:6:\"yearly\";s:3:\"Yes\";}','0','','','');





CREATE TABLE `payment_histories` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `company_id` bigint(20) NOT NULL,
  `title` varchar(191) NOT NULL,
  `method` varchar(20) DEFAULT NULL,
  `currency` varchar(3) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `package_id` int(11) NOT NULL,
  `package_type` varchar(10) NOT NULL,
  `status` varchar(10) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `payment_methods` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `permissions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `role_id` bigint(20) NOT NULL,
  `permission` varchar(191) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `product_units` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `unit_name` varchar(191) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `products` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `item_id` bigint(20) NOT NULL,
  `supplier_id` bigint(20) DEFAULT NULL,
  `product_cost` decimal(10,2) NOT NULL,
  `product_price` decimal(10,2) NOT NULL,
  `product_unit` varchar(20) NOT NULL,
  `tax_method` varchar(10) NOT NULL,
  `tax_id` bigint(20) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `project_members` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `project_milestones` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(191) NOT NULL,
  `description` text DEFAULT NULL,
  `due_date` date NOT NULL,
  `status` varchar(20) NOT NULL,
  `cost` decimal(10,2) DEFAULT NULL,
  `project_id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `projects` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) NOT NULL,
  `client_id` bigint(20) NOT NULL,
  `progress` int(11) DEFAULT NULL,
  `billing_type` varchar(20) NOT NULL,
  `status` varchar(20) NOT NULL,
  `fixed_rate` decimal(10,2) DEFAULT NULL,
  `hourly_rate` decimal(10,2) DEFAULT NULL,
  `start_date` date NOT NULL,
  `end_date` date DEFAULT NULL,
  `description` text DEFAULT NULL,
  `custom_fields` longtext DEFAULT NULL,
  `user_id` bigint(20) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `purchase_order_item_taxes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `purchase_order_id` bigint(20) NOT NULL,
  `purchase_order_item_id` bigint(20) NOT NULL,
  `tax_id` bigint(20) NOT NULL,
  `name` varchar(100) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `purchase_order_items` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `purchase_order_id` bigint(20) NOT NULL,
  `product_id` bigint(20) NOT NULL,
  `description` text DEFAULT NULL,
  `quantity` decimal(8,2) NOT NULL,
  `unit_cost` decimal(10,2) NOT NULL,
  `discount` decimal(10,2) NOT NULL,
  `tax_method` varchar(10) DEFAULT NULL,
  `tax_id` bigint(20) DEFAULT NULL,
  `tax_amount` decimal(10,2) DEFAULT NULL,
  `sub_total` decimal(10,2) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `purchase_orders` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `order_date` date NOT NULL,
  `supplier_id` bigint(20) NOT NULL,
  `order_status` tinyint(4) NOT NULL,
  `order_tax_id` bigint(20) DEFAULT NULL,
  `order_tax` decimal(10,2) DEFAULT NULL,
  `order_discount` decimal(10,2) NOT NULL,
  `shipping_cost` decimal(10,2) NOT NULL,
  `product_total` decimal(10,2) NOT NULL,
  `grand_total` decimal(10,2) NOT NULL,
  `paid` decimal(10,2) NOT NULL,
  `payment_status` tinyint(4) NOT NULL,
  `attachemnt` text DEFAULT NULL,
  `note` text DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `purchase_return` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `return_date` date NOT NULL,
  `supplier_id` bigint(20) DEFAULT NULL,
  `account_id` bigint(20) NOT NULL,
  `chart_id` bigint(20) NOT NULL,
  `payment_method_id` bigint(20) NOT NULL,
  `tax_id` bigint(20) DEFAULT NULL,
  `tax_amount` decimal(10,2) DEFAULT NULL,
  `product_total` decimal(10,2) NOT NULL,
  `grand_total` decimal(10,2) NOT NULL,
  `attachemnt` text DEFAULT NULL,
  `note` text DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `purchase_return_item_taxes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `purchase_return_id` bigint(20) NOT NULL,
  `purchase_return_item_id` bigint(20) NOT NULL,
  `tax_id` bigint(20) NOT NULL,
  `name` varchar(100) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `purchase_return_items` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `purchase_return_id` int(11) NOT NULL,
  `product_id` bigint(20) NOT NULL,
  `description` text DEFAULT NULL,
  `quantity` decimal(10,2) NOT NULL,
  `unit_cost` decimal(10,2) NOT NULL,
  `discount` decimal(10,2) NOT NULL,
  `tax_method` varchar(10) DEFAULT NULL,
  `tax_id` bigint(20) DEFAULT NULL,
  `tax_amount` decimal(10,2) DEFAULT NULL,
  `sub_total` decimal(10,2) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `quotation_item_taxes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `quotation_id` bigint(20) NOT NULL,
  `quotation_item_id` bigint(20) NOT NULL,
  `tax_id` bigint(20) NOT NULL,
  `name` varchar(100) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `quotation_items` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `quotation_id` bigint(20) NOT NULL,
  `item_id` bigint(20) NOT NULL,
  `description` text DEFAULT NULL,
  `quantity` decimal(10,2) NOT NULL,
  `unit_cost` decimal(10,2) NOT NULL,
  `discount` decimal(10,2) NOT NULL,
  `tax_method` varchar(10) DEFAULT NULL,
  `tax_id` bigint(20) DEFAULT NULL,
  `tax_amount` decimal(10,2) DEFAULT NULL,
  `sub_total` decimal(10,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `quotations` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `quotation_number` varchar(191) NOT NULL,
  `quotation_date` date NOT NULL,
  `template` varchar(100) DEFAULT NULL,
  `grand_total` decimal(10,2) NOT NULL,
  `converted_total` decimal(10,2) DEFAULT NULL,
  `tax_total` decimal(10,2) NOT NULL,
  `note` text DEFAULT NULL,
  `related_to` varchar(20) DEFAULT NULL,
  `related_id` bigint(20) DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `repeating_transactions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `trans_date` date NOT NULL,
  `account_id` bigint(20) NOT NULL,
  `chart_id` bigint(20) NOT NULL,
  `type` varchar(10) NOT NULL,
  `dr_cr` varchar(2) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `base_amount` decimal(10,2) DEFAULT NULL,
  `payer_payee_id` bigint(20) DEFAULT NULL,
  `payment_method_id` bigint(20) NOT NULL,
  `reference` varchar(50) DEFAULT NULL,
  `note` text DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `status` tinyint(4) DEFAULT 0,
  `trans_id` bigint(20) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `sales_return` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `return_date` date NOT NULL,
  `customer_id` bigint(20) NOT NULL,
  `tax_id` bigint(20) DEFAULT NULL,
  `tax_amount` decimal(10,2) DEFAULT NULL,
  `product_total` decimal(10,2) NOT NULL,
  `grand_total` decimal(10,2) NOT NULL,
  `converted_total` decimal(10,2) DEFAULT NULL,
  `attachemnt` text DEFAULT NULL,
  `note` text DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `sales_return_item_taxes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `sales_return_id` bigint(20) NOT NULL,
  `sales_return_item_id` bigint(20) NOT NULL,
  `tax_id` bigint(20) NOT NULL,
  `name` varchar(100) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `sales_return_items` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `sales_return_id` bigint(20) NOT NULL,
  `product_id` bigint(20) NOT NULL,
  `description` text DEFAULT NULL,
  `quantity` decimal(8,2) NOT NULL,
  `unit_cost` decimal(10,2) NOT NULL,
  `discount` decimal(10,2) NOT NULL,
  `tax_method` varchar(10) DEFAULT NULL,
  `tax_id` bigint(20) DEFAULT NULL,
  `tax_amount` decimal(10,2) DEFAULT NULL,
  `sub_total` decimal(10,2) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `services` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `item_id` bigint(20) NOT NULL,
  `cost` decimal(10,2) NOT NULL,
  `tax_method` varchar(10) NOT NULL,
  `tax_id` bigint(20) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `settings` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) NOT NULL,
  `value` longtext NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO settings VALUES('1','mail_type','smtp','','2024-12-14 22:57:08');
INSERT INTO settings VALUES('2','backend_direction','ltr','','');
INSERT INTO settings VALUES('3','language','English','','2024-12-14 23:16:36');
INSERT INTO settings VALUES('4','membership_system','enabled','','');
INSERT INTO settings VALUES('5','trial_period','7','','');
INSERT INTO settings VALUES('6','allow_singup','yes','','');
INSERT INTO settings VALUES('7','email_verification','disabled','','');
INSERT INTO settings VALUES('8','hero_title','a:2:{s:6:\"Bangla\";s:36:\"Start Your Business With Hisabat 365\";s:7:\"English\";s:36:\"Start Your Business With Hisabat 365\";}','','2024-12-14 23:09:04');
INSERT INTO settings VALUES('9','hero_sub_title','a:2:{s:6:\"Bangla\";s:170:\"A simple, easy to customize, and powerful business platform for managing and tracking Projects, Tasks, Invoices, Quotations, Leads, Customers, Transactions and many more!\";s:7:\"English\";s:170:\"A simple, easy to customize, and powerful business platform for managing and tracking Projects, Tasks, Invoices, Quotations, Leads, Customers, Transactions and many more!\";}','','2024-12-14 23:09:04');
INSERT INTO settings VALUES('10','meta_keywords','invoice, projects, tasks, accounting, quotation, crm, business, erp, accounting software, live chat','','2024-12-14 23:10:37');
INSERT INTO settings VALUES('11','meta_description','A simple, easy to customize, and powerful business platform for managing and tracking Projects, Tasks, Invoices, Quotations, Leads, Customers, Transactions and many more!','','2024-12-14 23:10:37');
INSERT INTO settings VALUES('12','company_name','Hisabat 365','2024-12-14 18:54:23','2024-12-14 23:16:36');
INSERT INTO settings VALUES('13','site_title','Hisabat 365','2024-12-14 18:54:23','2024-12-14 23:16:36');
INSERT INTO settings VALUES('14','phone','+971585985109','2024-12-14 18:54:23','2024-12-14 23:16:36');
INSERT INTO settings VALUES('15','email','info@hisabat365.com','2024-12-14 18:54:23','2024-12-14 23:16:36');
INSERT INTO settings VALUES('16','timezone','Asia/Dubai','2024-12-14 18:54:23','2024-12-14 23:16:36');
INSERT INTO settings VALUES('17','from_email','no-reply@hisabat365.com','2024-12-14 22:55:21','2024-12-14 22:57:08');
INSERT INTO settings VALUES('18','from_name','hisabat365','2024-12-14 22:55:21','2024-12-14 22:57:08');
INSERT INTO settings VALUES('19','smtp_host','hisabat365.com','2024-12-14 22:55:21','2024-12-14 22:57:08');
INSERT INTO settings VALUES('20','smtp_port','465','2024-12-14 22:55:21','2024-12-14 22:57:08');
INSERT INTO settings VALUES('21','smtp_username','no-reply@hisabat365.com','2024-12-14 22:55:21','2024-12-14 22:57:08');
INSERT INTO settings VALUES('22','smtp_password','%?1sT0(9ysD8','2024-12-14 22:55:21','2024-12-14 22:57:08');
INSERT INTO settings VALUES('23','smtp_encryption','ssl','2024-12-14 22:55:21','2024-12-14 22:57:08');
INSERT INTO settings VALUES('24','website_copyright','a:2:{s:6:\"Bangla\";s:42:\"©2012-24 Hisabat 365. All rights reserved\";s:7:\"English\";s:42:\"©2012-24 Hisabat 365. All rights reserved\";}','2024-12-14 23:09:04','2024-12-14 23:09:04');
INSERT INTO settings VALUES('25','website_title','Hisabat 365','2024-12-14 23:10:37','2024-12-14 23:10:37');
INSERT INTO settings VALUES('26','address','DEIRA DUBAI','2024-12-14 23:16:36','2024-12-14 23:16:36');
INSERT INTO settings VALUES('27','logo','logo.png','2024-12-14 23:18:12','2024-12-15 10:01:42');
INSERT INTO settings VALUES('28','favicon','file_1734242509.png','2024-12-14 23:18:58','2024-12-15 10:01:49');
INSERT INTO settings VALUES('29','about_content','a:1:{s:7:\"English\";s:469:\"<p style=\"text-align: justify;\"><strong>Hisabat 365</strong> is a robust, cloud-based inventory management software designed to streamline and optimize the process of managing inventory, tracking stock levels, and simplifying logistics for businesses of all sizes. It offers an intuitive user interface, real-time updates, and a range of customizable features, providing businesses with the tools they need to effectively track, control, and manage their inventory.</p>\";}','2024-12-15 10:23:58','2024-12-15 10:24:15');
INSERT INTO settings VALUES('30','terms_condition_content','a:1:{s:7:\"English\";s:8173:\"<p>Effective Date: [12/12/2024]</p>
<hr />
<p>These Terms and Conditions (&ldquo;Terms&rdquo;) govern your access to and use of the Hisabat 365 Inventory Management Software (&ldquo;Software&rdquo; or &ldquo;Service&rdquo;), provided by [Company Name] (&ldquo;Company,&rdquo; &ldquo;we,&rdquo; &ldquo;our,&rdquo; or &ldquo;us&rdquo;). By using or accessing the Software, you agree to be bound by these Terms. If you do not agree with any of the Terms outlined below, you must refrain from using the Software.</p>
<hr />
<h3>1. <strong>Acceptance of Terms</strong></h3>
<p>By accessing or using the Hisabat 365 Inventory Management Software, you acknowledge and agree to comply with these Terms and any applicable laws, rules, and regulations. If you are using the Software on behalf of a company or other legal entity, you represent that you are authorized to accept these Terms on behalf of that entity.</p>
<hr />
<h3>2. <strong>License Grant</strong></h3>
<p>The Company grants you a limited, non-exclusive, non-transferable, revocable license to use the Software in accordance with these Terms. This license is solely for your internal business purposes and may not be sublicensed, resold, or redistributed without prior written consent from the Company.</p>
<hr />
<h3>3. <strong>Account Registration</strong></h3>
<p>To access and use the Software, you may be required to create an account by providing certain personal and business information. You agree to provide accurate, current, and complete information during the registration process and to update such information if it changes. You are responsible for maintaining the confidentiality of your account credentials and for all activities that occur under your account.</p>
<hr />
<h3>4. <strong>User Responsibilities</strong></h3>
<p>You agree to use the Software solely for lawful purposes and in accordance with these Terms. You will not:</p>
<ul>
<li>Violate any applicable local, state, or international laws.</li>
<li>Use the Software to infringe upon the intellectual property rights of others.</li>
<li>Attempt to gain unauthorized access to the Software or its related systems or networks.</li>
<li>Upload or transmit viruses, malware, or any other harmful code.</li>
<li>Interfere with or disrupt the operation of the Software.</li>
</ul>
<hr />
<h3>5. <strong>Subscription Fees and Payment</strong></h3>
<p>The Software is offered on a subscription-based model, and fees are charged based on the selected subscription plan. All fees are due in advance, and you agree to pay the applicable subscription fees as specified at the time of purchase or renewal.</p>
<ul>
<li><strong>Billing:</strong> You authorize the Company to charge your chosen payment method for subscription fees. Subscription fees are non-refundable, except as required by applicable law.</li>
<li><strong>Renewal:</strong> Subscriptions will automatically renew unless canceled by you prior to the renewal date. Renewal charges will be billed at the current subscription rate, and you will be notified of any rate changes.</li>
</ul>
<hr />
<h3>6. <strong>Trial Period</strong></h3>
<p>The Software may be offered with a free trial period. If you use the Software during a free trial, the following applies:</p>
<ul>
<li>The trial period is for a limited time only, as specified at the time of sign-up.</li>
<li>After the trial period ends, you must subscribe to continue using the Software, and you will be charged according to the selected plan unless canceled before the trial period ends.</li>
</ul>
<hr />
<h3>7. <strong>Term and Termination</strong></h3>
<ul>
<li><strong>Term:</strong> These Terms are effective upon your acceptance and will remain in effect as long as you use the Software.</li>
<li><strong>Termination by You:</strong> You may terminate your use of the Software at any time by canceling your subscription and discontinuing your use of the Software.</li>
<li><strong>Termination by Us:</strong> We may suspend or terminate your access to the Software if we determine that you have violated these Terms or engaged in illegal, harmful, or disruptive behavior.</li>
<li><strong>Effect of Termination:</strong> Upon termination, your access to the Software will be revoked, and you will lose access to all data stored on the Software, unless you have made arrangements to export or back up your data.</li>
</ul>
<hr />
<h3>8. <strong>Data Privacy and Security</strong></h3>
<p>We respect your privacy and are committed to protecting your personal data. Please refer to our Privacy Policy [insert link] for details on how we collect, use, and protect your data.</p>
<ul>
<li>You retain ownership of all data you input into the Software. However, by using the Software, you grant the Company a license to process and store your data as necessary to provide the services.</li>
<li>We employ reasonable security measures to protect your data, but we cannot guarantee absolute security.</li>
</ul>
<hr />
<h3>9. <strong>Intellectual Property</strong></h3>
<p>The Software, including all content, features, functionality, and associated materials (collectively, &ldquo;Content&rdquo;), is owned by the Company and is protected by intellectual property laws, including copyright, trademark, and patent laws.</p>
<p>You agree not to copy, modify, distribute, or otherwise use any part of the Software or Content without prior written consent from the Company.</p>
<hr />
<h3>10. <strong>Limitation of Liability</strong></h3>
<p>To the fullest extent permitted by law, the Company shall not be liable for any indirect, incidental, special, consequential, or punitive damages arising out of or in connection with your use of the Software, even if the Company has been advised of the possibility of such damages.</p>
<p>Our total liability to you, for any claim arising out of or in connection with these Terms, shall not exceed the amount you have paid for the Software during the 12-month period immediately preceding the claim.</p>
<hr />
<h3>11. <strong>Indemnification</strong></h3>
<p>You agree to indemnify, defend, and hold harmless the Company and its officers, directors, employees, and affiliates from and against any claims, damages, liabilities, and expenses (including reasonable attorneys&rsquo; fees) arising from your use of the Software or any breach of these Terms.</p>
<hr />
<h3>12. <strong>Changes to Terms</strong></h3>
<p>The Company reserves the right to modify or update these Terms at any time. We will notify you of any changes by posting the updated Terms on our website or through the Software. Your continued use of the Software after such changes are posted constitutes your acceptance of the updated Terms.</p>
<hr />
<h3>13. <strong>Governing Law and Dispute Resolution</strong></h3>
<p>These Terms shall be governed by and construed in accordance with the laws of [Your Country/State]. Any dispute arising out of or in connection with these Terms shall be resolved through [mediation/arbitration] before a competent court or body in [Jurisdiction].</p>
<hr />
<h3>14. <strong>Miscellaneous</strong></h3>
<ul>
<li><strong>Severability:</strong> If any provision of these Terms is found to be invalid or unenforceable, the remaining provisions shall remain in full effect.</li>
<li><strong>Waiver:</strong> No waiver of any provision of these Terms will be deemed a waiver of any other provision or a continuing waiver of the same provision.</li>
<li><strong>Assignment:</strong> You may not assign or transfer your rights or obligations under these Terms without our prior written consent.</li>
</ul>
<hr />
<h3>15. <strong>Contact Information</strong></h3>
<p>For any questions or concerns regarding these Terms or the Software, please contact us at:</p>
<p><strong>Binary General Trading Fz-LLC</strong><br /><strong>DEIRA DUBAI</strong><br /><strong>info@hisabat365.com</strong><br /><strong>+971585985109</strong></p>
<hr />
<p>By accessing and using the Hisabat 365 Inventory Management Software, you acknowledge that you have read, understood, and agree to be bound by these Terms and Conditions.</p>\";}','2024-12-15 10:28:03','2024-12-15 10:28:03');
INSERT INTO settings VALUES('31','privacy_policy_content','a:1:{s:7:\"English\";s:8106:\"<p>Effective Date: [12/12/2024]</p>
<hr />
<p>At [Binary General Trading Fz-LLC] (\"we,\" \"us,\" or \"our\"), we take your privacy seriously. This Privacy Policy outlines how we collect, use, disclose, and protect your information when you use the Hisabat 365 Inventory Management Software (\"Software\"). By using the Software, you consent to the collection and use of information as described in this policy.</p>
<hr />
<h3><strong>1. Information We Collect</strong></h3>
<p>We collect both personal and business information to provide and improve our services. The types of information we collect include:</p>
<h4><strong>A. Personal Information</strong></h4>
<ul>
<li><strong>Account Information:</strong> When you create an account, we collect your name, email address, phone number, and payment information.</li>
<li><strong>Contact Information:</strong> If you contact us via email, phone, or our support team, we collect information relevant to your inquiry or support request.</li>
</ul>
<h4><strong>B. Business Information</strong></h4>
<ul>
<li><strong>Business Details:</strong> When you register for the Software, we collect your business name, address, and other related information necessary for account creation and billing.</li>
<li><strong>Inventory Data:</strong> The Software stores data related to your business&rsquo;s inventory, including product names, quantities, prices, suppliers, and transaction records.</li>
</ul>
<h4><strong>C. Usage Data</strong></h4>
<ul>
<li><strong>Device and Browsing Information:</strong> We collect information about how you access and interact with the Software, including device type, IP address, browser type, operating system, and usage data (e.g., which features are accessed and how often).</li>
<li><strong>Cookies and Tracking Technologies:</strong> We use cookies, web beacons, and similar tracking technologies to collect information about your interactions with the Software. Cookies help improve your experience and ensure the proper functioning of the Software.</li>
</ul>
<hr />
<h3><strong>2. How We Use Your Information</strong></h3>
<p>We use the information we collect for the following purposes:</p>
<ul>
<li><strong>Providing and Improving Services:</strong> To deliver and maintain the Software, including processing transactions, managing inventory, and providing customer support.</li>
<li><strong>Communication:</strong> To send you important updates about your account, billing notifications, service announcements, and marketing communications if you&rsquo;ve opted-in.</li>
<li><strong>Personalizing Your Experience:</strong> To customize and improve your experience within the Software, such as providing relevant features and content.</li>
<li><strong>Security and Fraud Prevention:</strong> To ensure the security of your account and protect against unauthorized access, fraud, or misuse of the Software.</li>
<li><strong>Legal Compliance:</strong> To comply with applicable laws, regulations, and legal processes.</li>
</ul>
<hr />
<h3><strong>3. How We Share Your Information</strong></h3>
<p>We respect your privacy and will not share your personal or business information except in the following circumstances:</p>
<h4><strong>A. Service Providers</strong></h4>
<p>We may share your information with trusted third-party service providers who help us deliver and improve the Software. These providers may include payment processors, hosting providers, and customer support platforms. These third parties are only allowed to use your information to perform services on our behalf and are required to keep your information confidential.</p>
<h4><strong>B. Legal Requirements</strong></h4>
<p>We may disclose your information if required to do so by law or if we believe such action is necessary to comply with legal obligations, protect our rights, investigate fraud, or ensure user safety.</p>
<h4><strong>C. Business Transfers</strong></h4>
<p>In the event of a merger, acquisition, or sale of all or a portion of our business or assets, your information may be transferred to the acquiring entity. We will notify you before your data is transferred and becomes subject to a different privacy policy.</p>
<h4><strong>D. Aggregated or De-Identified Data</strong></h4>
<p>We may share aggregated or de-identified data with third parties for analytical, marketing, or research purposes. This data does not personally identify you or your business.</p>
<hr />
<h3><strong>4. Data Retention</strong></h3>
<p>We retain your personal and business information for as long as your account is active or as needed to provide services, comply with legal obligations, resolve disputes, and enforce agreements. If you choose to cancel your account, we may retain certain information for a period of time as required by law or to protect our legal rights.</p>
<hr />
<h3><strong>5. Data Security</strong></h3>
<p>We implement reasonable security measures to protect your personal and business information from unauthorized access, alteration, disclosure, or destruction. These measures include encryption, secure server protocols, and access control mechanisms.</p>
<p>However, no security system is 100% secure, and we cannot guarantee the absolute security of your data. You are also responsible for maintaining the security of your account by keeping your login credentials confidential.</p>
<hr />
<h3><strong>6. Your Rights and Choices</strong></h3>
<p>You have certain rights regarding your personal information, including:</p>
<ul>
<li><strong>Access and Correction:</strong> You can access, update, or correct the personal and business information associated with your account by logging into your account or contacting us directly.</li>
<li><strong>Deletion:</strong> You can request the deletion of your account and personal data by contacting our support team. Please note that some data may be retained for legal or operational purposes.</li>
<li><strong>Opt-Out of Marketing Communications:</strong> You can opt out of receiving marketing communications from us by following the unsubscribe instructions in the emails or by contacting us.</li>
<li><strong>Cookies:</strong> You can manage cookie preferences through your browser settings. However, please note that disabling certain cookies may impact your experience with the Software.</li>
</ul>
<hr />
<h3><strong>7. International Data Transfers</strong></h3>
<p>If you are located outside of [Country/Region], please be aware that your information may be transferred to and processed in [Country], where our servers and data centers are located. By using the Software, you consent to the transfer of your data to a location outside of your country.</p>
<hr />
<h3><strong>8. Children&rsquo;s Privacy</strong></h3>
<p>The Software is not intended for use by children under the age of 13. We do not knowingly collect personal information from children. If we become aware that a child has provided us with personal information, we will take steps to delete such information from our servers.</p>
<hr />
<h3><strong>9. Changes to This Privacy Policy</strong></h3>
<p>We reserve the right to update or modify this Privacy Policy at any time. Any changes to the policy will be posted on this page with an updated effective date. We encourage you to review this policy periodically to stay informed about how we are protecting your information. Your continued use of the Software after changes to this Privacy Policy constitutes your acceptance of the updated terms.</p>
<hr />
<h3><strong>10. Contact Us</strong></h3>
<p>If you have any questions, concerns, or requests regarding this Privacy Policy or your personal information, please contact us at:</p>
<p><strong>Binary General Trading Fz-LLC</strong><br /><strong>DEIRA DUBAI</strong><br /><strong>info@hisabat365.com</strong><br /><strong>+971585985109</strong></p>
<hr />
<p>By using the Hisabat 365 Inventory Management Software, you acknowledge that you have read and understood this Privacy Policy and agree to the practices described herein.</p>\";}','2024-12-15 10:30:12','2024-12-15 10:31:09');




CREATE TABLE `social_google_accounts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL,
  `provider_user_id` varchar(191) NOT NULL,
  `provider` varchar(191) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `staff_roles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `description` text DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `suppliers` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `supplier_name` varchar(191) NOT NULL,
  `company_name` varchar(191) DEFAULT NULL,
  `vat_number` varchar(191) DEFAULT NULL,
  `email` varchar(191) NOT NULL,
  `phone` varchar(20) NOT NULL,
  `address` varchar(191) DEFAULT NULL,
  `country` varchar(50) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `postal_code` varchar(20) DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `task_statuses` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(30) NOT NULL,
  `color` varchar(10) NOT NULL,
  `order` int(11) DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `tasks` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(191) NOT NULL,
  `description` text DEFAULT NULL,
  `project_id` bigint(20) NOT NULL,
  `milestone_id` bigint(20) DEFAULT NULL,
  `priority` varchar(15) NOT NULL,
  `task_status_id` bigint(20) NOT NULL,
  `assigned_user_id` bigint(20) DEFAULT NULL,
  `start_date` date NOT NULL,
  `end_date` date DEFAULT NULL,
  `custom_fields` longtext DEFAULT NULL,
  `user_id` bigint(20) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `taxs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tax_name` varchar(30) NOT NULL,
  `rate` decimal(10,2) NOT NULL,
  `type` varchar(10) NOT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `timesheets` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `start_time` datetime NOT NULL,
  `end_time` datetime NOT NULL,
  `total_hour` varchar(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `project_id` bigint(20) NOT NULL,
  `task_id` bigint(20) NOT NULL,
  `note` text DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;





CREATE TABLE `transactions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `trans_date` date NOT NULL,
  `account_id` bigint(20) NOT NULL,
  `chart_id` bigint(20) NOT NULL,
  `type` varchar(10) NOT NULL,
  `dr_cr` varchar(2) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `base_amount` decimal(10,2) DEFAULT NULL,
  `payer_payee_id` bigint(20) DEFAULT NULL,
  `invoice_id` bigint(20) DEFAULT NULL,
  `purchase_id` bigint(20) DEFAULT NULL,
  `purchase_return_id` bigint(20) DEFAULT NULL,
  `project_id` bigint(20) DEFAULT NULL,
  `payment_method_id` bigint(20) NOT NULL,
  `reference` varchar(50) DEFAULT NULL,
  `attachment` text DEFAULT NULL,
  `note` text DEFAULT NULL,
  `company_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



