CREATE TABLE `Dar_Alemadpayroll_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payroll_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `salary` float(8,3) NOT NULL,
  `manual_deduction` float(8,3) NOT NULL,
  `manual_deduction_reason` text COLLATE utf8_unicode_ci,
  `manual_bounce` float(8,3) NOT NULL,
  `manual_bonus_reason` text COLLATE utf8_unicode_ci,
  `advance` float(10,3) NOT NULL,
  `loan` float(10,3) NOT NULL,
  `pasi_company` double DEFAULT '0',
  `pasi_employee` double DEFAULT '0',
  `job_s_company` double DEFAULT '0',
  `job_s_employee` double DEFAULT '0',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadpayroll_detail`
--

INSERT INTO `Dar_Alemadpayroll_detail` VALUES (1,1,46,0.000,0.000,'',0.000,'',0.000,100.000,0,0,0,0,0),(2,1,1,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(3,1,47,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(4,1,50,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(5,1,48,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(6,1,42,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(7,1,49,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(8,1,45,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(9,1,36,250.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,1),(10,1,43,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(11,1,44,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(12,1,53,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(13,1,52,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(14,1,51,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(15,1,56,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(16,1,55,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(17,1,39,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(18,1,38,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(19,1,59,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(20,1,58,700.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(21,1,37,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(22,1,54,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(23,1,61,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(24,1,57,350.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(25,1,41,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(26,1,40,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0),(27,1,60,0.000,0.000,NULL,0.000,NULL,0.000,0.000,0,0,0,0,0);

--
-- Table structure for table `Dar_Alemadposts`
--

CREATE TABLE `Dar_Alemadposts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `post_id` int(11) NOT NULL,
  `share_with` text COLLATE utf8_unicode_ci,
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadposts`
--


--
-- Table structure for table `Dar_Alemadproject_comments`
--

CREATE TABLE `Dar_Alemadproject_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `comment_id` int(11) NOT NULL DEFAULT '0',
  `task_id` int(11) NOT NULL DEFAULT '0',
  `file_id` int(11) NOT NULL DEFAULT '0',
  `customer_feedback_id` int(11) NOT NULL DEFAULT '0',
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadproject_comments`
--


--
-- Table structure for table `Dar_Alemadproject_files`
--

CREATE TABLE `Dar_Alemadproject_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` text COLLATE utf8_unicode_ci NOT NULL,
  `file_id` text COLLATE utf8_unicode_ci,
  `service_type` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `file_size` double NOT NULL,
  `created_at` datetime NOT NULL,
  `project_id` int(11) NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadproject_files`
--


--
-- Table structure for table `Dar_Alemadproject_members`
--

CREATE TABLE `Dar_Alemadproject_members` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL,
  `is_leader` tinyint(1) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadproject_members`
--

INSERT INTO `Dar_Alemadproject_members` VALUES (1,36,1,1,0),(2,57,2,1,0),(3,1,3,1,0),(4,36,4,1,0),(5,36,5,1,0),(6,1,6,1,0),(7,36,7,1,0),(8,36,8,1,0);

--
-- Table structure for table `Dar_Alemadproject_settings`
--

CREATE TABLE `Dar_Alemadproject_settings` (
  `project_id` int(11) NOT NULL,
  `setting_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `setting_value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `unique_index` (`project_id`,`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadproject_settings`
--


--
-- Table structure for table `Dar_Alemadproject_time`
--

CREATE TABLE `Dar_Alemadproject_time` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `start_time` datetime NOT NULL,
  `end_time` datetime DEFAULT NULL,
  `status` enum('open','logged','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'logged',
  `note` text COLLATE utf8_unicode_ci,
  `task_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadproject_time`
--


--
-- Table structure for table `Dar_Alemadprojects`
--

CREATE TABLE `Dar_Alemadprojects` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `start_date` date DEFAULT NULL,
  `deadline` date DEFAULT NULL,
  `client_id` int(11) NOT NULL,
  `created_date` date DEFAULT NULL,
  `created_by` int(11) NOT NULL DEFAULT '0',
  `status` enum('open','completed','hold','canceled','pending','') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending',
  `labels` text COLLATE utf8_unicode_ci,
  `price` double NOT NULL DEFAULT '0',
  `starred_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `geo_location` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadprojects`
--

INSERT INTO `Dar_Alemadprojects` VALUES (1,'المخزن','بيع مواد المخزن للورش والمستهلك المباشر','2022-01-15','2022-11-30',2,'2022-01-14',36,'open','',30000,'',0,NULL,1),(2,'Windows and Doors ','CURTEN WALL\n1. Window 0.90x2 2 pc\n2. Window 1.80x2 1pc\n3. Window 0.60x800 8pc\n4. Window 1.60x1.60 1pc\n5. Window 2x1.6 1 PC\n6. Window 0.6X1.1 1 PC\n7. Window 2X2 1 PC\n8. Window 0.9X2.2 2 PC\n9. Window 1.2X2.2 1 PC\n10. Window 0.8X2.2 2 PC\n11. SLIDING Window 4X2.1 1 PC\n12. Window 0.9X2.2 2 PC\n13. Window 0.4X1.6 1 PC\n14. Window 0.6X0.6 1 PC\n15. Window 0.75X2.2 2 PC\n16. Window 0.9X2.2 2 PC\n17. Window 1.6X1.6 1 PC\n18. Window 2X2 1 PC\n19. Window 0.9X1.4 1 PC\n20. Window 0.6X1.1 1 PC\n21. SLIDING 2X1.4 1 PC','2022-01-26','2022-03-31',7,'2022-01-30',57,'completed','5',3800,'',0,NULL,0),(3,'Parking ','Parking 6x5\nPvc Germany \nPower coating paint','2022-02-02','2022-02-28',1,'2022-02-01',1,'open','5',650,'',0,NULL,1),(4,'muscat','ابواب','2022-02-02','2022-02-02',2,'2022-02-02',36,'open','',3000,'',0,NULL,1),(5,'مسقط','ابواب','2022-02-02','2022-02-02',9,'2022-02-02',36,'open','',3000,'',0,NULL,1),(6,'هع','<p>هع</p>','2022-02-03','2022-02-17',1,'2022-02-03',1,'open','مرحلة',0,'',0,NULL,1),(7,'الورشة ','',NULL,NULL,1,'2022-02-05',36,'open','',0,'',0,NULL,1),(8,'مصنع الشركة','','2022-02-05','2022-03-31',2,'2022-02-05',36,'open','',0,'',0,NULL,0);

--
-- Table structure for table `Dar_Alemadpurchase_order_items`
--

CREATE TABLE `Dar_Alemadpurchase_order_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `purchase_order_id` int(11) NOT NULL,
  `tax_id` int(11) DEFAULT '0',
  `tax_id2` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=78 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadpurchase_order_items`
--

INSERT INTO `Dar_Alemadpurchase_order_items` VALUES (1,1,'سيليكون ابيض','مادة مطاطية لتثبيت الزجاج',1236,'سيليكون',0.45,556.2,0,1,1,0,0),(2,3,'سليكون اسود ','مادة مطاطية اتثبيت الزجاج',1050,'',0.3,315,0,1,1,0,0),(3,1,'سيليكون ابيض','مادة مطاطية لتثبيت الزجاج',1236,'سيليكون',0.3,370.8,0,3,0,0,0),(4,1,'سيليكون ابيض','مادة مطاطية لتثبيت الزجاج',2100,'سيليكون',0.24,504,0,5,0,0,0),(5,3,'سليكون اسود ','مادة مطاطية اتثبيت الزجاج',1500,'',0.3,450,0,5,0,0,0),(6,6,'مسمار برغي BULEX','',23000,'بالقطعه',0.05,1150,0,6,0,0,0),(7,4,'ضلفة باب UPVC رقم التصميمPM-1101','لوح UVPC بتصميم معين انظر رقم التصميم في العنوان',15,'ضلف لتصنيع الابواب',14,210,0,7,0,0,0),(8,7,'ضلف باب UPVCرقم التصميمMP-700','لوح UPVC بتصميم معين انظر رقم التصميم في العنوان',25,'باقطعة',14,350,0,8,0,0,0),(9,8,'ضلف باب UVPC رقم التصميمMP-1100','',25,'بالقطعة',14,350,0,9,0,0,0),(10,9,'ضلفة بابUVPCرقم التصميم501','لوحUVPC بتصميم معين انظر رقم التصميم في العنوان',25,'بالقطعة',14,350,0,12,0,0,0),(11,10,'uPVC door panel design number MP-1701','',1,'Piece',14,14,0,13,0,0,0),(12,11,'UPVC Door Panel Design No. MP-611L','',5,'PICE',14,70,0,14,0,0,0),(13,12,'UPVC Door Panel Design No. MP-1200','',25,'PICE',14,350,0,15,0,0,0),(14,13,'UPVC Door Panel Design No. MP-700L','',5,'PICE',14,70,0,16,0,0,0),(15,14,'UPVC Door Panel Design No. MP-1601','',15,'PICE',14,210,0,18,0,0,0),(16,15,'UPVC Door Panel Design No. MP-800','',20,'PIECE',14,280,0,18,0,0,0),(17,17,'UPVC Door Panel Design No. MP-910','',25,'PIECE',14,350,0,18,0,0,0),(18,18,'UPVC Door Panel Design No. MP-1700','',40,'PIECE',14,560,0,18,0,0,0),(19,19,'UPVC Door Panel Design No. MP-200','',45,'PIECE',14,630,0,18,0,0,0),(20,21,'UPVC Door Panel Design No. MP-500','',25,'PIECE',14,350,0,18,0,0,0),(21,20,'UPVC Door Panel Design No. MP-530','',25,'PIECE',14,350,0,18,0,0,0),(22,22,'UPVC Door Panel Design No. MP-900','',25,'PIECE',14,350,0,18,0,0,0),(23,23,'UPVC Door Panel Design No. MP-2000','',20,'PIECE',14,280,0,18,0,0,0),(24,25,'UPVC Door Panel Design No. MP-1800','',20,'PIECE',14,280,0,18,0,0,0),(25,24,'UPVC Door Panel Design No. MP-1600','',25,'PIECE',14,350,0,18,0,0,0),(26,26,'UPVC Door Panel Design No. MP-1801','',15,'PIECE',14,210,0,18,0,0,0),(27,27,'UPVC Door Panel Design No. MP-602','',15,'PIECE',14,210,0,18,0,0,0),(28,28,'UPVC Door Panel Design No. MP-1900','',15,'PIECE',14,210,0,18,0,0,0),(29,29,'UPVC Door Panel Design No. MP-402','',15,'PIECE',14,210,0,18,0,0,0),(30,30,'UPVC Door Panel Design No. MP-1501','',10,'PIECE',14,140,0,18,0,0,0),(31,31,'UPVC Door Panel Design No. MP-مجهول1','',5,'PIECE',14,70,0,18,0,0,0),(32,32,'UPVC Door Panel Design No. MP-مجهول2','',15,'PIECE',14,210,0,18,0,0,0),(33,33,'UPVC Door Panel Design No. MP-مجهول3','',15,'PIECE',14,210,0,18,0,0,0),(34,34,'UPVC Door Panel Design No. MP-مجهول4','',5,'PIECE',14,70,0,18,0,0,0),(35,35,'UPVC Door Panel Design No. MP-مجهول5','',10,'PIECE',14,140,0,18,0,0,0),(36,36,'UPVC Door Panel Design No. MP-مجهول6','',5,'PIECE',14,70,0,18,0,0,0),(37,80,'FLAT BAR150*6MM*6','بار مسطح',12,'M',3.5,42,0,19,0,0,0),(38,68,'PIPE GI STEEL مضاد للصده 4*3','',60,'m',4.375,262.5,0,19,0,0,0),(39,69,'\'\'pipe  GI 2.5\'\'3mmمسورة 2.5\"3','',240,'M',2.45,588,0,19,0,0,0),(40,56,'Iron pipe diameter 6 mm x thickness 3 inches ماسورة حديد مقاس 6*3','',36,' m',6.5625,236.25,0,19,0,0,0),(41,81,'MM MS8*50 FLAT BAR','',30,'PIECE',1.275,38.25,0,19,0,0,0),(42,10,'u p v c panel door PM-1701','',10,'Piece',10.84,108.4,0,20,0,0,0),(43,9,'u p v c panel door PM-501','',15,'PIECE',10.83,162.45,0,20,0,0,0),(44,67,'u p v c panel door PM-1601','',15,'PIECE',14,210,0,20,0,0,0),(45,50,'u p v c panel door PM-1201','مع زجاج',13.53,'PIECE',13.53,183.0609,0,20,0,0,0),(46,72,'U P V C Panel Door PM-901','',5,'PIECE',13.92,69.6,0,20,0,0,0),(47,48,'u p v c panel door PM-701','مع زجاج',15,'PIECE',15.84,237.6,0,20,0,0,0),(48,47,'u p v c panel door PM-102s','مع زجاج',5,'PIECE',15.84,79.2,0,20,0,0,0),(49,45,'u p v c panel door PM-102','مع زجاج',15,'PIECE',15.65,234.75,0,20,0,0,0),(50,44,'u p v c panel door PM-1902','مع الزجاج ',1,'PIECE',14.3,14.3,0,20,0,0,0),(51,33,'u p v c panel door PM-1502','',10,'PIECE',13.15,131.5,0,20,0,0,0),(52,71,'U P V C Panel Door PM-1401','',15,'PIECE',10.84,162.6,0,20,0,0,0),(53,73,'U P V C Panel Door PM-1902L','',5,'PIECE',20.07,100.35,0,20,0,0,0),(54,31,'u p v c panel door PM-202','',5,'PIECE',15.65,78.25,0,20,0,0,0),(55,75,'U P V C Panel Door PM-103','',15,'PIECE',10,150,0,20,0,0,0),(56,34,'u p v c panel door PM-201L','',5,'PIECE',14,70,0,20,0,0,0),(57,35,'u p v c panel door PM-1500','',10,'PIECE',9.1,91,0,20,0,0,0),(58,36,'u p v c panel door PM-1900L','',5,'PIECE',14,70,0,20,0,0,0),(59,77,'U P V C Panel Door PM-610','',25,'PIECE',10,250,0,20,0,0,0),(60,78,'U P V C Panel Door PM-400','',25,'PIECE',10,250,0,20,0,0,0),(61,79,'U P V C Panel Door PM-1300','',22,'PIECE',14,308,0,20,0,0,0),(62,101,'Alum.Groove/Rail Double 6Mt. -Lenth','',80,'pc',45,3600,0,21,0,0,0),(63,0,'\'FLAT BAR -MS -150*6MM*6','',2,'PC',20,40,0,22,1,0,0),(64,80,'\'FLAT BAR -MS -150*6MM*6','بار مسطح',2,'PC',20,40,0,23,1,0,0),(65,119,' GI BEND PIPE','',10,'PC',25,250,0,23,1,0,0),(66,117,'	PIPE GI STEEL 2.5\'\'3MM','',40,'pc',14,560,0,23,1,0,0),(67,116,'	PIPE GI STEEL 6 Inch _3MM','',6,'pc',37.5,225,0,23,1,0,0),(68,118,'	FLAT BAR - MS -8*50','',5,'pc',7.3,36.5,0,23,1,0,0),(69,0,'PIPE GI STEEL ','all steel',1,'p',9200,9200,0,24,0,0,0),(70,53,'Poly. PVC 750gsm, 3*60m,White,Mehler_Germany','طربال الماني ابيض 750جرام',3,'roll',5,15,0,25,0,0,0),(71,120,'Alum.Groove/Rail Single 6Mt. -Lenth','',60,'pc',2.63,157.8,0,28,0,0,0),(72,53,'Poly. PVC 750gsm, 3*60m,White,Mehler_Germany','طربال الماني ابيض 750جرام',60,'M',4.737,284.22,0,28,0,0,0),(73,121,'PVC 750gsm, 3*50m,Beige FPC light Beige 1015','sudia',100,'Mtr.',3.684,368.4,0,28,0,0,0),(74,101,'Alum.Groove/Rail Double 6Mt. -Lenth','',10,'Pcs',4.737,47.37,0,30,0,0,0),(75,120,'Alum.Groove/Rail Single 6Mt. -Lenth','',20,'pc',2.632,52.64,0,30,0,0,0),(76,0,'Total bills & remine money','<p>all bill before this time</p>',1,'total',9488,9488,0,31,0,0,0),(77,0,'Total bills before2022','<p>total biils</p>',1,'Total',9674.3,9674.3,0,32,0,0,0);

--
-- Table structure for table `Dar_Alemadpurchase_order_payments`
--

CREATE TABLE `Dar_Alemadpurchase_order_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `amount` double NOT NULL,
  `payment_date` date NOT NULL,
  `payment_method_id` int(11) NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `purchase_order_id` int(11) NOT NULL,
  `status` enum('draft','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `transaction_id` int(11) DEFAULT '0',
  `prepayment_transaction_id` int(11) NOT NULL DEFAULT '0',
  `created_by` int(11) DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `id_2` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadpurchase_order_payments`
--

INSERT INTO `Dar_Alemadpurchase_order_payments` VALUES (1,300,'2021-06-01',4,'2022-01-14','','','',0,'تما شحنها من تركيه\nبفاتوره رقم',3,'draft',0,0,0,36,'2022-01-14 19:28:29'),(2,70.8,'2021-12-28',4,'2022-01-14','','','',0,'',3,'draft',0,0,0,36,'2022-01-14 19:32:05'),(3,370.8,'2021-12-28',4,'2022-01-14','','','',0,'سداد كامل',3,'draft',1,0,0,36,'2022-01-14 19:34:38'),(4,350,'2022-01-11',4,'2022-01-17','','','',0,'',9,'draft',1,0,0,36,'2022-01-17 16:45:46'),(5,350,'2022-01-11',4,'2022-01-17','','','',0,'',8,'draft',0,0,0,36,'2022-01-17 16:46:26'),(6,0,'2022-01-11',4,'2022-01-17','','','',0,'',7,'draft',0,0,0,36,'2022-01-27 10:29:15'),(7,350,'2022-01-12',4,'2022-01-17','','','',0,'',9,'draft',1,0,0,36,'2022-01-17 16:48:00'),(8,954,'2021-06-01',4,'2022-01-17','','','',0,'',5,'draft',0,0,0,36,'2022-01-17 16:50:10'),(9,0,'2022-02-01',4,'2022-02-05','','','',0,'',23,'draft',1,0,0,36,'2022-02-05 15:10:03'),(10,650,'2022-02-15',5,'2022-02-07','','muscat','23222',0,'',23,'draft',1,0,0,1,'2022-02-07 14:53:36');

--
-- Table structure for table `Dar_Alemadpurchase_orders`
--

CREATE TABLE `Dar_Alemadpurchase_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) NOT NULL,
  `purchase_order_date` date NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `status` enum('draft','not_paid') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `approval_status` enum('not_approved','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_approved',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadpurchase_orders`
--

INSERT INTO `Dar_Alemadpurchase_orders` VALUES (1,1,'2022-01-12',0,'','','draft','not_approved',1),(2,1,'2022-01-13',0,'','Test','draft','not_approved',1),(3,1,'2022-01-14',0,'','مواد للمحزن','not_paid','not_approved',0),(4,1,'2022-01-15',0,'','','draft','not_approved',0),(5,1,'2022-01-17',0,'','','not_paid','approved',0),(6,1,'2022-01-17',0,'','','not_paid','approved',0),(7,1,'2022-01-17',0,'','','not_paid','approved',0),(8,1,'2022-01-17',0,'','','not_paid','approved',0),(9,1,'2022-01-17',0,'','','not_paid','approved',0),(10,1,'2022-01-17',0,'','','draft','approved',0),(11,1,'2022-01-17',0,'','','not_paid','approved',0),(12,1,'2022-01-17',0,'','','draft','approved',0),(13,1,'2022-01-17',0,'','','draft','approved',0),(14,1,'2022-01-17',0,'','','draft','approved',0),(15,1,'2022-01-17',1,'','','draft','approved',0),(16,1,'2022-01-17',0,'','','draft','approved',0),(17,1,'2022-01-17',0,'','','draft','not_approved',0),(18,1,'2022-01-17',0,'','','draft','approved',0),(19,7,'2022-01-25',0,'','','not_paid','approved',0),(20,1,'2022-01-29',0,'','مشتريات الواحuvpc','draft','not_approved',0),(21,17,'2022-02-03',0,'','','draft','not_approved',1),(22,7,'2022-01-25',0,'','','draft','not_approved',1),(23,7,'2022-01-12',0,'','','not_paid','approved',0),(24,7,'2021-12-01',0,'','Remine money before 2022','draft','approved',0),(25,17,'2022-02-08',0,'','','draft','approved',0),(26,17,'2022-01-22',0,'','فاتورة صحيحة#5776','draft','approved',0),(27,17,'2022-01-22',0,'','','not_paid','not_approved',0),(28,17,'2022-01-22',0,'','<p>فاتورة صحيحة #5776</p>','draft','approved',0),(29,17,'2022-01-09',0,'','<p>Ayouoob albluchi order</p>','not_paid','approved',0),(30,17,'2022-01-09',0,'','<p>#أيوب البلوشي</p>','draft','approved',0),(31,17,'2021-12-31',0,'','<p>All bills before this time</p>','draft','approved',0),(32,7,'2021-12-30',0,'','Total bills before this time','draft','approved',0);

--
-- Table structure for table `Dar_Alemadpurchase_return_items`
--

CREATE TABLE `Dar_Alemadpurchase_return_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `po_item_id` int(11) NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `purchase_return_id` int(11) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadpurchase_return_items`
--

INSERT INTO `Dar_Alemadpurchase_return_items` VALUES (1,14,15,15,0,1,0),(2,15,16,20,0,1,0),(3,17,17,25,0,1,0),(4,18,18,40,0,1,0),(5,19,19,45,0,1,0),(6,21,20,25,0,1,0),(7,20,21,25,0,1,0),(8,22,22,25,0,1,0),(9,23,23,20,0,1,0),(10,25,24,20,0,1,0),(11,24,25,25,0,1,0),(12,26,26,15,0,1,0),(13,27,27,15,0,1,0),(14,28,28,15,0,1,0),(15,29,29,15,0,1,0),(16,30,30,10,0,1,0),(17,31,31,5,0,1,0),(18,32,32,15,0,1,0),(19,33,33,15,0,1,0),(20,34,34,5,0,1,0),(21,35,35,10,0,1,0),(22,36,36,5,0,1,0),(23,80,37,12,0,2,0),(24,68,38,60,0,2,0),(25,69,39,240,0,2,0),(26,56,40,36,0,2,0),(27,81,41,30,0,2,0),(28,80,37,12,0,3,0),(29,68,38,60,0,3,0),(30,69,39,240,0,3,0),(31,56,40,36,0,3,0),(32,81,41,30,0,3,0),(33,0,69,1,0,4,0);

--
-- Table structure for table `Dar_Alemadpurchase_returns`
--

CREATE TABLE `Dar_Alemadpurchase_returns` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `purchase_order_id` int(11) NOT NULL,
  `shipment_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) NOT NULL DEFAULT '0',
  `payment_method_id` int(11) DEFAULT '0',
  `transaction_id` int(11) DEFAULT '0',
  `date` date NOT NULL,
  `status` enum('draft','approved') COLLATE utf8_unicode_ci DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadpurchase_returns`
--

INSERT INTO `Dar_Alemadpurchase_returns` VALUES (1,18,NULL,1,4,0,'2022-01-22','draft','معامله تجريبية',0),(2,19,NULL,7,4,0,'2022-01-26','approved','',0),(3,19,NULL,7,4,0,'2022-02-08','approved','',0),(4,24,NULL,7,4,0,'2021-12-31','approved','',0);

--
-- Table structure for table `Dar_Alemadroles`
--

CREATE TABLE `Dar_Alemadroles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `permissions` mediumtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadroles`
--

INSERT INTO `Dar_Alemadroles` VALUES (1,'ادارة المشتريات والمبيوعات','a:115:{s:5:\"leave\";N;s:14:\"leave_specific\";s:0:\"\";s:10:\"attendance\";N;s:19:\"attendance_specific\";s:0:\"\";s:7:\"invoice\";N;s:8:\"estimate\";N;s:7:\"expense\";N;s:6:\"client\";N;s:4:\"lead\";s:3:\"all\";s:6:\"ticket\";N;s:15:\"ticket_specific\";s:0:\"\";s:12:\"announcement\";N;s:23:\"help_and_knowledge_base\";N;s:23:\"can_manage_all_projects\";s:1:\"0\";s:19:\"can_create_projects\";s:1:\"1\";s:17:\"can_edit_projects\";s:1:\"1\";s:19:\"can_delete_projects\";N;s:30:\"can_add_remove_project_members\";N;s:16:\"can_create_tasks\";s:1:\"1\";s:14:\"can_edit_tasks\";s:1:\"1\";s:16:\"can_delete_tasks\";N;s:20:\"can_comment_on_tasks\";s:1:\"1\";s:24:\"show_assigned_tasks_only\";N;s:21:\"can_create_milestones\";s:1:\"1\";s:19:\"can_edit_milestones\";s:1:\"1\";s:21:\"can_delete_milestones\";N;s:16:\"can_delete_files\";N;s:34:\"can_view_team_members_contact_info\";s:1:\"1\";s:34:\"can_view_team_members_social_links\";s:1:\"1\";s:29:\"team_member_update_permission\";s:3:\"all\";s:38:\"team_member_update_permission_specific\";s:0:\"\";s:27:\"timesheet_manage_permission\";s:0:\"\";s:36:\"timesheet_manage_permission_specific\";s:0:\"\";s:21:\"disable_event_sharing\";N;s:22:\"hide_team_members_list\";s:1:\"0\";s:28:\"can_delete_leave_application\";N;s:10:\"accounting\";s:0:\"\";s:7:\"payroll\";s:0:\"\";s:5:\"eroom\";s:0:\"\";s:4:\"logs\";s:0:\"\";s:7:\"reports\";s:0:\"\";s:25:\"can_access_delivery_notes\";s:1:\"1\";s:25:\"can_create_delivery_notes\";s:1:\"1\";s:23:\"can_edit_delivery_notes\";s:1:\"1\";s:25:\"can_delete_delivery_notes\";N;s:31:\"delivery_note_manage_permission\";N;s:40:\"delivery_note_manage_permission_specific\";s:0:\"\";s:20:\"can_access_suppliers\";s:1:\"1\";s:20:\"can_create_suppliers\";s:1:\"1\";s:18:\"can_edit_suppliers\";s:1:\"1\";s:20:\"can_delete_suppliers\";N;s:26:\"supplier_manage_permission\";s:3:\"all\";s:35:\"supplier_manage_permission_specific\";s:0:\"\";s:26:\"can_access_purchase_orders\";s:1:\"1\";s:26:\"can_create_purchase_orders\";s:1:\"1\";s:24:\"can_edit_purchase_orders\";s:1:\"1\";s:26:\"can_delete_purchase_orders\";N;s:32:\"purchase_order_manage_permission\";N;s:41:\"purchase_order_manage_permission_specific\";s:0:\"\";s:16:\"can_access_items\";s:1:\"1\";s:16:\"can_create_items\";s:1:\"1\";s:14:\"can_edit_items\";N;s:16:\"can_delete_items\";N;s:22:\"item_manage_permission\";N;s:31:\"item_manage_permission_specific\";s:0:\"\";s:19:\"can_access_expenses\";s:1:\"1\";s:19:\"can_create_expenses\";s:1:\"1\";s:17:\"can_edit_expenses\";s:1:\"1\";s:19:\"can_delete_expenses\";N;s:25:\"expense_manage_permission\";N;s:34:\"expense_manage_permission_specific\";s:0:\"\";s:20:\"internal_transaction\";N;s:27:\"can_access_invoice_payments\";s:1:\"1\";s:27:\"can_create_invoice_payments\";s:1:\"1\";s:25:\"can_edit_invoice_payments\";s:1:\"1\";s:27:\"can_delete_invoice_payments\";N;s:34:\"can_access_purchase_order_payments\";s:1:\"1\";s:34:\"can_create_purchase_order_payments\";s:1:\"1\";s:32:\"can_edit_purchase_order_payments\";s:1:\"1\";s:34:\"can_delete_purchase_order_payments\";N;s:19:\"can_access_contacts\";s:1:\"1\";s:19:\"can_create_contacts\";s:1:\"1\";s:17:\"can_edit_contacts\";s:1:\"1\";s:19:\"can_delete_contacts\";N;s:25:\"contact_manage_permission\";N;s:34:\"contact_manage_permission_specific\";s:0:\"\";s:18:\"can_access_clients\";s:1:\"1\";s:18:\"can_create_clients\";s:1:\"1\";s:16:\"can_edit_clients\";s:1:\"1\";s:18:\"can_delete_clients\";N;s:24:\"client_manage_permission\";s:3:\"all\";s:33:\"client_manage_permission_specific\";s:0:\"\";s:19:\"can_access_invoices\";s:1:\"1\";s:19:\"can_create_invoices\";s:1:\"1\";s:17:\"can_edit_invoices\";s:1:\"1\";s:19:\"can_delete_invoices\";N;s:25:\"invoice_manage_permission\";N;s:34:\"invoice_manage_permission_specific\";s:0:\"\";s:20:\"can_access_estimates\";s:1:\"1\";s:20:\"can_create_estimates\";s:1:\"1\";s:18:\"can_edit_estimates\";s:1:\"1\";s:20:\"can_delete_estimates\";N;s:26:\"estimate_manage_permission\";N;s:35:\"estimate_manage_permission_specific\";s:0:\"\";s:16:\"estimate_request\";s:3:\"all\";s:8:\"discount\";s:2:\"15\";s:8:\"expenses\";s:0:\"\";s:9:\"estimates\";s:0:\"\";s:8:\"invoices\";s:0:\"\";s:16:\"invoice_payments\";s:0:\"\";s:14:\"delivery_notes\";s:0:\"\";s:15:\"purchase_orders\";s:0:\"\";s:23:\"purchase_order_payments\";s:0:\"\";s:8:\"payrolls\";N;s:21:\"internal_transactions\";N;}',0);

--
-- Table structure for table `Dar_Alemadsalary_advance`
--

CREATE TABLE `Dar_Alemadsalary_advance` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `amount` float NOT NULL DEFAULT '0',
  `date` date DEFAULT NULL,
  `deleted` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadsalary_advance`
--


--
-- Table structure for table `Dar_Alemadsale_return_items`
--

CREATE TABLE `Dar_Alemadsale_return_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sale_return_id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `invoice_item_id` int(11) NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `sort` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadsale_return_items`
--

INSERT INTO `Dar_Alemadsale_return_items` VALUES (1,1,1,1,15,0,0);

--
-- Table structure for table `Dar_Alemadsale_returns`
--

CREATE TABLE `Dar_Alemadsale_returns` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `invoice_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `payment_method_id` int(11) DEFAULT '0',
  `transaction_id` int(11) DEFAULT '0',
  `date` date NOT NULL,
  `status` enum('draft','approved') COLLATE utf8_unicode_ci DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadsale_returns`
--

INSERT INTO `Dar_Alemadsale_returns` VALUES (1,1,2,4,0,'2022-02-03','draft','',1);

--
-- Table structure for table `Dar_Alemadsettings`
--

CREATE TABLE `Dar_Alemadsettings` (
  `setting_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `setting_value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'app',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `setting_name` (`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadsettings`
--

INSERT INTO `Dar_Alemadsettings` VALUES ('accepted_file_formats','jpg,jpeg,doc,pdf,csv,pptx,xlsx,docx,png,rar','app',0),('allow_partial_invoice_payment_from_clients','','app',0),('allowed_ip_addresses','','app',0),('app_title','Teamway ERP','app',0),('attendance_password','94269935','app',0),('client_can_add_project_files','1','app',0),('client_can_comment_on_files','1','app',0),('client_can_comment_on_tasks','1','app',0),('client_can_create_projects','1','app',0),('client_can_create_tasks','1','app',0),('client_can_edit_tasks','1','app',0),('client_can_view_activity','1','app',0),('client_can_view_gantt','1','app',0),('client_can_view_milestones','1','app',0),('client_can_view_overview','1','app',0),('client_can_view_project_files','1','app',0),('client_can_view_tasks','1','app',0),('client_default_dashboard','','app',0),('client_message_own_contacts','1','app',0),('client_message_users','5','app',0),('company_address','سلطنة عمان-محافظة مسقط السيب المعبيلة الصناعية','app',0),('company_email','daralemad.shades@gmail.com','app',0),('company_name','Dar Al Emad For Windows & Shades','app',0),('company_phone','0096891911127 - 0096891911126 -0096891409098','app',0),('company_vat_number','OM1100129497','app',0),('company_website','https://maps.app.goo.gl/bS4yUBVw74Rvme8P9','app',0),('cost_of_goods_sold','25','app',0),('currency_position','right','app',0),('currency_symbol',' /OMR','app',0),('date_format','d-m-Y','app',0),('decimal_separator','.','app',0),('default_bank','965','app',0),('default_cash_on_hand','19','app',0),('default_currency','OMR','app',0),('default_due_date_after_billing_date','','app',0),('default_inventory','24','app',0),('default_sales','47','app',0),('disable_client_login','1','app',0),('disable_client_signup','1','app',0),('discount','17','app',0),('email_protocol','','app',0),('email_sent_from_address','info@teamway.om','app',0),('email_sent_from_name','Teamway','app',0),('email_smtp_host','','app',0),('email_smtp_pass','','app',0),('email_smtp_port','','app',0),('email_smtp_security_type','none','app',0),('email_smtp_user','','app',0),('enable_attendance','','app',0),('enable_email_piping','','app',0),('enable_google_calendar_api','','app',0),('enable_push_notification','','app',0),('enable_rich_text_editor','1','app',0),('estimate_color','#054d7f ','app',0),('estimate_logo','a:1:{s:9:\"file_name\";s:36:\"_file61df236c60488-estimate-logo.png\";}','app',0),('favicon','','app',0),('financial_year_end','2022-12-30','app',0),('first_day_of_week','0','app',0),('hidden_client_menus','','app',0),('imap_email','info@teamway.om','app',0),('imap_host','','app',0),('imap_password','00000','app',0),('imap_port','','app',0),('imap_ssl_enabled','1','app',0),('initial_number_of_the_estimate','2','app',0),('initial_number_of_the_invoice','6','app',0),('invoice_color','#054d7f ','app',0),('invoice_footer','<p><br></p>','app',0),('invoice_logo','a:1:{s:9:\"file_name\";s:35:\"_file61df37ee91364-invoice-logo.png\";}','app',0),('invoice_prefix','','app',0),('item_purchase_code','53434654','app',0),('language','arabic','app',0),('leave_salary_expenses','67','app',0),('module_announcement','1','app',0),('module_attendance','','app',0),('module_chat','1','app',0),('module_estimate','1','app',0),('module_estimate_request','','app',0),('module_event','1','app',0),('module_expense','1','app',0),('module_help','','app',0),('module_invoice','1','app',0),('module_knowledge_base','1','app',0),('module_lead','1','app',0),('module_leave','1','app',0),('module_message','1','app',0),('module_note','1','app',0),('module_project_timesheet','','app',0),('module_ticket','','app',0),('module_timeline','1','app',0),('module_todo','1','app',0),('no_of_decimals','2','app',0),('payable_cheques','53','app',0),('payable_EOS_benefits','67','app',0),('payable_job_security','67','app',0),('payable_leave_salaries','67','app',0),('payable_PASI','4','app',0),('payable_salaries','67','app',0),('project_reference_in_tickets','1','app',0),('pusher_app_id','929038','app',0),('pusher_cluster','eu','app',0),('pusher_key','2cbc86a72bfa9a85b0e5','app',0),('pusher_secret','53077cbb420c5e79c8f6','app',0),('receivable_cheques','22','app',0),('rows_per_page','100','app',0),('salary_advances','67','app',0),('salary_expenses','67','app',0),('scrollbar','native','app',0),('send_bcc_to','daralemad.shades@gmail.com','app',0),('send_estimate_bcc_to','','app',0),('show_background_image_in_signin_page','yes','app',0),('show_logo_in_signin_page','yes','app',0),('show_recent_ticket_comments_at_the_top','1','app',0),('signin_page_background','','app',0),('site_logo','','app',0),('ticket_prefix','','app',0),('time_format','24_hours','app',0),('timezone','Asia/Muscat','app',0),('user_1_allowed_distance','100000','user',0),('user_1_dashboard','','user',0),('user_1_disable_push_notification','0','user',0),('user_1_hidden_topbar_menus','','user',0),('user_1_location','23.620058326708097,58.24233084570313','user',0),('user_1_notification_sound_volume','4','user',0),('user_1_personal_language','english','user',0),('user_10_dashboard','','user',0),('user_10_personal_language','english','user',0),('user_11_dashboard','','user',0),('user_2_dashboard','','user',0),('user_21_dashboard','','user',0),('user_21_personal_language','english','user',0),('user_23_dashboard','','user',0),('user_24_dashboard','','user',0),('user_24_personal_language','arabic','user',0),('user_25_dashboard','','user',0),('user_25_personal_language','english','user',0),('user_3_dashboard','','user',0),('user_36_dashboard','','user',0),('user_36_personal_language','arabic','user',0),('user_4_dashboard','','user',0),('user_5_allowed_distance','100000000','user',0),('user_5_dashboard','6','user',0),('user_5_disable_push_notification','1','user',0),('user_5_hidden_topbar_menus','','user',0),('user_5_location','23.673522614041882,57.680654820312505','user',0),('user_5_notification_sound_volume','7','user',0),('user_5_personal_language','english','user',0),('user_57_dashboard','','user',0),('user_57_personal_language','arabic','user',0),('user_59_dashboard','','user',0),('user_6_dashboard','','user',0),('user_6_personal_language','english','user',0),('user_60_dashboard','','user',0),('user_60_personal_language','arabic','user',0),('VAT_expense','4','app',0),('VAT_in','4','app',0),('VAT_out','4','app',0),('weekend','5,6','app',0);

--
-- Table structure for table `Dar_Alemadshipment_items`
--

CREATE TABLE `Dar_Alemadshipment_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `po_item_id` int(11) NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `shipment_id` int(11) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadshipment_items`
--

INSERT INTO `Dar_Alemadshipment_items` VALUES (1,6,6,23000,0,1,0),(2,4,7,15,0,2,0),(3,7,8,25,0,3,0),(4,8,9,25,0,4,0),(5,9,10,25,0,5,0),(6,1,4,2100,0,6,0),(7,3,5,1500,0,6,0),(8,11,12,5,0,7,0),(9,12,13,25,0,8,0),(10,13,14,5,0,9,0),(11,14,15,15,0,10,0),(12,15,16,20,0,10,0),(13,17,17,25,0,10,0),(14,18,18,40,0,10,0),(15,19,19,45,0,10,0),(16,21,20,25,0,10,0),(17,20,21,25,0,10,0),(18,22,22,25,0,10,0),(19,23,23,20,0,10,0),(20,25,24,20,0,10,0),(21,24,25,25,0,10,0),(22,26,26,15,0,10,0),(23,27,27,15,0,10,0),(24,28,28,15,0,10,0),(25,29,29,15,0,10,0),(26,30,30,10,0,10,0),(27,31,31,5,0,10,0),(28,32,32,15,0,10,0),(29,33,33,15,0,10,0),(30,34,34,5,0,10,0),(31,35,35,10,0,10,0),(32,36,36,5,0,10,0),(33,80,37,12,0,11,0),(34,68,38,60,0,11,0),(35,69,39,240,0,11,0),(36,56,40,36,0,11,0),(37,81,41,30,0,11,0),(38,80,64,2,0,12,0),(39,119,65,10,0,12,0),(40,117,66,40,0,12,0),(41,116,67,6,0,12,0),(42,118,68,5,0,12,0),(43,53,70,3,0,13,0),(44,120,71,60,0,14,0),(45,53,72,60,0,14,0),(46,121,73,100,0,14,0),(47,101,74,10,0,15,0),(48,120,75,20,0,15,0),(49,0,76,1,0,16,0),(50,0,77,1,0,17,0);

--
-- Table structure for table `Dar_Alemadshipments`
--

CREATE TABLE `Dar_Alemadshipments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `purchase_order_id` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL DEFAULT '0',
  `date` date NOT NULL,
  `invoice_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `invoice_date` date DEFAULT NULL,
  `delivery_note_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `delivery_note_date` date DEFAULT NULL,
  `status` enum('draft','approved') COLLATE utf8_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadshipments`
--

INSERT INTO `Dar_Alemadshipments` VALUES (1,6,1,'2022-01-18','5','2021-06-01','120','2021-06-30','approved','',0),(2,7,1,'2021-12-01','','2021-11-23','120','2022-01-11','approved','',0),(3,8,1,'2021-06-01','5','2021-06-05','5','2022-01-11','approved','',0),(4,9,1,'2021-06-01','5','2022-06-05','5','2022-01-11','approved','',0),(5,12,1,'2021-06-01','5','2021-06-05','5','2022-01-11',NULL,'',0),(6,5,1,'2021-06-01','2','2021-06-05','2','2021-07-01',NULL,'',0),(7,14,1,'2021-06-01','5','2021-06-05','5','2022-01-11',NULL,'',0),(8,15,1,'2021-06-01','5','2021-06-05','5','2022-01-11',NULL,'',0),(9,16,1,'2021-06-01','5','2021-06-05','5','2022-01-11',NULL,'',0),(10,18,1,'2021-06-01','اخر فاتور تم استلامها في المخزن من الانوان يوم 11-1-2022','2022-01-11','غير مدرجه','2022-01-11','approved','',0),(11,19,7,'2022-01-25','5387','2022-01-25','5388','2022-01-25','draft','',0),(12,23,7,'2022-01-18','5387','2022-01-25','5388','2022-01-25','approved','علي حساب مفتوح',0),(13,25,17,'2022-02-09','001','2022-02-10','0011','2022-02-10','approved','',0),(14,28,17,'2022-01-22','16720','2022-02-22','108012','2022-01-22','approved','#Stars line',0),(15,30,17,'2022-01-09','','0000-00-00','','0000-00-00','approved','',0),(16,31,17,'2022-01-01','','0000-00-00','','0000-00-00','approved','',0),(17,32,7,'2021-12-31','','0000-00-00','','0000-00-00','approved','',0);

--
-- Table structure for table `Dar_Alemadsocial_links`
--

CREATE TABLE `Dar_Alemadsocial_links` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `facebook` text COLLATE utf8_unicode_ci,
  `twitter` text COLLATE utf8_unicode_ci,
  `linkedin` text COLLATE utf8_unicode_ci,
  `googleplus` text COLLATE utf8_unicode_ci,
  `digg` text COLLATE utf8_unicode_ci,
  `youtube` text COLLATE utf8_unicode_ci,
  `pinterest` text COLLATE utf8_unicode_ci,
  `instagram` text COLLATE utf8_unicode_ci,
  `github` text COLLATE utf8_unicode_ci,
  `tumblr` text COLLATE utf8_unicode_ci,
  `vine` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadsocial_links`
--


--
-- Table structure for table `Dar_Alemadstock_adjustments`
--

CREATE TABLE `Dar_Alemadstock_adjustments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadstock_adjustments`
--

INSERT INTO `Dar_Alemadstock_adjustments` VALUES (1,81,350,'تقسيمها علي 7 سم متر  الكمية بالقطقة 5 بار 6 متر',0),(2,56,-33,'',0);

--
-- Table structure for table `Dar_Alemadsuppliers`
--

CREATE TABLE `Dar_Alemadsuppliers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `contact_name` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `alternative_phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency_symbol` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vat_number` text COLLATE utf8_unicode_ci,
  `note` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `account_id` int(11) NOT NULL DEFAULT '0',
  `advance_account_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadsuppliers`
--

INSERT INTO `Dar_Alemadsuppliers` VALUES (1,'استيراد من تركيه','','تركيا','','','','','2022-01-12','','96495400','','','','','',912,0,0),(2,'نجوم المدينة العربية للتجارة ش . م . م','تجارة مواد البناء وادوات الكهربائية وتمديداتها','','','','','','2022-01-23','','9793079 -92104073 -9','','','','','',913,0,0),(3,'نجمه للسراميك والاستثمار ش . م . م','بيع السيراميك والجرانيت و الرخام (السيراميك الايراني',' المعبيلة الصناعية شارع رقم : 10 بالقرب من كلية الخليج','','','','','2022-01-23','','9756483 _ 96954430','','','','','',914,0,0),(4,'طيف السحاب للتجاره و المقاولات','ادوات و مواد البناء و الورود الحديدية','المعبية الصناعية شارع رقم: 2 و 8 سلطنة عمان','','','','','2022-01-23','','93881779 - 99511092 ','المخزن : 24455824','','','','',915,0,0),(5,'السرايا الجديدة','','المعبيلة الصناعية ','','','','','2022-01-23','','97457959 -22076499','info@newsaray.com','','','','',916,0,0),(6,'Gulf company Glass','توريد وتركيب جميع انواع الزجاج','المعبيلة  ','','','','','2022-01-23','','99430398 -24450611 ف','','','','','',917,0,0),(7,'Ali & Yousif Trading (pipe steel)','بيع الحديد ستاستيل كاستل المونيوم ومواو البناء  وصناعة العازل الحراري والواح الصاج','','','','','','2022-01-23','',' 99331470 ','ضريبة القيمة المضافة','','','','',918,0,0),(8,'محمد رياض و شريكة  ش . م . م','الالمونيموم / الزجاج / الحديد/ سيراميك/ الالات / ادوات/ الصحية ','المعبيلة','','','','','2022-01-23','','25689882','','','','','',919,0,0),(9,'دولما DOLMA','الزجاج','المعبيلة الصناعية','','','','','2022-01-23','',' 94149494 -99704141','','','','','',920,0,0),(10,'الشركة هدايه لحديد الصلب ش . م . م','بيع حديد الصلب','المعبيلة','','','','','2022-01-23','','0096824464881 فاكس  ','','','','','',921,0,0),(11,'الساحة الذهبية المتحدة ش . م . م',' ','المعبيلة الصناعية','','','','','2022-01-23','','24264919 - 22043090','','','','','',922,0,0),(12,'السميم للتجارة ش . م . م','','روي مسقط','','','','','2022-01-23','','24814885','فاكس 24814885','','','','',923,0,0),(13,'مركز التزويد الصناعي ش . م . م','متور مولدات كبرسون  اسبيرات اجهزه المذكوره','مسقط سيتي سنتر','','','','','2022-01-23','','24467233','','','','','',924,0,0),(14,'روابي شافان الممزة للتجارة','تنظيف وتلميع السيارات','','','','','','2022-01-23','','99237833','','','','','',925,0,0),(15,'الوفاق لاعمال التجارية  ش . م . م','','سلطنة عمان','','','','','2022-01-23','','97643159','','','','','',926,0,0),(16,'الكوكب الاحمر الوطنية ش. م . م','','فرع المعبيلة ','','','','','2022-01-23','',' 92881046','','','','','',927,0,0),(17,'Al SHAMIL  ( Tents & sheds Tr. L.LC )','009660506264904','الامارت / الشارقة','','','','','2022-02-03','','009660506264904','','','','','',971,0,0);

--
-- Table structure for table `Dar_Alemadtask_status`
--

CREATE TABLE `Dar_Alemadtask_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `key_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadtask_status`
--

INSERT INTO `Dar_Alemadtask_status` VALUES (1,'To Do','to_do','#F9A52D',0,0),(2,'In progress','in_progress','#1672B9',1,0),(3,'Done','done','#00B393',2,0),(4,'holding','','#aab7b7',3,1),(5,'الاقرار الضريبي','','#83c340',4,1),(6,'قريبة','','#83c340',3,1);

--
-- Table structure for table `Dar_Alemadtasks`
--

CREATE TABLE `Dar_Alemadtasks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `milestone_id` int(11) NOT NULL DEFAULT '0',
  `assigned_to` int(11) NOT NULL,
  `deadline` date DEFAULT NULL,
  `labels` text COLLATE utf8_unicode_ci,
  `points` tinyint(4) NOT NULL DEFAULT '1',
  `status` enum('to_do','in_progress','done') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'to_do',
  `status_id` int(11) NOT NULL,
  `start_date` date DEFAULT NULL,
  `collaborators` text COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `recurring` tinyint(1) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `recurring_task_id` int(11) NOT NULL DEFAULT '0',
  `no_of_cycles_completed` int(11) NOT NULL DEFAULT '0',
  `created_date` date NOT NULL,
  `next_recurring_date` date DEFAULT NULL,
  `reminder_date` date NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `deleted` tinyint(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadtasks`
--

INSERT INTO `Dar_Alemadtasks` VALUES (1,'عمل تقوية','عمل دعامات للمنتج حسب اتفاق الزبون',2,0,57,'2022-02-15','',1,'to_do',1,'2022-02-01','',0,0,0,'',0,0,0,'2022-02-01',NULL,'0000-00-00',0,0);

--
-- Table structure for table `Dar_Alemadtaxes`
--

CREATE TABLE `Dar_Alemadtaxes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` tinytext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `percentage` double NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Dar_Alemadtaxes`
--

INSERT INTO `Dar_Alemadtaxes` VALUES (1,'VAT (5%)',5,0);

--
-- Table structure for table `Dar_Alemadteam`
--

CREATE TABLE `Dar_Alemadteam` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `members` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadteam`
--


--
-- Table structure for table `Dar_Alemadteam_member_job_info`
--

CREATE TABLE `Dar_Alemadteam_member_job_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `date_of_hire` date DEFAULT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  `salary` double NOT NULL DEFAULT '0',
  `salary_term` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `working_hours` int(11) DEFAULT NULL,
  `yearly_leaves` int(11) DEFAULT NULL,
  `housing` float DEFAULT '0',
  `transportation` float DEFAULT '0',
  `telephone` float DEFAULT '0',
  `utility` float DEFAULT '0',
  `national` tinyint(4) DEFAULT '0',
  `pasi` tinyint(4) DEFAULT '1',
  `bank_title` text COLLATE utf8_unicode_ci,
  `account_title` text COLLATE utf8_unicode_ci,
  `account_no` text COLLATE utf8_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadteam_member_job_info`
--

INSERT INTO `Dar_Alemadteam_member_job_info` VALUES (5,36,'2022-01-05',0,250,NULL,8,30,0,0,0,0,0,1,'bank_muscat','',''),(6,37,'2021-02-13',0,0,NULL,10,6,0,0,0,0,0,1,NULL,NULL,NULL),(7,38,'2021-01-19',0,0,NULL,10,6,0,0,0,0,0,1,NULL,NULL,NULL),(8,39,'2021-02-20',0,0,NULL,10,6,0,0,0,0,0,1,NULL,NULL,NULL),(9,40,'2021-01-19',0,0,NULL,10,6,0,0,0,0,0,1,NULL,NULL,NULL),(10,41,'2021-02-02',0,0,NULL,10,6,0,0,0,0,0,1,NULL,NULL,NULL),(11,42,'2021-01-19',0,150,NULL,0,0,0,0,0,0,0,1,'bank_muscat','',''),(12,43,'2021-02-20',0,0,NULL,0,0,0,0,0,0,0,1,NULL,NULL,NULL),(13,44,'0000-00-00',0,200,NULL,0,0,0,0,0,0,0,1,'bank_muscat','',''),(14,45,'2016-05-03',0,0,NULL,0,0,0,0,0,0,0,1,NULL,NULL,NULL),(15,46,'2016-08-21',0,160,NULL,0,0,0,0,0,0,0,1,'bank_muscat','abdul rehman ','0203051381750018'),(16,47,'2017-01-01',0,160,NULL,0,0,0,0,0,0,0,1,'bank_muscat','andra singh','0203051381540013'),(17,48,'2018-09-07',0,500,NULL,0,0,0,0,0,0,0,1,'bank_muscat','',''),(18,49,'0216-05-10',0,140,NULL,0,0,0,0,0,0,0,1,'bank_muscat','',''),(19,50,'2021-03-21',0,150,NULL,0,0,0,0,0,0,0,1,'bank_muscat','',''),(20,51,'2021-02-06',0,0,NULL,0,0,0,0,0,0,0,1,NULL,NULL,NULL),(21,52,'2021-02-13',0,0,NULL,0,0,0,0,0,0,0,1,NULL,NULL,NULL),(22,53,'2021-03-21',0,120,NULL,9,6,0,0,0,0,0,1,'bank_muscat','',''),(23,54,'2021-02-06',0,0,NULL,9,6,0,0,0,0,0,1,NULL,NULL,NULL),(24,55,'2021-02-13',0,0,NULL,9,6,0,0,0,0,0,1,NULL,NULL,NULL),(25,56,'2018-09-13',0,0,NULL,9,6,0,0,0,0,0,1,NULL,NULL,NULL),(26,57,'2021-01-01',0,350,NULL,9,6,0,0,0,0,0,1,NULL,NULL,NULL),(27,58,'0000-00-00',0,700,NULL,0,0,0,0,0,0,0,1,NULL,NULL,NULL),(28,59,'0000-00-00',0,0,NULL,0,0,0,0,0,0,0,1,NULL,NULL,NULL),(29,60,'0000-00-00',0,0,NULL,9,6,0,0,0,0,0,1,NULL,NULL,NULL),(30,61,'0000-00-00',0,0,NULL,9,6,0,0,0,0,0,1,NULL,NULL,NULL);

--
-- Table structure for table `Dar_Alemadticket_comments`
--

CREATE TABLE `Dar_Alemadticket_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadticket_comments`
--


--
-- Table structure for table `Dar_Alemadticket_types`
--

CREATE TABLE `Dar_Alemadticket_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadticket_types`
--

INSERT INTO `Dar_Alemadticket_types` VALUES (1,'General Support',0),(2,'One way',0),(3,'Two way',0);

--
-- Table structure for table `Dar_Alemadtickets`
--

CREATE TABLE `Dar_Alemadtickets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `ticket_type_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `status` enum('new','client_replied','open','closed') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'new',
  `last_activity_at` datetime DEFAULT NULL,
  `assigned_to` int(11) NOT NULL DEFAULT '0',
  `creator_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `creator_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `labels` text COLLATE utf8_unicode_ci,
  `task_id` int(11) NOT NULL,
  `closed_at` datetime NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadtickets`
--


--
-- Table structure for table `Dar_Alemadto_do`
--

CREATE TABLE `Dar_Alemadto_do` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `labels` text COLLATE utf8_unicode_ci,
  `status` enum('to_do','done') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'to_do',
  `start_date` date DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Dar_Alemadto_do`
--

INSERT INTO `Dar_Alemadto_do` VALUES (1,36,'2022-01-30 15:45:55','الاقرار الضريبي','','','done',NULL,0),(2,1,'2022-02-01 18:37:32','عمل تأمين للشركة','','','to_do',NULL,0);

--
-- Table structure for table `Dar_Alemadtransactions`
--

CREATE TABLE `Dar_Alemadtransactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `type` text NOT NULL,
  `is_manual` tinyint(1) NOT NULL DEFAULT '0',
  `reference` text,
  `bank_cash` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `Dar_Alemadtransactions`
--

INSERT INTO `Dar_Alemadtransactions` VALUES (1,'2022-01-12','Invoice: 1#1',0,NULL,0,0),(2,'2022-01-12','Invoice Inventory: 1#1',0,NULL,0,0),(3,'2021-06-01','Automatic Purchase Payment:  أمر شراء #3',0,NULL,0,1),(4,'2021-06-01','Automatic Purchase Payment:  أمر شراء #3',0,NULL,0,1),(5,'2022-01-13','Invoice Payment Received: الفاتورة #2',0,NULL,0,1),(6,'2022-01-17','Purchase Order:  أمر شراء #5',0,NULL,0,0),(7,'2022-01-17','Purchase Order:  أمر شراء #6',0,NULL,0,0),(8,'2022-01-17','Purchase Order:  أمر شراء #7',0,NULL,0,0),(9,'2022-01-17','Purchase Order:  أمر شراء #8',0,NULL,0,0),(10,'2022-01-17','Purchase Order:  أمر شراء #9',0,NULL,0,0),(11,'2022-01-17','Purchase Order:  أمر شراء #10',0,NULL,0,0),(12,'2022-01-17','Automatic General Expense: Cash on hand',0,NULL,0,1),(13,'2022-01-17','Purchase Order:  أمر شراء #11',0,NULL,0,0),(14,'2022-01-17','Purchase Order:  أمر شراء #12',0,NULL,0,0),(15,'2022-01-17','Purchase Order:  أمر شراء #13',0,NULL,0,0),(16,'2022-01-17','Purchase Order:  أمر شراء #14',0,NULL,0,0),(17,'2022-01-17','Purchase Order:  أمر شراء #14',0,NULL,0,0),(18,'2022-01-17','Purchase Order:  أمر شراء #14',0,NULL,0,0),(19,'2022-01-17','Purchase Order:  أمر شراء #14',0,NULL,0,0),(20,'2022-01-17','Purchase Order:  أمر شراء #15',0,NULL,0,0),(21,'2022-01-17','Purchase Order:  أمر شراء #16',0,NULL,0,0),(22,'2022-01-17','Purchase Order:  أمر شراء #18',0,NULL,0,0),(23,'2022-01-19','Automatic General Expense: Cash on hand',0,NULL,0,1),(24,'2022-01-19','Automatic General Expense: Cash on hand',0,NULL,0,1),(25,'2022-01-23','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(26,'2022-01-23','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(27,'2022-01-23','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(28,'2022-01-23','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(29,'2022-01-23','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(30,'2022-01-23','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(31,'2022-01-23','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(32,'2022-01-23','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(33,'2022-01-23','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(34,'2022-01-23','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(35,'2022-01-23','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(36,'2022-01-23','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(37,'2022-01-23','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(38,'2022-01-25','Purchase Order:  أمر شراء #19',0,NULL,0,0),(39,'2022-01-26','Purchase Return: عودة شراء #2',0,NULL,0,0),(40,'2022-01-26','Purchase Return Refund: عودة شراء #2',0,NULL,0,0),(41,'2022-01-27','payment_voucher',1,'منصرفات الوقود عامة',0,0),(42,'2022-01-29','payment_voucher',1,'',0,0),(43,'2022-01-29','payment_voucher',1,'شركة  علي و يوسف',0,0),(44,'2022-01-26','Automatic General Expense: Bank',0,NULL,0,1),(45,'2022-01-26','Invoice Payment Received: الفاتورة #3',0,NULL,0,1),(46,'2022-01-01','Automatic General Expense: Cash on hand',0,NULL,0,1),(47,'2022-01-31','Invoice: الفاتورة #4',0,NULL,0,0),(48,'2022-01-31','Invoice Inventory: الفاتورة #4',0,NULL,0,0),(49,'2022-02-01','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(50,'2022-02-02','Invoice: الفاتورة #6',0,NULL,0,0),(51,'2022-01-26','Invoice: INVOICE #3',0,NULL,0,0),(52,'2022-01-26','Invoice Inventory: INVOICE #3',0,NULL,0,0),(53,'2022-01-26','Invoice Payment Received: INVOICE #3',0,NULL,0,0),(54,'2022-02-03','Invoice: الفاتورة #9',0,NULL,0,0),(55,'2022-02-03','Invoice Inventory: الفاتورة #9',0,NULL,0,0),(56,'2022-02-03','Invoice: الفاتورة #10',0,NULL,0,0),(57,'2022-02-03','Invoice Payment Received: الفاتورة #10',0,NULL,0,0),(58,'2022-02-05','Invoice: الفاتورة #12',0,NULL,0,0),(59,'2022-01-22','Invoice: الفاتورة #13',0,NULL,0,0),(60,'2022-01-22','Invoice Payment Received: الفاتورة #13',0,NULL,0,0),(61,'2022-01-29','Invoice: الفاتورة #14',0,NULL,0,0),(62,'2022-01-29','Invoice Payment Received: الفاتورة #14',0,NULL,0,0),(63,'2022-01-04','Invoice: الفاتورة #15',0,NULL,0,0),(64,'2022-01-04','Invoice Payment Received: الفاتورة #15',0,NULL,0,0),(65,'2022-02-01','Invoice Payment Received: الفاتورة #15',0,NULL,0,0),(66,'2022-02-04','Invoice Payment Received: الفاتورة #15',0,NULL,0,0),(67,'2022-01-23','Invoice: الفاتورة #16',0,NULL,0,0),(68,'2022-01-23','Invoice Payment Received: الفاتورة #16',0,NULL,0,0),(69,'2022-02-05','Automatic General Expense: المبلغ في اليد',0,NULL,0,1),(70,'2022-01-06','Invoice: الفاتورة #18',0,NULL,0,0),(71,'2022-01-06','Invoice Inventory: الفاتورة #18',0,NULL,0,0),(72,'2022-01-06','Invoice Payment Received: الفاتورة #18',0,NULL,0,1),(73,'2022-01-06','Invoice: الفاتورة #19',0,NULL,0,0),(74,'2022-01-06','Invoice Inventory: الفاتورة #19',0,NULL,0,0),(75,'2022-01-06','Invoice Payment Received: الفاتورة #19',0,NULL,0,0),(76,'2022-01-26','Invoice: الفاتورة #20',0,NULL,0,0),(77,'2022-01-26','Invoice Inventory: الفاتورة #20',0,NULL,0,0),(78,'2022-01-26','Invoice Payment Received: الفاتورة #20',0,NULL,0,0),(79,'2022-01-12','Purchase Order:  أمر شراء #23',0,NULL,0,0),(80,'2022-02-01','Automatic Purchase Payment:  أمر شراء #23',0,NULL,0,1),(81,'2021-12-01','Purchase Order:  أمر شراء #24',0,NULL,0,0),(82,'2022-02-08','Purchase Order:  أمر شراء #25',0,NULL,0,0),(83,'2022-01-22','Purchase Order: PURCHASE ORDER #26',0,NULL,0,0),(84,'2022-01-22','Purchase Order: PURCHASE ORDER #28',0,NULL,0,0),(85,'2022-01-09','Purchase Order: PURCHASE ORDER #29',0,NULL,0,0),(86,'2022-01-09','Purchase Order: PURCHASE ORDER #30',0,NULL,0,0),(87,'2021-12-31','Purchase Order: PURCHASE ORDER #31',0,NULL,0,0),(88,'2021-12-30','Purchase Order: PURCHASE ORDER #32',0,NULL,0,0),(89,'2022-02-08','Purchase Return: PURCHASE RETURN #3',0,NULL,0,0),(90,'2022-02-08','Purchase Return Refund: PURCHASE RETURN #3',0,NULL,0,0),(91,'2021-12-31','Purchase Return: PURCHASE RETURN #4',0,NULL,0,0),(92,'2021-12-31','Purchase Return Refund: PURCHASE RETURN #4',0,NULL,0,0);

--
-- Table structure for table `Delete_Esamaccounts`
--

CREATE TABLE `Delete_Esamaccounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `acc_name` varchar(255) NOT NULL,
  `acc_code` varchar(255) DEFAULT NULL,
  `acc_parent` int(11) NOT NULL,
  `is_primary` tinyint(1) NOT NULL DEFAULT '0',
  `is_inactive` int(11) NOT NULL DEFAULT '0',
  `acc_description` text,
  `module_id` int(11) DEFAULT '0',
  `module` enum('suppliers','team_members','clients','expenses','assets') DEFAULT NULL,
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=78 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `Delete_Esamaccounts`
--

INSERT INTO `Delete_Esamaccounts` VALUES (1,'Assets','1',0,1,0,NULL,NULL,NULL,0),(2,'Liabilities','2',0,1,0,NULL,0,NULL,0),(3,'Equity','3',0,1,0,NULL,0,NULL,0),(4,'Expenses','4',0,1,0,NULL,0,NULL,0),(5,'Income','5',0,1,0,NULL,0,NULL,0),(6,'Others','6',0,1,0,NULL,0,NULL,0),(7,'Receviable','1-1',1,1,0,NULL,0,NULL,0),(8,'Bank and Cash','1-2',1,1,0,NULL,0,NULL,0),(9,'Current Assets','1-3',1,1,0,NULL,0,NULL,0),(10,'Non Current Assets','1-4',1,1,0,NULL,0,NULL,0),(11,'Prepayments','1-5',1,1,0,NULL,0,NULL,0),(12,'Fixed Assets','1-6',1,1,0,NULL,0,NULL,0),(13,'Payable','2-1',2,1,0,NULL,0,NULL,0),(14,'Credit Card','2-2',2,1,0,NULL,0,NULL,0),(15,'Current Liabilities','2-3',2,1,0,NULL,0,NULL,0),(18,'Non Current Liabilities','2-4',2,1,0,NULL,0,NULL,0),(19,'Equity','3-1',3,1,0,NULL,0,NULL,0),(20,'Current Year Earnings','3-2',3,1,0,NULL,0,NULL,0),(21,'Expenses','4-1',4,1,0,NULL,0,NULL,0),(22,'Depreciation','4-2',4,1,0,NULL,0,NULL,0),(23,'Cost of Revenue','4-3',4,1,0,NULL,0,NULL,0),(24,'Income','5-1',5,1,0,NULL,0,NULL,0),(25,'Other Income','5-2',5,1,0,NULL,0,NULL,0),(26,'Off Balance Sheet','6-1',6,1,0,NULL,0,NULL,0),(38,'Advance Payments','2-5',2,1,0,NULL,0,NULL,0),(77,'Retained Earnings A/c','3-2-1',20,0,0,'',0,'clients',0);

--
-- Table structure for table `Delete_Esamactivity_logs`
--

CREATE TABLE `Delete_Esamactivity_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `action` enum('created','updated','deleted') COLLATE utf8_unicode_ci NOT NULL,
  `log_type` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `log_type_title` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `log_type_id` int(11) NOT NULL DEFAULT '0',
  `changes` mediumtext COLLATE utf8_unicode_ci,
  `log_for` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `log_for_id` int(11) NOT NULL DEFAULT '0',
  `log_for2` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
  `log_for_id2` int(11) DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamactivity_logs`
--


--
-- Table structure for table `Delete_Esamannouncements`
--

CREATE TABLE `Delete_Esamannouncements` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `created_by` int(11) NOT NULL,
  `share_with` mediumtext COLLATE utf8_unicode_ci,
  `created_at` datetime NOT NULL,
  `files` text COLLATE utf8_unicode_ci NOT NULL,
  `read_by` mediumtext COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `created_by` (`created_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamannouncements`
--


--
-- Table structure for table `Delete_Esamattendance`
--

CREATE TABLE `Delete_Esamattendance` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `status` enum('incomplete','pending','approved','rejected','deleted') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'incomplete',
  `user_id` int(11) NOT NULL,
  `in_time` datetime NOT NULL,
  `out_time` datetime DEFAULT NULL,
  `checked_by` int(11) DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `checked_at` datetime DEFAULT NULL,
  `reject_reason` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `checked_by` (`checked_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamattendance`
--


--
-- Table structure for table `Delete_Esamchecklist_items`
--

CREATE TABLE `Delete_Esamchecklist_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `is_checked` int(11) NOT NULL DEFAULT '0',
  `task_id` int(11) NOT NULL DEFAULT '0',
  `sort` int(11) NOT NULL DEFAULT '0',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamchecklist_items`
--


--
-- Table structure for table `Delete_Esamci_sessions`
--

CREATE TABLE `Delete_Esamci_sessions` (
  `id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `ip_address` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
  `timestamp` int(10) unsigned NOT NULL DEFAULT '0',
  `data` blob NOT NULL,
  KEY `ci_sessions_timestamp` (`timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamci_sessions`
--

INSERT INTO `Delete_Esamci_sessions` VALUES ('77a1c3d3864f4a45c6799ce29a5f39992c9f5e8a','5.37.196.127',1635758922,''),('3a1b4bf2c2672801d68e305e147faf79591ef00f','5.37.196.127',1635758943,''),('2a87ab66ad783a027fb1fce76d0c016e28177c23','5.37.196.127',1635773327,_binary '__ci_last_regenerate|i:1635761026;user_id|s:1:\"1\";');

--
-- Table structure for table `Delete_Esamclient_groups`
--

CREATE TABLE `Delete_Esamclient_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamclient_groups`
--


--
-- Table structure for table `Delete_Esamclients`
--

CREATE TABLE `Delete_Esamclients` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date NOT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency_symbol` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `starred_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `group_ids` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `is_lead` tinyint(1) NOT NULL DEFAULT '0',
  `lead_status_id` int(11) NOT NULL,
  `owner_id` int(11) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `lead_source_id` int(11) NOT NULL,
  `last_lead_status` text COLLATE utf8_unicode_ci NOT NULL,
  `client_migration_date` date NOT NULL,
  `vat_number` text COLLATE utf8_unicode_ci,
  `currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
  `disable_online_payment` tinyint(1) NOT NULL DEFAULT '0',
  `geo_location` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `account_id` int(11) NOT NULL DEFAULT '0',
  `advance_account_id` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamclients`
--


--
-- Table structure for table `Delete_Esamcontacts`
--

CREATE TABLE `Delete_Esamcontacts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `alternative_phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `job_title` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `created_date` date NOT NULL,
  `created_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamcontacts`
--


--
-- Table structure for table `Delete_Esamcustom_field_values`
--

CREATE TABLE `Delete_Esamcustom_field_values` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `related_to_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `related_to_id` int(11) NOT NULL,
  `custom_field_id` int(11) NOT NULL,
  `value` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamcustom_field_values`
--


--
-- Table structure for table `Delete_Esamcustom_fields`
--

CREATE TABLE `Delete_Esamcustom_fields` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `placeholder` text COLLATE utf8_unicode_ci NOT NULL,
  `example_variable_name` text COLLATE utf8_unicode_ci,
  `options` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `field_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `related_to` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `show_in_table` tinyint(1) NOT NULL DEFAULT '0',
  `show_in_invoice` tinyint(1) NOT NULL DEFAULT '0',
  `show_in_estimate` tinyint(1) NOT NULL DEFAULT '0',
  `visible_to_admins_only` tinyint(1) NOT NULL DEFAULT '0',
  `hide_from_clients` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamcustom_fields`
--


--
-- Table structure for table `Delete_Esamcustom_widgets`
--

CREATE TABLE `Delete_Esamcustom_widgets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci,
  `content` text COLLATE utf8_unicode_ci,
  `show_title` tinyint(1) NOT NULL DEFAULT '0',
  `show_border` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamcustom_widgets`
--


--
-- Table structure for table `Delete_Esamdashboards`
--

CREATE TABLE `Delete_Esamdashboards` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci,
  `data` text COLLATE utf8_unicode_ci,
  `color` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamdashboards`
--


--
-- Table structure for table `Delete_Esamdelivery_note_items`
--

CREATE TABLE `Delete_Esamdelivery_note_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) DEFAULT '0',
  `invoice_item_id` int(11) DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `delivery_note_id` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamdelivery_note_items`
--


--
-- Table structure for table `Delete_Esamdelivery_notes`
--

CREATE TABLE `Delete_Esamdelivery_notes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `invoice_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `project_id` int(11) NOT NULL DEFAULT '0',
  `delivery_note_date` date NOT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `status` enum('draft','approved','request_approval') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamdelivery_notes`
--


--
-- Table structure for table `Delete_Esamemail_templates`
--

CREATE TABLE `Delete_Esamemail_templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `template_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `email_subject` text COLLATE utf8_unicode_ci NOT NULL,
  `default_message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `custom_message` mediumtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamemail_templates`
--


--
-- Table structure for table `Delete_Esamenteries`
--

CREATE TABLE `Delete_Esamenteries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `trans_id` int(11) NOT NULL,
  `account` int(11) NOT NULL,
  `type` enum('dr','cr') NOT NULL,
  `amount` double NOT NULL,
  `narration` text NOT NULL,
  `branch_id` int(11) DEFAULT '0',
  `concerned_person` int(11) DEFAULT '0',
  `unit` text,
  `reference` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `Delete_Esamenteries`
--


--
-- Table structure for table `Delete_Esamestimate_forms`
--

CREATE TABLE `Delete_Esamestimate_forms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL,
  `assigned_to` int(11) NOT NULL,
  `public` tinyint(1) NOT NULL DEFAULT '0',
  `enable_attachment` tinyint(4) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamestimate_forms`
--


--
-- Table structure for table `Delete_Esamestimate_items`
--

CREATE TABLE `Delete_Esamestimate_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `tax_id` int(11) DEFAULT '0',
  `tax_id2` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamestimate_items`
--


--
-- Table structure for table `Delete_Esamestimate_requests`
--

CREATE TABLE `Delete_Esamestimate_requests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `estimate_form_id` int(11) NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `client_id` int(11) NOT NULL,
  `lead_id` int(11) NOT NULL,
  `assigned_to` int(11) NOT NULL,
  `status` enum('new','processing','hold','canceled','estimated') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'new',
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamestimate_requests`
--


--
-- Table structure for table `Delete_Esamestimates`
--

CREATE TABLE `Delete_Esamestimates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `estimate_request_id` int(11) NOT NULL DEFAULT '0',
  `estimate_date` date NOT NULL,
  `valid_until` date NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `last_email_sent_date` date DEFAULT NULL,
  `status` enum('draft','sent','accepted','declined','approved','request_approval') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `discount_type` enum('before_tax','after_tax') COLLATE utf8_unicode_ci NOT NULL,
  `discount_amount` double NOT NULL,
  `discount_amount_type` enum('percentage','fixed_amount') COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamestimates`
--


--
-- Table structure for table `Delete_Esamevents`
--

CREATE TABLE `Delete_Esamevents` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `start_time` time DEFAULT NULL,
  `end_time` time DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `location` mediumtext COLLATE utf8_unicode_ci,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci NOT NULL,
  `share_with` mediumtext COLLATE utf8_unicode_ci,
  `editable_google_event` tinyint(1) NOT NULL DEFAULT '0',
  `google_event_id` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  `color` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `recurring` int(1) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `last_start_date` date DEFAULT NULL,
  `recurring_dates` longtext COLLATE utf8_unicode_ci NOT NULL,
  `confirmed_by` text COLLATE utf8_unicode_ci NOT NULL,
  `rejected_by` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `created_by` (`created_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamevents`
--


--
-- Table structure for table `Delete_Esamexpense_categories`
--

CREATE TABLE `Delete_Esamexpense_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `account_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamexpense_categories`
--


--
-- Table structure for table `Delete_Esamexpenses`
--

CREATE TABLE `Delete_Esamexpenses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `expense_date` date NOT NULL,
  `category_id` int(11) NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `amount` double NOT NULL,
  `payment_mode` enum('bank','cash_on_hand','cheque','reimbursement','pt_cash') COLLATE utf8_unicode_ci NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` int(11) DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `client_id` int(11) NOT NULL DEFAULT '0',
  `status` enum('draft','request_approval','approved','rejected') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `transaction_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamexpenses`
--


--
-- Table structure for table `Delete_Esamgeneral_files`
--

CREATE TABLE `Delete_Esamgeneral_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` text COLLATE utf8_unicode_ci NOT NULL,
  `file_id` text COLLATE utf8_unicode_ci,
  `service_type` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `file_size` double NOT NULL,
  `created_at` datetime NOT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `eroom_id` int(11) NOT NULL DEFAULT '0',
  `uploaded_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamgeneral_files`
--


--
-- Table structure for table `Delete_Esamhelp_articles`
--

CREATE TABLE `Delete_Esamhelp_articles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `category_id` int(11) NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `files` text COLLATE utf8_unicode_ci NOT NULL,
  `total_views` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamhelp_articles`
--


--
-- Table structure for table `Delete_Esamhelp_categories`
--

CREATE TABLE `Delete_Esamhelp_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `type` enum('help','knowledge_base') COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamhelp_categories`
--


--
-- Table structure for table `Delete_Esaminternal_transactions`
--

CREATE TABLE `Delete_Esaminternal_transactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `from_employee` int(11) NOT NULL,
  `to_employee` int(11) NOT NULL,
  `amount` float(10,3) NOT NULL,
  `note` text COLLATE utf8_bin NOT NULL,
  `status` enum('draft','approved') COLLATE utf8_bin NOT NULL DEFAULT 'draft',
  `transaction_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Dumping data for table `Delete_Esaminternal_transactions`
--


--
-- Table structure for table `Delete_Esaminvoice_items`
--

CREATE TABLE `Delete_Esaminvoice_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `invoice_id` int(11) NOT NULL,
  `tax_id` int(11) DEFAULT '0',
  `tax_id2` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esaminvoice_items`
--


--
-- Table structure for table `Delete_Esaminvoice_payments`
--

CREATE TABLE `Delete_Esaminvoice_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `amount` double NOT NULL,
  `payment_date` date NOT NULL,
  `payment_method_id` int(11) NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `invoice_id` int(11) NOT NULL,
  `status` enum('draft','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `transaction_id` tinytext COLLATE utf8_unicode_ci,
  `account_transaction_id` int(11) NOT NULL DEFAULT '0',
  `advance_transaction_id` int(11) NOT NULL DEFAULT '0',
  `created_by` int(11) DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `id_2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esaminvoice_payments`
--


--
-- Table structure for table `Delete_Esaminvoices`
--

CREATE TABLE `Delete_Esaminvoices` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `bill_date` date NOT NULL,
  `due_date` date NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `labels` text COLLATE utf8_unicode_ci,
  `last_email_sent_date` date DEFAULT NULL,
  `status` enum('draft','not_paid','cancelled') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `delivery_status` enum('delivered','not_delivered') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_delivered',
  `approval_status` enum('not_approved','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_approved',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `recurring` tinyint(4) NOT NULL DEFAULT '0',
  `recurring_invoice_id` int(11) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `next_recurring_date` date DEFAULT NULL,
  `no_of_cycles_completed` int(11) NOT NULL DEFAULT '0',
  `due_reminder_date` date DEFAULT NULL,
  `recurring_reminder_date` date DEFAULT NULL,
  `discount_amount` double NOT NULL,
  `discount_amount_type` enum('percentage','fixed_amount') COLLATE utf8_unicode_ci NOT NULL,
  `discount_type` enum('before_tax','after_tax') COLLATE utf8_unicode_ci NOT NULL,
  `cancelled_at` datetime DEFAULT NULL,
  `cancelled_by` int(11) NOT NULL,
  `revised` int(11) NOT NULL,
  `transaction_id` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esaminvoices`
--


--
-- Table structure for table `Delete_Esamitem_categories`
--

CREATE TABLE `Delete_Esamitem_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamitem_categories`
--


--
-- Table structure for table `Delete_Esamitems`
--

CREATE TABLE `Delete_Esamitems` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `cost` double NOT NULL,
  `rate` double NOT NULL,
  `category_id` int(11) NOT NULL,
  `item_type` enum('product','service') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'product',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamitems`
--


--
-- Table structure for table `Delete_Esamlead_source`
--

CREATE TABLE `Delete_Esamlead_source` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamlead_source`
--

INSERT INTO `Delete_Esamlead_source` VALUES (1,'Google',1,0),(2,'Facebook',2,0),(3,'Twitter',3,0),(4,'Youtube',4,0),(5,'Elsewhere',5,0);

--
-- Table structure for table `Delete_Esamlead_status`
--

CREATE TABLE `Delete_Esamlead_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamlead_status`
--

INSERT INTO `Delete_Esamlead_status` VALUES (1,'New','#f1c40f',0,0),(2,'Qualified','#2d9cdb',1,0),(3,'Discussion','#29c2c2',2,0),(4,'Negotiation','#2d9cdb',3,0),(5,'Won','#83c340',4,0),(6,'Lost','#e74c3c',5,0);

--
-- Table structure for table `Delete_Esamleads`
--

CREATE TABLE `Delete_Esamleads` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `first_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `last_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date NOT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamleads`
--


--
-- Table structure for table `Delete_Esamleave_applications`
--

CREATE TABLE `Delete_Esamleave_applications` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `leave_type_id` int(11) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `total_hours` decimal(7,2) NOT NULL,
  `total_days` decimal(5,2) NOT NULL,
  `applicant_id` int(11) NOT NULL,
  `reason` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('pending','approved','rejected','canceled') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending',
  `created_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `checked_at` datetime DEFAULT NULL,
  `checked_by` int(11) NOT NULL DEFAULT '0',
  `paid_unpaid` tinyint(1) DEFAULT '1',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `leave_type_id` (`leave_type_id`),
  KEY `user_id` (`applicant_id`),
  KEY `checked_by` (`checked_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamleave_applications`
--


--
-- Table structure for table `Delete_Esamleave_types`
--

CREATE TABLE `Delete_Esamleave_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `max_allowed` int(11) DEFAULT '1',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamleave_types`
--

INSERT INTO `Delete_Esamleave_types` VALUES (1,'Casual Leave','active','#83c340','',1,0),(2,'Annual Leave','active','#83c340','',1,0),(3,'Emergency leave','active','#29c2c2','',1,0),(4,'Eid Vacation','active','#83c340','',1,0);

--
-- Table structure for table `Delete_Esamloans`
--

CREATE TABLE `Delete_Esamloans` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `amount` double DEFAULT NULL,
  `date` date DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamloans`
--


--
-- Table structure for table `Delete_Esammessages`
--

CREATE TABLE `Delete_Esammessages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Untitled',
  `message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `from_user_id` int(11) NOT NULL,
  `to_user_id` int(11) NOT NULL,
  `status` enum('unread','read') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'unread',
  `message_id` int(11) NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `files` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted_by_users` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `message_from` (`from_user_id`),
  KEY `message_to` (`to_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esammessages`
--


--
-- Table structure for table `Delete_Esammilestones`
--

CREATE TABLE `Delete_Esammilestones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL,
  `due_date` date NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esammilestones`
--


--
-- Table structure for table `Delete_Esamnotes`
--

CREATE TABLE `Delete_Esamnotes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `client_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci,
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `is_public` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamnotes`
--


--
-- Table structure for table `Delete_Esamnotification_settings`
--

CREATE TABLE `Delete_Esamnotification_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `event` varchar(250) NOT NULL,
  `category` varchar(50) NOT NULL,
  `enable_email` int(1) NOT NULL DEFAULT '0',
  `enable_web` int(1) NOT NULL DEFAULT '0',
  `notify_to_team` text NOT NULL,
  `notify_to_team_members` text NOT NULL,
  `notify_to_terms` text NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `event` (`event`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Delete_Esamnotification_settings`
--

INSERT INTO `Delete_Esamnotification_settings` VALUES (1,'project_created','project',0,1,'1','5','client_primary_contact,client_all_contacts',1,0),(2,'project_deleted','project',0,1,'1','5','project_members,client_primary_contact,client_all_contacts',2,0),(3,'project_task_created','project',0,1,'','5','project_members,task_assignee',3,0),(4,'project_task_updated','project',0,1,'','','task_assignee',4,0),(5,'project_task_assigned','project',0,1,'','','task_assignee',5,0),(7,'project_task_started','project',0,1,'','5','project_members,client_primary_contact,client_all_contacts',7,0),(8,'project_task_finished','project',0,0,'','','',8,0),(9,'project_task_reopened','project',0,0,'','','',9,0),(10,'project_task_deleted','project',0,1,'','','task_assignee',10,0),(11,'project_task_commented','project',0,1,'','','task_assignee',11,0),(12,'project_member_added','project',0,1,'','','project_members',12,0),(13,'project_member_deleted','project',0,1,'','','project_members',13,0),(14,'project_file_added','project',0,1,'','','project_members',14,0),(15,'project_file_deleted','project',0,1,'','','project_members',15,0),(16,'project_file_commented','project',0,1,'','','project_members',16,0),(17,'project_comment_added','project',0,1,'','','project_members',17,0),(18,'project_comment_replied','project',0,1,'','','project_members,comment_creator',18,0),(19,'project_customer_feedback_added','project',0,1,'','','project_members',19,0),(20,'project_customer_feedback_replied','project',0,1,'','','project_members,comment_creator',20,0),(21,'client_signup','client',0,0,'','','',21,0),(22,'invoice_online_payment_received','invoice',0,0,'','','',22,0),(23,'leave_application_submitted','leave',0,0,'','','',23,0),(24,'leave_approved','leave',0,1,'','','leave_applicant',24,0),(25,'leave_assigned','leave',0,1,'','','leave_applicant',25,0),(26,'leave_rejected','leave',0,1,'','','leave_applicant',26,0),(27,'leave_canceled','leave',0,0,'','','',27,0),(28,'ticket_created','ticket',0,1,'','6,7,5,11,12,1','client_all_contacts',28,0),(29,'ticket_commented','ticket',0,1,'','','client_primary_contact,ticket_creator',29,0),(30,'ticket_closed','ticket',0,1,'','','client_primary_contact,ticket_creator',30,0),(31,'ticket_reopened','ticket',0,1,'','','client_primary_contact,ticket_creator',31,0),(32,'estimate_request_received','estimate',0,0,'','','',32,0),(33,'estimate_sent','estimate',0,0,'','','',33,0),(34,'estimate_accepted','estimate',0,0,'','','',34,0),(35,'estimate_rejected','estimate',0,0,'','','',35,0),(36,'new_message_sent','message',0,0,'','','',36,0),(37,'message_reply_sent','message',0,0,'','','',37,0),(38,'invoice_payment_confirmation','invoice',0,0,'','','',22,0),(39,'new_event_added_in_calendar','event',0,0,'','','',39,0),(40,'recurring_invoice_created_vai_cron_job','invoice',0,0,'','','',22,0),(41,'new_announcement_created','announcement',1,1,'','','recipient',41,0),(42,'invoice_due_reminder_before_due_date','invoice',0,0,'','','',22,0),(43,'invoice_overdue_reminder','invoice',0,0,'','','',22,0),(44,'recurring_invoice_creation_reminder','invoice',0,0,'','','',22,0),(45,'project_completed','project',0,0,'','','',2,0),(46,'lead_created','lead',0,0,'','','',21,0),(47,'client_created_from_lead','lead',0,0,'','','',21,0),(48,'project_task_deadline_pre_reminder','project',0,1,'','','task_assignee',20,0),(49,'project_task_reminder_on_the_day_of_deadline','project',0,1,'','','task_assignee',20,0),(50,'project_task_deadline_overdue_reminder','project',0,1,'','','task_assignee',20,0),(51,'recurring_task_created_via_cron_job','project',0,1,'','','project_members,task_assignee',20,0),(52,'calendar_event_modified','event',0,0,'','','',39,0);

--
-- Table structure for table `Delete_Esamnotifications`
--

CREATE TABLE `Delete_Esamnotifications` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `notify_to` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `read_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `event` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL,
  `task_id` int(11) NOT NULL,
  `project_comment_id` int(11) NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `ticket_comment_id` int(11) NOT NULL,
  `project_file_id` int(11) NOT NULL,
  `leave_id` int(11) NOT NULL,
  `post_id` int(11) NOT NULL,
  `to_user_id` int(11) NOT NULL,
  `activity_log_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL,
  `lead_id` int(11) NOT NULL,
  `invoice_payment_id` int(11) NOT NULL,
  `invoice_id` int(11) NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `estimate_request_id` int(11) NOT NULL,
  `actual_message_id` int(11) NOT NULL,
  `parent_message_id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `announcement_id` int(11) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamnotifications`
--


--
-- Table structure for table `Delete_Esampayment_methods`
--

CREATE TABLE `Delete_Esampayment_methods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'custom',
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `online_payable` tinyint(1) NOT NULL DEFAULT '0',
  `available_on_invoice` tinyint(1) NOT NULL DEFAULT '0',
  `minimum_payment_amount` double NOT NULL DEFAULT '0',
  `settings` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esampayment_methods`
--

INSERT INTO `Delete_Esampayment_methods` VALUES (1,'Cash','custom','',0,0,0,'a:0:{}',0),(4,'Bank transfer / Card','custom','',0,0,0,'a:0:{}',0),(5,'Cheque','custom','',0,0,0,'a:0:{}',0);

--
-- Table structure for table `Delete_Esampaypal_ipn`
--

CREATE TABLE `Delete_Esampaypal_ipn` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `transaction_id` tinytext COLLATE utf8_unicode_ci,
  `ipn_hash` longtext COLLATE utf8_unicode_ci NOT NULL,
  `ipn_data` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esampaypal_ipn`
--


--
-- Table structure for table `Delete_Esampayroll`
--

CREATE TABLE `Delete_Esampayroll` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `month` date NOT NULL,
  `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esampayroll`
--


--
-- Table structure for table `Delete_Esampayroll_detail`
--

CREATE TABLE `Delete_Esampayroll_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payroll_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `salary` float(8,3) NOT NULL,
  `manual_deduction` float(8,3) NOT NULL,
  `manual_deduction_reason` text COLLATE utf8_unicode_ci,
  `manual_bounce` float(8,3) NOT NULL,
  `manual_bonus_reason` text COLLATE utf8_unicode_ci,
  `advance` float(10,3) NOT NULL,
  `loan` float(10,3) NOT NULL,
  `pasi_company` double DEFAULT '0',
  `pasi_employee` double DEFAULT '0',
  `job_s_company` double DEFAULT '0',
  `job_s_employee` double DEFAULT '0',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esampayroll_detail`
--


--
-- Table structure for table `Delete_Esamposts`
--

CREATE TABLE `Delete_Esamposts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `post_id` int(11) NOT NULL,
  `share_with` text COLLATE utf8_unicode_ci,
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamposts`
--


--
-- Table structure for table `Delete_Esamproject_comments`
--

CREATE TABLE `Delete_Esamproject_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `comment_id` int(11) NOT NULL DEFAULT '0',
  `task_id` int(11) NOT NULL DEFAULT '0',
  `file_id` int(11) NOT NULL DEFAULT '0',
  `customer_feedback_id` int(11) NOT NULL DEFAULT '0',
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamproject_comments`
--


--
-- Table structure for table `Delete_Esamproject_files`
--

CREATE TABLE `Delete_Esamproject_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` text COLLATE utf8_unicode_ci NOT NULL,
  `file_id` text COLLATE utf8_unicode_ci,
  `service_type` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `file_size` double NOT NULL,
  `created_at` datetime NOT NULL,
  `project_id` int(11) NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamproject_files`
--


--
-- Table structure for table `Delete_Esamproject_members`
--

CREATE TABLE `Delete_Esamproject_members` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL,
  `is_leader` tinyint(1) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamproject_members`
--


--
-- Table structure for table `Delete_Esamproject_settings`
--

CREATE TABLE `Delete_Esamproject_settings` (
  `project_id` int(11) NOT NULL,
  `setting_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `setting_value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `unique_index` (`project_id`,`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamproject_settings`
--


--
-- Table structure for table `Delete_Esamproject_time`
--

CREATE TABLE `Delete_Esamproject_time` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `start_time` datetime NOT NULL,
  `end_time` datetime DEFAULT NULL,
  `status` enum('open','logged','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'logged',
  `note` text COLLATE utf8_unicode_ci,
  `task_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamproject_time`
--


--
-- Table structure for table `Delete_Esamprojects`
--

CREATE TABLE `Delete_Esamprojects` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `start_date` date DEFAULT NULL,
  `deadline` date DEFAULT NULL,
  `client_id` int(11) NOT NULL,
  `created_date` date DEFAULT NULL,
  `created_by` int(11) NOT NULL DEFAULT '0',
  `status` enum('open','completed','hold','canceled','pending','') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending',
  `labels` text COLLATE utf8_unicode_ci,
  `price` double NOT NULL DEFAULT '0',
  `starred_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `geo_location` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamprojects`
--


--
-- Table structure for table `Delete_Esampurchase_order_items`
--

CREATE TABLE `Delete_Esampurchase_order_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `purchase_order_id` int(11) NOT NULL,
  `tax_id` int(11) DEFAULT '0',
  `tax_id2` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esampurchase_order_items`
--


--
-- Table structure for table `Delete_Esampurchase_order_payments`
--

CREATE TABLE `Delete_Esampurchase_order_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `amount` double NOT NULL,
  `payment_date` date NOT NULL,
  `payment_method_id` int(11) NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `purchase_order_id` int(11) NOT NULL,
  `status` enum('draft','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `transaction_id` int(11) DEFAULT '0',
  `prepayment_transaction_id` int(11) NOT NULL DEFAULT '0',
  `created_by` int(11) DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `id_2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esampurchase_order_payments`
--


--
-- Table structure for table `Delete_Esampurchase_orders`
--

CREATE TABLE `Delete_Esampurchase_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) NOT NULL,
  `purchase_order_date` date NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `status` enum('draft','not_paid') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `approval_status` enum('not_approved','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_approved',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esampurchase_orders`
--


--
-- Table structure for table `Delete_Esampurchase_return_items`
--

CREATE TABLE `Delete_Esampurchase_return_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `po_item_id` int(11) NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `purchase_return_id` int(11) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esampurchase_return_items`
--


--
-- Table structure for table `Delete_Esampurchase_returns`
--

CREATE TABLE `Delete_Esampurchase_returns` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `purchase_order_id` int(11) NOT NULL,
  `shipment_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) NOT NULL DEFAULT '0',
  `payment_method_id` int(11) DEFAULT '0',
  `transaction_id` int(11) DEFAULT '0',
  `date` date NOT NULL,
  `status` enum('draft','approved') COLLATE utf8_unicode_ci DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esampurchase_returns`
--


--
-- Table structure for table `Delete_Esamroles`
--

CREATE TABLE `Delete_Esamroles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `permissions` mediumtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamroles`
--


--
-- Table structure for table `Delete_Esamsalary_advance`
--

CREATE TABLE `Delete_Esamsalary_advance` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `amount` float NOT NULL DEFAULT '0',
  `date` date DEFAULT NULL,
  `deleted` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamsalary_advance`
--


--
-- Table structure for table `Delete_Esamsale_return_items`
--

CREATE TABLE `Delete_Esamsale_return_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sale_return_id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `invoice_item_id` int(11) NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `sort` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamsale_return_items`
--


--
-- Table structure for table `Delete_Esamsale_returns`
--

CREATE TABLE `Delete_Esamsale_returns` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `invoice_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `payment_method_id` int(11) DEFAULT '0',
  `transaction_id` int(11) DEFAULT '0',
  `date` date NOT NULL,
  `status` enum('draft','approved') COLLATE utf8_unicode_ci DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamsale_returns`
--


--
-- Table structure for table `Delete_Esamsettings`
--

CREATE TABLE `Delete_Esamsettings` (
  `setting_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `setting_value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'app',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `setting_name` (`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamsettings`
--

INSERT INTO `Delete_Esamsettings` VALUES ('accepted_file_formats','jpg,jpeg,doc,pdf,csv,pptx,xlsx,docx,png,rar','app',0),('allow_partial_invoice_payment_from_clients','','app',0),('allowed_ip_addresses','','app',0),('app_title','Teamway ERP','app',0),('attendance_password','94269935','app',0),('client_can_add_project_files','1','app',0),('client_can_comment_on_files','1','app',0),('client_can_comment_on_tasks','1','app',0),('client_can_create_projects','1','app',0),('client_can_create_tasks','1','app',0),('client_can_edit_tasks','1','app',0),('client_can_view_activity','1','app',0),('client_can_view_gantt','1','app',0),('client_can_view_milestones','1','app',0),('client_can_view_overview','1','app',0),('client_can_view_project_files','1','app',0),('client_can_view_tasks','1','app',0),('client_default_dashboard','','app',0),('client_message_own_contacts','1','app',0),('client_message_users','5','app',0),('company_address','Post Box No: 673, Postal Code: 113','app',0),('company_email','info@teamway.om','app',0),('company_name','Teamway ERP','app',0),('company_phone','00968 - 24619009','app',0),('company_vat_number','','app',0),('company_website','www.teamway.om','app',0),('currency_position','right','app',0),('currency_symbol',' /OMR','app',0),('date_format','d-m-Y','app',0),('decimal_separator','.','app',0),('default_bank','900','app',0),('default_currency','OMR','app',0),('default_due_date_after_billing_date','','app',0),('disable_client_login','1','app',0),('disable_client_signup','1','app',0),('email_protocol','','app',0),('email_sent_from_address','info@teamway.om','app',0),('email_sent_from_name','Teamway','app',0),('email_smtp_host','','app',0),('email_smtp_pass','','app',0),('email_smtp_port','','app',0),('email_smtp_security_type','none','app',0),('email_smtp_user','','app',0),('enable_attendance','','app',0),('enable_email_piping','','app',0),('enable_google_calendar_api','','app',0),('enable_push_notification','','app',0),('enable_rich_text_editor','0','app',0),('estimate_color','#054d7f ','app',0),('estimate_logo','','app',0),('favicon','','app',0),('first_day_of_week','0','app',0),('hidden_client_menus','','app',0),('imap_email','info@teamway.om','app',0),('imap_host','','app',0),('imap_password','00000','app',0),('imap_port','','app',0),('imap_ssl_enabled','1','app',0),('initial_number_of_the_estimate','2','app',0),('initial_number_of_the_invoice','2','app',0),('invoice_color','#054d7f ','app',0),('invoice_footer','<p><br></p>','app',0),('invoice_logo','','app',0),('invoice_prefix','','app',0),('item_purchase_code','53434654','app',0),('language','english','app',0),('module_announcement','1','app',0),('module_attendance','','app',0),('module_chat','1','app',0),('module_estimate','1','app',0),('module_estimate_request','','app',0),('module_event','1','app',0),('module_expense','1','app',0),('module_help','','app',0),('module_invoice','1','app',0),('module_knowledge_base','1','app',0),('module_lead','1','app',0),('module_leave','1','app',0),('module_message','1','app',0),('module_note','1','app',0),('module_project_timesheet','','app',0),('module_ticket','','app',0),('module_timeline','1','app',0),('module_todo','1','app',0),('no_of_decimals','2','app',0),('project_reference_in_tickets','1','app',0),('pusher_app_id','929038','app',0),('pusher_cluster','eu','app',0),('pusher_key','2cbc86a72bfa9a85b0e5','app',0),('pusher_secret','53077cbb420c5e79c8f6','app',0),('rows_per_page','100','app',0),('scrollbar','native','app',0),('send_bcc_to','','app',0),('send_estimate_bcc_to','','app',0),('show_background_image_in_signin_page','yes','app',0),('show_logo_in_signin_page','yes','app',0),('show_recent_ticket_comments_at_the_top','1','app',0),('signin_page_background','','app',0),('site_logo','','app',0),('ticket_prefix','','app',0),('time_format','24_hours','app',0),('timezone','Asia/Muscat','app',0),('user_1_allowed_distance','100000','user',0),('user_1_dashboard','','user',0),('user_1_disable_push_notification','0','user',0),('user_1_hidden_topbar_menus','','user',0),('user_1_location','23.620058326708097,58.24233084570313','user',0),('user_1_notification_sound_volume','4','user',0),('user_1_personal_language','english','user',0),('user_10_dashboard','','user',0),('user_10_personal_language','english','user',0),('user_11_dashboard','','user',0),('user_2_dashboard','','user',0),('user_21_dashboard','','user',0),('user_21_personal_language','english','user',0),('user_23_dashboard','','user',0),('user_24_dashboard','','user',0),('user_24_personal_language','arabic','user',0),('user_25_dashboard','','user',0),('user_25_personal_language','english','user',0),('user_3_dashboard','','user',0),('user_4_dashboard','','user',0),('user_5_allowed_distance','100000000','user',0),('user_5_dashboard','6','user',0),('user_5_disable_push_notification','1','user',0),('user_5_hidden_topbar_menus','','user',0),('user_5_location','23.673522614041882,57.680654820312505','user',0),('user_5_notification_sound_volume','7','user',0),('user_5_personal_language','english','user',0),('user_6_dashboard','','user',0),('user_6_personal_language','english','user',0),('weekend','5,6','app',0);

--
-- Table structure for table `Delete_Esamshipment_items`
--

CREATE TABLE `Delete_Esamshipment_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `po_item_id` int(11) NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `shipment_id` int(11) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamshipment_items`
--


--
-- Table structure for table `Delete_Esamshipments`
--

CREATE TABLE `Delete_Esamshipments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `purchase_order_id` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL DEFAULT '0',
  `date` date NOT NULL,
  `invoice_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `invoice_date` date DEFAULT NULL,
  `delivery_note_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `delivery_note_date` date DEFAULT NULL,
  `status` enum('draft','approved') COLLATE utf8_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamshipments`
--


--
-- Table structure for table `Delete_Esamsocial_links`
--

CREATE TABLE `Delete_Esamsocial_links` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `facebook` text COLLATE utf8_unicode_ci,
  `twitter` text COLLATE utf8_unicode_ci,
  `linkedin` text COLLATE utf8_unicode_ci,
  `googleplus` text COLLATE utf8_unicode_ci,
  `digg` text COLLATE utf8_unicode_ci,
  `youtube` text COLLATE utf8_unicode_ci,
  `pinterest` text COLLATE utf8_unicode_ci,
  `instagram` text COLLATE utf8_unicode_ci,
  `github` text COLLATE utf8_unicode_ci,
  `tumblr` text COLLATE utf8_unicode_ci,
  `vine` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamsocial_links`
--


--
-- Table structure for table `Delete_Esamstock_adjustments`
--

CREATE TABLE `Delete_Esamstock_adjustments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamstock_adjustments`
--


--
-- Table structure for table `Delete_Esamsuppliers`
--

CREATE TABLE `Delete_Esamsuppliers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `contact_name` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date DEFAULT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `alternative_phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency_symbol` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vat_number` text COLLATE utf8_unicode_ci,
  `note` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `account_id` int(11) NOT NULL DEFAULT '0',
  `advance_account_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamsuppliers`
--


--
-- Table structure for table `Delete_Esamtask_status`
--

CREATE TABLE `Delete_Esamtask_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `key_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamtask_status`
--

INSERT INTO `Delete_Esamtask_status` VALUES (1,'To Do','to_do','#F9A52D',0,0),(2,'In progress','in_progress','#1672B9',1,0),(3,'Done','done','#00B393',2,0),(4,'holding','','#aab7b7',3,0);

--
-- Table structure for table `Delete_Esamtasks`
--

CREATE TABLE `Delete_Esamtasks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `milestone_id` int(11) NOT NULL DEFAULT '0',
  `assigned_to` int(11) NOT NULL,
  `deadline` date DEFAULT NULL,
  `labels` text COLLATE utf8_unicode_ci,
  `points` tinyint(4) NOT NULL DEFAULT '1',
  `status` enum('to_do','in_progress','done') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'to_do',
  `status_id` int(11) NOT NULL,
  `start_date` date DEFAULT NULL,
  `collaborators` text COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `recurring` tinyint(1) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `recurring_task_id` int(11) NOT NULL DEFAULT '0',
  `no_of_cycles_completed` int(11) NOT NULL DEFAULT '0',
  `created_date` date NOT NULL,
  `next_recurring_date` date DEFAULT NULL,
  `reminder_date` date NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `deleted` tinyint(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamtasks`
--


--
-- Table structure for table `Delete_Esamtaxes`
--

CREATE TABLE `Delete_Esamtaxes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` tinytext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `percentage` double NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Delete_Esamtaxes`
--

INSERT INTO `Delete_Esamtaxes` VALUES (1,'VAT (5%)',5,0);

--
-- Table structure for table `Delete_Esamteam`
--

CREATE TABLE `Delete_Esamteam` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `members` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamteam`
--


--
-- Table structure for table `Delete_Esamteam_member_job_info`
--

CREATE TABLE `Delete_Esamteam_member_job_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `date_of_hire` date DEFAULT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  `salary` double NOT NULL DEFAULT '0',
  `salary_term` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `working_hours` int(11) DEFAULT NULL,
  `yearly_leaves` int(11) DEFAULT NULL,
  `housing` float DEFAULT '0',
  `transportation` float DEFAULT '0',
  `telephone` float DEFAULT '0',
  `utility` float DEFAULT '0',
  `national` tinyint(4) DEFAULT '0',
  `pasi` tinyint(4) DEFAULT '1',
  `bank_title` text COLLATE utf8_unicode_ci,
  `account_title` text COLLATE utf8_unicode_ci,
  `account_no` text COLLATE utf8_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamteam_member_job_info`
--


--
-- Table structure for table `Delete_Esamticket_comments`
--

CREATE TABLE `Delete_Esamticket_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamticket_comments`
--


--
-- Table structure for table `Delete_Esamticket_types`
--

CREATE TABLE `Delete_Esamticket_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamticket_types`
--

INSERT INTO `Delete_Esamticket_types` VALUES (1,'General Support',0),(2,'One way',0),(3,'Two way',0);

--
-- Table structure for table `Delete_Esamtickets`
--

CREATE TABLE `Delete_Esamtickets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `ticket_type_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `status` enum('new','client_replied','open','closed') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'new',
  `last_activity_at` datetime DEFAULT NULL,
  `assigned_to` int(11) NOT NULL DEFAULT '0',
  `creator_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `creator_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `labels` text COLLATE utf8_unicode_ci,
  `task_id` int(11) NOT NULL,
  `closed_at` datetime NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamtickets`
--


--
-- Table structure for table `Delete_Esamto_do`
--

CREATE TABLE `Delete_Esamto_do` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `labels` text COLLATE utf8_unicode_ci,
  `status` enum('to_do','done') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'to_do',
  `start_date` date DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Delete_Esamto_do`
--


--
-- Table structure for table `Delete_Esamtransactions`
--

CREATE TABLE `Delete_Esamtransactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `type` text NOT NULL,
  `is_manual` tinyint(1) NOT NULL DEFAULT '0',
  `reference` text,
  `bank_cash` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `Delete_Esamtransactions`
--


--
-- Table structure for table `Doaa123accounts`
--

CREATE TABLE `Doaa123accounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `acc_name` varchar(255) NOT NULL,
  `acc_code` varchar(255) DEFAULT NULL,
  `acc_parent` int(11) NOT NULL,
  `is_primary` tinyint(1) NOT NULL DEFAULT '0',
  `is_inactive` int(11) NOT NULL DEFAULT '0',
  `acc_description` text,
  `module_id` int(11) DEFAULT '0',
  `module` enum('suppliers','team_members','clients','expenses','assets') DEFAULT NULL,
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=78 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `Doaa123accounts`
--

INSERT INTO `Doaa123accounts` VALUES (1,'Assets','1',0,1,0,NULL,NULL,NULL,0),(2,'Liabilities','2',0,1,0,NULL,0,NULL,0),(3,'Equity','3',0,1,0,NULL,0,NULL,0),(4,'Expenses','4',0,1,0,NULL,0,NULL,0),(5,'Income','5',0,1,0,NULL,0,NULL,0),(6,'Others','6',0,1,0,NULL,0,NULL,0),(7,'Receviable','1-1',1,1,0,NULL,0,NULL,0),(8,'Bank and Cash','1-2',1,1,0,NULL,0,NULL,0),(9,'Current Assets','1-3',1,1,0,NULL,0,NULL,0),(10,'Non Current Assets','1-4',1,1,0,NULL,0,NULL,0),(11,'Prepayments','1-5',1,1,0,NULL,0,NULL,0),(12,'Fixed Assets','1-6',1,1,0,NULL,0,NULL,0),(13,'Payable','2-1',2,1,0,NULL,0,NULL,0),(14,'Credit Card','2-2',2,1,0,NULL,0,NULL,0),(15,'Current Liabilities','2-3',2,1,0,NULL,0,NULL,0),(18,'Non Current Liabilities','2-4',2,1,0,NULL,0,NULL,0),(19,'Equity','3-1',3,1,0,NULL,0,NULL,0),(20,'Current Year Earnings','3-2',3,1,0,NULL,0,NULL,0),(21,'Expenses','4-1',4,1,0,NULL,0,NULL,0),(22,'Depreciation','4-2',4,1,0,NULL,0,NULL,0),(23,'Cost of Revenue','4-3',4,1,0,NULL,0,NULL,0),(24,'Income','5-1',5,1,0,NULL,0,NULL,0),(25,'Other Income','5-2',5,1,0,NULL,0,NULL,0),(26,'Off Balance Sheet','6-1',6,1,0,NULL,0,NULL,0),(38,'Advance Payments','2-5',2,1,0,NULL,0,NULL,0),(77,'Retained Earnings A/c','3-2-1',20,0,0,'',0,'clients',0);

--
-- Table structure for table `Doaa123activity_logs`
--

CREATE TABLE `Doaa123activity_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `action` enum('created','updated','deleted') COLLATE utf8_unicode_ci NOT NULL,
  `log_type` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `log_type_title` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `log_type_id` int(11) NOT NULL DEFAULT '0',
  `changes` mediumtext COLLATE utf8_unicode_ci,
  `log_for` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `log_for_id` int(11) NOT NULL DEFAULT '0',
  `log_for2` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
  `log_for_id2` int(11) DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123activity_logs`
--


--
-- Table structure for table `Doaa123announcements`
--

CREATE TABLE `Doaa123announcements` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `created_by` int(11) NOT NULL,
  `share_with` mediumtext COLLATE utf8_unicode_ci,
  `created_at` datetime NOT NULL,
  `files` text COLLATE utf8_unicode_ci NOT NULL,
  `read_by` mediumtext COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `created_by` (`created_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123announcements`
--


--
-- Table structure for table `Doaa123attendance`
--

CREATE TABLE `Doaa123attendance` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `status` enum('incomplete','pending','approved','rejected','deleted') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'incomplete',
  `user_id` int(11) NOT NULL,
  `in_time` datetime NOT NULL,
  `out_time` datetime DEFAULT NULL,
  `checked_by` int(11) DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `checked_at` datetime DEFAULT NULL,
  `reject_reason` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `checked_by` (`checked_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123attendance`
--


--
-- Table structure for table `Doaa123checklist_items`
--

CREATE TABLE `Doaa123checklist_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `is_checked` int(11) NOT NULL DEFAULT '0',
  `task_id` int(11) NOT NULL DEFAULT '0',
  `sort` int(11) NOT NULL DEFAULT '0',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123checklist_items`
--


--
-- Table structure for table `Doaa123ci_sessions`
--

CREATE TABLE `Doaa123ci_sessions` (
  `id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `ip_address` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
  `timestamp` int(10) unsigned NOT NULL DEFAULT '0',
  `data` blob NOT NULL,
  KEY `ci_sessions_timestamp` (`timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123ci_sessions`
--

INSERT INTO `Doaa123ci_sessions` VALUES ('77a1c3d3864f4a45c6799ce29a5f39992c9f5e8a','5.37.196.127',1635758922,''),('3a1b4bf2c2672801d68e305e147faf79591ef00f','5.37.196.127',1635758943,''),('ccb8332cc0e2830a0b1884f500c37bbf1c05f067','161.8.109.180',1666872953,_binary '__ci_last_regenerate|i:1666872945;'),('cd48fc77d2de9437599893bf20c87e6000ce5f72','54.92.157.29',1666875292,_binary '__ci_last_regenerate|i:1666875292;'),('17cfe3ddd8c1d92e7b63c9862a025272bd5e5de1','161.8.109.180',1666876349,_binary '__ci_last_regenerate|i:1666876348;');

--
-- Table structure for table `Doaa123client_groups`
--

CREATE TABLE `Doaa123client_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123client_groups`
--


--
-- Table structure for table `Doaa123clients`
--

CREATE TABLE `Doaa123clients` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date NOT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `currency_symbol` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `starred_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `group_ids` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `is_lead` tinyint(1) NOT NULL DEFAULT '0',
  `lead_status_id` int(11) NOT NULL,
  `owner_id` int(11) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `lead_source_id` int(11) NOT NULL,
  `last_lead_status` text COLLATE utf8_unicode_ci NOT NULL,
  `client_migration_date` date NOT NULL,
  `vat_number` text COLLATE utf8_unicode_ci,
  `currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
  `disable_online_payment` tinyint(1) NOT NULL DEFAULT '0',
  `geo_location` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `account_id` int(11) NOT NULL DEFAULT '0',
  `advance_account_id` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123clients`
--


--
-- Table structure for table `Doaa123contacts`
--

CREATE TABLE `Doaa123contacts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `alternative_phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `job_title` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `created_date` date NOT NULL,
  `created_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123contacts`
--


--
-- Table structure for table `Doaa123custom_field_values`
--

CREATE TABLE `Doaa123custom_field_values` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `related_to_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `related_to_id` int(11) NOT NULL,
  `custom_field_id` int(11) NOT NULL,
  `value` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123custom_field_values`
--


--
-- Table structure for table `Doaa123custom_fields`
--

CREATE TABLE `Doaa123custom_fields` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `placeholder` text COLLATE utf8_unicode_ci NOT NULL,
  `example_variable_name` text COLLATE utf8_unicode_ci,
  `options` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `field_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `related_to` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `show_in_table` tinyint(1) NOT NULL DEFAULT '0',
  `show_in_invoice` tinyint(1) NOT NULL DEFAULT '0',
  `show_in_estimate` tinyint(1) NOT NULL DEFAULT '0',
  `visible_to_admins_only` tinyint(1) NOT NULL DEFAULT '0',
  `hide_from_clients` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123custom_fields`
--


--
-- Table structure for table `Doaa123custom_widgets`
--

CREATE TABLE `Doaa123custom_widgets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci,
  `content` text COLLATE utf8_unicode_ci,
  `show_title` tinyint(1) NOT NULL DEFAULT '0',
  `show_border` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123custom_widgets`
--


--
-- Table structure for table `Doaa123dashboards`
--

CREATE TABLE `Doaa123dashboards` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci,
  `data` text COLLATE utf8_unicode_ci,
  `color` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123dashboards`
--


--
-- Table structure for table `Doaa123delivery_note_items`
--

CREATE TABLE `Doaa123delivery_note_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) DEFAULT '0',
  `invoice_item_id` int(11) DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `delivery_note_id` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123delivery_note_items`
--


--
-- Table structure for table `Doaa123delivery_notes`
--

CREATE TABLE `Doaa123delivery_notes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `invoice_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `project_id` int(11) NOT NULL DEFAULT '0',
  `delivery_note_date` date NOT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `status` enum('draft','approved','request_approval') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123delivery_notes`
--


--
-- Table structure for table `Doaa123email_templates`
--

CREATE TABLE `Doaa123email_templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `template_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `email_subject` text COLLATE utf8_unicode_ci NOT NULL,
  `default_message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `custom_message` mediumtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123email_templates`
--


--
-- Table structure for table `Doaa123enteries`
--

CREATE TABLE `Doaa123enteries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `trans_id` int(11) NOT NULL,
  `account` int(11) NOT NULL,
  `type` enum('dr','cr') NOT NULL,
  `amount` double NOT NULL,
  `narration` text NOT NULL,
  `branch_id` int(11) DEFAULT '0',
  `concerned_person` int(11) DEFAULT '0',
  `unit` text,
  `reference` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `Doaa123enteries`
--


--
-- Table structure for table `Doaa123estimate_forms`
--

CREATE TABLE `Doaa123estimate_forms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL,
  `assigned_to` int(11) NOT NULL,
  `public` tinyint(1) NOT NULL DEFAULT '0',
  `enable_attachment` tinyint(4) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123estimate_forms`
--


--
-- Table structure for table `Doaa123estimate_items`
--

CREATE TABLE `Doaa123estimate_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `tax_id` int(11) DEFAULT '0',
  `tax_id2` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123estimate_items`
--


--
-- Table structure for table `Doaa123estimate_requests`
--

CREATE TABLE `Doaa123estimate_requests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `estimate_form_id` int(11) NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `client_id` int(11) NOT NULL,
  `lead_id` int(11) NOT NULL,
  `assigned_to` int(11) NOT NULL,
  `status` enum('new','processing','hold','canceled','estimated') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'new',
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123estimate_requests`
--


--
-- Table structure for table `Doaa123estimates`
--

CREATE TABLE `Doaa123estimates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `estimate_request_id` int(11) NOT NULL DEFAULT '0',
  `estimate_date` date NOT NULL,
  `valid_until` date NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `last_email_sent_date` date DEFAULT NULL,
  `status` enum('draft','sent','accepted','declined','approved','request_approval') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `discount_type` enum('before_tax','after_tax') COLLATE utf8_unicode_ci NOT NULL,
  `discount_amount` double NOT NULL,
  `discount_amount_type` enum('percentage','fixed_amount') COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123estimates`
--


--
-- Table structure for table `Doaa123events`
--

CREATE TABLE `Doaa123events` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `start_time` time DEFAULT NULL,
  `end_time` time DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `location` mediumtext COLLATE utf8_unicode_ci,
  `files` mediumtext COLLATE utf8_unicode_ci,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci NOT NULL,
  `share_with` mediumtext COLLATE utf8_unicode_ci,
  `editable_google_event` tinyint(1) NOT NULL DEFAULT '0',
  `google_event_id` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  `color` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `recurring` int(1) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `last_start_date` date DEFAULT NULL,
  `recurring_dates` longtext COLLATE utf8_unicode_ci NOT NULL,
  `confirmed_by` text COLLATE utf8_unicode_ci NOT NULL,
  `rejected_by` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `created_by` (`created_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123events`
--


--
-- Table structure for table `Doaa123expense_categories`
--

CREATE TABLE `Doaa123expense_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `account_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123expense_categories`
--


--
-- Table structure for table `Doaa123expenses`
--

CREATE TABLE `Doaa123expenses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `expense_date` date NOT NULL,
  `category_id` int(11) NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `amount` double NOT NULL,
  `payment_mode` enum('bank','cash_on_hand','cheque','reimbursement','pt_cash') COLLATE utf8_unicode_ci NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` int(11) DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `client_id` int(11) NOT NULL DEFAULT '0',
  `status` enum('draft','request_approval','approved','rejected') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `transaction_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123expenses`
--


--
-- Table structure for table `Doaa123general_files`
--

CREATE TABLE `Doaa123general_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` text COLLATE utf8_unicode_ci NOT NULL,
  `file_id` text COLLATE utf8_unicode_ci,
  `service_type` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `file_size` double NOT NULL,
  `created_at` datetime NOT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `eroom_id` int(11) NOT NULL DEFAULT '0',
  `uploaded_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123general_files`
--


--
-- Table structure for table `Doaa123help_articles`
--

CREATE TABLE `Doaa123help_articles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `category_id` int(11) NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `files` text COLLATE utf8_unicode_ci NOT NULL,
  `total_views` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123help_articles`
--


--
-- Table structure for table `Doaa123help_categories`
--

CREATE TABLE `Doaa123help_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `type` enum('help','knowledge_base') COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123help_categories`
--


--
-- Table structure for table `Doaa123internal_transactions`
--

CREATE TABLE `Doaa123internal_transactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `from_employee` int(11) NOT NULL,
  `to_employee` int(11) NOT NULL,
  `amount` float(10,3) NOT NULL,
  `note` text COLLATE utf8_bin NOT NULL,
  `status` enum('draft','approved') COLLATE utf8_bin NOT NULL DEFAULT 'draft',
  `transaction_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Dumping data for table `Doaa123internal_transactions`
--


--
-- Table structure for table `Doaa123invoice_items`
--

CREATE TABLE `Doaa123invoice_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `invoice_id` int(11) NOT NULL,
  `tax_id` int(11) DEFAULT '0',
  `tax_id2` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123invoice_items`
--


--
-- Table structure for table `Doaa123invoice_payments`
--

CREATE TABLE `Doaa123invoice_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `amount` double NOT NULL,
  `payment_date` date NOT NULL,
  `payment_method_id` int(11) NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `invoice_id` int(11) NOT NULL,
  `status` enum('draft','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `transaction_id` tinytext COLLATE utf8_unicode_ci,
  `account_transaction_id` int(11) NOT NULL DEFAULT '0',
  `advance_transaction_id` int(11) NOT NULL DEFAULT '0',
  `created_by` int(11) DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `id_2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123invoice_payments`
--


--
-- Table structure for table `Doaa123invoices`
--

CREATE TABLE `Doaa123invoices` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `bill_date` date NOT NULL,
  `due_date` date NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `labels` text COLLATE utf8_unicode_ci,
  `last_email_sent_date` date DEFAULT NULL,
  `status` enum('draft','not_paid','cancelled') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `delivery_status` enum('delivered','not_delivered') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_delivered',
  `approval_status` enum('not_approved','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_approved',
  `tax_id` int(11) NOT NULL DEFAULT '0',
  `tax_id2` int(11) NOT NULL DEFAULT '0',
  `recurring` tinyint(4) NOT NULL DEFAULT '0',
  `recurring_invoice_id` int(11) NOT NULL DEFAULT '0',
  `repeat_every` int(11) NOT NULL DEFAULT '0',
  `repeat_type` enum('days','weeks','months','years') COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_of_cycles` int(11) NOT NULL DEFAULT '0',
  `next_recurring_date` date DEFAULT NULL,
  `no_of_cycles_completed` int(11) NOT NULL DEFAULT '0',
  `due_reminder_date` date DEFAULT NULL,
  `recurring_reminder_date` date DEFAULT NULL,
  `discount_amount` double NOT NULL,
  `discount_amount_type` enum('percentage','fixed_amount') COLLATE utf8_unicode_ci NOT NULL,
  `discount_type` enum('before_tax','after_tax') COLLATE utf8_unicode_ci NOT NULL,
  `cancelled_at` datetime DEFAULT NULL,
  `cancelled_by` int(11) NOT NULL,
  `revised` int(11) NOT NULL,
  `transaction_id` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123invoices`
--


--
-- Table structure for table `Doaa123item_categories`
--

CREATE TABLE `Doaa123item_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123item_categories`
--


--
-- Table structure for table `Doaa123items`
--

CREATE TABLE `Doaa123items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `cost` double NOT NULL,
  `rate` double NOT NULL,
  `category_id` int(11) NOT NULL,
  `item_type` enum('product','service') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'product',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123items`
--


--
-- Table structure for table `Doaa123lead_source`
--

CREATE TABLE `Doaa123lead_source` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123lead_source`
--

INSERT INTO `Doaa123lead_source` VALUES (1,'Google',1,0),(2,'Facebook',2,0),(3,'Twitter',3,0),(4,'Youtube',4,0),(5,'Elsewhere',5,0);

--
-- Table structure for table `Doaa123lead_status`
--

CREATE TABLE `Doaa123lead_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123lead_status`
--

INSERT INTO `Doaa123lead_status` VALUES (1,'New','#f1c40f',0,0),(2,'Qualified','#2d9cdb',1,0),(3,'Discussion','#29c2c2',2,0),(4,'Negotiation','#2d9cdb',3,0),(5,'Won','#83c340',4,0),(6,'Lost','#e74c3c',5,0);

--
-- Table structure for table `Doaa123leads`
--

CREATE TABLE `Doaa123leads` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `first_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `last_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_date` date NOT NULL,
  `website` text COLLATE utf8_unicode_ci,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123leads`
--


--
-- Table structure for table `Doaa123leave_applications`
--

CREATE TABLE `Doaa123leave_applications` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `leave_type_id` int(11) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `total_hours` decimal(7,2) NOT NULL,
  `total_days` decimal(5,2) NOT NULL,
  `applicant_id` int(11) NOT NULL,
  `reason` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('pending','approved','rejected','canceled') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending',
  `created_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `checked_at` datetime DEFAULT NULL,
  `checked_by` int(11) NOT NULL DEFAULT '0',
  `paid_unpaid` tinyint(1) DEFAULT '1',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `leave_type_id` (`leave_type_id`),
  KEY `user_id` (`applicant_id`),
  KEY `checked_by` (`checked_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123leave_applications`
--


--
-- Table structure for table `Doaa123leave_types`
--

CREATE TABLE `Doaa123leave_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `status` enum('active','inactive') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'active',
  `color` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `max_allowed` int(11) DEFAULT '1',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123leave_types`
--

INSERT INTO `Doaa123leave_types` VALUES (1,'Casual Leave','active','#83c340','',1,0),(2,'Annual Leave','active','#83c340','',1,0),(3,'Emergency leave','active','#29c2c2','',1,0),(4,'Eid Vacation','active','#83c340','',1,0);

--
-- Table structure for table `Doaa123loans`
--

CREATE TABLE `Doaa123loans` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `amount` double DEFAULT NULL,
  `date` date DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123loans`
--


--
-- Table structure for table `Doaa123messages`
--

CREATE TABLE `Doaa123messages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Untitled',
  `message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `from_user_id` int(11) NOT NULL,
  `to_user_id` int(11) NOT NULL,
  `status` enum('unread','read') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'unread',
  `message_id` int(11) NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `files` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted_by_users` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `message_from` (`from_user_id`),
  KEY `message_to` (`to_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123messages`
--


--
-- Table structure for table `Doaa123milestones`
--

CREATE TABLE `Doaa123milestones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL,
  `due_date` date NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123milestones`
--


--
-- Table structure for table `Doaa123notes`
--

CREATE TABLE `Doaa123notes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `client_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci,
  `files` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `is_public` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123notes`
--


--
-- Table structure for table `Doaa123notification_settings`
--

CREATE TABLE `Doaa123notification_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `event` varchar(250) NOT NULL,
  `category` varchar(50) NOT NULL,
  `enable_email` int(1) NOT NULL DEFAULT '0',
  `enable_web` int(1) NOT NULL DEFAULT '0',
  `notify_to_team` text NOT NULL,
  `notify_to_team_members` text NOT NULL,
  `notify_to_terms` text NOT NULL,
  `sort` int(11) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `event` (`event`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Doaa123notification_settings`
--

INSERT INTO `Doaa123notification_settings` VALUES (1,'project_created','project',0,1,'1','5','client_primary_contact,client_all_contacts',1,0),(2,'project_deleted','project',0,1,'1','5','project_members,client_primary_contact,client_all_contacts',2,0),(3,'project_task_created','project',0,1,'','5','project_members,task_assignee',3,0),(4,'project_task_updated','project',0,1,'','','task_assignee',4,0),(5,'project_task_assigned','project',0,1,'','','task_assignee',5,0),(7,'project_task_started','project',0,1,'','5','project_members,client_primary_contact,client_all_contacts',7,0),(8,'project_task_finished','project',0,0,'','','',8,0),(9,'project_task_reopened','project',0,0,'','','',9,0),(10,'project_task_deleted','project',0,1,'','','task_assignee',10,0),(11,'project_task_commented','project',0,1,'','','task_assignee',11,0),(12,'project_member_added','project',0,1,'','','project_members',12,0),(13,'project_member_deleted','project',0,1,'','','project_members',13,0),(14,'project_file_added','project',0,1,'','','project_members',14,0),(15,'project_file_deleted','project',0,1,'','','project_members',15,0),(16,'project_file_commented','project',0,1,'','','project_members',16,0),(17,'project_comment_added','project',0,1,'','','project_members',17,0),(18,'project_comment_replied','project',0,1,'','','project_members,comment_creator',18,0),(19,'project_customer_feedback_added','project',0,1,'','','project_members',19,0),(20,'project_customer_feedback_replied','project',0,1,'','','project_members,comment_creator',20,0),(21,'client_signup','client',0,0,'','','',21,0),(22,'invoice_online_payment_received','invoice',0,0,'','','',22,0),(23,'leave_application_submitted','leave',0,0,'','','',23,0),(24,'leave_approved','leave',0,1,'','','leave_applicant',24,0),(25,'leave_assigned','leave',0,1,'','','leave_applicant',25,0),(26,'leave_rejected','leave',0,1,'','','leave_applicant',26,0),(27,'leave_canceled','leave',0,0,'','','',27,0),(28,'ticket_created','ticket',0,1,'','6,7,5,11,12,1','client_all_contacts',28,0),(29,'ticket_commented','ticket',0,1,'','','client_primary_contact,ticket_creator',29,0),(30,'ticket_closed','ticket',0,1,'','','client_primary_contact,ticket_creator',30,0),(31,'ticket_reopened','ticket',0,1,'','','client_primary_contact,ticket_creator',31,0),(32,'estimate_request_received','estimate',0,0,'','','',32,0),(33,'estimate_sent','estimate',0,0,'','','',33,0),(34,'estimate_accepted','estimate',0,0,'','','',34,0),(35,'estimate_rejected','estimate',0,0,'','','',35,0),(36,'new_message_sent','message',0,0,'','','',36,0),(37,'message_reply_sent','message',0,0,'','','',37,0),(38,'invoice_payment_confirmation','invoice',0,0,'','','',22,0),(39,'new_event_added_in_calendar','event',0,0,'','','',39,0),(40,'recurring_invoice_created_vai_cron_job','invoice',0,0,'','','',22,0),(41,'new_announcement_created','announcement',1,1,'','','recipient',41,0),(42,'invoice_due_reminder_before_due_date','invoice',0,0,'','','',22,0),(43,'invoice_overdue_reminder','invoice',0,0,'','','',22,0),(44,'recurring_invoice_creation_reminder','invoice',0,0,'','','',22,0),(45,'project_completed','project',0,0,'','','',2,0),(46,'lead_created','lead',0,0,'','','',21,0),(47,'client_created_from_lead','lead',0,0,'','','',21,0),(48,'project_task_deadline_pre_reminder','project',0,1,'','','task_assignee',20,0),(49,'project_task_reminder_on_the_day_of_deadline','project',0,1,'','','task_assignee',20,0),(50,'project_task_deadline_overdue_reminder','project',0,1,'','','task_assignee',20,0),(51,'recurring_task_created_via_cron_job','project',0,1,'','','project_members,task_assignee',20,0),(52,'calendar_event_modified','event',0,0,'','','',39,0);

--
-- Table structure for table `Doaa123notifications`
--

CREATE TABLE `Doaa123notifications` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `notify_to` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `read_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `event` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL,
  `task_id` int(11) NOT NULL,
  `project_comment_id` int(11) NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `ticket_comment_id` int(11) NOT NULL,
  `project_file_id` int(11) NOT NULL,
  `leave_id` int(11) NOT NULL,
  `post_id` int(11) NOT NULL,
  `to_user_id` int(11) NOT NULL,
  `activity_log_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL,
  `lead_id` int(11) NOT NULL,
  `invoice_payment_id` int(11) NOT NULL,
  `invoice_id` int(11) NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `estimate_request_id` int(11) NOT NULL,
  `actual_message_id` int(11) NOT NULL,
  `parent_message_id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `announcement_id` int(11) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123notifications`
--


--
-- Table structure for table `Doaa123payment_methods`
--

CREATE TABLE `Doaa123payment_methods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'custom',
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `online_payable` tinyint(1) NOT NULL DEFAULT '0',
  `available_on_invoice` tinyint(1) NOT NULL DEFAULT '0',
  `minimum_payment_amount` double NOT NULL DEFAULT '0',
  `settings` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123payment_methods`
--

INSERT INTO `Doaa123payment_methods` VALUES (1,'Cash','custom','',0,0,0,'a:0:{}',0),(4,'Bank transfer / Card','custom','',0,0,0,'a:0:{}',0),(5,'Cheque','custom','',0,0,0,'a:0:{}',0);

--
-- Table structure for table `Doaa123paypal_ipn`
--

CREATE TABLE `Doaa123paypal_ipn` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `transaction_id` tinytext COLLATE utf8_unicode_ci,
  `ipn_hash` longtext COLLATE utf8_unicode_ci NOT NULL,
  `ipn_data` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123paypal_ipn`
--


--
-- Table structure for table `Doaa123payroll`
--

CREATE TABLE `Doaa123payroll` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `month` date NOT NULL,
  `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123payroll`
--


--
-- Table structure for table `Doaa123payroll_detail`
--

CREATE TABLE `Doaa123payroll_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payroll_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `salary` float(8,3) NOT NULL,
  `manual_deduction` float(8,3) NOT NULL,
  `manual_deduction_reason` text COLLATE utf8_unicode_ci,
  `manual_bounce` float(8,3) NOT NULL,
  `manual_bonus_reason` text COLLATE utf8_unicode_ci,
  `advance` float(10,3) NOT NULL,
  `loan` float(10,3) NOT NULL,
  `pasi_company` double DEFAULT '0',
  `pasi_employee` double DEFAULT '0',
  `job_s_company` double DEFAULT '0',
  `job_s_employee` double DEFAULT '0',
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123payroll_detail`
--


--
-- Table structure for table `Doaa123posts`
--

CREATE TABLE `Doaa123posts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `post_id` int(11) NOT NULL,
  `share_with` text COLLATE utf8_unicode_ci,
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123posts`
--


--
-- Table structure for table `Doaa123project_comments`
--

CREATE TABLE `Doaa123project_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `comment_id` int(11) NOT NULL DEFAULT '0',
  `task_id` int(11) NOT NULL DEFAULT '0',
  `file_id` int(11) NOT NULL DEFAULT '0',
  `customer_feedback_id` int(11) NOT NULL DEFAULT '0',
  `files` longtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123project_comments`
--


--
-- Table structure for table `Doaa123project_files`
--

CREATE TABLE `Doaa123project_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` text COLLATE utf8_unicode_ci NOT NULL,
  `file_id` text COLLATE utf8_unicode_ci,
  `service_type` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `file_size` double NOT NULL,
  `created_at` datetime NOT NULL,
  `project_id` int(11) NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123project_files`
--


--
-- Table structure for table `Doaa123project_members`
--

CREATE TABLE `Doaa123project_members` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `project_id` int(11) NOT NULL,
  `is_leader` tinyint(1) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123project_members`
--


--
-- Table structure for table `Doaa123project_settings`
--

CREATE TABLE `Doaa123project_settings` (
  `project_id` int(11) NOT NULL,
  `setting_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `setting_value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `unique_index` (`project_id`,`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123project_settings`
--


--
-- Table structure for table `Doaa123project_time`
--

CREATE TABLE `Doaa123project_time` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `start_time` datetime NOT NULL,
  `end_time` datetime DEFAULT NULL,
  `status` enum('open','logged','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'logged',
  `note` text COLLATE utf8_unicode_ci,
  `task_id` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123project_time`
--


--
-- Table structure for table `Doaa123projects`
--

CREATE TABLE `Doaa123projects` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci,
  `start_date` date DEFAULT NULL,
  `deadline` date DEFAULT NULL,
  `client_id` int(11) NOT NULL,
  `created_date` date DEFAULT NULL,
  `created_by` int(11) NOT NULL DEFAULT '0',
  `status` enum('open','completed','hold','canceled','pending','') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'pending',
  `labels` text COLLATE utf8_unicode_ci,
  `price` double NOT NULL DEFAULT '0',
  `starred_by` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `estimate_id` int(11) NOT NULL,
  `geo_location` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123projects`
--


--
-- Table structure for table `Doaa123purchase_order_items`
--

CREATE TABLE `Doaa123purchase_order_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL DEFAULT '0',
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `quantity` double NOT NULL,
  `unit_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rate` double NOT NULL,
  `total` double NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `purchase_order_id` int(11) NOT NULL,
  `tax_id` int(11) DEFAULT '0',
  `tax_id2` int(11) DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123purchase_order_items`
--


--
-- Table structure for table `Doaa123purchase_order_payments`
--

CREATE TABLE `Doaa123purchase_order_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `amount` double NOT NULL,
  `payment_date` date NOT NULL,
  `payment_method_id` int(11) NOT NULL,
  `cheque_due_date` date DEFAULT NULL,
  `cheque_description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_account` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_number` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cheque_transaction_id` int(11) NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `purchase_order_id` int(11) NOT NULL,
  `status` enum('draft','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `transaction_id` int(11) DEFAULT '0',
  `prepayment_transaction_id` int(11) NOT NULL DEFAULT '0',
  `created_by` int(11) DEFAULT '1',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`),
  KEY `id_2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123purchase_order_payments`
--


--
-- Table structure for table `Doaa123purchase_orders`
--

CREATE TABLE `Doaa123purchase_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) NOT NULL,
  `purchase_order_date` date NOT NULL,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `labels` text COLLATE utf8_unicode_ci NOT NULL,
  `note` mediumtext COLLATE utf8_unicode_ci,
  `status` enum('draft','not_paid') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'draft',
  `approval_status` enum('not_approved','request_approval','approved') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'not_approved',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123purchase_orders`
--


--
-- Table structure for table `Doaa123purchase_return_items`
--

CREATE TABLE `Doaa123purchase_return_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `po_item_id` int(11) NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `purchase_return_id` int(11) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123purchase_return_items`
--


--
-- Table structure for table `Doaa123purchase_returns`
--

CREATE TABLE `Doaa123purchase_returns` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `purchase_order_id` int(11) NOT NULL,
  `shipment_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) NOT NULL DEFAULT '0',
  `payment_method_id` int(11) DEFAULT '0',
  `transaction_id` int(11) DEFAULT '0',
  `date` date NOT NULL,
  `status` enum('draft','approved') COLLATE utf8_unicode_ci DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123purchase_returns`
--


--
-- Table structure for table `Doaa123roles`
--

CREATE TABLE `Doaa123roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `permissions` mediumtext COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123roles`
--


--
-- Table structure for table `Doaa123salary_advance`
--

CREATE TABLE `Doaa123salary_advance` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `amount` float NOT NULL DEFAULT '0',
  `date` date DEFAULT NULL,
  `deleted` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123salary_advance`
--


--
-- Table structure for table `Doaa123sale_return_items`
--

CREATE TABLE `Doaa123sale_return_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sale_return_id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `invoice_item_id` int(11) NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `sort` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123sale_return_items`
--


--
-- Table structure for table `Doaa123sale_returns`
--

CREATE TABLE `Doaa123sale_returns` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `invoice_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `payment_method_id` int(11) DEFAULT '0',
  `transaction_id` int(11) DEFAULT '0',
  `date` date NOT NULL,
  `status` enum('draft','approved') COLLATE utf8_unicode_ci DEFAULT 'draft',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123sale_returns`
--


--
-- Table structure for table `Doaa123settings`
--

CREATE TABLE `Doaa123settings` (
  `setting_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `setting_value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'app',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `setting_name` (`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123settings`
--

INSERT INTO `Doaa123settings` VALUES ('accepted_file_formats','jpg,jpeg,doc,pdf,csv,pptx,xlsx,docx,png,rar','app',0),('allow_partial_invoice_payment_from_clients','','app',0),('allowed_ip_addresses','','app',0),('app_title','Teamway ERP','app',0),('attendance_password','94269935','app',0),('client_can_add_project_files','1','app',0),('client_can_comment_on_files','1','app',0),('client_can_comment_on_tasks','1','app',0),('client_can_create_projects','1','app',0),('client_can_create_tasks','1','app',0),('client_can_edit_tasks','1','app',0),('client_can_view_activity','1','app',0),('client_can_view_gantt','1','app',0),('client_can_view_milestones','1','app',0),('client_can_view_overview','1','app',0),('client_can_view_project_files','1','app',0),('client_can_view_tasks','1','app',0),('client_default_dashboard','','app',0),('client_message_own_contacts','1','app',0),('client_message_users','5','app',0),('company_address','Post Box No: 673, Postal Code: 113','app',0),('company_email','info@teamway.om','app',0),('company_name','Teamway ERP','app',0),('company_phone','00968 - 24619009','app',0),('company_vat_number','','app',0),('company_website','www.teamway.om','app',0),('currency_position','right','app',0),('currency_symbol',' /OMR','app',0),('date_format','d-m-Y','app',0),('decimal_separator','.','app',0),('default_bank','900','app',0),('default_currency','OMR','app',0),('default_due_date_after_billing_date','','app',0),('disable_client_login','1','app',0),('disable_client_signup','1','app',0),('email_protocol','','app',0),('email_sent_from_address','info@teamway.om','app',0),('email_sent_from_name','Teamway','app',0),('email_smtp_host','','app',0),('email_smtp_pass','','app',0),('email_smtp_port','','app',0),('email_smtp_security_type','none','app',0),('email_smtp_user','','app',0),('enable_attendance','','app',0),('enable_email_piping','','app',0),('enable_google_calendar_api','','app',0),('enable_push_notification','','app',0),('enable_rich_text_editor','0','app',0),('estimate_color','#054d7f ','app',0),('estimate_logo','','app',0),('favicon','','app',0),('first_day_of_week','0','app',0),('hidden_client_menus','','app',0),('imap_email','info@teamway.om','app',0),('imap_host','','app',0),('imap_password','00000','app',0),('imap_port','','app',0),('imap_ssl_enabled','1','app',0),('initial_number_of_the_estimate','2','app',0),('initial_number_of_the_invoice','2','app',0),('invoice_color','#054d7f ','app',0),('invoice_footer','<p><br></p>','app',0),('invoice_logo','','app',0),('invoice_prefix','','app',0),('item_purchase_code','53434654','app',0),('language','english','app',0),('module_announcement','1','app',0),('module_attendance','','app',0),('module_chat','1','app',0),('module_estimate','1','app',0),('module_estimate_request','','app',0),('module_event','1','app',0),('module_expense','1','app',0),('module_help','','app',0),('module_invoice','1','app',0),('module_knowledge_base','1','app',0),('module_lead','1','app',0),('module_leave','1','app',0),('module_message','1','app',0),('module_note','1','app',0),('module_project_timesheet','','app',0),('module_ticket','','app',0),('module_timeline','1','app',0),('module_todo','1','app',0),('no_of_decimals','2','app',0),('project_reference_in_tickets','1','app',0),('pusher_app_id','929038','app',0),('pusher_cluster','eu','app',0),('pusher_key','2cbc86a72bfa9a85b0e5','app',0),('pusher_secret','53077cbb420c5e79c8f6','app',0),('rows_per_page','100','app',0),('scrollbar','native','app',0),('send_bcc_to','','app',0),('send_estimate_bcc_to','','app',0),('show_background_image_in_signin_page','yes','app',0),('show_logo_in_signin_page','yes','app',0),('show_recent_ticket_comments_at_the_top','1','app',0),('signin_page_background','','app',0),('site_logo','','app',0),('ticket_prefix','','app',0),('time_format','24_hours','app',0),('timezone','Asia/Muscat','app',0),('user_1_allowed_distance','100000','user',0),('user_1_dashboard','','user',0),('user_1_disable_push_notification','0','user',0),('user_1_hidden_topbar_menus','','user',0),('user_1_location','23.620058326708097,58.24233084570313','user',0),('user_1_notification_sound_volume','4','user',0),('user_1_personal_language','english','user',0),('user_10_dashboard','','user',0),('user_10_personal_language','english','user',0),('user_11_dashboard','','user',0),('user_2_dashboard','','user',0),('user_21_dashboard','','user',0),('user_21_personal_language','english','user',0),('user_23_dashboard','','user',0),('user_24_dashboard','','user',0),('user_24_personal_language','arabic','user',0),('user_25_dashboard','','user',0),('user_25_personal_language','english','user',0),('user_3_dashboard','','user',0),('user_4_dashboard','','user',0),('user_5_allowed_distance','100000000','user',0),('user_5_dashboard','6','user',0),('user_5_disable_push_notification','1','user',0),('user_5_hidden_topbar_menus','','user',0),('user_5_location','23.673522614041882,57.680654820312505','user',0),('user_5_notification_sound_volume','7','user',0),('user_5_personal_language','english','user',0),('user_6_dashboard','','user',0),('user_6_personal_language','english','user',0),('weekend','5,6','app',0);

--
-- Table structure for table `Doaa123shipment_items`
--

CREATE TABLE `Doaa123shipment_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `po_item_id` int(11) NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `shipment_id` int(11) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123shipment_items`
--


--
-- Table structure for table `Doaa123shipments`
--

CREATE TABLE `Doaa123shipments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `purchase_order_id` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL DEFAULT '0',
  `date` date NOT NULL,
  `invoice_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `invoice_date` date DEFAULT NULL,
  `delivery_note_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `delivery_note_date` date DEFAULT NULL,
  `status` enum('draft','approved') COLLATE utf8_unicode_ci DEFAULT NULL,
  `note` text COLLATE utf8_unicode_ci,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123shipments`
--


--
-- Table structure for table `Doaa123social_links`
--

CREATE TABLE `Doaa123social_links` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `facebook` text COLLATE utf8_unicode_ci,
  `twitter` text COLLATE utf8_unicode_ci,
  `linkedin` text COLLATE utf8_unicode_ci,
  `googleplus` text COLLATE utf8_unicode_ci,
  `digg` text COLLATE utf8_unicode_ci,
  `youtube` text COLLATE utf8_unicode_ci,
  `pinterest` text COLLATE utf8_unicode_ci,
  `instagram` text COLLATE utf8_unicode_ci,
  `github` text COLLATE utf8_unicode_ci,
  `tumblr` text COLLATE utf8_unicode_ci,
  `vine` text COLLATE utf8_unicode_ci,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Doaa123social_links`
--


--
-- Table structure for table `Doaa123stock_adjustments`
--

CREATE TABLE `Doaa123stock_adjustments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item_id` int(11) NOT NULL,
  `quantity` double NOT NULL DEFAULT '0',
  `note` text COLLATE utf8_unicode_ci,
  `deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
