SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET NAMES utf8 */;
-- --------------------------------------------------------
-- Table structure for table `assets`
`id` int(11) NOT NULL AUTO_INCREMENT,
`category` int(11) DEFAULT NULL,
`sub_category` int(11) DEFAULT NULL,
`company_asset_code` int(11) DEFAULT NULL,
`name` varchar(50) NOT NULL,
`location` varchar(15) NOT NULL,
`allocated_to` int(11) DEFAULT NULL,
`responsible_technician` int(11) DEFAULT NULL,
`vendor` int(11) DEFAULT NULL,
`asset_classification` varchar(50) NOT NULL,
`purchase_date` date DEFAULT NULL,
`invoice_number` varchar(50) DEFAULT NULL,
`manufacturer` varchar(50) NOT NULL,
`key_number` varchar(11) NOT NULL,
`warenty_status` enum('Yes','No') NOT NULL,
`warenty_end_date` date DEFAULT NULL,
`is_working` enum('No','Yes') NOT NULL,
`imagencrpname` text NOT NULL,
`qr_image` text NOT NULL,
`isactive` tinyint(4) DEFAULT NULL,
`created_by` int(11) DEFAULT NULL,
`modified_by` int(11) DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=63 ;
-- --------------------------------------------------------
-- Table structure for table `assets_categories`
CREATE TABLE `assets_categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET latin1 NOT NULL,
`parent` int(11) DEFAULT NULL,
`is_active` tinyint(4) DEFAULT NULL,
`created_by` int(11) DEFAULT NULL,
`modified_by` varchar(11) DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=198 ;
-- --------------------------------------------------------
-- Table structure for table `assets_history`
CREATE TABLE `assets_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`asset_id` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`history` varchar(500) DEFAULT NULL,
`isactive` tinyint(1) DEFAULT NULL,
`createdby` int(11) DEFAULT NULL,
`modifiedby` int(11) DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=233 ;
-- --------------------------------------------------------
-- Table structure for table `expenses`
CREATE TABLE `expenses` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`expense_name` varchar(100) DEFAULT NULL,
`category_id` int(11) DEFAULT NULL,
`project_id` int(11) DEFAULT NULL,
`client_id` int(11) DEFAULT NULL,
`trip_id` int(11) DEFAULT NULL,
`manager_id` int(11) DEFAULT NULL,
`expense_date` date DEFAULT NULL,
`expense_currency_id` int(11) DEFAULT NULL,
`expense_amount` float(10,2) DEFAULT NULL,
`expense_conversion_rate` float(5,2) DEFAULT NULL,
`application_currency_id` int(11) DEFAULT NULL,
`application_amount` float(10,2) DEFAULT NULL,
`advance_amount` float(10,2) DEFAULT NULL,
`is_reimbursable` tinyint(1) DEFAULT NULL,
`is_from_advance` tinyint(1) DEFAULT '0',
`expense_payment_id` int(11) DEFAULT NULL,
`expense_payment_ref_no` varchar(200) DEFAULT NULL,
`status` enum('saved','submitted','approved','rejected') DEFAULT 'saved',
`createdby` int(11) DEFAULT NULL,
`modifiedby` int(11) DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `expense_advacne_summary`
CREATE TABLE `expense_advacne_summary` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`employee_id` int(11) DEFAULT NULL,
`total` float(10,2) DEFAULT NULL,
`utilized` float(10,2) DEFAULT NULL,
`returned` float(10,2) DEFAULT NULL,
`balance` float(10,2) DEFAULT NULL,
`createdby` int(11) DEFAULT NULL,
`modifiedby` int(11) DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
UNIQUE KEY `UNIQUEEMP` (`employee_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `expense_advance`
CREATE TABLE `expense_advance` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` enum('advance','return') DEFAULT 'advance',
`from_id` int(11) DEFAULT NULL,
`to_id` int(11) DEFAULT NULL,
`payment_ref_number` varchar(200) DEFAULT NULL,
`payment_mode_id` int(11) DEFAULT NULL,
`project_id` int(11) DEFAULT NULL,
`currency_id` int(11) DEFAULT NULL,
`amount` float(10,2) DEFAULT NULL,
`application_currency_id` int(11) DEFAULT NULL,
`application_amount` float(10,2) DEFAULT NULL,
`advance_conversion_rate` float(10,2) DEFAULT NULL,
`createdby` int(11) DEFAULT NULL,
`modifiedby` int(11) DEFAULT NULL,
`createddate` datetime NOT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `expense_categories`
CREATE TABLE `expense_categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`expense_category_name` varchar(100) DEFAULT NULL,
`unit_price` varchar(50) DEFAULT NULL,
`unit_name` varchar(50) DEFAULT NULL,
`createdby` int(11) DEFAULT NULL,
`modifiedby` int(11) DEFAULT NULL,
`created_date` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `expense_forward`
CREATE TABLE `expense_forward` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`expense_id` int(11) DEFAULT NULL,
`trip_id` int(11) DEFAULT NULL,
`from_id` int(11) DEFAULT NULL,
`to_id` int(11) DEFAULT NULL,
`createdby` int(11) DEFAULT NULL,
`modifiedby` int(11) DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `expense_history`
CREATE TABLE `expense_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`expense_id` int(11) DEFAULT NULL,
`trip_id` int(11) DEFAULT NULL,
`history` varchar(500) DEFAULT NULL,
`createdby` int(11) DEFAULT NULL,
`modifiedby` int(11) DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `expense_notifications`
CREATE TABLE `expense_notifications` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`expense_id` int(11) DEFAULT NULL,
`trip_id` int(11) DEFAULT NULL,
`notification` varchar(500) DEFAULT NULL,
`link` varchar(200) DEFAULT NULL,
`createdby` int(11) DEFAULT NULL,
`modifiedby` int(11) DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `expense_payment_methods`
CREATE TABLE `expense_payment_methods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`payment_method_name` varchar(100) DEFAULT NULL,
`createdby` int(11) DEFAULT NULL,
`modifiedby` int(11) DEFAULT NULL,
`created_date` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `expense_receipts`
CREATE TABLE `expense_receipts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`expense_id` int(11) DEFAULT NULL,
`trip_id` int(11) DEFAULT NULL,
`receipt_name` varchar(100) DEFAULT NULL COMMENT 'orginal file name',
`receipt_filename` varchar(100) DEFAULT NULL COMMENT 'auto generated file name',
`receipt_file_type` varchar(5) DEFAULT NULL,
`createdby` int(11) DEFAULT NULL,
`modifiedby` int(11) DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `expense_return_advance`
CREATE TABLE `expense_return_advance` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`from_id` int(11) DEFAULT NULL,
`to_id` int(11) DEFAULT NULL,
`currency_id` int(11) DEFAULT NULL,
`returned_amount` float(10,2) DEFAULT NULL,
`createdby` int(11) DEFAULT NULL,
`modifiedby` int(11) DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `expense_trips`
CREATE TABLE `expense_trips` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`manager_id` int(11) DEFAULT NULL,
`trip_name` varchar(100) DEFAULT NULL,
`from_date` date DEFAULT NULL,
`to_date` date DEFAULT NULL,
`status` enum('NS','S','A','R') DEFAULT 'NS' COMMENT 'NS-Notsubmitted,S-submitted,R-Rejected,A-Approved',
`createdby` int(11) DEFAULT NULL,
`modifiedby` int(11) DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `expense_trip_history`
CREATE TABLE `expense_trip_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`trip_id` int(11) DEFAULT NULL,
`expense_id` int(11) DEFAULT NULL,
`history` varchar(500) DEFAULT NULL,
`createdby` int(11) DEFAULT NULL,
`modifiedby` int(11) DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `main_accountclasstype`
CREATE TABLE `main_accountclasstype` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`accountclasstype` varchar(255) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`createdby` int(11) unsigned DEFAULT NULL,
`modifiedby` int(11) unsigned DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) unsigned DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `main_allottedleaveslog`
CREATE TABLE `main_allottedleaveslog` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
`userid` bigint(11) unsigned DEFAULT NULL,
`assignedleaves` int(5) DEFAULT NULL,
`totalleaves` int(5) DEFAULT NULL,
`year` int(5) DEFAULT NULL,
`createdby` bigint(11) unsigned DEFAULT NULL,
`modifiedby` bigint(11) unsigned DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `main_announcements`
CREATE TABLE `main_announcements` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT NULL,
`status` tinyint(1) DEFAULT NULL COMMENT '1-Save as draft, 2-Posted',
`isactive` tinyint(1) DEFAULT NULL,
`createdby` bigint(20) DEFAULT NULL,
`createdby_role` bigint(20) DEFAULT NULL,
`createdby_group` bigint(20) DEFAULT NULL,
`modifiedby` bigint(20) DEFAULT NULL,
`modifiedby_role` bigint(20) DEFAULT NULL,
`modifiedby_group` bigint(20) DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `main_assignmententryreasoncode`
CREATE TABLE `main_assignmententryreasoncode` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`assignmententryreasoncode` varchar(255) NOT NULL,
`description` varchar(255) DEFAULT NULL,
`createdby` int(11) unsigned DEFAULT NULL,
`modifiedby` int(11) unsigned DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `main_attendancestatuscode`
CREATE TABLE `main_attendancestatuscode` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`attendancestatuscode` varchar(255) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`createdby` int(11) unsigned DEFAULT NULL,
`modifiedby` int(11) unsigned DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) unsigned DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `main_bankaccounttype`
CREATE TABLE `main_bankaccounttype` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`bankaccounttype` varchar(255) NOT NULL,
`description` varchar(255) DEFAULT NULL,
`createdby` int(11) unsigned DEFAULT NULL,
`modifiedby` int(11) unsigned DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
-- Table structure for table `main_bgagencylist`
CREATE TABLE `main_bgagencylist` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) unsigned DEFAULT NULL,
`agencyname` varchar(255) NOT NULL,
`primaryphone` varchar(100) NOT NULL,
`secondaryphone` varchar(100) DEFAULT NULL,
`bg_checktype` varchar(255) NOT NULL,
`website_url` varchar(255) DEFAULT NULL,
`flag` tinyint(1) DEFAULT '1',
`createdby` int(11) unsigned DEFAULT NULL,
`modifiedby` int(11) unsigned DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`isactive` tinyint(1) DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- Triggers `main_bgagencylist`
DROP TRIGGER IF EXISTS `main_agencylist_aft_upd`;
CREATE TRIGGER `main_agencylist_aft_upd` AFTER UPDATE ON `main_bgagencylist`