? Fallagassrini

Fallagassrini Bypass Shell

echo"
Fallagassrini
";
Current Path : /home1/savoy/public_html/savoyglobal.net/sgms/draft/application/data/

Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
Upload File :
Current File : /home1/savoy/public_html/savoyglobal.net/sgms/draft/application/data/sgms_cleared-11.05.sql

-- phpMyAdmin SQL Dump
-- version 3.2.2.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 11, 2012 at 11:29 AM
-- Server version: 5.1.37
-- PHP Version: 5.2.10-2ubuntu6.10

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!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 */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `sgms`
--

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

--
-- Table structure for table `account_type`
--

CREATE TABLE IF NOT EXISTS `account_type` (
  `account_type_id` tinyint(1) NOT NULL AUTO_INCREMENT,
  `type` varchar(20) NOT NULL,
  PRIMARY KEY (`account_type_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `account_type`
--

INSERT INTO `account_type` (`account_type_id`, `type`) VALUES
(1, 'Savings Account'),
(2, 'Current Account'),
(3, 'Credit Account'),
(4, 'Cash Account');

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

--
-- Table structure for table `activity`
--

CREATE TABLE IF NOT EXISTS `activity` (
  `activity_id` int(11) NOT NULL AUTO_INCREMENT,
  `activity_category_id` int(11) NOT NULL,
  `activity_name` varchar(200) NOT NULL,
  `activity_code` varchar(10) NOT NULL,
  `activity_account_code` varchar(20) NOT NULL,
  PRIMARY KEY (`activity_id`),
  UNIQUE KEY `activity_code` (`activity_code`),
  KEY `activity_category_id` (`activity_category_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;

--
-- Dumping data for table `activity`
--

INSERT INTO `activity` (`activity_id`, `activity_category_id`, `activity_name`, `activity_code`, `activity_account_code`) VALUES
(7, 2, 'Leadership Training', 'T1', '200001'),
(8, 1, 'HRM', 'S1', '200002'),
(9, 2, 'Sales Training', 'T2', '200003');

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

--
-- Table structure for table `activity_category`
--

CREATE TABLE IF NOT EXISTS `activity_category` (
  `activity_category_id` int(11) NOT NULL AUTO_INCREMENT,
  `activity_category_name` varchar(200) NOT NULL,
  `activity_category_prefix` varchar(20) NOT NULL,
  PRIMARY KEY (`activity_category_id`),
  UNIQUE KEY `activity_category_prefix` (`activity_category_prefix`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `activity_category`
--

INSERT INTO `activity_category` (`activity_category_id`, `activity_category_name`, `activity_category_prefix`) VALUES
(1, 'Software', 'S'),
(2, 'Training', 'T');

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

--
-- Table structure for table `allowdeduc`
--

CREATE TABLE IF NOT EXISTS `allowdeduc` (
  `allowdeduc_id` int(11) NOT NULL AUTO_INCREMENT,
  `allowdeduc_name` varchar(100) NOT NULL,
  `allowdeduc_type` int(2) NOT NULL,
  `allowdeduc_mode` int(2) NOT NULL,
  `chart_account_code` varchar(10) NOT NULL,
  PRIMARY KEY (`allowdeduc_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `allowdeduc`
--

INSERT INTO `allowdeduc` (`allowdeduc_id`, `allowdeduc_name`, `allowdeduc_type`, `allowdeduc_mode`, `chart_account_code`) VALUES
(2, 'Festival Allowance', 1, 1, '310001'),
(3, 'Deduction LOP', 0, 0, '310002');

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

--
-- Table structure for table `audit_trail`
--

CREATE TABLE IF NOT EXISTS `audit_trail` (
  `audit_trail_id` int(11) NOT NULL AUTO_INCREMENT,
  `ref_id` int(11) NOT NULL,
  `transaction_date` date NOT NULL,
  `fiscal_year` int(11) NOT NULL,
  PRIMARY KEY (`audit_trail_id`),
  KEY `ref_id` (`ref_id`),
  KEY `fiscal_year` (`fiscal_year`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=58 ;

--
-- Dumping data for table `audit_trail`
--


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

--
-- Table structure for table `auto_journal`
--

CREATE TABLE IF NOT EXISTS `auto_journal` (
  `auto_journal_id` int(11) NOT NULL AUTO_INCREMENT,
  `auto_journal_ref_id` int(11) NOT NULL,
  `account_code` varchar(30) NOT NULL,
  `amount` double(10,2) NOT NULL,
  `memo` tinytext NOT NULL,
  PRIMARY KEY (`auto_journal_id`),
  KEY `auto_journal_ref_id` (`auto_journal_ref_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `auto_journal`
--


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

--
-- Table structure for table `auto_journal_main`
--

CREATE TABLE IF NOT EXISTS `auto_journal_main` (
  `auto_journal_main_id` int(11) NOT NULL,
  `auto_journal_title` varchar(128) NOT NULL,
  PRIMARY KEY (`auto_journal_main_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `auto_journal_main`
--


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

--
-- Table structure for table `bank_account`
--

CREATE TABLE IF NOT EXISTS `bank_account` (
  `bank_account_id` int(5) NOT NULL AUTO_INCREMENT,
  `account_code` varchar(11) NOT NULL DEFAULT '',
  `bank_account_name` varchar(60) NOT NULL DEFAULT '',
  `account_type_id` varchar(2) NOT NULL,
  `bank_account_number` varchar(100) NOT NULL DEFAULT '',
  `bank_name` varchar(60) NOT NULL DEFAULT '',
  `bank_address` tinytext,
  `currency_id` int(3) NOT NULL,
  `last_reconciled_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `ending_reconcile_balance` double NOT NULL,
  PRIMARY KEY (`bank_account_id`),
  KEY `bank_account_name` (`bank_account_name`),
  KEY `bank_account_number` (`bank_account_number`),
  KEY `account_code` (`account_code`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;

--
-- Dumping data for table `bank_account`
--

INSERT INTO `bank_account` (`bank_account_id`, `account_code`, `bank_account_name`, `account_type_id`, `bank_account_number`, `bank_name`, `bank_address`, `currency_id`, `last_reconciled_date`, `ending_reconcile_balance`) VALUES
(6, '100010', 'COMMERCIAL BANK OF QATAR', '2', '3423432432', '', '', 1, '2012-05-05 00:00:00', 0),
(7, '100012', 'Cash in Hand', '4', '50000', '', '', 1, '2012-05-10 00:00:00', 0);

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

--
-- Table structure for table `bank_transaction`
--

CREATE TABLE IF NOT EXISTS `bank_transaction` (
  `bank_transaction_id` int(11) NOT NULL AUTO_INCREMENT,
  `ref_id` int(11) DEFAULT NULL,
  `bank_account_code` varchar(11) DEFAULT NULL,
  `transaction_date` date NOT NULL DEFAULT '0000-00-00',
  `amount` double DEFAULT '0',
  `reconciled` varchar(20) NOT NULL,
  PRIMARY KEY (`bank_transaction_id`),
  KEY `ref_id` (`ref_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=25 ;

--
-- Dumping data for table `bank_transaction`
--


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

--
-- Table structure for table `branch`
--

CREATE TABLE IF NOT EXISTS `branch` (
  `branch_id` int(11) NOT NULL AUTO_INCREMENT,
  `branch_name` varchar(100) NOT NULL,
  `address` text NOT NULL,
  `city` varchar(100) NOT NULL,
  `country` varchar(100) NOT NULL,
  `contact_no` varchar(50) NOT NULL,
  `email` varchar(100) NOT NULL,
  `fax` varchar(50) NOT NULL,
  `website` varchar(50) NOT NULL,
  PRIMARY KEY (`branch_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `branch`
--

INSERT INTO `branch` (`branch_id`, `branch_name`, `address`, `city`, `country`, `contact_no`, `email`, `fax`, `website`) VALUES
(1, 'Doha', '', 'Doha', '', '', '', '', '');

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

--
-- Table structure for table `branch_target`
--

CREATE TABLE IF NOT EXISTS `branch_target` (
  `branch_target_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `target` varchar(200) NOT NULL,
  `currency_id` int(11) NOT NULL,
  `target_type` varchar(30) NOT NULL,
  `remarks` text NOT NULL,
  PRIMARY KEY (`branch_target_id`),
  KEY `branch_id` (`branch_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `branch_target`
--


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

--
-- Table structure for table `calendar`
--

CREATE TABLE IF NOT EXISTS `calendar` (
  `event_id` int(11) NOT NULL,
  `event_title` varchar(200) NOT NULL,
  `trainer_name` varchar(200) NOT NULL,
  `event_start_date` date NOT NULL,
  `event_end_date` date NOT NULL,
  `event_location` varchar(200) NOT NULL,
  `event_description` text NOT NULL,
  PRIMARY KEY (`event_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `calendar`
--


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

--
-- Table structure for table `chart_master`
--

CREATE TABLE IF NOT EXISTS `chart_master` (
  `chart_master_id` int(11) NOT NULL AUTO_INCREMENT,
  `chart_account_code` varchar(10) NOT NULL,
  `chart_account_name` varchar(250) NOT NULL,
  `chart_account_type` int(11) NOT NULL,
  `parent` int(11) NOT NULL DEFAULT '0',
  `inactive` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`chart_account_code`),
  UNIQUE KEY `id` (`chart_master_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=496 ;

--
-- Dumping data for table `chart_master`
--

INSERT INTO `chart_master` (`chart_master_id`, `chart_account_code`, `chart_account_name`, `chart_account_type`, `parent`, `inactive`) VALUES
(324, '100000', 'CAPITAL                                           ', 2, 0, 0),
(325, '100001', 'STAFF LOAN A/C', 1, 0, 0),
(326, '100002', 'PREPAID EXPENSES                                  ', 1, 0, 0),
(327, '100003', 'COMPUTERS                                         ', 1, 0, 0),
(328, '100004', 'PARTITIONS & DECORATIONS                          ', 1, 0, 0),
(329, '100005', 'OFFICE FURNITURES                                 ', 1, 0, 0),
(330, '100006', 'OTHER EQUIPMENTS                                  ', 1, 0, 0),
(331, '100007', 'MOTOR VEHICLES                                    ', 1, 0, 0),
(332, '100008', 'FURNITURESFIXTURES & EQUIPMENT                ', 1, 0, 0),
(333, '100009', 'CREDIT CARD COLLECTION                            ', 1, 0, 0),
(334, '100010', 'COMMERCIAL BANK OF QATAR', 2, 0, 0),
(335, '100011', 'INVESTMENTS                                       ', 1, 0, 0),
(336, '100012', 'Cash in Hand', 4, 0, 0),
(337, '100013', 'PETTY CASH ', 1, 0, 0),
(83, '150000', 'Savoys Account', 1, 0, 0),
(86, '160000', 'Agent Account', 1, 0, 0),
(485, '200001', 'Leadership Training', 4, 0, 0),
(488, '200002', 'HRM', 4, 0, 0),
(489, '200003', 'Sales Training', 4, 0, 0),
(5, '210000', 'Customer Account', 4, 0, 0),
(338, '220000', 'OTHER INCOME                                      ', 4, 0, 0),
(339, '220001', 'INCOME FROM LOANS                                 ', 4, 0, 0),
(340, '220002', 'INCOME FROM FIXED DEPOSITS                        ', 4, 0, 0),
(341, '220003', 'INCOME FROM INVESTMENTS                           ', 4, 0, 0),
(342, '220004', 'INCOME FROM ASSET MANAGEMENT                      ', 4, 0, 0),
(343, '220005', 'INCOME FROM MANAGEMENT FEES                       ', 4, 0, 0),
(344, '220006', 'PROFIT ON SALE OF F/ASSET                         ', 4, 0, 0),
(345, '220007', 'PROFIT/LOSS  ON FIXED ASSETS ', 4, 0, 0),
(346, '220008', 'REALIZED GAIN IN EXCHANGE RATE                    ', 4, 0, 0),
(347, '220009', 'GAIN / LOSS ON EXCHANGE                           ', 4, 0, 0),
(348, '220010', 'PRIOR YEAR ADJUSTMENT                             ', 4, 0, 0),
(349, '220011', 'OTHER EXCEPTIONAL INCOME                          ', 4, 0, 0),
(350, '300000', 'BASIC SALARY                                      ', 3, 0, 0),
(351, '300001', 'Housing Allowance', 3, 0, 0),
(352, '300002', ' UTILITY                                ', 3, 0, 0),
(353, '300003', 'RECREATION & CLUB FEES                            ', 3, 0, 0),
(354, '300004', 'STAFF HOUSING                                     ', 3, 0, 0),
(355, '300005', 'Car Allowance', 3, 0, 0),
(356, '300006', 'Fuel Expenses', 3, 0, 0),
(357, '300007', 'TELEPHONE ALLOWANCE                               ', 3, 0, 0),
(358, '300008', 'LEAVE TRAVEL AIR PASSAGE                          ', 3, 0, 0),
(359, '300009', 'LEAVE TRAVEL ALLOWANCE                            ', 3, 0, 0),
(360, '300010', 'STAFF MEDICAL INSURANCE                           ', 3, 0, 0),
(361, '300011', 'SCHOOL FEES MANAGEMENT                            ', 3, 0, 0),
(362, '300012', 'SOCIAL SECURITY NATIONALS (GOSI)                  ', 3, 0, 0),
(363, '300013', 'PASSPORT/ VISA/ IQAMA RENEWALS                    ', 3, 0, 0),
(364, '300014', 'VISA RENEWALS                                     ', 3, 0, 0),
(365, '300015', 'WORK PERMIT RENEWALS                              ', 3, 0, 0),
(366, '300016', 'MEDICAL FOR IQAMA RENEWAL                         ', 3, 0, 0),
(367, '300017', 'VISA FORM TYPING & OTHERS                         ', 3, 0, 0),
(368, '300018', 'RECRUITMENT EXPENSES                              ', 3, 0, 0),
(369, '300019', 'STAFF RELOCATION EXPENSES                         ', 3, 0, 0),
(370, '300020', 'INSURANCE EXAM EXPS                               ', 3, 0, 0),
(371, '300021', 'INSURANCE EXAM AWARDS                             ', 3, 0, 0),
(372, '300022', 'STAFF PROFIT BONUS                                ', 3, 0, 0),
(373, '300023', 'STAFF PERFORMANCE BONUS                           ', 3, 0, 0),
(374, '300024', 'STAFF TRAINING                                    ', 3, 0, 0),
(375, '300025', 'STAFF TRAINING OTHERS                             ', 3, 0, 0),
(376, '300026', 'CO CONTRIBUTION STAFF PENSION                     ', 3, 0, 0),
(377, '300027', 'OTHER STAFF RELATED EXPS                          ', 3, 0, 0),
(378, '300028', 'STAFF LEAVING INDEMINITY                          ', 3, 0, 0),
(379, '300029', 'OFFICE RENT                                       ', 3, 0, 0),
(380, '300030', 'OFFICE WATER / ELECTRICITY                        ', 3, 0, 0),
(381, '300031', 'OFFICE UPKEEP & MAINTENANCE                       ', 3, 0, 0),
(382, '300032', 'OFFICE EQUIPMENT MAINTENANCE                      ', 3, 0, 0),
(383, '300033', 'OFFICE RENOVATION                                 ', 3, 0, 0),
(384, '300034', 'OFFICE TELEPHONES                                 ', 3, 0, 0),
(385, '300035', 'OFFICE FAX CHARGES                                ', 3, 0, 0),
(386, '300036', 'OFFICE MOBILE CHARGES                             ', 3, 0, 0),
(387, '300037', 'ISDN/LEASE LINE COSTS                             ', 3, 0, 0),
(388, '300038', 'POSTAGE/ COURIER EXPENSES                         ', 3, 0, 0),
(389, '300039', 'IT EXPENSES', 3, 0, 0),
(390, '300040', 'DEPRECIATION - OTHERS                             ', 3, 0, 0),
(391, '300041', 'ADVERTISING                                       ', 3, 0, 0),
(392, '300042', 'SPONSORSHIP                                       ', 3, 0, 0),
(393, '300043', 'CHARITY / GIFTS                                   ', 3, 0, 0),
(394, '300044', 'BUSINESS PROMOTION                                ', 3, 0, 0),
(395, '300045', 'MARKETING                                         ', 3, 0, 0),
(396, '300046', 'LEGAL & CONSULTANCY                               ', 3, 0, 0),
(397, '300047', 'TAXATION FEES                                     ', 3, 0, 0),
(398, '300048', 'COMMERCIAL REGISTRATION                           ', 3, 0, 0),
(399, '300049', 'CHAMBER OF COMMERCE                               ', 3, 0, 0),
(400, '300050', 'OTHER FEES                                        ', 3, 0, 0),
(401, '300051', 'TRANSLATION CHARGES                               ', 3, 0, 0),
(402, '300052', 'BROKERAGE TAX                                       ', 3, 0, 0),
(403, '300053', 'GOVT FEE ON BROKERAGES                              ', 3, 0, 0),
(404, '300054', 'EXTERNAL AUDIT FEES                               ', 3, 0, 0),
(405, '300055', 'INTERNAL AUDIT FEES                               ', 3, 0, 0),
(406, '300056', 'BANK CHARGES                                      ', 3, 0, 0),
(407, '300057', 'CREDIT CARD CHARGES                               ', 3, 0, 0),
(408, '300058', 'PRINTING                                          ', 3, 0, 0),
(409, '300059', 'ENVELOPS                                          ', 3, 0, 0),
(410, '300060', 'STATIONERY                                        ', 3, 0, 0),
(411, '300061', 'GENERAL STATIONERY                                ', 3, 0, 0),
(412, '300062', 'BUSINESS CARDS                                    ', 3, 0, 0),
(413, '300063', 'NEWS PAPER & PERIODOCALS                          ', 3, 0, 0),
(414, '300064', 'CO. MEMBERSHIP SUBSCRIPTION                       ', 3, 0, 0),
(415, '300065', 'BUSINESS TRAVEL                                   ', 3, 0, 0),
(416, '300066', 'BUSINESS TRAVEL HOTEL                             ', 3, 0, 0),
(417, '300067', 'BUSINESS TRAVEL INCIDENTAL                        ', 3, 0, 0),
(418, '300068', 'OFFICE CAR PETROL EXPENSES                        ', 3, 0, 0),
(419, '300069', 'CAR MAINTENACE COSTS                              ', 3, 0, 0),
(420, '300070', 'CAR WASHING CHARGES                               ', 3, 0, 0),
(421, '300071', 'CAR PARKING CHARGES                               ', 3, 0, 0),
(422, '300072', 'CAR LEASING CHARGES                               ', 3, 0, 0),
(423, '300073', 'CAR INSURANCE EXPENSES                            ', 3, 0, 0),
(424, '300074', 'TAXI FARE EXPENSES                                ', 3, 0, 0),
(425, '300075', 'ENTERTAINMENT - BUSINESS                          ', 3, 0, 0),
(426, '300076', 'ENTERTAINMENT - STAFF                             ', 3, 0, 0),
(427, '300077', 'ENTERTAINMENT - VISITORS                          ', 3, 0, 0),
(428, '300078', 'CONFERENCE EXPENSES                               ', 3, 0, 0),
(429, '300079', 'TECHNICAL RISK SURVEY COSTS                       ', 3, 0, 0),
(430, '300080', 'DRINKING WATER                                    ', 3, 0, 0),
(431, '300081', 'OFFICE COFFEE TEA EXPENSES                        ', 3, 0, 0),
(432, '300082', 'MISCELLANEOUS EXPENSES                            ', 3, 0, 0),
(433, '300083', 'PROJECT EXPENSES                                  ', 3, 0, 0),
(434, '300084', 'OTHER EXPENSES                                    ', 3, 0, 0),
(435, '300085', 'TAXATION CHARGE FOR THE YEAR                      ', 3, 0, 0),
(436, '300086', 'WITHHOLDING TAX CHARGE                            ', 3, 0, 0),
(437, '300087', 'INVESTMENT EXPENSES                               ', 3, 0, 0),
(438, '300088', 'BAD DEBTS WRITTEN OFF / PROVISION                 ', 3, 0, 0),
(439, '300089', 'MANAGER''S  FEES                                    ', 3, 0, 0),
(466, '300090', 'Unpaid leave', 3, 0, 0),
(1, '310000', 'Employee Account', 3, 0, 0),
(493, '310001', 'Festival Allowance', 3, 0, 0),
(494, '310002', 'Deduction LOP', 3, 0, 0),
(440, '400000', 'STATUTORY RESERVE                                 ', 2, 0, 0),
(441, '400001', 'CAPITAL RESERVE                                   ', 2, 0, 0),
(442, '400002', 'LEGAL RESERVE                                     ', 2, 0, 0),
(443, '400003', 'GENERAL RESERVE                                   ', 2, 0, 0),
(444, '400004', 'PROFIT/LOSS    ', 2, 0, 0),
(445, '400005', 'LOSS FOR THE CURRENT YEAR                         ', 2, 0, 0),
(446, '400006', 'ACCRUED EXPENSES                                  ', 2, 0, 0),
(447, '400007', 'COMMISSION PAYABLE                                ', 2, 0, 0),
(448, '400008', 'DEPRECIATION ON FIXED ASSETS                      ', 2, 0, 0),
(449, '400009', 'DEPRECIATION - COMPUTERS                          ', 2, 0, 0),
(450, '400010', 'DEPRECIATION - FURNITURE & FIXTURES               ', 2, 0, 0),
(451, '400011', 'ACCM DEPN- COMP. HARDWARE & SOFTWRE               ', 2, 0, 0),
(452, '400012', 'ACCUM. DEPN- FURN. FIXTURES & EQPT.               ', 2, 0, 0),
(453, '400013', 'ACCUM. DEPN- MOTOR VEHICLES                       ', 2, 0, 0),
(454, '400014', 'DEPRECIATION - OTHERS                             ', 2, 0, 0),
(455, '400015', 'ACC. DEPN- COMPUTER HARDWARE-HO                   ', 2, 0, 0),
(456, '400016', 'ACC. DEPN- FURNS. FIXTRES. EQPT-HO                ', 2, 0, 0),
(457, '400017', 'ACCUM. DEPN- MOTOR VEHICLES- H.O.                 ', 2, 0, 0),
(458, '400018', 'CLOSING BALANCE ACCOUNT                           ', 2, 0, 0),
(486, 'CRP0001', 'Horeitia Global', 4, 5, 0),
(487, 'CRP0002', 'Isrishti Technologies', 4, 5, 0),
(479, 'EMP001', 'Jerry Babu', 3, 1, 0),
(491, 'EMP002', 'shan salam', 3, 1, 0),
(495, 'EMP003', 'Haseeb', 3, 1, 0),
(490, 'IDL0001', 'haseeb', 4, 5, 0);

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

--
-- Table structure for table `chart_type`
--

CREATE TABLE IF NOT EXISTS `chart_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `chart_type_name` varchar(25) NOT NULL,
  `sort` tinyint(4) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `chart_type`
--

INSERT INTO `chart_type` (`id`, `chart_type_name`, `sort`) VALUES
(1, 'Assets', 1),
(2, 'Liabilities', 4),
(3, 'Expense', 3),
(4, 'Income', 2);

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

--
-- Table structure for table `cheque_info_transaction`
--

CREATE TABLE IF NOT EXISTS `cheque_info_transaction` (
  `cheque_id` int(11) NOT NULL AUTO_INCREMENT,
  `ref_id` int(11) NOT NULL,
  `cheque_date` date NOT NULL,
  `cheque_drawn` varchar(30) NOT NULL,
  `cheque_no` varchar(20) NOT NULL,
  PRIMARY KEY (`cheque_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `cheque_info_transaction`
--


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

--
-- Table structure for table `company`
--

CREATE TABLE IF NOT EXISTS `company` (
  `company_id` int(11) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(100) NOT NULL,
  `company_display_name` varchar(50) NOT NULL,
  `address` text NOT NULL,
  `city` varchar(100) NOT NULL,
  `country` varchar(100) NOT NULL,
  `contact_no` varchar(50) NOT NULL,
  `email` varchar(100) NOT NULL,
  `fax` varchar(50) NOT NULL,
  `website` varchar(50) NOT NULL,
  `logo` varchar(200) NOT NULL,
  `prefix_code` varchar(10) NOT NULL,
  `quotation_terms` text NOT NULL,
  `registration_terms` text NOT NULL,
  `placement_terms` text NOT NULL,
  `fiscal_year_id` int(11) NOT NULL,
  `footer` text NOT NULL,
  PRIMARY KEY (`company_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `company`
--

INSERT INTO `company` (`company_id`, `company_name`, `company_display_name`, `address`, `city`, `country`, `contact_no`, `email`, `fax`, `website`, `logo`, `prefix_code`, `quotation_terms`, `registration_terms`, `placement_terms`, `fiscal_year_id`, `footer`) VALUES
(1, 'Savoy Global WLL', 'Savoy Global', 'Po Box 200203', 'Doha', 'Qatar', '+ 974 44323006', 'jerrybabu@savoyglobal.net', '+974 44322142', 'savoyglobal.net', 'savoy_header.png', 'SAV', 'Quotation\n1. If paid by cheque, confirmation of seat is subject to encashment of cheque. \n\n2. For outstation cheques please add bank charges. \n', 'Registration\n1. If paid by cheque, confirmation of seat is subject to encashment of cheque. \n\n2. For outstation cheques please add bank charges. \n', 'Registration\n1. If paid by cheque, confirmation of seat is subject to encashment of cheque. \n\n2. For outstation cheques please add bank charges. \n', 1, ' Tel: + 974 44323006   |   Fax: +974 44322142  | P.O Box 200203 |  Email: jerrybabu@savoyglobal.net |   Website: savoyglobal.net');

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

--
-- Table structure for table `currency`
--

CREATE TABLE IF NOT EXISTS `currency` (
  `currency_id` int(11) NOT NULL AUTO_INCREMENT,
  `currency_name` varchar(100) NOT NULL,
  `currency_code` varchar(20) NOT NULL,
  `default_currency` int(11) NOT NULL,
  PRIMARY KEY (`currency_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `currency`
--

INSERT INTO `currency` (`currency_id`, `currency_name`, `currency_code`, `default_currency`) VALUES
(1, 'Qatar Riyal', 'QR', 1);

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

--
-- Table structure for table `customer`
--

CREATE TABLE IF NOT EXISTS `customer` (
  `customer_id` int(11) NOT NULL,
  `customer_type` int(11) NOT NULL,
  `customer_name` varchar(100) NOT NULL COMMENT 'Customer Name',
  `customer_no` varchar(30) NOT NULL,
  `customer_address` text NOT NULL,
  `customer_city` varchar(100) NOT NULL,
  `customer_state` varchar(100) NOT NULL,
  `customer_country` varchar(100) NOT NULL,
  `customer_contact_no` varchar(60) NOT NULL,
  `customer_fax` varchar(30) NOT NULL,
  `customer_email` varchar(60) NOT NULL,
  `customer_status` enum('Active','Inactive') NOT NULL,
  PRIMARY KEY (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `customer`
--


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

--
-- Table structure for table `customer_corporate`
--

CREATE TABLE IF NOT EXISTS `customer_corporate` (
  `customer_id` int(11) NOT NULL,
  `customer_group_name` varchar(100) NOT NULL,
  `customer_business_activity` varchar(100) NOT NULL,
  `customer_website` varchar(100) NOT NULL,
  PRIMARY KEY (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `customer_corporate`
--


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

--
-- Table structure for table `customer_corporate_contacts`
--

CREATE TABLE IF NOT EXISTS `customer_corporate_contacts` (
  `customer_corporate_contacts_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) NOT NULL,
  `contact_name` varchar(100) NOT NULL,
  `contact_mobile` varchar(25) NOT NULL,
  `contact_email` varchar(50) NOT NULL,
  `contact_phone` varchar(25) NOT NULL,
  `contact_designation` varchar(150) NOT NULL,
  PRIMARY KEY (`customer_corporate_contacts_id`),
  KEY `customer_id_2` (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `customer_corporate_contacts`
--


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

--
-- Table structure for table `customer_file`
--

CREATE TABLE IF NOT EXISTS `customer_file` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(20) NOT NULL,
  `file_name` varchar(50) NOT NULL,
  `file_location` varchar(250) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `customer_id` (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `customer_file`
--


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

--
-- Table structure for table `customer_personal`
--

CREATE TABLE IF NOT EXISTS `customer_personal` (
  `customer_id` int(11) NOT NULL,
  `customer_dob` date NOT NULL,
  `customer_gender` enum('Male','Female') NOT NULL,
  `customer_profession` varchar(100) NOT NULL,
  `customer_marital_status` enum('Single','Married') NOT NULL,
  PRIMARY KEY (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `customer_personal`
--


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

--
-- Table structure for table `customer_transaction`
--

CREATE TABLE IF NOT EXISTS `customer_transaction` (
  `customer_transaction_id` int(11) NOT NULL AUTO_INCREMENT,
  `ref_id` int(11) NOT NULL,
  `transaction_date` date NOT NULL,
  `customer_account_code` varchar(20) NOT NULL,
  `memo` mediumtext NOT NULL,
  `amount` double NOT NULL,
  `allocated` double NOT NULL,
  PRIMARY KEY (`customer_transaction_id`),
  KEY `ref_id` (`ref_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ;

--
-- Dumping data for table `customer_transaction`
--


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

--
-- Table structure for table `daily_activity`
--

CREATE TABLE IF NOT EXISTS `daily_activity` (
  `daily_activity_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `activity_date` date NOT NULL,
  `remarks` text NOT NULL,
  PRIMARY KEY (`daily_activity_id`),
  KEY `employee_id` (`employee_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `daily_activity`
--


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

--
-- Table structure for table `daily_activity_details`
--

CREATE TABLE IF NOT EXISTS `daily_activity_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `daily_activity_id` int(11) NOT NULL,
  `customer_name` varchar(200) NOT NULL,
  `contact_person_name` varchar(200) NOT NULL,
  `time` varchar(20) NOT NULL,
  `contact_no` varchar(30) NOT NULL,
  `remarks` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `daily_activity_id` (`daily_activity_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `daily_activity_details`
--


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

--
-- Table structure for table `department`
--

CREATE TABLE IF NOT EXISTS `department` (
  `department_id` int(11) NOT NULL AUTO_INCREMENT,
  `department_name` varchar(100) NOT NULL,
  PRIMARY KEY (`department_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `department`
--

INSERT INTO `department` (`department_id`, `department_name`) VALUES
(1, 'Management'),
(2, 'Finance'),
(3, 'Administration');

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

--
-- Table structure for table `designation`
--

CREATE TABLE IF NOT EXISTS `designation` (
  `designation_id` int(11) NOT NULL AUTO_INCREMENT,
  `designation_name` varchar(100) NOT NULL,
  PRIMARY KEY (`designation_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `designation`
--

INSERT INTO `designation` (`designation_id`, `designation_name`) VALUES
(1, 'CEO'),
(2, 'GM'),
(3, 'Sales Manager');

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

--
-- Table structure for table `document`
--

CREATE TABLE IF NOT EXISTS `document` (
  `document_id` int(11) NOT NULL,
  `document_category_id` int(11) NOT NULL,
  `document_name` varchar(100) NOT NULL,
  `description` text NOT NULL,
  `file_path` varchar(100) NOT NULL,
  PRIMARY KEY (`document_id`),
  KEY `document_category_id` (`document_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `document`
--


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

--
-- Table structure for table `document_category`
--

CREATE TABLE IF NOT EXISTS `document_category` (
  `document_category_id` int(11) NOT NULL AUTO_INCREMENT,
  `document_category_name` varchar(100) NOT NULL,
  PRIMARY KEY (`document_category_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `document_category`
--

INSERT INTO `document_category` (`document_category_id`, `document_category_name`) VALUES
(1, 'Official'),
(3, 'Unofficial');

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

--
-- Table structure for table `employee`
--

CREATE TABLE IF NOT EXISTS `employee` (
  `employee_id` int(11) NOT NULL,
  `employee_no` varchar(20) NOT NULL,
  `employee_name` varchar(200) NOT NULL,
  `employee_gender` enum('Male','Female') NOT NULL,
  `employee_dob` date NOT NULL,
  `employee_nationality` varchar(60) NOT NULL,
  `employee_branch_id` int(11) NOT NULL,
  `employee_designation_id` int(11) NOT NULL,
  `employee_department_id` int(11) NOT NULL,
  `employee_grade_id` int(11) NOT NULL,
  `employee_status_id` int(11) NOT NULL,
  `employee_local_address` text NOT NULL,
  `employee_permanent_address` text NOT NULL,
  `employee_contact_no` varchar(20) NOT NULL,
  `employee_email` varchar(50) NOT NULL,
  `employee_passport_no` varchar(50) NOT NULL,
  `employee_visa_type` varchar(100) NOT NULL,
  `employee_visa_expiry_date` date NOT NULL,
  `employee_labour_card_no` varchar(100) NOT NULL,
  `employee_labour_card_expiry_date` date NOT NULL,
  `employee_reporting_to` int(11) NOT NULL,
  PRIMARY KEY (`employee_id`),
  KEY `employee_designation_id` (`employee_designation_id`),
  KEY `employee_status_id` (`employee_status_id`),
  KEY `employee_grade_id` (`employee_grade_id`),
  KEY `employee_department_id` (`employee_department_id`),
  KEY `employee_branch_id` (`employee_branch_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `employee`
--

INSERT INTO `employee` (`employee_id`, `employee_no`, `employee_name`, `employee_gender`, `employee_dob`, `employee_nationality`, `employee_branch_id`, `employee_designation_id`, `employee_department_id`, `employee_grade_id`, `employee_status_id`, `employee_local_address`, `employee_permanent_address`, `employee_contact_no`, `employee_email`, `employee_passport_no`, `employee_visa_type`, `employee_visa_expiry_date`, `employee_labour_card_no`, `employee_labour_card_expiry_date`, `employee_reporting_to`) VALUES
(1, 'EMP001', 'Jerry Babu Basheer', 'Male', '1980-04-04', '', 1, 1, 3, 1, 1, '', '', '998541651651', '', '', '', '0000-00-00', '', '0000-00-00', 0);

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

--
-- Table structure for table `employeecustomer`
--

CREATE TABLE IF NOT EXISTS `employeecustomer` (
  `employeecustomer_id` int(11) NOT NULL,
  `customer_allocation_date` date NOT NULL,
  `customer_id` int(11) NOT NULL,
  `description` text NOT NULL,
  `employee_id` int(11) NOT NULL,
  PRIMARY KEY (`employeecustomer_id`),
  KEY `customer_id` (`customer_id`),
  KEY `employee_id` (`employee_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `employeecustomer`
--


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

--
-- Table structure for table `employee_additional_certification`
--

CREATE TABLE IF NOT EXISTS `employee_additional_certification` (
  `employee_id` int(11) NOT NULL,
  `course` varchar(100) NOT NULL,
  `institute` varchar(100) NOT NULL,
  `yearofpassing` year(4) NOT NULL,
  KEY `employee_id` (`employee_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `employee_additional_certification`
--


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

--
-- Table structure for table `employee_educational_qualification`
--

CREATE TABLE IF NOT EXISTS `employee_educational_qualification` (
  `employee_id` int(11) NOT NULL,
  `course` varchar(100) NOT NULL,
  `university` varchar(50) NOT NULL,
  `yearofpassing` year(4) NOT NULL,
  KEY `employee_id` (`employee_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `employee_educational_qualification`
--


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

--
-- Table structure for table `employee_professional_experience`
--

CREATE TABLE IF NOT EXISTS `employee_professional_experience` (
  `employee_id` int(11) NOT NULL,
  `employer` varchar(100) NOT NULL,
  `designation` varchar(100) NOT NULL,
  `period` varchar(20) NOT NULL,
  KEY `employee_id` (`employee_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `employee_professional_experience`
--


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

--
-- Table structure for table `employee_salary`
--

CREATE TABLE IF NOT EXISTS `employee_salary` (
  `employee_salary_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `wef_date` date NOT NULL,
  `basic_salary` varchar(30) NOT NULL,
  `from_ticket` varchar(100) NOT NULL,
  `to_ticket` varchar(100) NOT NULL,
  `return_ticket` int(11) NOT NULL,
  `no_tickets` int(11) NOT NULL,
  `currency_type` int(11) NOT NULL,
  `payment_method` varchar(8) NOT NULL,
  PRIMARY KEY (`employee_salary_id`),
  KEY `employee_id` (`employee_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `employee_salary`
--


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

--
-- Table structure for table `employee_salary_allowdeduc`
--

CREATE TABLE IF NOT EXISTS `employee_salary_allowdeduc` (
  `employee_salary_id` int(11) NOT NULL,
  `allowdeduc_id` int(11) NOT NULL,
  `amount` double NOT NULL,
  KEY `employee_salary_id` (`employee_salary_id`),
  KEY `allowdeduc_id` (`allowdeduc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `employee_salary_allowdeduc`
--


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

--
-- Table structure for table `employee_salary_medical`
--

CREATE TABLE IF NOT EXISTS `employee_salary_medical` (
  `employee_salary_id` int(11) NOT NULL,
  `type` varchar(100) NOT NULL,
  `company` varchar(100) NOT NULL,
  `policy` varchar(20) NOT NULL,
  `plan` varchar(100) NOT NULL,
  `sum` double NOT NULL,
  KEY `employee_salary_id` (`employee_salary_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `employee_salary_medical`
--


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

--
-- Table structure for table `employee_salary_slip`
--

CREATE TABLE IF NOT EXISTS `employee_salary_slip` (
  `employee_salary_slip_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `salary_date` date NOT NULL,
  `pay_date` date NOT NULL,
  `basic_salary` double NOT NULL,
  `allowance_amount` double NOT NULL,
  `deduction_amount` double NOT NULL,
  `net_payment` double NOT NULL,
  `commission_amount` double NOT NULL,
  `paid_amount` double NOT NULL,
  `unpost` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`employee_salary_slip_id`),
  KEY `employee_id` (`employee_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `employee_salary_slip`
--


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

--
-- Table structure for table `employee_salary_slip_allowdeduc`
--

CREATE TABLE IF NOT EXISTS `employee_salary_slip_allowdeduc` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `employee_salary_slip_id` int(11) NOT NULL,
  `allowdeduc_id` int(11) NOT NULL,
  `amount` double NOT NULL,
  PRIMARY KEY (`id`),
  KEY `allowdeduc_id` (`allowdeduc_id`),
  KEY `employee_salary_slip_id` (`employee_salary_slip_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=94 ;

--
-- Dumping data for table `employee_salary_slip_allowdeduc`
--


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

--
-- Table structure for table `employee_target`
--

CREATE TABLE IF NOT EXISTS `employee_target` (
  `employee_target_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `target` varchar(200) NOT NULL,
  `currency_id` int(11) NOT NULL,
  `target_type` varchar(30) NOT NULL,
  `remarks` text NOT NULL,
  PRIMARY KEY (`employee_target_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `employee_target`
--


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

--
-- Table structure for table `fiscal_year`
--

CREATE TABLE IF NOT EXISTS `fiscal_year` (
  `fiscal_year_id` int(11) NOT NULL AUTO_INCREMENT,
  `fiscal_year_start` date NOT NULL,
  `fiscal_year_end` date NOT NULL,
  `closed` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`fiscal_year_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `fiscal_year`
--

INSERT INTO `fiscal_year` (`fiscal_year_id`, `fiscal_year_start`, `fiscal_year_end`, `closed`) VALUES
(1, '2012-04-01', '2013-03-31', 0);

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

--
-- Table structure for table `gl_trans`
--

CREATE TABLE IF NOT EXISTS `gl_trans` (
  `gl_trans_id` int(11) NOT NULL AUTO_INCREMENT,
  `ref_id` int(11) NOT NULL,
  `transaction_date` date NOT NULL,
  `account_code` varchar(20) NOT NULL,
  `memo` text NOT NULL,
  `amount` double NOT NULL,
  PRIMARY KEY (`gl_trans_id`),
  KEY `ref_id` (`ref_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=159 ;

--
-- Dumping data for table `gl_trans`
--


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

--
-- Table structure for table `grade`
--

CREATE TABLE IF NOT EXISTS `grade` (
  `grade_id` int(11) NOT NULL AUTO_INCREMENT,
  `grade_name` varchar(100) NOT NULL,
  PRIMARY KEY (`grade_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `grade`
--

INSERT INTO `grade` (`grade_id`, `grade_name`) VALUES
(1, 'A'),
(2, 'B');

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

--
-- Table structure for table `holiday`
--

CREATE TABLE IF NOT EXISTS `holiday` (
  `holiday_id` int(11) NOT NULL AUTO_INCREMENT,
  `holiday_name` varchar(100) NOT NULL,
  PRIMARY KEY (`holiday_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `holiday`
--

INSERT INTO `holiday` (`holiday_id`, `holiday_name`) VALUES
(1, 'Summer Vacation'),
(2, 'Vacation');

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

--
-- Table structure for table `leave_allocation`
--

CREATE TABLE IF NOT EXISTS `leave_allocation` (
  `leave_allocation_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `leave_allocation_year` year(4) NOT NULL,
  PRIMARY KEY (`leave_allocation_id`),
  KEY `employee_id` (`employee_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `leave_allocation`
--


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

--
-- Table structure for table `leave_allocation_detail`
--

CREATE TABLE IF NOT EXISTS `leave_allocation_detail` (
  `leave_allocation_id` int(11) NOT NULL,
  `leave_type_id` int(11) NOT NULL,
  `leave_allocation_days` int(11) NOT NULL,
  KEY `leave_allocation_id` (`leave_allocation_id`),
  KEY `leave_type_id` (`leave_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `leave_allocation_detail`
--


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

--
-- Table structure for table `leave_application`
--

CREATE TABLE IF NOT EXISTS `leave_application` (
  `leave_application_id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `leave_type_id` int(11) NOT NULL,
  `from_date` date NOT NULL,
  `to_date` date NOT NULL,
  `remarks` text NOT NULL,
  `leave_status` varchar(100) NOT NULL DEFAULT 'Pending',
  PRIMARY KEY (`leave_application_id`),
  KEY `employee_id` (`employee_id`),
  KEY `leave_type_id` (`leave_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `leave_application`
--


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

--
-- Table structure for table `leave_type`
--

CREATE TABLE IF NOT EXISTS `leave_type` (
  `leave_type_id` int(11) NOT NULL AUTO_INCREMENT,
  `leave_type_name` varchar(100) NOT NULL,
  PRIMARY KEY (`leave_type_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `leave_type`
--

INSERT INTO `leave_type` (`leave_type_id`, `leave_type_name`) VALUES
(1, 'Annual Leave'),
(2, 'Emergency Leave'),
(3, 'Sick Leave');

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

--
-- Table structure for table `login_details`
--

CREATE TABLE IF NOT EXISTS `login_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(30) DEFAULT NULL,
  `password` varchar(32) DEFAULT NULL,
  `login_time` datetime NOT NULL,
  `faillog_count` varchar(11) DEFAULT NULL,
  `userid` varchar(11) DEFAULT NULL,
  `failing_time` datetime NOT NULL,
  `ip_address` varchar(16) NOT NULL,
  `status` varchar(8) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `login_details`
--


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

--
-- Table structure for table `main_account_settings`
--

CREATE TABLE IF NOT EXISTS `main_account_settings` (
  `main_account_settings_id` int(11) NOT NULL AUTO_INCREMENT,
  `project` double NOT NULL,
  `commission` varchar(10) NOT NULL,
  PRIMARY KEY (`main_account_settings_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `main_account_settings`
--

INSERT INTO `main_account_settings` (`main_account_settings_id`, `project`, `commission`) VALUES
(1, 200000, '400007');

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

--
-- Table structure for table `master`
--

CREATE TABLE IF NOT EXISTS `master` (
  `masterid` int(11) NOT NULL AUTO_INCREMENT,
  `menu_id` int(11) NOT NULL,
  `creator_id` int(11) NOT NULL,
  `owner_id` int(11) NOT NULL,
  `created_time` datetime NOT NULL,
  `modified_time` datetime NOT NULL,
  PRIMARY KEY (`masterid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=200 ;

--
-- Dumping data for table `master`
--

INSERT INTO `master` (`masterid`, `menu_id`, `creator_id`, `owner_id`, `created_time`, `modified_time`) VALUES
(1, 0, 1, 1, '2012-04-27 16:48:16', '2012-05-10 15:15:57');

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

--
-- Table structure for table `menu`
--

CREATE TABLE IF NOT EXISTS `menu` (
  `menu_id` int(10) NOT NULL AUTO_INCREMENT,
  `module_id` int(10) NOT NULL,
  `caption` varchar(50) NOT NULL,
  `target` varchar(250) NOT NULL,
  `sort` int(11) NOT NULL,
  `imagepath` varchar(100) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`menu_id`),
  KEY `Module_id` (`module_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=66 ;

--
-- Dumping data for table `menu`
--

INSERT INTO `menu` (`menu_id`, `module_id`, `caption`, `target`, `sort`, `imagepath`, `active`) VALUES
(1, 2, 'Type of Activity', 'manage_activity_category', 1, '', 1),
(2, 2, 'Projects', 'manage_activity', 2, '', 1),
(3, 2, 'Company Details', 'manage_company', 4, '', 1),
(4, 2, 'Branch', 'manage_branch', 5, '', 1),
(5, 3, 'Customers', 'manage_customer', 1, 'Individual Customers.png', 1),
(6, 3, 'Track Customers', 'manage_track_customer', 2, 'staff-customer.png', 1),
(7, 4, 'Employee Customer Allocation', 'manage_employeecustomer', 1, 'staff-customer.png', 1),
(8, 4, 'Sales Leads Management', 'manage_sales_lead', 2, 'Sales Leads.png', 1),
(9, 4, 'Employee Target', 'manage_employee_target', 3, 'Employee Target.png', 1),
(10, 4, 'Branch Target', 'manage_branch_target', 4, 'branch Target.png', 1),
(11, 5, 'Proposals', 'manage_training_proposal', 2, 'Proposals.png', 1),
(12, 5, 'Documents', 'manage_document', 5, 'Documents.png', 1),
(13, 6, 'Employees', 'manage_employee', 1, 'empolyee.png', 1),
(14, 6, 'Leave Allocation', 'manage_leave_allocation', 2, 'leave allocation.png', 1),
(15, 6, 'Leave Application', 'manage_leave_application', 3, 'leave application.png', 1),
(16, 6, 'Employee Salary Settings', 'manage_employee_salary', 6, 'Employee Salary settings.png', 1),
(17, 6, 'Employee Salary Payment', 'manage_salary_payment', 7, 'Employee Salary Payment.png', 1),
(18, 6, 'Pay Slip', 'manage_payslip', 8, 'pay slip.png', 1),
(19, 6, 'Designations', 'manage_designation', 9, 'Designations.png', 1),
(20, 6, 'Departments', 'manage_department', 10, 'dipartment.png', 1),
(21, 6, 'Grade', 'manage_grade', 11, 'Grade.png', 1),
(22, 6, 'Status', 'manage_status', 12, 'Status.png', 1),
(23, 6, 'Allowance & Deductions', 'manage_allowdeduc', 13, 'Allowance & Deductions.png', 1),
(24, 6, 'Leave Types', 'manage_leave_type', 14, 'leave application.png', 1),
(25, 6, 'Holidays', 'manage_holiday', 15, 'Holidays.png', 1),
(26, 7, 'Debit Note', 'manage_debit_note', 1, 'Debit Note.png', 1),
(27, 7, 'Credit Note', 'manage_credit_note', 2, 'Credit Note.png', 1),
(28, 7, 'Customer Payments', 'manage_customer_payment', 3, 'Customer Payments.png', 1),
(29, 7, 'Payment Voucher', 'manage_payment_voucher', 4, 'voucher.png', 1),
(30, 7, 'Receipt Voucher', 'manage_receipt_voucher', 5, 'voucher.png', 1),
(31, 7, 'Bank Journal', 'manage_bank_journal', 6, 'Bank Journal.png', 1),
(32, 7, 'Auto Journal', 'manage_auto_journal', 7, 'Bank Journal.png', 1),
(33, 7, 'Journal Voucher', 'manage_jounal_voucher', 8, 'voucher.png', 1),
(34, 7, 'Trial Balance Report', 'manage_trial_balance_report', 9, 'trial blnce.png', 1),
(35, 7, 'Sub A/c Trial Balance', 'manage_sub_ac_trial_balance', 10, 'trial blnce sub.png', 1),
(36, 7, 'Sub A/c Ledger', 'manage_sub_ac_ledger', 11, 'sub ledjer.png', 1),
(37, 7, 'Statement of Account', 'manage_statement_account', 12, 'statement subacount.png', 1),
(38, 7, 'Aging Summary', 'manage_aging_summary', 13, 'summary.png', 1),
(39, 7, 'Aging report', 'manage_aging_report', 14, 'report.png', 1),
(40, 7, 'Transaction Code', 'manage_transaction_code', 16, 'transaction.png', 1),
(41, 7, 'Sub Accounts', 'manage_sub_account', 18, 'sub main ac.png', 1),
(42, 7, 'Main Accounts', 'manage_main_account', 19, 'main ac.png', 1),
(43, 7, 'Currency', 'manage_currency', 20, 'Currency.png', 1),
(44, 7, 'Fiscal Year', 'manage_fiscal_year', 21, 'Fiscal Year.png', 1),
(45, 7, 'Sub A/C Settings', 'manage_sub_account_settings', 22, 'sub main ac set.png', 1),
(46, 7, 'Main Account Settings', 'manage_main_account_settings', 23, 'main ac set.png', 1),
(47, 8, 'Production Report', 'manage_report', 1, 'Customer Reports.png', 1),
(48, 9, 'Users', 'manage_user', 1, 'user settings.png', 1),
(49, 9, 'User Profiles', 'manage_profile', 2, 'profile settings.png', 1),
(50, 9, 'Reminders', 'manage_reminder', 3, 'reminder.png', 1),
(51, 9, 'Alerts', 'manage_alert', 4, 'alert.png', 0),
(52, 5, 'Quotation', 'manage_quotation_training', 2, 'Customer Payments.png', 1),
(53, 5, 'Registration', 'manage_registration_training', 3, 'Debit Note.png', 1),
(54, 6, 'Offer Letter', 'manage_offer_letter', 4, 'voucher.png', 1),
(55, 6, 'Resume Management', 'manage_resume_management', 5, 'voucher.png', 1),
(56, 2, 'Document Categories', 'manage_document_category', 3, 'Documents.png', 1),
(57, 5, 'Calendar', 'manage_calendar', 6, 'voucher.png', 1),
(58, 4, 'Daily Activity', 'manage_daily_activity', 5, 'user settings.png', 1),
(59, 2, 'Source', 'manage_source', 3, '', 1),
(60, 10, 'Proposals', 'manage_proposal_software', 1, '', 1),
(61, 10, 'Placement', 'manage_placement', 2, '', 1),
(62, 7, 'Bank Accounts', 'manage_bank_account', 17, 'Bank Journal.png', 1),
(63, 8, 'Sales Report', 'manage_report', 2, '', 1),
(64, 8, 'HR Report', 'manage_report', 3, '', 1),
(65, 5, 'Cancellation', 'manage_cancellation_training', 4, '', 1);

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

--
-- Table structure for table `modules`
--

CREATE TABLE IF NOT EXISTS `modules` (
  `module_id` int(10) NOT NULL AUTO_INCREMENT,
  `module_name` varchar(30) NOT NULL,
  `module_title` varchar(100) NOT NULL,
  `sort` int(11) NOT NULL,
  `active` tinyint(1) NOT NULL,
  PRIMARY KEY (`module_id`),
  UNIQUE KEY `module_name` (`module_name`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;

--
-- Dumping data for table `modules`
--

INSERT INTO `modules` (`module_id`, `module_name`, `module_title`, `sort`, `active`) VALUES
(1, 'Home', 'Home', 1, 1),
(2, 'Master', 'Master', 2, 1),
(3, 'Customer', 'Customers', 3, 1),
(4, 'Sales', 'Sales', 4, 1),
(5, 'Training', 'Training', 5, 1),
(6, 'HR', 'HR', 7, 1),
(7, 'Accounting', 'Accounting', 8, 1),
(8, 'Report', 'Reports', 9, 1),
(9, 'Settings', 'Settings', 10, 1),
(10, 'Software', 'Software', 6, 1);

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

--
-- Table structure for table `offer_letter`
--

CREATE TABLE IF NOT EXISTS `offer_letter` (
  `offer_letter_id` int(11) NOT NULL,
  `candidate_name` varchar(100) NOT NULL,
  `candidate_email` varchar(30) NOT NULL,
  `interview_date` date NOT NULL,
  `contact_no` varchar(15) NOT NULL,
  `designation_id` int(11) NOT NULL,
  `joining_date` date NOT NULL,
  `filename` varchar(50) NOT NULL,
  PRIMARY KEY (`offer_letter_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `offer_letter`
--


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

--
-- Table structure for table `project`
--

CREATE TABLE IF NOT EXISTS `project` (
  `project_id` int(11) NOT NULL,
  `project_code` varchar(20) NOT NULL,
  `project_title` varchar(200) NOT NULL,
  `project_description` text NOT NULL,
  `project_date` date NOT NULL,
  PRIMARY KEY (`project_id`),
  UNIQUE KEY `project_code` (`project_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `project`
--


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

--
-- Table structure for table `refs`
--

CREATE TABLE IF NOT EXISTS `refs` (
  `ref_id` int(11) NOT NULL,
  `ref_transaction_type_id` int(11) NOT NULL,
  `ref_code` varchar(20) NOT NULL,
  PRIMARY KEY (`ref_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `refs`
--


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

--
-- Table structure for table `refs_records`
--

CREATE TABLE IF NOT EXISTS `refs_records` (
  `ref_id` int(11) NOT NULL,
  `record_id` int(11) NOT NULL,
  `type` varchar(50) NOT NULL,
  PRIMARY KEY (`ref_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `refs_records`
--


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

--
-- Table structure for table `reminder`
--

CREATE TABLE IF NOT EXISTS `reminder` (
  `reminder_id` int(10) NOT NULL,
  `reminder_date` date NOT NULL,
  `remind_before` int(10) NOT NULL,
  `reminder_subject` varchar(100) NOT NULL,
  `reminder_description` text NOT NULL,
  PRIMARY KEY (`reminder_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `reminder`
--


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

--
-- Table structure for table `report`
--

CREATE TABLE IF NOT EXISTS `report` (
  `report_id` int(11) NOT NULL AUTO_INCREMENT,
  `report_label` varchar(200) NOT NULL,
  `report_target` varchar(200) NOT NULL,
  `report_sort` int(11) NOT NULL,
  `report_module_id` int(11) NOT NULL,
  PRIMARY KEY (`report_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;

--
-- Dumping data for table `report`
--

INSERT INTO `report` (`report_id`, `report_label`, `report_target`, `report_sort`, `report_module_id`) VALUES
(1, 'Training', 'addformdisplay(''production_report_training'',''Report'');', 1, 47),
(2, 'Software', 'addformdisplay(''production_report_software'',''Report'');', 2, 47),
(3, 'Employee Target Report', 'addformdisplay(''employee_target_report'',''Report'')', 1, 63),
(4, 'Leads Report', 'addformdisplay(''leads_report'',''Report'')', 3, 63),
(5, 'Daily Activity Report', 'addformdisplay(''daily_activity_report'',''Report'')', 4, 63),
(6, 'Salary Report', 'addformdisplay(''salary_report'',''Report'')', 7, 64),
(7, 'Leave Report', 'addformdisplay(''leave_report'',''Report'')', 2, 64),
(8, 'Branch Target Report', 'addformdisplay(''branch_target_report'',''Report'')', 2, 63);

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

--
-- Table structure for table `resume_management`
--

CREATE TABLE IF NOT EXISTS `resume_management` (
  `resume_management_id` int(11) NOT NULL,
  `candidate_name` varchar(100) NOT NULL,
  `qualification` text NOT NULL,
  `email` varchar(30) NOT NULL,
  `submission_date` date NOT NULL,
  `expected_salary` varchar(50) NOT NULL,
  `experience` varchar(50) NOT NULL,
  `contact_no` varchar(15) NOT NULL,
  `filename` varchar(50) NOT NULL,
  PRIMARY KEY (`resume_management_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `resume_management`
--


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

--
-- Table structure for table `sales_lead`
--

CREATE TABLE IF NOT EXISTS `sales_lead` (
  `sales_lead_id` int(11) NOT NULL,
  `lead_name` varchar(100) NOT NULL,
  `activity_id` int(11) NOT NULL,
  `contact_no` varchar(50) NOT NULL,
  `email` varchar(50) NOT NULL,
  `status` varchar(100) NOT NULL,
  `remarks` text NOT NULL,
  `employee_id` int(11) NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (`sales_lead_id`),
  KEY `employee_id` (`employee_id`),
  KEY `activity_id` (`activity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sales_lead`
--


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

--
-- Table structure for table `software_placement`
--

CREATE TABLE IF NOT EXISTS `software_placement` (
  `placement_id` int(11) NOT NULL,
  `software_proposal_id` int(11) NOT NULL,
  `placement_date` date NOT NULL,
  `placement_status` varchar(200) NOT NULL,
  `placement_remarks` text NOT NULL,
  `fie_location` varchar(100) NOT NULL,
  `terms_conditions` text NOT NULL,
  PRIMARY KEY (`placement_id`),
  KEY `software_proposal_id` (`software_proposal_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `software_placement`
--


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

--
-- Table structure for table `software_placement_details`
--

CREATE TABLE IF NOT EXISTS `software_placement_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `placement_id` int(11) NOT NULL,
  `description` text NOT NULL,
  `quantity` double NOT NULL,
  `price` double NOT NULL,
  `discount` double NOT NULL,
  PRIMARY KEY (`id`),
  KEY `placement_id` (`placement_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;

--
-- Dumping data for table `software_placement_details`
--


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

--
-- Table structure for table `software_placement_payment`
--

CREATE TABLE IF NOT EXISTS `software_placement_payment` (
  `placement_payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `placement_id` int(11) NOT NULL,
  `amount` double NOT NULL,
  `payment_method` varchar(200) NOT NULL,
  PRIMARY KEY (`placement_payment_id`),
  KEY `placement_id` (`placement_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `software_placement_payment`
--


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

--
-- Table structure for table `software_proposal`
--

CREATE TABLE IF NOT EXISTS `software_proposal` (
  `software_proposal_id` int(11) NOT NULL,
  `software_proposal_title` varchar(200) NOT NULL,
  `software_proposal_date` date NOT NULL,
  `activity_id` int(11) NOT NULL,
  `proposal_code` varchar(20) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `source_id` int(12) NOT NULL,
  `software_proposal_remarks` text NOT NULL,
  `fie_location` varchar(100) NOT NULL,
  PRIMARY KEY (`software_proposal_id`),
  KEY `customer_id` (`customer_id`),
  KEY `activity_id` (`activity_id`),
  KEY `source_id` (`source_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `software_proposal`
--


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

--
-- Table structure for table `software_proposal_details`
--

CREATE TABLE IF NOT EXISTS `software_proposal_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `software_proposal_id` int(11) NOT NULL,
  `description` text NOT NULL,
  `quantity` decimal(10,0) NOT NULL,
  `price` decimal(10,0) NOT NULL,
  `discount` decimal(10,0) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `software_proposal_id` (`software_proposal_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `software_proposal_details`
--


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

--
-- Table structure for table `source`
--

CREATE TABLE IF NOT EXISTS `source` (
  `source_id` int(11) NOT NULL AUTO_INCREMENT,
  `source_name` varchar(100) NOT NULL,
  PRIMARY KEY (`source_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `source`
--

INSERT INTO `source` (`source_id`, `source_name`) VALUES
(2, 'Website'),
(3, 'Direct Marketing');

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

--
-- Table structure for table `status`
--

CREATE TABLE IF NOT EXISTS `status` (
  `status_id` int(11) NOT NULL AUTO_INCREMENT,
  `status_name` varchar(100) NOT NULL,
  PRIMARY KEY (`status_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `status`
--

INSERT INTO `status` (`status_id`, `status_name`) VALUES
(1, 'Active'),
(2, 'Inactive');

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

--
-- Table structure for table `sub_account_settings`
--

CREATE TABLE IF NOT EXISTS `sub_account_settings` (
  `sub_account_settings_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer` int(11) NOT NULL,
  `employee` int(11) NOT NULL,
  `profitloss` int(11) NOT NULL,
  `salary` varchar(10) NOT NULL,
  PRIMARY KEY (`sub_account_settings_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `sub_account_settings`
--

INSERT INTO `sub_account_settings` (`sub_account_settings_id`, `customer`, `employee`, `profitloss`, `salary`) VALUES
(1, 5, 1, 444, '300000');

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

--
-- Table structure for table `training_cancellation`
--

CREATE TABLE IF NOT EXISTS `training_cancellation` (
  `training_cancellation_id` int(11) NOT NULL,
  `training_cancellation_code` varchar(20) NOT NULL,
  `training_registration_id` int(11) NOT NULL,
  `training_cancellation_date` date NOT NULL,
  `training_cancellation_amount` double NOT NULL,
  `remarks` text NOT NULL,
  PRIMARY KEY (`training_cancellation_id`),
  KEY `training_registration_id` (`training_registration_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `training_cancellation`
--


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

--
-- Table structure for table `training_proposal`
--

CREATE TABLE IF NOT EXISTS `training_proposal` (
  `training_id` int(11) NOT NULL,
  `training_title` varchar(200) NOT NULL,
  `training_date` varchar(100) NOT NULL,
  `activity_id` int(11) NOT NULL,
  `training_code` varchar(50) NOT NULL,
  `trainer` varchar(200) NOT NULL,
  `venue` varchar(200) NOT NULL,
  `remarks` text NOT NULL,
  PRIMARY KEY (`training_id`),
  KEY `activity_id` (`activity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `training_proposal`
--


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

--
-- Table structure for table `training_proposal_details`
--

CREATE TABLE IF NOT EXISTS `training_proposal_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `training_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `communication_date` date NOT NULL,
  `source_id` int(11) NOT NULL,
  `no_pax` int(11) NOT NULL,
  `fee_head` decimal(10,0) NOT NULL,
  `discount` decimal(10,0) NOT NULL,
  `proposal_file_location` varchar(200) NOT NULL,
  `remarks` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `training_id` (`training_id`),
  KEY `customer_id` (`customer_id`),
  KEY `source_id` (`source_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `training_proposal_details`
--


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

--
-- Table structure for table `training_quotation`
--

CREATE TABLE IF NOT EXISTS `training_quotation` (
  `training_quotation_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_training_id` int(11) NOT NULL,
  `quotation_code` varchar(20) NOT NULL,
  `quotation_date` date NOT NULL,
  `remarks` text NOT NULL,
  `terms_conditions` text NOT NULL,
  PRIMARY KEY (`training_quotation_id`),
  KEY `customer_training_id` (`customer_training_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `training_quotation`
--


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

--
-- Table structure for table `training_quotation_details`
--

CREATE TABLE IF NOT EXISTS `training_quotation_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `training_quotation_id` int(11) NOT NULL,
  `description` text NOT NULL,
  `no_pax` int(50) NOT NULL,
  `fee_head` double NOT NULL,
  `discount` double NOT NULL,
  PRIMARY KEY (`id`),
  KEY `training_quotation_id` (`training_quotation_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `training_quotation_details`
--


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

--
-- Table structure for table `training_registration`
--

CREATE TABLE IF NOT EXISTS `training_registration` (
  `training_registration_id` int(11) NOT NULL,
  `training_quotation_id` int(11) NOT NULL,
  `training_registration_date` date NOT NULL,
  `remarks` text NOT NULL,
  `terms_conditions` text NOT NULL,
  PRIMARY KEY (`training_registration_id`),
  KEY `training_quotation_id` (`training_quotation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `training_registration`
--


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

--
-- Table structure for table `training_registration_details`
--

CREATE TABLE IF NOT EXISTS `training_registration_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `training_registration_id` int(11) NOT NULL,
  `description` text NOT NULL,
  `no_pax` int(50) NOT NULL,
  `fee_head` double NOT NULL,
  `discount` double NOT NULL,
  PRIMARY KEY (`id`),
  KEY `training_registration_id` (`training_registration_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `training_registration_details`
--


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

--
-- Table structure for table `training_registration_payment`
--

CREATE TABLE IF NOT EXISTS `training_registration_payment` (
  `training_registration_payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `training_registration_id` int(11) NOT NULL,
  `amount` double NOT NULL,
  `payment_method` varchar(200) NOT NULL,
  PRIMARY KEY (`training_registration_payment_id`),
  KEY `training_registration_id` (`training_registration_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `training_registration_payment`
--


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

--
-- Table structure for table `transaction_code`
--

CREATE TABLE IF NOT EXISTS `transaction_code` (
  `transaction_code_id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(30) NOT NULL,
  `type` varchar(30) NOT NULL,
  `trans` tinyint(2) NOT NULL,
  PRIMARY KEY (`transaction_code_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `transaction_code`
--

INSERT INTO `transaction_code` (`transaction_code_id`, `code`, `type`, `trans`) VALUES
(1, 'PV', 'P', 1),
(2, 'CN', 'C', 5),
(3, 'DN', 'D', 6),
(4, 'RV', 'R', 2),
(5, 'BJ', 'B', 4),
(6, 'JV', 'J', 3);

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

--
-- Table structure for table `transaction_type`
--

CREATE TABLE IF NOT EXISTS `transaction_type` (
  `transaction_type_id` tinyint(2) NOT NULL AUTO_INCREMENT,
  `transaction` varchar(30) NOT NULL,
  PRIMARY KEY (`transaction_type_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `transaction_type`
--

INSERT INTO `transaction_type` (`transaction_type_id`, `transaction`) VALUES
(1, 'Payment Voucher'),
(2, 'Receipt Voucher'),
(3, 'Journal Voucher'),
(4, 'Bank Journal'),
(5, 'Credit Note'),
(6, 'Debit Note');

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

--
-- Table structure for table `unposted_journal`
--

CREATE TABLE IF NOT EXISTS `unposted_journal` (
  `unposted_journal_id` int(11) NOT NULL AUTO_INCREMENT,
  `ref_id` int(11) NOT NULL,
  `payment_date` date NOT NULL,
  `account_code` varchar(30) NOT NULL,
  `amount` double(10,2) NOT NULL,
  `memo` tinytext NOT NULL,
  `unpost` tinyint(4) NOT NULL,
  PRIMARY KEY (`unposted_journal_id`),
  KEY `ref_id` (`ref_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=135 ;

--
-- Dumping data for table `unposted_journal`
--


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

--
-- Table structure for table `unposted_payment`
--

CREATE TABLE IF NOT EXISTS `unposted_payment` (
  `unposted_payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `ref_id` int(11) NOT NULL,
  `bank_account_code` varchar(30) NOT NULL,
  `payment_date` date NOT NULL,
  `amount` double(10,2) NOT NULL,
  `other_account_code` varchar(30) NOT NULL,
  `memo` tinytext NOT NULL,
  `unpost` tinyint(4) NOT NULL,
  `payment_method` enum('Cash','Cheque') NOT NULL,
  PRIMARY KEY (`unposted_payment_id`),
  KEY `ref_id` (`ref_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=56 ;

--
-- Dumping data for table `unposted_payment`
--


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

--
-- Table structure for table `user`
--

CREATE TABLE IF NOT EXISTS `user` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(200) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `user_modules` text NOT NULL,
  `modules_permission` text NOT NULL,
  `private` tinytext NOT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `user`
--

INSERT INTO `user` (`user_id`, `username`, `password`, `employee_id`, `user_modules`, `modules_permission`, `private`) VALUES
(1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 1, '1,2,3,4,56,59,5,6,7,8,9,10,58,11,12,52,53,57,65,13,14,15,16,17,18,19,20,21,22,23,24,25,54,55,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,62,47,63,64,48,49,50,51,60,61,', '7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,', '0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'),
(6, 'EMP002', '3e119ab537d3c4cc0c31b9277bfd785e', 100, '1,2,3,4,56,59,5,6,7,8,9,10,58,11,12,52,53,57,65,13,14,15,16,17,18,19,20,21,22,23,24,25,54,55,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,62,47,63,64,48,49,50,51,60,61,', '7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,', '1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,');

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

--
-- Table structure for table `user_profile`
--

CREATE TABLE IF NOT EXISTS `user_profile` (
  `profile_id` int(11) NOT NULL AUTO_INCREMENT,
  `designation_id` int(11) NOT NULL,
  `profile_modules` text NOT NULL,
  `profile_modules_permission` text NOT NULL,
  `profile_modules_private` tinytext NOT NULL,
  PRIMARY KEY (`profile_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `user_profile`
--

INSERT INTO `user_profile` (`profile_id`, `designation_id`, `profile_modules`, `profile_modules_permission`, `profile_modules_private`) VALUES
(1, 1, '1,2,56,59,3,4,5,6,7,8,9,10,58,11,52,53,65,12,57,60,61,13,14,15,54,55,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,62,41,42,43,44,45,46,47,63,64,48,49,50,51,', '7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,', '1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,'),
(6, 3, '1,2,59,56,3,4,5,6,7,8,9,10,58,52,11,53,65,12,57,60,61,13,14,15,54,55,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,62,41,42,43,44,45,46,47,63,64,48,49,50,51,', '4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,', '0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,');

--
-- Constraints for dumped tables
--

--
-- Constraints for table `activity`
--
ALTER TABLE `activity`
  ADD CONSTRAINT `activity_ibfk_1` FOREIGN KEY (`activity_category_id`) REFERENCES `activity_category` (`activity_category_id`) ON DELETE NO ACTION;

--
-- Constraints for table `audit_trail`
--
ALTER TABLE `audit_trail`
  ADD CONSTRAINT `audit_trail_ibfk_1` FOREIGN KEY (`ref_id`) REFERENCES `refs` (`ref_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `audit_trail_ibfk_2` FOREIGN KEY (`fiscal_year`) REFERENCES `fiscal_year` (`fiscal_year_id`) ON DELETE NO ACTION;

--
-- Constraints for table `auto_journal`
--
ALTER TABLE `auto_journal`
  ADD CONSTRAINT `auto_journal_ibfk_1` FOREIGN KEY (`auto_journal_ref_id`) REFERENCES `auto_journal_main` (`auto_journal_main_id`) ON DELETE CASCADE;

--
-- Constraints for table `bank_transaction`
--
ALTER TABLE `bank_transaction`
  ADD CONSTRAINT `bank_transaction_ibfk_1` FOREIGN KEY (`ref_id`) REFERENCES `refs` (`ref_id`) ON DELETE CASCADE;

--
-- Constraints for table `branch_target`
--
ALTER TABLE `branch_target`
  ADD CONSTRAINT `branch_target_ibfk_1` FOREIGN KEY (`branch_target_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE,
  ADD CONSTRAINT `branch_target_ibfk_2` FOREIGN KEY (`branch_id`) REFERENCES `branch` (`branch_id`) ON DELETE CASCADE;

--
-- Constraints for table `calendar`
--
ALTER TABLE `calendar`
  ADD CONSTRAINT `calendar_ibfk_1` FOREIGN KEY (`event_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE;

--
-- Constraints for table `customer`
--
ALTER TABLE `customer`
  ADD CONSTRAINT `customer_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE;

--
-- Constraints for table `customer_corporate`
--
ALTER TABLE `customer_corporate`
  ADD CONSTRAINT `customer_corporate_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON DELETE CASCADE;

--
-- Constraints for table `customer_corporate_contacts`
--
ALTER TABLE `customer_corporate_contacts`
  ADD CONSTRAINT `customer_corporate_contacts_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON DELETE CASCADE;

--
-- Constraints for table `customer_file`
--
ALTER TABLE `customer_file`
  ADD CONSTRAINT `customer_file_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON DELETE CASCADE;

--
-- Constraints for table `customer_personal`
--
ALTER TABLE `customer_personal`
  ADD CONSTRAINT `customer_personal_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON DELETE CASCADE;

--
-- Constraints for table `customer_transaction`
--
ALTER TABLE `customer_transaction`
  ADD CONSTRAINT `customer_transaction_ibfk_1` FOREIGN KEY (`ref_id`) REFERENCES `refs` (`ref_id`) ON DELETE CASCADE;

--
-- Constraints for table `daily_activity`
--
ALTER TABLE `daily_activity`
  ADD CONSTRAINT `daily_activity_ibfk_1` FOREIGN KEY (`daily_activity_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE;

--
-- Constraints for table `daily_activity_details`
--
ALTER TABLE `daily_activity_details`
  ADD CONSTRAINT `daily_activity_details_ibfk_1` FOREIGN KEY (`daily_activity_id`) REFERENCES `daily_activity` (`daily_activity_id`) ON DELETE CASCADE;

--
-- Constraints for table `document`
--
ALTER TABLE `document`
  ADD CONSTRAINT `document_ibfk_1` FOREIGN KEY (`document_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE,
  ADD CONSTRAINT `document_ibfk_2` FOREIGN KEY (`document_category_id`) REFERENCES `document_category` (`document_category_id`) ON DELETE NO ACTION;

--
-- Constraints for table `employee`
--
ALTER TABLE `employee`
  ADD CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE,
  ADD CONSTRAINT `employee_ibfk_2` FOREIGN KEY (`employee_designation_id`) REFERENCES `designation` (`designation_id`) ON DELETE NO ACTION,
  ADD CONSTRAINT `employee_ibfk_3` FOREIGN KEY (`employee_branch_id`) REFERENCES `branch` (`branch_id`) ON DELETE NO ACTION,
  ADD CONSTRAINT `employee_ibfk_4` FOREIGN KEY (`employee_department_id`) REFERENCES `department` (`department_id`) ON DELETE NO ACTION;

--
-- Constraints for table `employeecustomer`
--
ALTER TABLE `employeecustomer`
  ADD CONSTRAINT `employeecustomer_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `employeecustomer_ibfk_3` FOREIGN KEY (`employeecustomer_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE,
  ADD CONSTRAINT `employeecustomer_ibfk_4` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`employee_id`) ON DELETE NO ACTION;

--
-- Constraints for table `employee_additional_certification`
--
ALTER TABLE `employee_additional_certification`
  ADD CONSTRAINT `employee_additional_certification_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`employee_id`) ON DELETE CASCADE;

--
-- Constraints for table `employee_educational_qualification`
--
ALTER TABLE `employee_educational_qualification`
  ADD CONSTRAINT `employee_educational_qualification_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`employee_id`) ON DELETE CASCADE;

--
-- Constraints for table `employee_professional_experience`
--
ALTER TABLE `employee_professional_experience`
  ADD CONSTRAINT `employee_professional_experience_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`employee_id`) ON DELETE CASCADE;

--
-- Constraints for table `employee_salary`
--
ALTER TABLE `employee_salary`
  ADD CONSTRAINT `employee_salary_ibfk_1` FOREIGN KEY (`employee_salary_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE,
  ADD CONSTRAINT `employee_salary_ibfk_2` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`employee_id`) ON DELETE CASCADE;

--
-- Constraints for table `employee_salary_allowdeduc`
--
ALTER TABLE `employee_salary_allowdeduc`
  ADD CONSTRAINT `employee_salary_allowdeduc_ibfk_1` FOREIGN KEY (`employee_salary_id`) REFERENCES `employee_salary` (`employee_salary_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `employee_salary_allowdeduc_ibfk_2` FOREIGN KEY (`allowdeduc_id`) REFERENCES `allowdeduc` (`allowdeduc_id`) ON DELETE NO ACTION;

--
-- Constraints for table `employee_salary_medical`
--
ALTER TABLE `employee_salary_medical`
  ADD CONSTRAINT `employee_salary_medical_ibfk_1` FOREIGN KEY (`employee_salary_id`) REFERENCES `employee_salary` (`employee_salary_id`) ON DELETE CASCADE;

--
-- Constraints for table `employee_salary_slip`
--
ALTER TABLE `employee_salary_slip`
  ADD CONSTRAINT `employee_salary_slip_ibfk_1` FOREIGN KEY (`employee_salary_slip_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE,
  ADD CONSTRAINT `employee_salary_slip_ibfk_2` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`employee_id`) ON DELETE NO ACTION;

--
-- Constraints for table `employee_salary_slip_allowdeduc`
--
ALTER TABLE `employee_salary_slip_allowdeduc`
  ADD CONSTRAINT `employee_salary_slip_allowdeduc_ibfk_1` FOREIGN KEY (`allowdeduc_id`) REFERENCES `allowdeduc` (`allowdeduc_id`) ON DELETE NO ACTION,
  ADD CONSTRAINT `employee_salary_slip_allowdeduc_ibfk_2` FOREIGN KEY (`employee_salary_slip_id`) REFERENCES `employee_salary_slip` (`employee_salary_slip_id`) ON DELETE CASCADE;

--
-- Constraints for table `employee_target`
--
ALTER TABLE `employee_target`
  ADD CONSTRAINT `employee_target_ibfk_1` FOREIGN KEY (`employee_target_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE;

--
-- Constraints for table `gl_trans`
--
ALTER TABLE `gl_trans`
  ADD CONSTRAINT `gl_trans_ibfk_1` FOREIGN KEY (`ref_id`) REFERENCES `refs` (`ref_id`) ON DELETE CASCADE;

--
-- Constraints for table `leave_allocation`
--
ALTER TABLE `leave_allocation`
  ADD CONSTRAINT `leave_allocation_ibfk_1` FOREIGN KEY (`leave_allocation_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE,
  ADD CONSTRAINT `leave_allocation_ibfk_2` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`employee_id`) ON DELETE CASCADE;

--
-- Constraints for table `leave_allocation_detail`
--
ALTER TABLE `leave_allocation_detail`
  ADD CONSTRAINT `leave_allocation_detail_ibfk_1` FOREIGN KEY (`leave_allocation_id`) REFERENCES `leave_allocation` (`leave_allocation_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `leave_allocation_detail_ibfk_2` FOREIGN KEY (`leave_type_id`) REFERENCES `leave_type` (`leave_type_id`) ON DELETE NO ACTION;

--
-- Constraints for table `leave_application`
--
ALTER TABLE `leave_application`
  ADD CONSTRAINT `leave_application_ibfk_1` FOREIGN KEY (`leave_application_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE,
  ADD CONSTRAINT `leave_application_ibfk_2` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`employee_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `leave_application_ibfk_3` FOREIGN KEY (`leave_type_id`) REFERENCES `leave_type` (`leave_type_id`) ON DELETE NO ACTION;

--
-- Constraints for table `offer_letter`
--
ALTER TABLE `offer_letter`
  ADD CONSTRAINT `offer_letter_ibfk_1` FOREIGN KEY (`offer_letter_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE;

--
-- Constraints for table `project`
--
ALTER TABLE `project`
  ADD CONSTRAINT `project_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE;

--
-- Constraints for table `refs`
--
ALTER TABLE `refs`
  ADD CONSTRAINT `refs_ibfk_1` FOREIGN KEY (`ref_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE;

--
-- Constraints for table `refs_records`
--
ALTER TABLE `refs_records`
  ADD CONSTRAINT `refs_records_ibfk_1` FOREIGN KEY (`ref_id`) REFERENCES `refs` (`ref_id`) ON DELETE CASCADE;

--
-- Constraints for table `reminder`
--
ALTER TABLE `reminder`
  ADD CONSTRAINT `reminder_ibfk_1` FOREIGN KEY (`reminder_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE;

--
-- Constraints for table `resume_management`
--
ALTER TABLE `resume_management`
  ADD CONSTRAINT `resume_management_ibfk_1` FOREIGN KEY (`resume_management_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE;

--
-- Constraints for table `sales_lead`
--
ALTER TABLE `sales_lead`
  ADD CONSTRAINT `sales_lead_ibfk_1` FOREIGN KEY (`sales_lead_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE,
  ADD CONSTRAINT `sales_lead_ibfk_2` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`employee_id`) ON DELETE NO ACTION,
  ADD CONSTRAINT `sales_lead_ibfk_3` FOREIGN KEY (`activity_id`) REFERENCES `activity` (`activity_id`) ON DELETE NO ACTION;

--
-- Constraints for table `software_placement`
--
ALTER TABLE `software_placement`
  ADD CONSTRAINT `software_placement_ibfk_1` FOREIGN KEY (`placement_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE,
  ADD CONSTRAINT `software_placement_ibfk_2` FOREIGN KEY (`software_proposal_id`) REFERENCES `software_proposal` (`software_proposal_id`) ON DELETE NO ACTION;

--
-- Constraints for table `software_placement_details`
--
ALTER TABLE `software_placement_details`
  ADD CONSTRAINT `software_placement_details_ibfk_1` FOREIGN KEY (`placement_id`) REFERENCES `software_placement` (`placement_id`) ON DELETE CASCADE;

--
-- Constraints for table `software_placement_payment`
--
ALTER TABLE `software_placement_payment`
  ADD CONSTRAINT `software_placement_payment_ibfk_1` FOREIGN KEY (`placement_id`) REFERENCES `software_placement` (`placement_id`) ON DELETE CASCADE;

--
-- Constraints for table `software_proposal`
--
ALTER TABLE `software_proposal`
  ADD CONSTRAINT `software_proposal_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON DELETE NO ACTION,
  ADD CONSTRAINT `software_proposal_ibfk_2` FOREIGN KEY (`activity_id`) REFERENCES `activity` (`activity_id`) ON DELETE NO ACTION,
  ADD CONSTRAINT `software_proposal_ibfk_3` FOREIGN KEY (`software_proposal_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE,
  ADD CONSTRAINT `software_proposal_ibfk_4` FOREIGN KEY (`source_id`) REFERENCES `source` (`source_id`) ON DELETE NO ACTION;

--
-- Constraints for table `software_proposal_details`
--
ALTER TABLE `software_proposal_details`
  ADD CONSTRAINT `software_proposal_details_ibfk_1` FOREIGN KEY (`software_proposal_id`) REFERENCES `software_proposal` (`software_proposal_id`) ON DELETE CASCADE;

--
-- Constraints for table `training_cancellation`
--
ALTER TABLE `training_cancellation`
  ADD CONSTRAINT `training_cancellation_ibfk_1` FOREIGN KEY (`training_cancellation_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE,
  ADD CONSTRAINT `training_cancellation_ibfk_2` FOREIGN KEY (`training_registration_id`) REFERENCES `training_registration` (`training_registration_id`) ON DELETE NO ACTION;

--
-- Constraints for table `training_proposal`
--
ALTER TABLE `training_proposal`
  ADD CONSTRAINT `training_proposal_ibfk_1` FOREIGN KEY (`training_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE,
  ADD CONSTRAINT `training_proposal_ibfk_2` FOREIGN KEY (`activity_id`) REFERENCES `activity` (`activity_id`) ON DELETE NO ACTION;

--
-- Constraints for table `training_proposal_details`
--
ALTER TABLE `training_proposal_details`
  ADD CONSTRAINT `training_proposal_details_ibfk_1` FOREIGN KEY (`training_id`) REFERENCES `training_proposal` (`training_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `training_proposal_details_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON DELETE NO ACTION,
  ADD CONSTRAINT `training_proposal_details_ibfk_3` FOREIGN KEY (`source_id`) REFERENCES `source` (`source_id`) ON DELETE NO ACTION;

--
-- Constraints for table `training_quotation`
--
ALTER TABLE `training_quotation`
  ADD CONSTRAINT `training_quotation_ibfk_1` FOREIGN KEY (`customer_training_id`) REFERENCES `training_proposal_details` (`id`) ON DELETE NO ACTION;

--
-- Constraints for table `training_quotation_details`
--
ALTER TABLE `training_quotation_details`
  ADD CONSTRAINT `training_quotation_details_ibfk_1` FOREIGN KEY (`training_quotation_id`) REFERENCES `training_quotation` (`training_quotation_id`) ON DELETE CASCADE;

--
-- Constraints for table `training_registration`
--
ALTER TABLE `training_registration`
  ADD CONSTRAINT `training_registration_ibfk_1` FOREIGN KEY (`training_quotation_id`) REFERENCES `training_quotation` (`training_quotation_id`) ON DELETE NO ACTION,
  ADD CONSTRAINT `training_registration_ibfk_2` FOREIGN KEY (`training_registration_id`) REFERENCES `master` (`masterid`) ON DELETE CASCADE;

--
-- Constraints for table `training_registration_details`
--
ALTER TABLE `training_registration_details`
  ADD CONSTRAINT `training_registration_details_ibfk_1` FOREIGN KEY (`training_registration_id`) REFERENCES `training_registration` (`training_registration_id`) ON DELETE CASCADE;

--
-- Constraints for table `training_registration_payment`
--
ALTER TABLE `training_registration_payment`
  ADD CONSTRAINT `training_registration_payment_ibfk_1` FOREIGN KEY (`training_registration_id`) REFERENCES `training_registration` (`training_registration_id`) ON DELETE CASCADE;

--
-- Constraints for table `unposted_journal`
--
ALTER TABLE `unposted_journal`
  ADD CONSTRAINT `unposted_journal_ibfk_1` FOREIGN KEY (`ref_id`) REFERENCES `refs` (`ref_id`) ON DELETE CASCADE;

--
-- Constraints for table `unposted_payment`
--
ALTER TABLE `unposted_payment`
  ADD CONSTRAINT `unposted_payment_ibfk_1` FOREIGN KEY (`ref_id`) REFERENCES `refs` (`ref_id`) ON DELETE CASCADE;

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net