-- http://www.phpmyadmin.net
--




--
-- Database: `demosps`
--

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

--
-- Table structure for table `acount_type`
--

CREATE TABLE IF NOT EXISTS `acount_type` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `accountTypeName` varchar(64) CHARACTER SET utf8 NOT NULL,
  `createdBy` int(11) NOT NULL,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `chat`
--

CREATE TABLE IF NOT EXISTS `chat` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `to` varchar(50) NOT NULL,
  `from` varchar(50) NOT NULL,
  `message` text NOT NULL,
  `sent` datetime NOT NULL,
  `recd` datetime NOT NULL,
  `createdID` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`),
  KEY `to` (`to`),
  KEY `from` (`from`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `chats`
--

CREATE TABLE IF NOT EXISTS `chats` (
  `id` int(5) unsigned NOT NULL AUTO_INCREMENT,
  `message` text NOT NULL,
  `time` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `ci_sessions`
--

CREATE TABLE IF NOT EXISTS `ci_sessions` (
  `session_id` varchar(40) NOT NULL DEFAULT '0',
  `ip_address` varchar(16) NOT NULL DEFAULT '0',
  `user_agent` varchar(50) NOT NULL,
  `last_activity` int(10) unsigned NOT NULL DEFAULT '0',
  `user_data` text NOT NULL,
  PRIMARY KEY (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `ci_users`
--

CREATE TABLE IF NOT EXISTS `ci_users` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(255) NOT NULL,
  `user_email` varchar(255) NOT NULL,
  `user_password` varchar(255) NOT NULL,
  `registered_date` datetime NOT NULL,
  `status` int(5) NOT NULL,
  `online` int(5) NOT NULL,
  PRIMARY KEY (`user_id`,`user_email`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

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

CREATE TABLE IF NOT EXISTS `company` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyName` varchar(128) NOT NULL,
  `companyNo` varchar(16) NOT NULL,
  `incorporateDate` date NOT NULL,
  `businessTypeID` int(11) NOT NULL,
  `line1` varchar(128) NOT NULL,
  `line2` varchar(128) NOT NULL,
  `line3` varchar(128) NOT NULL,
  `city` varchar(128) NOT NULL,
  `companyPostCode` varchar(8) NOT NULL,
  `companyStateID` int(11) NOT NULL,
  `phoneNo` varchar(16) NOT NULL,
  `faxNo` varchar(16) NOT NULL,
  `email` varchar(32) NOT NULL,
  `website` varchar(32) NOT NULL,
  `uploadLogo` varchar(64) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `languageID` int(11) NOT NULL,
  `countryID` int(11) NOT NULL,
  `muslimShareholder` double NOT NULL,
  `gstRegisteredNo` varchar(16) NOT NULL,
  `gstRegisteredDate` date DEFAULT NULL,
  `gstSubmissionBuffer` int(16) NOT NULL,
  `taxablePeriod` smallint(6) NOT NULL,
  `dateFormat` int(16) NOT NULL DEFAULT '1',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(6) NOT NULL,
  `keyCode` varchar(128) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=124 ;

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

INSERT INTO `company` (`ID`, `companyName`, `companyNo`, `incorporateDate`, `businessTypeID`, `line1`, `line2`, `line3`, `city`, `companyPostCode`, `companyStateID`, `phoneNo`, `faxNo`, `email`, `website`, `uploadLogo`, `currencyID`, `languageID`, `countryID`, `muslimShareholder`, `gstRegisteredNo`, `gstRegisteredDate`, `gstSubmissionBuffer`, `taxablePeriod`, `dateFormat`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `keyCode`) VALUES
(121, 'Demo', '12345', '2014-01-01', 1, '123, JLN 123', 'TMN 123', 'taman kelana', 'AMPANG', '33333', 1931, '', '', '', '', 'dmo123.JPG', 1, 0, 458, 80, '111111111111', '2014-11-03', 0, 3, 1, 0, '2014-11-16 17:04:45', 0, '2015-02-10 04:30:33', 0, 'vp8XYptujJYHpiFC+S7qvcaAnh2Lan6qYEbZPXSfcDE'),
(123, 'Demo', '12345', '2014-01-01', 1, '123, JLN 123', 'TMN 123', 'taman kelana', 'AMPANG', '33333', 1931, '', '', '', '', 'dmo123.JPG', 1, 0, 458, 80, '111111111111', '2014-11-03', 0, 3, 1, 0, '2014-11-16 17:04:45', 0, '2015-02-10 04:30:33', 0, 'vp8XYptujJYHpiFC+S7qvcaAnh2Lan6qYEbZPXSfcDE');

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

--
-- Table structure for table `comp_acct_group_bak`
--

CREATE TABLE IF NOT EXISTS `comp_acct_group_bak` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `acctTypeID` int(11) NOT NULL,
  `acctGroupName` varchar(128) NOT NULL,
  `acctCode` char(9) NOT NULL,
  `orderNo` int(11) NOT NULL,
  `parentID` int(11) NOT NULL,
  `title` tinyint(1) DEFAULT '0',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `refID` int(11) NOT NULL COMMENT '_ref_acct_group.ID',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_acct_type`
--

CREATE TABLE IF NOT EXISTS `comp_acct_type` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `acctTypeName` varchar(128) NOT NULL,
  `acctClass` smallint(6) NOT NULL,
  `balance` smallint(1) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `comp_acct_type`
--

INSERT INTO `comp_acct_type` (`ID`, `acctTypeName`, `acctClass`, `balance`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 'Assets', 0, 0, 1, '2014-05-07 21:01:48', 0, '0000-00-00 00:00:00'),
(2, 'Liability', 0, 1, 1, '2014-05-07 21:01:48', 0, '2014-09-02 19:00:33'),
(3, 'Income', 1, 0, 1, '2014-05-07 21:01:48', 0, '0000-00-00 00:00:00'),
(4, 'Expenses', 1, 1, 1, '2014-05-07 21:01:48', 0, '2014-09-21 17:59:38'),
(5, 'Equity', 0, 1, 1, '2014-08-06 18:49:35', 0, '2014-09-02 19:00:39');

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

--
-- Table structure for table `comp_acc_det`
--

CREATE TABLE IF NOT EXISTS `comp_acc_det` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT NULL,
  `acctGroupID` int(11) DEFAULT NULL,
  `acctID` int(11) DEFAULT NULL,
  `year` int(11) DEFAULT NULL,
  `period` varchar(2) DEFAULT NULL,
  `amountdr` double DEFAULT NULL,
  `amountcr` double DEFAULT NULL,
  `total` double DEFAULT '0',
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `is_delete` smallint(6) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `Index 2` (`companyID`,`acctID`,`year`,`period`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=739 ;

--
-- Dumping data for table `comp_acc_det`
--

INSERT INTO `comp_acc_det` (`ID`, `companyID`, `acctGroupID`, `acctID`, `year`, `period`, `amountdr`, `amountcr`, `total`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(456, 121, 1, 30867, 2013, '1', 100000, 100000, 0, 57, '2014-11-18 11:11:31', 19, '2014-11-18 18:04:31', NULL),
(457, 121, 3, 30889, 2013, '1', 90000, 90000, 0, 57, '2014-11-18 11:11:31', 19, '2014-11-18 18:04:31', NULL),
(458, 121, 3, 30894, 2013, '1', 35000, 35000, 0, 57, '2014-11-18 11:11:31', 19, '2014-11-18 18:04:31', NULL),
(482, 121, 4, 30903, 2013, '1', 13000, 13000, 0, 19, '2014-11-20 16:11:49', 19, '2014-11-20 23:50:49', NULL),
(483, 121, 3, 30892, 2013, '1', 13000, 0, 13000, 19, '2014-11-20 16:11:49', 19, '2014-11-20 23:50:49', NULL),
(484, 121, 4, 31256, 2013, '1', 0, 13992, -13992, 19, '2014-11-20 16:11:50', 19, '2014-11-20 23:50:50', NULL),
(485, 121, 3, 30899, 2013, '1', 792, 0, 792, 19, '2014-11-20 16:11:50', 19, '2014-11-20 23:50:50', NULL),
(486, 121, 10, 30947, 2013, '1', 200, 0, 200, 19, '2014-11-20 16:11:50', NULL, '2014-11-20 23:50:50', NULL),
(487, 121, 4, 31256, 2013, '2', 2226, 0, 2226, 19, '2014-11-20 17:11:13', 19, '2014-11-21 00:32:13', NULL),
(488, 121, 3, 30892, 2013, '2', 0, 2100, -2100, 19, '2014-11-20 17:11:13', 19, '2014-11-21 00:32:13', NULL),
(489, 121, 3, 30899, 2013, '2', 0, 126, -126, 19, '2014-11-20 17:11:13', 19, '2014-11-21 00:32:13', NULL),
(538, 121, 4, 30903, 2014, '12', 5011, 17111, -12100, 57, '2014-12-07 11:12:02', 57, '2014-12-07 18:14:02', NULL),
(539, 121, 3, 30892, 2014, '12', 17111, 1375, 15736, 57, '2014-12-07 11:12:02', 57, '2014-12-07 18:14:02', NULL),
(540, 121, 4, 31256, 2014, '12', 23750.36, 20787.66, 2962.7000000000007, 57, '2014-12-07 11:12:02', 57, '2014-12-07 18:26:02', NULL),
(541, 121, 3, 30899, 2014, '12', 309.96000000000004, 0, 309.96000000000004, 57, '2014-12-07 11:12:02', 57, '2014-12-07 18:26:02', NULL),
(542, 121, 3, 30889, 2014, '12', 103638, 51244.66, 52393.34, 57, '2014-12-07 11:12:49', 57, '2014-12-07 18:35:49', NULL),
(544, 121, 1, 30867, 2014, '12', 0, 50000, -50000, 57, '2014-12-07 13:12:45', NULL, '2014-12-07 20:01:45', NULL),
(553, 121, 3, 30887, 2014, '12', 1375, 1375, 0, 57, '2014-12-07 13:12:33', 57, '2014-12-07 20:21:33', NULL),
(554, 121, 3, 30886, 2014, '12', 5512, 5512, 0, 57, '2014-12-07 13:12:45', 57, '2014-12-07 20:22:45', NULL),
(555, 121, 7, 30923, 2014, '12', 0, 5200, -5200, 57, '2014-12-07 13:12:45', 57, '2014-12-07 20:22:45', NULL),
(556, 121, 4, 30906, 2014, '12', 0, 342, -342, 57, '2014-12-07 13:12:45', 57, '2014-12-07 20:22:45', NULL),
(557, 121, 8, 30930, 2014, '12', 1375, 0, 1375, 57, '2014-12-07 13:12:45', 57, '2014-12-07 20:22:45', NULL),
(558, 121, 10, 30958, 2014, '12', 150, 0, 150, 57, '2014-12-07 13:12:53', NULL, '2014-12-07 20:30:53', NULL),
(561, 121, 2, 30870, 2014, '12', 12500, 10000, 2500, 57, '2014-12-07 15:12:45', 57, '2014-12-07 22:35:45', NULL),
(562, 121, 10, 30960, 2014, '12', 155, 0, 155, 57, '2014-12-07 16:12:02', NULL, '2014-12-07 23:09:02', NULL),
(565, 121, 32, 30983, 2014, '12', 0, 20500, -20500, 57, '2014-12-07 16:12:55', 57, '2014-12-07 23:32:55', NULL),
(566, 121, 10, 30947, 2014, '0', -200, 0, -200, 57, '2014-12-07 16:12:19', NULL, '2014-12-07 23:38:19', NULL),
(567, 121, 1, 30868, 2014, '0', 200, 0, 200, 57, '2014-12-07 16:12:19', NULL, '2014-12-07 23:38:19', NULL),
(568, 121, 4, 30902, 2014, '12', 2120, 2120, 0, 57, '2014-12-08 10:12:37', 57, '2014-12-08 17:58:37', NULL),
(572, 121, 3, 30888, 2014, '12', 0, 2500, -2500, 57, '2014-12-08 12:12:59', NULL, '2014-12-08 19:46:59', NULL),
(573, 121, 2, 30884, 2014, '12', 50000, 0, 50000, 57, '2014-12-08 12:12:59', NULL, '2014-12-08 19:46:59', NULL),
(574, 121, 6, 30920, 2014, '12', 10000, 55000, -45000, 57, '2014-12-08 12:12:59', 57, '2014-12-08 19:46:59', NULL),
(575, 121, 10, 30965, 2014, '12', 1000, 0, 1000, 57, '2014-12-08 12:12:59', NULL, '2014-12-08 19:46:59', NULL),
(576, 121, 2, 30885, 2014, '12', 0, 1000, -1000, 57, '2014-12-08 12:12:59', NULL, '2014-12-08 19:46:59', NULL),
(577, 121, 44, 30981, 2014, '12', 5000, 0, 5000, 57, '2014-12-08 12:12:59', NULL, '2014-12-08 19:46:59', NULL),
(578, 121, 2, 30878, 2014, '12', 3500, 0, 3500, 57, '2014-12-08 12:12:00', NULL, '2014-12-08 19:47:00', NULL),
(579, 121, 2, 30881, 2014, '12', 1500, 0, 1500, 57, '2014-12-08 12:12:00', NULL, '2014-12-08 19:47:00', NULL),
(580, 121, 44, 30980, 2014, '12', 60, 0, 60, 57, '2014-12-08 12:12:01', NULL, '2014-12-08 19:47:01', NULL),
(581, 121, 10, 30974, 2014, '12', 2000, 0, 2000, 57, '2014-12-08 12:12:01', NULL, '2014-12-08 19:47:01', NULL),
(582, 121, 4, 30912, 2014, '12', 0, 2000, -2000, 57, '2014-12-08 12:12:01', NULL, '2014-12-08 19:47:01', NULL),
(583, 121, 3, 30896, 2014, '12', 400, 0, 400, 57, '2014-12-08 12:12:01', NULL, '2014-12-08 19:47:01', NULL),
(584, 121, 10, 30950, 2014, '12', 0, 400, -400, 57, '2014-12-08 12:12:01', NULL, '2014-12-08 19:47:01', NULL),
(737, 121, 3, 30889, 2015, '1', 0, 500, -500, 19, '2015-01-18 11:01:29', NULL, '2015-01-18 18:44:29', NULL),
(738, 121, 10, 30948, 2015, '1', 500, 0, 500, 19, '2015-01-18 11:01:29', NULL, '2015-01-18 18:44:29', NULL);

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

--
-- Table structure for table `comp_address`
--

CREATE TABLE IF NOT EXISTS `comp_address` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `addressName` varchar(128) NOT NULL,
  `line1` varchar(128) NOT NULL,
  `line2` varchar(128) NOT NULL,
  `line3` varchar(128) NOT NULL,
  `city` varchar(128) NOT NULL,
  `postCode` varchar(8) NOT NULL,
  `stateID` int(11) NOT NULL,
  `countryID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` tinyint(1) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=39 ;

--
-- Dumping data for table `comp_address`
--

INSERT INTO `comp_address` (`ID`, `companyID`, `addressName`, `line1`, `line2`, `line3`, `city`, `postCode`, `stateID`, `countryID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(35, 121, '', 'Jalan Ship', 'taman beringin', '', 'Gombak', '66555', 1931, 458, 0, '2014-11-20 20:18:21', 0, '0000-00-00 00:00:00', 0),
(37, 121, '', '888, JLN SUKAHATI', 'GEMBIRA RASA', '', 'IPOH', '30020', 1927, 458, 0, '2014-12-07 19:47:55', 0, '0000-00-00 00:00:00', 0),
(38, 121, '', '137, KE JELOBAK', 'KE JELOBU', '', 'REMBAU', '33333', 1925, 458, 0, '2014-12-07 19:48:55', 0, '0000-00-00 00:00:00', 0);

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

--
-- Table structure for table `comp_alert_table`
--

CREATE TABLE IF NOT EXISTS `comp_alert_table` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `acctTypeID` int(11) NOT NULL,
  `badRelief` tinyint(1) NOT NULL,
  `registration` tinyint(1) NOT NULL,
  `gstReturn` tinyint(1) NOT NULL,
  `accountReceivable` tinyint(1) NOT NULL,
  `accountPayable` tinyint(1) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_bank`
--

CREATE TABLE IF NOT EXISTS `comp_bank` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `bankName` varchar(64) NOT NULL,
  `bankShortName` varchar(8) NOT NULL,
  `branch` varchar(64) NOT NULL,
  `bankAccountNo` varchar(32) NOT NULL,
  `currentBalance` double NOT NULL,
  `line1` varchar(64) NOT NULL,
  `line2` varchar(64) NOT NULL,
  `line3` varchar(64) NOT NULL,
  `city` varchar(64) NOT NULL,
  `PostCode` varchar(8) NOT NULL,
  `bankStateID` int(11) NOT NULL,
  `bankCountryID` int(11) NOT NULL,
  `attention` varchar(32) NOT NULL,
  `phoneNumber1` varchar(64) NOT NULL,
  `phoneNumber2` varchar(64) NOT NULL,
  `fax` varchar(64) NOT NULL,
  `generalNote` varchar(255) NOT NULL,
  `creditLimit` int(8) NOT NULL,
  `creditLimitAlert` tinyint(1) NOT NULL,
  `linkAccountID` int(11) NOT NULL,
  `createdDate` date NOT NULL,
  `currencyID` int(11) NOT NULL,
  `email` varchar(32) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` int(16) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_bank_reconcile`
--

CREATE TABLE IF NOT EXISTS `comp_bank_reconcile` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `bankLinkAcctCode` int(11) NOT NULL,
  `reconcileDate` date NOT NULL,
  `reconcileBalance` double NOT NULL,
  `concileDebit` double NOT NULL,
  `concileCredit` double NOT NULL,
  `glBalance` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_bank_reconcile_track_back`
--

CREATE TABLE IF NOT EXISTS `comp_bank_reconcile_track_back` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `reconID` int(11) NOT NULL,
  `transDate` date NOT NULL,
  `refNo` varchar(255) NOT NULL,
  `description` varchar(255) NOT NULL,
  `debitAmount` double NOT NULL,
  `creditAmount` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_budget`
--

CREATE TABLE IF NOT EXISTS `comp_budget` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT NULL,
  `acctGroupID` int(11) DEFAULT NULL,
  `acctID` int(11) DEFAULT NULL,
  `year` int(11) DEFAULT NULL,
  `period` int(2) DEFAULT NULL,
  `amountdr` double DEFAULT NULL,
  `amountcr` double DEFAULT NULL,
  `total` double DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `is_delete` smallint(6) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `Index 2` (`companyID`,`acctID`,`year`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_cash_sales`
--

CREATE TABLE IF NOT EXISTS `comp_cash_sales` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `salesInvoiceDate` date NOT NULL,
  `locationID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `paymentMethodID` int(11) NOT NULL,
  `termsID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `paymentFrom` varchar(128) NOT NULL,
  `totalAmountIncludeTax` double NOT NULL,
  `totalTaxAmount` double NOT NULL,
  `totalamountExcludeTax` double NOT NULL,
  `discount` double NOT NULL,
  `outOfBalance` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(6) NOT NULL DEFAULT '0',
  `updateAble` smallint(6) NOT NULL DEFAULT '1',
  `journalNo` varchar(32) NOT NULL,
  `bankID` int(11) NOT NULL,
  `amountReceived` double NOT NULL,
  `referenceNo` varchar(32) NOT NULL,
  `bankReconcileID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_cash_sales`
--
DROP TRIGGER IF EXISTS `triger_cash_sales`;
DELIMITER //
CREATE TRIGGER `triger_cash_sales` BEFORE INSERT ON `comp_cash_sales`
 FOR EACH ROW set new.serialNo = (select nextSerialNo 
			   from view_serial_comp_cash_sales
                    where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_cash_sales_charges`
--

CREATE TABLE IF NOT EXISTS `comp_cash_sales_charges` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `cashSaleID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `accountNoID` int(11) NOT NULL,
  `chargeDescription` text NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `drAccountID` int(11) NOT NULL,
  `crAccountID` int(11) NOT NULL,
  `drTaxAccountID` int(11) NOT NULL,
  `crTaxAccountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_cash_sales_detail`
--

CREATE TABLE IF NOT EXISTS `comp_cash_sales_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `lineNo` int(11) NOT NULL,
  `invoiceID` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `umID` int(11) NOT NULL,
  `unitPrice` double NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `accountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_chart_of_acct`
--

CREATE TABLE IF NOT EXISTS `comp_chart_of_acct` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `acctGroupID` int(11) NOT NULL,
  `acctCode` char(9) NOT NULL,
  `acctName` varchar(128) NOT NULL,
  `acctDesc` varchar(128) NOT NULL,
  `openingBalanceDr` double NOT NULL,
  `openingBalanceCr` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_chart_of_acct_bak`
--

CREATE TABLE IF NOT EXISTS `comp_chart_of_acct_bak` (
  `ID` int(11) NOT NULL DEFAULT '0',
  `companyID` int(11) NOT NULL,
  `acctGroupID` int(11) NOT NULL,
  `acctCode` char(9) NOT NULL,
  `acctName` varchar(128) NOT NULL,
  `acctDesc` varchar(128) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(6) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `comp_contact`
--

CREATE TABLE IF NOT EXISTS `comp_contact` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `company_contact_name` varchar(128) NOT NULL,
  `position` varchar(32) NOT NULL,
  `telOffice` varchar(32) NOT NULL,
  `telHp` varchar(32) NOT NULL,
  `email` varchar(64) NOT NULL,
  `remaks` text NOT NULL,
  `createdID` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_control_acct_setup`
--

CREATE TABLE IF NOT EXISTS `comp_control_acct_setup` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `refID` int(11) NOT NULL,
  `groupDisplay` int(11) NOT NULL,
  `companyID` int(11) NOT NULL,
  `accountCode` varchar(64) NOT NULL,
  `updateable` smallint(6) NOT NULL DEFAULT '1',
  `accountID` int(11) NOT NULL DEFAULT '0',
  `orderNo` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_currency_conv`
--

CREATE TABLE IF NOT EXISTS `comp_currency_conv` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT NULL,
  `currencyFrom` int(11) DEFAULT NULL,
  `currencyTo` int(11) DEFAULT NULL,
  `startDate` date DEFAULT NULL,
  `endDate` date DEFAULT NULL,
  `rateConv` double DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `is_delete` smallint(6) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `Index 2` (`companyID`,`currencyFrom`,`startDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_delivery_detail`
--

CREATE TABLE IF NOT EXISTS `comp_delivery_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `deliveryID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `orderID` int(11) NOT NULL,
  `invoiceID` int(11) NOT NULL DEFAULT '0',
  `soDetailsLine` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `unitPrice` double NOT NULL,
  `quantityOrdered` int(11) NOT NULL,
  `requiredDate` date NOT NULL,
  `totalQuantitySent` int(11) NOT NULL,
  `quantitySent` int(11) NOT NULL,
  `amount` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `standUM` int(11) NOT NULL,
  `salesID` int(11) NOT NULL,
  `umID` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_delivery_order`
--

CREATE TABLE IF NOT EXISTS `comp_delivery_order` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `deliveryCode` varchar(32) NOT NULL,
  `salesOrderID` int(11) NOT NULL,
  `customerID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `deliveryOrderDate` date NOT NULL,
  `locationID` int(11) NOT NULL,
  `deliverToID` text NOT NULL,
  `toAddress` varchar(200) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `employeeID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `shippingMethodID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `exchangeRate` double NOT NULL,
  `totalReceivable` double NOT NULL,
  `updateAble` int(11) NOT NULL DEFAULT '1',
  `isDelete` int(11) NOT NULL DEFAULT '0',
  `journalNo` varchar(32) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_delivery_order`
--
DROP TRIGGER IF EXISTS `trigger_before_insert_donn1_add_serialNo`;
DELIMITER //
CREATE TRIGGER `trigger_before_insert_donn1_add_serialNo` BEFORE INSERT ON `comp_delivery_order`
 FOR EACH ROW set new.serialNo = (select nextSerialNo 
			   from view_serial_comp_delivery_order 
			   where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_department`
--

CREATE TABLE IF NOT EXISTS `comp_department` (
  `fldid` int(11) NOT NULL DEFAULT '0',
  `code` varchar(18) CHARACTER SET utf8 DEFAULT NULL,
  `description` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
  `dept_head` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  PRIMARY KEY (`fldid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `comp_employee`
--

CREATE TABLE IF NOT EXISTS `comp_employee` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `employeeCode` varchar(16) NOT NULL,
  `employeeName` varchar(64) NOT NULL,
  `employeePosition` varchar(32) NOT NULL,
  `line1` varchar(64) NOT NULL,
  `line2` varchar(64) NOT NULL,
  `line3` varchar(64) NOT NULL,
  `postCode` varchar(8) NOT NULL,
  `city` varchar(32) NOT NULL,
  `stateID` int(11) NOT NULL,
  `countryID` int(11) NOT NULL,
  `phoneNo` varchar(32) NOT NULL,
  `email` varchar(128) NOT NULL,
  `dateOfJoin` date NOT NULL,
  `gender` smallint(6) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `is_delete` smallint(6) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_financial_year`
--

CREATE TABLE IF NOT EXISTS `comp_financial_year` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `financialYear` int(4) NOT NULL,
  `startDate` date NOT NULL,
  `endDate` date NOT NULL,
  `period` smallint(2) NOT NULL,
  `status` smallint(1) NOT NULL COMMENT '0=Open, 1=close',
  `yearEnd` smallint(1) NOT NULL DEFAULT '1',
  `updateAble` tinyint(1) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(6) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_form_control`
--

CREATE TABLE IF NOT EXISTS `comp_form_control` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `formID` int(11) NOT NULL,
  `formCode` varchar(8) NOT NULL,
  `formYear` tinyint(1) NOT NULL,
  `formMonth` tinyint(1) NOT NULL,
  `formDay` tinyint(1) NOT NULL,
  `formInitial` varchar(16) NOT NULL,
  `formInitialNo` int(11) NOT NULL DEFAULT '1',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `orderNo` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_gl`
--

CREATE TABLE IF NOT EXISTS `comp_gl` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT '0',
  `acctCode` char(9) DEFAULT '0',
  `acctGroupID` int(11) DEFAULT '0',
  `description` varchar(128) DEFAULT '0',
  `amount_cr` double DEFAULT '0',
  `amount_dr` double DEFAULT '0',
  `period` smallint(2) DEFAULT '0',
  `year` year(4) DEFAULT NULL,
  `createdID` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_gst_report`
--

CREATE TABLE IF NOT EXISTS `comp_gst_report` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT NULL,
  `ammendment` int(2) DEFAULT '0',
  `A1` varchar(12) NOT NULL DEFAULT '0',
  `A2` varchar(64) NOT NULL DEFAULT '0',
  `B3a` date DEFAULT NULL,
  `B3b` date DEFAULT NULL,
  `B4` date DEFAULT NULL,
  `B5a` double DEFAULT NULL,
  `B5b` double DEFAULT NULL,
  `B6a` double DEFAULT NULL,
  `B6b` double DEFAULT NULL,
  `B7` double DEFAULT NULL,
  `B8` double DEFAULT NULL,
  `B9` double DEFAULT NULL,
  `C10` double DEFAULT NULL,
  `C11` double DEFAULT NULL,
  `C12` double DEFAULT NULL,
  `C13` double DEFAULT NULL,
  `C14` double DEFAULT NULL,
  `C15` double DEFAULT NULL,
  `C16` double DEFAULT NULL,
  `C17` double DEFAULT NULL,
  `C18` double DEFAULT NULL,
  `C19a1` varchar(32) DEFAULT NULL,
  `C19a2` double DEFAULT NULL,
  `C19b1` varchar(32) DEFAULT NULL,
  `C19b2` double DEFAULT NULL,
  `C19c1` varchar(32) DEFAULT NULL,
  `C19c2` double DEFAULT NULL,
  `C19d1` varchar(32) DEFAULT NULL,
  `C19d2` double DEFAULT NULL,
  `C19e1` varchar(32) DEFAULT NULL,
  `C19e2` double DEFAULT NULL,
  `C19f` double DEFAULT NULL,
  `C19g` double DEFAULT NULL,
  `D20` varchar(128) DEFAULT NULL,
  `D21a` varchar(16) DEFAULT NULL,
  `D21b` varchar(16) DEFAULT NULL,
  `D22` varchar(32) DEFAULT NULL,
  `D23` varchar(128) DEFAULT NULL,
  `D24` date DEFAULT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updateAble` tinyint(4) NOT NULL DEFAULT '1',
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_industry`
--

CREATE TABLE IF NOT EXISTS `comp_industry` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `industryID` int(11) NOT NULL,
  `businessTypeID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`),
  KEY `companyID` (`companyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_item_category`
--

CREATE TABLE IF NOT EXISTS `comp_item_category` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `code` varchar(4) NOT NULL,
  `name` varchar(64) NOT NULL,
  `shortName` varchar(8) NOT NULL,
  `description` varchar(128) NOT NULL,
  `orderNo` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updateBy` int(11) NOT NULL,
  `updateTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(6) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `companyID` (`companyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_jl_seq`
--

CREATE TABLE IF NOT EXISTS `comp_jl_seq` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `compID` int(11) DEFAULT NULL,
  `moduleID` int(11) DEFAULT NULL,
  `initial` varchar(2) CHARACTER SET utf8 DEFAULT NULL,
  `year` year(4) NOT NULL,
  `period` int(2) NOT NULL,
  `seqNo` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_journal`
--

CREATE TABLE IF NOT EXISTS `comp_journal` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT NULL,
  `journalID` varchar(50) DEFAULT NULL,
  `description` varchar(128) DEFAULT NULL,
  `referrence` varchar(128) DEFAULT NULL,
  `batch` varchar(50) DEFAULT NULL,
  `module` int(11) DEFAULT NULL,
  `effective_date` date DEFAULT NULL,
  `entered_date` date DEFAULT NULL,
  `period` smallint(2) DEFAULT NULL,
  `year` year(4) DEFAULT NULL,
  `total_amount_dr` double DEFAULT NULL,
  `total_amount_cr` double DEFAULT NULL,
  `total_amount` double DEFAULT '0',
  `status` tinyint(4) DEFAULT '0' COMMENT 'unposted = 0, posted = 1',
  `remarks` varchar(128) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `formNo` varchar(100) DEFAULT NULL,
  `is_delete` smallint(16) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `status` (`status`),
  KEY `journalID` (`journalID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_journal_detail`
--

CREATE TABLE IF NOT EXISTS `comp_journal_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT '0',
  `journalID` varchar(50) DEFAULT '0',
  `sequence` int(11) DEFAULT '0',
  `acctCode` int(11) DEFAULT '0',
  `projectID` int(11) DEFAULT '0',
  `description` varchar(200) DEFAULT '0',
  `amount_cr` double DEFAULT '0',
  `amount_dr` double DEFAULT '0',
  `currencyID` int(11) DEFAULT '0',
  `currency_amount` double DEFAULT '0',
  `exchange_rate` double DEFAULT '0',
  `enter_exchange_rate` double DEFAULT '0',
  `period` smallint(2) DEFAULT '0',
  `year` year(4) DEFAULT NULL,
  `formNo` varchar(50) DEFAULT NULL,
  `supplier` varchar(200) DEFAULT NULL,
  `line` int(11) DEFAULT NULL,
  `status` smallint(2) DEFAULT '0',
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  `bankReconcileID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `journalID` (`journalID`),
  KEY `comp_acc_det` (`companyID`,`acctCode`,`period`,`year`,`status`,`is_delete`),
  KEY `acctCode` (`acctCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_location_transfer`
--

CREATE TABLE IF NOT EXISTS `comp_location_transfer` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL,
  `companyID` int(11) NOT NULL,
  `fromLocationID` int(11) NOT NULL,
  `toLocationID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `movementTypeID` int(11) NOT NULL,
  `dateTransfer` date NOT NULL,
  `memo` text NOT NULL,
  `is_delete` smallint(6) NOT NULL,
  `updateable` smallint(6) NOT NULL DEFAULT '1',
  `createdby` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_location_transfer_detail`
--

CREATE TABLE IF NOT EXISTS `comp_location_transfer_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `locationTransferID` int(11) NOT NULL,
  `LineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `fromStock` int(11) NOT NULL,
  `is_delete` smallint(6) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_opening_balance`
--

CREATE TABLE IF NOT EXISTS `comp_opening_balance` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `accountID` int(11) NOT NULL,
  `year` int(11) NOT NULL,
  `debit` double NOT NULL,
  `credit` double NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_payment`
--

CREATE TABLE IF NOT EXISTS `comp_payment` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `amountPaid` double NOT NULL,
  `paymentMethodID` int(11) NOT NULL,
  `referenceNo` varchar(16) NOT NULL,
  `bankID` int(11) NOT NULL,
  `reconcile` smallint(6) NOT NULL DEFAULT '0',
  `accountID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `paymentDate` date NOT NULL,
  `updateAble` smallint(1) NOT NULL DEFAULT '1',
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `addressID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `totalDiscount` double NOT NULL,
  `bankCharges` double NOT NULL,
  `totalOtherCharge` double NOT NULL,
  `totalPaid` double NOT NULL,
  `totalApplied` double NOT NULL,
  `outOfBalance` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  `accountDescription` varchar(128) NOT NULL DEFAULT 'Temp Description',
  `paymentID` int(11) NOT NULL,
  `journalNo` varchar(32) NOT NULL,
  `bankReconcileID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_payment`
--
DROP TRIGGER IF EXISTS `trigger_before_insert_cp_add_serialNo`;
DELIMITER //
CREATE TRIGGER `trigger_before_insert_cp_add_serialNo` BEFORE INSERT ON `comp_payment`
 FOR EACH ROW set new.serialNo = (select nextSerialNo 
			   from view_serial_comp_payment 
			   where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_payment_detail`
--

CREATE TABLE IF NOT EXISTS `comp_payment_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `paymentID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `purchaseInvoiceID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `APBalance` double NOT NULL,
  `discount` double NOT NULL,
  `amountApplied` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_payment_others`
--

CREATE TABLE IF NOT EXISTS `comp_payment_others` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `otherPaymentType` smallint(6) NOT NULL COMMENT '0=with item. 1=without item',
  `companyID` int(11) NOT NULL,
  `payTo` text NOT NULL,
  `projectID` int(11) NOT NULL,
  `amountPaid` double NOT NULL,
  `paymentMethodID` int(11) NOT NULL,
  `referenceNo` varchar(32) NOT NULL,
  `accountID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `paymentDate` date NOT NULL,
  `updateAble` smallint(1) NOT NULL DEFAULT '1',
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `addressID` int(11) NOT NULL,
  `locationID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `totalDiscount` double NOT NULL,
  `bankCharges` double NOT NULL,
  `bankId` int(11) NOT NULL,
  `totalOtherCharge` double NOT NULL,
  `totalPaid` double NOT NULL,
  `totalApplied` double NOT NULL,
  `outOfBalance` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  `accountDescription` varchar(128) NOT NULL,
  `paymentID` int(11) NOT NULL,
  `journalNo` varchar(32) NOT NULL,
  `reconcile` smallint(6) NOT NULL,
  `bankReconcileID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_payment_others`
--
DROP TRIGGER IF EXISTS `trigger_before_insert_payo_add_serialNo`;
DELIMITER //
CREATE TRIGGER `trigger_before_insert_payo_add_serialNo` BEFORE INSERT ON `comp_payment_others`
 FOR EACH ROW set new.serialNo = (select nextSerialNo 
			   from view_serial_comp_payment_others 
			   where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_payment_others_without_item`
--

CREATE TABLE IF NOT EXISTS `comp_payment_others_without_item` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `otherPaymentID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `accountID` int(11) NOT NULL,
  `itemdescription` text NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_payment_others_with_item`
--

CREATE TABLE IF NOT EXISTS `comp_payment_others_with_item` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `otherPaymentID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text NOT NULL,
  `quantity` int(11) NOT NULL,
  `umID` int(11) NOT NULL,
  `unitPrice` double NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `accountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `is_delete` smallint(16) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_project`
--

CREATE TABLE IF NOT EXISTS `comp_project` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `project_name` varchar(128) NOT NULL,
  `projectManagerID` int(11) NOT NULL,
  `totalBudget` double NOT NULL,
  `remarks` text NOT NULL,
  `createdID` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_purchase_order`
--

CREATE TABLE IF NOT EXISTS `comp_purchase_order` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL,
  `companyID` int(11) NOT NULL,
  `purchaserID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `invoiceID` int(11) NOT NULL DEFAULT '0',
  `shiptoID` int(11) NOT NULL,
  `purchaseOrderNo` varchar(32) NOT NULL,
  `salesAgentName` varchar(64) NOT NULL,
  `formNo` varchar(16) NOT NULL,
  `poDate` date NOT NULL,
  `exchangeRate` double NOT NULL,
  `termAndConditionID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updateAble` tinyint(4) NOT NULL DEFAULT '1',
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `memo` varchar(255) NOT NULL,
  `is_delete` int(11) NOT NULL DEFAULT '0',
  `journalNo` varchar(32) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_purchase_order`
--
DROP TRIGGER IF EXISTS `mytrigerfopobeforeinsert`;
DELIMITER //
CREATE TRIGGER `mytrigerfopobeforeinsert` BEFORE INSERT ON `comp_purchase_order`
 FOR EACH ROW set new.serialNo = 
(select nextSerialNo from view_serial_comp_purchase_order 
	where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_purchase_order_detail`
--

CREATE TABLE IF NOT EXISTS `comp_purchase_order_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `purchaseOrderID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemCode` varchar(16) NOT NULL,
  `itemName` varchar(128) NOT NULL,
  `description` text,
  `unitPrice` double NOT NULL,
  `umID` int(11) NOT NULL,
  `quantityOrder` int(11) NOT NULL,
  `quantityReceivedTotal` int(11) NOT NULL DEFAULT '0',
  `amount` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_purchase_price`
--

CREATE TABLE IF NOT EXISTS `comp_purchase_price` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `umID` int(11) NOT NULL,
  `price` double NOT NULL,
  `startDate` date NOT NULL,
  `endDate` date NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` varchar(50) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_quotation`
--

CREATE TABLE IF NOT EXISTS `comp_quotation` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `customerID` int(11) NOT NULL,
  `quotationCode` varchar(32) NOT NULL,
  `salesAgentID` int(11) NOT NULL,
  `employeeID` int(11) unsigned NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `quotationDate` date NOT NULL,
  `deliverToID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `supplierID` text NOT NULL,
  `memo` varchar(128) NOT NULL,
  `totalTaxAmount` double NOT NULL,
  `exchangeRate` double NOT NULL,
  `totalReceivable` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_quotation`
--
DROP TRIGGER IF EXISTS `trigger_before_insert_cq_add_serialNo`;
DELIMITER //
CREATE TRIGGER `trigger_before_insert_cq_add_serialNo` BEFORE INSERT ON `comp_quotation`
 FOR EACH ROW set new.serialNo = 
(select nextSerialNo from view_serial_comp_quotation 
	where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_quotation_detail`
--

CREATE TABLE IF NOT EXISTS `comp_quotation_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `quotationID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `description` varchar(200) NOT NULL,
  `unitOfPrice` double NOT NULL,
  `quantityOrder` int(11) NOT NULL,
  `amountExcludeTax` double DEFAULT NULL,
  `taxID` int(11) NOT NULL,
  `umID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncudeTax` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_receive_delivery_conn`
--

CREATE TABLE IF NOT EXISTS `comp_receive_delivery_conn` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `receiveDetailID` int(11) NOT NULL,
  `deliveryDetailID` int(11) NOT NULL,
  `type` int(11) NOT NULL COMMENT '1 = DO, 2 = LocTrans, 3 = salesDebitNote, 4 = supplierDebitNote, 5 = cashSale, 6 = item adjustment',
  `qty` bigint(20) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_receive_item`
--

CREATE TABLE IF NOT EXISTS `comp_receive_item` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `opening_balance` tinyint(1) NOT NULL DEFAULT '0',
  `supplierDoNo` varchar(32) NOT NULL,
  `purchaseOrderID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `deliveryDate` date NOT NULL,
  `locationID` int(11) NOT NULL,
  `deliverToID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `exchangeRate` float NOT NULL,
  `employeeID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `shippingMethodID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `totalPayable` double NOT NULL,
  `journalNo` varchar(32) NOT NULL,
  `updateAble` smallint(6) NOT NULL DEFAULT '1',
  `isDelete` tinyint(1) NOT NULL DEFAULT '0',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_receive_item`
--
DROP TRIGGER IF EXISTS `triger_BEFORE_Insert_addSerialForReceiveItem`;
DELIMITER //
CREATE TRIGGER `triger_BEFORE_Insert_addSerialForReceiveItem` BEFORE INSERT ON `comp_receive_item`
 FOR EACH ROW set new.serialNo = 
(select nextSerialNo from view_serial_comp_receive_item 
	where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_receive_item_detail`
--

CREATE TABLE IF NOT EXISTS `comp_receive_item_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `receiveID` int(11) NOT NULL,
  `invoiceID` int(11) NOT NULL DEFAULT '0',
  `lineNo` int(11) NOT NULL,
  `poDetailID` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemCode` varchar(16) NOT NULL,
  `itemName` varchar(128) NOT NULL,
  `description` text,
  `unitPrice` double NOT NULL,
  `quantityOrder` double NOT NULL,
  `quantityReceived` double NOT NULL DEFAULT '0',
  `umID` int(11) NOT NULL DEFAULT '0',
  `standUM` int(11) NOT NULL,
  `amount` double NOT NULL,
  `balanceItem` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_receive_item_detail`
--
DROP TRIGGER IF EXISTS `updateBalanceItem`;
DELIMITER //
CREATE TRIGGER `updateBalanceItem` BEFORE INSERT ON `comp_receive_item_detail`
 FOR EACH ROW if new.balanceitem is null then
set new.balanceItem = new.quantityReceived;
end if
//
DELIMITER ;

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

--
-- Table structure for table `comp_receive_payment`
--

CREATE TABLE IF NOT EXISTS `comp_receive_payment` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `customerID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `paymentMethodID` int(11) NOT NULL,
  `referenceNo` varchar(32) NOT NULL,
  `bankID` int(11) NOT NULL,
  `accountID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `receivePaymentDate` date NOT NULL,
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `addressID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `totalDiscount` double NOT NULL,
  `bankCharges` double NOT NULL,
  `totalOtherCharge` double NOT NULL,
  `totalReceived` double NOT NULL,
  `totalApplied` double NOT NULL,
  `outOfBalance` double NOT NULL,
  `updateAble` smallint(1) NOT NULL DEFAULT '1',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(6) NOT NULL DEFAULT '0',
  `journalNo` varchar(32) NOT NULL,
  `bankReconcileID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_receive_payment`
--
DROP TRIGGER IF EXISTS `trigger_before_insert_rpay_add_serialNo`;
DELIMITER //
CREATE TRIGGER `trigger_before_insert_rpay_add_serialNo` BEFORE INSERT ON `comp_receive_payment`
 FOR EACH ROW set new.serialNo = (select nextSerialNo 
			   from view_serial_comp_receive_payment
			   where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_receive_payment_detail`
--

CREATE TABLE IF NOT EXISTS `comp_receive_payment_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `receivePaymentID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `invoiceID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `ARBalance` double NOT NULL,
  `discount` double NOT NULL,
  `amountApplied` double NOT NULL,
  `debtRecoverID` int(11) NOT NULL DEFAULT '0',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_receive_payment_others`
--

CREATE TABLE IF NOT EXISTS `comp_receive_payment_others` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `receiveFrom` varchar(128) NOT NULL,
  `projectID` int(11) NOT NULL,
  `paymentMethodID` int(11) NOT NULL,
  `referenceNo` varchar(32) NOT NULL,
  `bankID` int(11) NOT NULL,
  `accountID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `receivePaymentDate` date NOT NULL,
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `addressID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `totalDiscount` double NOT NULL,
  `bankCharges` double NOT NULL,
  `totalOtherCharge` double NOT NULL,
  `totalReceived` double NOT NULL,
  `totalApplied` double NOT NULL,
  `updateAble` smallint(1) NOT NULL DEFAULT '1',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(6) NOT NULL DEFAULT '0',
  `journalNo` varchar(32) NOT NULL,
  `bankReconcileID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_receive_payment_others`
--
DROP TRIGGER IF EXISTS `trigger_before_insert_rpay_add_others_serialNo`;
DELIMITER //
CREATE TRIGGER `trigger_before_insert_rpay_add_others_serialNo` BEFORE INSERT ON `comp_receive_payment_others`
 FOR EACH ROW set new.serialNo = (select nextSerialNo 
			   from view_serial_comp_receive_payment_others
			   where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_receive_payment_others_detail`
--

CREATE TABLE IF NOT EXISTS `comp_receive_payment_others_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `receivePaymentOthersID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `accountNoID` int(11) NOT NULL,
  `description` text NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_sales_agent`
--

CREATE TABLE IF NOT EXISTS `comp_sales_agent` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `agentCode` varchar(32) NOT NULL,
  `agentName` varchar(128) NOT NULL,
  `position` varchar(32) NOT NULL,
  `telOffice` varchar(32) NOT NULL,
  `telHp` varchar(32) NOT NULL,
  `email` varchar(64) NOT NULL,
  `commisionRate` double NOT NULL,
  `remarks` text NOT NULL,
  `createdID` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_sales_bad_debt`
--

CREATE TABLE IF NOT EXISTS `comp_sales_bad_debt` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `custID` int(11) NOT NULL,
  `valueBadDebt` double NOT NULL,
  `gstBadDebt` double NOT NULL,
  `transDate` date NOT NULL,
  `updateAble` tinyint(1) NOT NULL DEFAULT '1',
  `journalNo` varchar(255) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_sales_creditnote`
--

CREATE TABLE IF NOT EXISTS `comp_sales_creditnote` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `customerID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `creditNoteDate` date NOT NULL,
  `salesInvoiceID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `termsID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `agentID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `employeeID` int(11) NOT NULL,
  `shippingMethodID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `amountPaid` decimal(10,0) NOT NULL,
  `totalTaxAmount` double NOT NULL,
  `totalPayable` double NOT NULL,
  `total` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  `updateAble` tinyint(1) NOT NULL DEFAULT '1',
  `journalNo` varchar(32) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_sales_creditnote`
--
DROP TRIGGER IF EXISTS `trigger_before_insert_scn_add_serialNo`;
DELIMITER //
CREATE TRIGGER `trigger_before_insert_scn_add_serialNo` BEFORE INSERT ON `comp_sales_creditnote`
 FOR EACH ROW set new.serialNo = (select nextSerialNo 
			   from view_serial_comp_sales_creditnote
			   where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_sales_creditnote_charges`
--

CREATE TABLE IF NOT EXISTS `comp_sales_creditnote_charges` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `creditNoteID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `accountNoID` int(11) NOT NULL,
  `chargeDescription` text NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `drAccountID` int(11) NOT NULL,
  `crAccountID` int(11) NOT NULL,
  `drTaxAccountID` int(11) NOT NULL,
  `crTaxAccountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_sales_creditnote_detail`
--

CREATE TABLE IF NOT EXISTS `comp_sales_creditnote_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `creditnoteID` int(11) NOT NULL,
  `invoiceDetailID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text NOT NULL,
  `umID` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `unitPrice` double NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `accountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_sales_debitnote`
--

CREATE TABLE IF NOT EXISTS `comp_sales_debitnote` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `customerID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `debitNoteDate` date NOT NULL,
  `salesInvoiceID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `termsID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `agentID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `employeeID` int(11) NOT NULL,
  `shippingMethodID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `amountPaid` decimal(10,0) NOT NULL,
  `totalTaxAmount` double NOT NULL,
  `totalPayable` double NOT NULL,
  `total` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  `updateAble` tinyint(1) NOT NULL DEFAULT '1',
  `journalNo` varchar(32) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_sales_debitnote`
--
DROP TRIGGER IF EXISTS `trigger_before_insert_sdn_add_serialNo`;
DELIMITER //
CREATE TRIGGER `trigger_before_insert_sdn_add_serialNo` BEFORE INSERT ON `comp_sales_debitnote`
 FOR EACH ROW set new.serialNo = (select nextSerialNo 
			   from view_serial_comp_sales_debitnote
			   where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_sales_debitnote_charges`
--

CREATE TABLE IF NOT EXISTS `comp_sales_debitnote_charges` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `debitNoteID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `accountNoID` int(11) NOT NULL,
  `chargeDescription` text NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `drAccountID` int(11) NOT NULL,
  `crAccountID` int(11) NOT NULL,
  `drTaxAccountID` int(11) NOT NULL,
  `crTaxAccountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_sales_debitnote_detail`
--

CREATE TABLE IF NOT EXISTS `comp_sales_debitnote_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `debitnoteID` int(11) NOT NULL,
  `invoiceDetailID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text NOT NULL,
  `umID` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `unitPrice` double NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `accountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_sales_debt_recover`
--

CREATE TABLE IF NOT EXISTS `comp_sales_debt_recover` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `custID` int(11) NOT NULL,
  `valueDebtRecover` double NOT NULL,
  `gstDebtRecover` double NOT NULL,
  `transDate` date NOT NULL,
  `updateAble` tinyint(1) NOT NULL DEFAULT '1',
  `journalNo` varchar(255) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_sales_detail`
--

CREATE TABLE IF NOT EXISTS `comp_sales_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `salesID` int(11) NOT NULL,
  `invoiceID` int(11) NOT NULL DEFAULT '0',
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `description` varchar(200) DEFAULT NULL,
  `unitPrice` double DEFAULT NULL,
  `unitmeasure` int(11) DEFAULT NULL,
  `umID` int(11) NOT NULL,
  `standUM` int(11) NOT NULL,
  `quantityOrder` double DEFAULT NULL,
  `quantityShip` double DEFAULT '0',
  `amount` double DEFAULT NULL,
  `requiredDate` date DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_sales_invoice`
--

CREATE TABLE IF NOT EXISTS `comp_sales_invoice` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `invoiceCodeID` int(11) NOT NULL COMMENT '1=sales inv, 2=direct sales inv,  3=debitNote, 4=creditNte',
  `salesID` int(11) NOT NULL,
  `customerID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `salesInvoiceDate` date NOT NULL,
  `customerPoNo` varchar(32) NOT NULL,
  `locationID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `termsID` int(11) NOT NULL,
  `shipToID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `agentID` int(11) NOT NULL,
  `printInInvoice` smallint(6) NOT NULL DEFAULT '0',
  `memo` text NOT NULL,
  `employeeID` int(11) NOT NULL,
  `showSaleAgent` tinyint(4) NOT NULL,
  `shippingMethodID` int(11) NOT NULL,
  `totalTaxAmount` double NOT NULL,
  `totalReceivable` double NOT NULL,
  `totalamount` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(6) NOT NULL DEFAULT '0',
  `updateAble` smallint(6) NOT NULL DEFAULT '1',
  `journalNo` varchar(32) NOT NULL,
  `salesOrderID` int(11) DEFAULT NULL,
  `badDebtID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `comp_invoice_date` (`salesInvoiceDate`,`companyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_sales_invoice`
--
DROP TRIGGER IF EXISTS `trir_befor_inser_SI`;
DELIMITER //
CREATE TRIGGER `trir_befor_inser_SI` BEFORE INSERT ON `comp_sales_invoice`
 FOR EACH ROW set new.serialNo = (select nextSerialNo 
			   from view_serial_comp_sales_invoice
			   where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_sales_invoice_charges`
--

CREATE TABLE IF NOT EXISTS `comp_sales_invoice_charges` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `invoiceID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `accountNoID` int(11) NOT NULL,
  `chargeDescription` text NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `drAccountID` int(11) NOT NULL,
  `crAccountID` int(11) NOT NULL,
  `drTaxAccountID` int(11) NOT NULL,
  `crTaxAccountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_sales_invoice_detail`
--

CREATE TABLE IF NOT EXISTS `comp_sales_invoice_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `invoiceID` int(11) NOT NULL,
  `doID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemdescription` varchar(128) NOT NULL,
  `umID` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `unitPrice` double NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `accountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`ID`),
  KEY `item` (`itemID`),
  KEY `tax` (`taxID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_sales_order`
--

CREATE TABLE IF NOT EXISTS `comp_sales_order` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(16) NOT NULL,
  `companyID` int(11) NOT NULL,
  `invoiceID` int(11) NOT NULL,
  `customerID` int(11) DEFAULT NULL,
  `OrderNo` varchar(32) DEFAULT NULL,
  `formNo` varchar(32) DEFAULT NULL,
  `currencyID` int(11) DEFAULT NULL,
  `exchangeRate` double DEFAULT '1',
  `salesOrderDate` date DEFAULT NULL,
  `dateRequired` date DEFAULT NULL,
  `deliveryToID` int(11) DEFAULT NULL,
  `salesPerson` int(11) DEFAULT NULL,
  `memo` varchar(128) DEFAULT NULL,
  `supplierID` int(11) DEFAULT NULL,
  `totalAmount` double DEFAULT NULL,
  `totalReceivable` double DEFAULT NULL,
  `status` tinyint(1) DEFAULT '1',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `is_delete` smallint(16) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_sales_order`
--
DROP TRIGGER IF EXISTS `Addserialsaleorder`;
DELIMITER //
CREATE TRIGGER `Addserialsaleorder` BEFORE INSERT ON `comp_sales_order`
 FOR EACH ROW set new.serialNo = (select nextSerialNo 
			   from view_serial_comp_sales_order
			   where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_sales_price`
--

CREATE TABLE IF NOT EXISTS `comp_sales_price` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `customerID` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `umID` int(11) NOT NULL,
  `startDate` date NOT NULL,
  `endDate` date NOT NULL,
  `price` double NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_section`
--

CREATE TABLE IF NOT EXISTS `comp_section` (
  `fldid` int(11) NOT NULL DEFAULT '0',
  `code` varchar(18) CHARACTER SET utf8 DEFAULT NULL,
  `department` varchar(18) CHARACTER SET utf8 DEFAULT NULL,
  `description` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
  `section_head` varchar(50) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `comp_so_seq`
--

CREATE TABLE IF NOT EXISTS `comp_so_seq` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `compID` int(11) DEFAULT NULL,
  `moduleID` int(11) DEFAULT NULL,
  `initial` varchar(2) CHARACTER SET utf8 DEFAULT NULL,
  `year` year(4) DEFAULT NULL,
  `period` int(2) DEFAULT NULL,
  `seqNo` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_supplier_closing`
--

CREATE TABLE IF NOT EXISTS `comp_supplier_closing` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `yearMonth` varchar(6) NOT NULL,
  `openBalance` double NOT NULL,
  `totalDr` double NOT NULL,
  `totalCr` double NOT NULL,
  `balance` double NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `companyID` (`companyID`,`supplierID`,`yearMonth`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_supplier_closing_daily`
--

CREATE TABLE IF NOT EXISTS `comp_supplier_closing_daily` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `transDate` date NOT NULL,
  `openBalance` double NOT NULL,
  `totalDr` double NOT NULL,
  `totalCr` double NOT NULL,
  `balance` double NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_supplier_creditnote`
--

CREATE TABLE IF NOT EXISTS `comp_supplier_creditnote` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `creditNoteDate` date NOT NULL,
  `supplierInvoiceID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `termsID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `agentID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `employeeID` int(11) NOT NULL,
  `shippingMethodID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `amountPaid` decimal(10,0) NOT NULL,
  `totalTaxAmount` double NOT NULL,
  `totalPayable` double NOT NULL,
  `total` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  `updateAble` tinyint(1) NOT NULL DEFAULT '1',
  `journalNo` varchar(32) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_supplier_creditnote`
--
DROP TRIGGER IF EXISTS `trigger_before_insert_scno_add_serialNo`;
DELIMITER //
CREATE TRIGGER `trigger_before_insert_scno_add_serialNo` BEFORE INSERT ON `comp_supplier_creditnote`
 FOR EACH ROW set new.serialNo = (select nextSerialNo 
			   from view_serial_comp_supplier_creditnote
			   where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_supplier_creditnote_charges`
--

CREATE TABLE IF NOT EXISTS `comp_supplier_creditnote_charges` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `creditNoteID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `accountNoID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text NOT NULL,
  `umID` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `unitPrice` double NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `drAccountID` int(11) NOT NULL,
  `crAccountID` int(11) NOT NULL,
  `drTaxAccountID` int(11) NOT NULL,
  `crTaxAccountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_supplier_creditnote_detail`
--

CREATE TABLE IF NOT EXISTS `comp_supplier_creditnote_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `creditnoteID` int(11) NOT NULL,
  `invoiceDetailID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text NOT NULL,
  `umID` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `unitPrice` double NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `accountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_supplier_debitnote`
--

CREATE TABLE IF NOT EXISTS `comp_supplier_debitnote` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `debitNoteDate` date NOT NULL,
  `supplierInvoiceID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `termsID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `agentID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `employeeID` int(11) NOT NULL,
  `shippingMethodID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `amountPaid` decimal(10,0) NOT NULL,
  `totalTaxAmount` double NOT NULL,
  `totalPayable` double NOT NULL,
  `total` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  `updateAble` tinyint(1) NOT NULL DEFAULT '1',
  `journalNo` varchar(32) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_supplier_debitnote`
--
DROP TRIGGER IF EXISTS `trigger_before_insert_sdno_add_serialNo`;
DELIMITER //
CREATE TRIGGER `trigger_before_insert_sdno_add_serialNo` BEFORE INSERT ON `comp_supplier_debitnote`
 FOR EACH ROW set new.serialNo = (select nextSerialNo 
			   from view_serial_comp_supplier_debitnote
			   where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_supplier_debitnote_charges`
--

CREATE TABLE IF NOT EXISTS `comp_supplier_debitnote_charges` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `debitNoteID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `accountNoID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text NOT NULL,
  `umID` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `unitPrice` double NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `drAccountID` int(11) NOT NULL,
  `crAccountID` int(11) NOT NULL,
  `drTaxAccountID` int(11) NOT NULL,
  `crTaxAccountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_supplier_debitnote_detail`
--

CREATE TABLE IF NOT EXISTS `comp_supplier_debitnote_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `debitnoteID` int(11) NOT NULL,
  `invoiceDetailID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text NOT NULL,
  `umID` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `unitPrice` double NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `accountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_supplier_invoice`
--

CREATE TABLE IF NOT EXISTS `comp_supplier_invoice` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `purchaseInvoiceCodeID` int(11) NOT NULL COMMENT '1=puchase inv, 2=direct purch inv, 3=debit note, 4=credit note',
  `purchaserID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `invoiceDate` date NOT NULL,
  `supplierInvoiceNo` varchar(32) NOT NULL,
  `projectID` int(11) NOT NULL,
  `termsID` int(11) NOT NULL,
  `shipToID` int(11) NOT NULL,
  `locationID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `agentID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `employeeID` int(11) NOT NULL,
  `shippingMethodID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `amountPaid` decimal(10,0) NOT NULL,
  `totalTaxAmount` double NOT NULL,
  `totalPayable` double NOT NULL,
  `total` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  `updateAble` tinyint(1) NOT NULL DEFAULT '1',
  `journalNo` varchar(32) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `supplier` (`ID`,`supplierID`,`updateAble`),
  KEY `comp_supp_invoicedate` (`companyID`,`invoiceDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `comp_supplier_invoice`
--
DROP TRIGGER IF EXISTS `trigger_before_insert_supinv_add_serialNo`;
DELIMITER //
CREATE TRIGGER `trigger_before_insert_supinv_add_serialNo` BEFORE INSERT ON `comp_supplier_invoice`
 FOR EACH ROW set new.serialNo = (select nextSerialNo 
			   from view_serial_comp_supplier_invoice 
			   where companyID = new.companyID)
//
DELIMITER ;

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

--
-- Table structure for table `comp_supplier_invoice_charges`
--

CREATE TABLE IF NOT EXISTS `comp_supplier_invoice_charges` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `invoiceID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `accountNoID` int(11) NOT NULL,
  `chargeDescription` text NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text NOT NULL,
  `umID` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `unitPrice` double NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `drAccountID` int(11) NOT NULL,
  `crAccountID` int(11) NOT NULL,
  `drTaxAccountID` int(11) NOT NULL,
  `crTaxAccountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_supplier_invoice_detail`
--

CREATE TABLE IF NOT EXISTS `comp_supplier_invoice_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `invoiceID` int(11) NOT NULL,
  `receiveID` int(11) NOT NULL COMMENT 'Is used for receive detail id instead of receive ID',
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text NOT NULL,
  `umID` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `unitPrice` double NOT NULL,
  `amountExcludedTax` double NOT NULL,
  `taxID` int(11) NOT NULL,
  `taxRate` double NOT NULL,
  `taxAmount` double NOT NULL,
  `amountIncludedTax` double NOT NULL,
  `accountID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`ID`),
  KEY `item` (`itemID`),
  KEY `tax` (`taxID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_supplier_statement`
--

CREATE TABLE IF NOT EXISTS `comp_supplier_statement` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `debit` double NOT NULL,
  `credit` double NOT NULL,
  `balance` double NOT NULL,
  `supplierCode` int(11) NOT NULL,
  `supplierName` varchar(16) NOT NULL,
  `description` varchar(255) NOT NULL,
  `referenceNo` varchar(5) NOT NULL,
  `is_delete` smallint(16) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `comp_unpresented_check`
--

CREATE TABLE IF NOT EXISTS `comp_unpresented_check` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `transDate` date NOT NULL,
  `transNo` varchar(255) NOT NULL,
  `desc` text NOT NULL,
  `referenceNo` varchar(255) NOT NULL,
  `bankID` int(11) NOT NULL,
  `debit` double NOT NULL,
  `credit` double NOT NULL,
  `bankReconcileID` int(11) NOT NULL DEFAULT '0',
  `is_delete` int(11) NOT NULL DEFAULT '0',
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) DEFAULT NULL,
  `updateTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

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

CREATE TABLE IF NOT EXISTS `customer` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `customerName` varchar(128) NOT NULL,
  `accountCode` varchar(8) NOT NULL,
  `customerCompanyNo` varchar(32) NOT NULL,
  `line1` varchar(128) NOT NULL,
  `line2` varchar(128) NOT NULL,
  `line3` varchar(128) NOT NULL,
  `city` varchar(128) NOT NULL,
  `customerPostCode` varchar(8) NOT NULL,
  `customerStateID` int(11) NOT NULL,
  `customerCountryID` int(11) NOT NULL,
  `attention` varchar(16) NOT NULL,
  `website` varchar(32) NOT NULL,
  `phoneNumber1` varchar(50) NOT NULL,
  `phoneNumber2` varchar(50) NOT NULL,
  `fax` varchar(50) NOT NULL,
  `generalNote` varchar(255) NOT NULL,
  `gstRegNo` varchar(16) NOT NULL,
  `termsID` int(11) NOT NULL,
  `creditLimit` int(8) NOT NULL,
  `creditLimitAlert` tinyint(1) NOT NULL,
  `linkedAPAccountID` varchar(11) NOT NULL,
  `createdDate` date NOT NULL,
  `currencyID` int(11) NOT NULL,
  `email` varchar(32) NOT NULL,
  `termstatus` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` int(16) NOT NULL,
  `position` varchar(16) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `customer_address`
--

CREATE TABLE IF NOT EXISTS `customer_address` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `customerID` int(11) NOT NULL,
  `addressCode` varchar(50) NOT NULL,
  `addressName` varchar(128) NOT NULL,
  `line1` varchar(128) NOT NULL,
  `line2` varchar(128) NOT NULL,
  `line3` varchar(128) NOT NULL,
  `city` varchar(128) NOT NULL,
  `postCode` varchar(8) NOT NULL,
  `stateID` int(11) NOT NULL,
  `countryID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` tinyint(1) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `customer_contact`
--

CREATE TABLE IF NOT EXISTS `customer_contact` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `customerID` int(11) NOT NULL,
  `customer_contact_name` varchar(128) NOT NULL,
  `position` varchar(32) NOT NULL,
  `telOffice` varchar(32) NOT NULL,
  `telHp` varchar(32) NOT NULL,
  `email` varchar(64) NOT NULL,
  `remaks` text NOT NULL,
  `createdID` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `gl_setup`
--

CREATE TABLE IF NOT EXISTS `gl_setup` (
  `ID` int(11) NOT NULL,
  `companyID` int(11) NOT NULL,
  `accountTypeID` int(11) NOT NULL,
  `accountNoID` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `item`
--

CREATE TABLE IF NOT EXISTS `item` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `itemCode` varchar(32) NOT NULL,
  `name` varchar(64) NOT NULL,
  `description` text NOT NULL,
  `itemCategoryID` int(11) NOT NULL,
  `itemTypeID` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `unitOfMeasureID` int(11) NOT NULL,
  `editDescription` tinyint(1) NOT NULL,
  `imageFile` varchar(64) NOT NULL,
  `itemStatusID` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'default to active=1',
  `reorderLevel` int(11) NOT NULL,
  `incomeID` int(11) NOT NULL,
  `cogsID` int(11) NOT NULL,
  `inventoriesID` int(11) NOT NULL,
  `inputTaxID` int(11) NOT NULL,
  `outputTaxID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `locationID` int(11) NOT NULL,
  `is_delete` smallint(6) NOT NULL,
  `updateable` smallint(6) NOT NULL,
  `totalAmount` double NOT NULL,
  `totalPayable` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `supplierPrice` double NOT NULL,
  `salesPrice` double NOT NULL,
  `currencyID` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `item`
--
DROP TRIGGER IF EXISTS `trigger_before_insert_item`;
DELIMITER //
CREATE TRIGGER `trigger_before_insert_item` BEFORE INSERT ON `item`
 FOR EACH ROW begin
if new.incomeID = 0 or new.incomeID is null then 
set new.incomeID = (select accountID from comp_control_acct_setup where ID > 0 and companyID = new.companyID and accountCode='saleacct'); 
end if;
if new.cogsID = 0 or new.cogsID is null then 
set new.cogsID = (select accountID from comp_control_acct_setup where id>0 and companyID = new.companyID and accountCode = 'saleacct');
end if;

end
//
DELIMITER ;

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

--
-- Table structure for table `item_adjustment`
--

CREATE TABLE IF NOT EXISTS `item_adjustment` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `locationID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `updateAble` smallint(11) NOT NULL DEFAULT '1',
  `adjustmentDate` date NOT NULL,
  `createdBy` varchar(50) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `item_adjustment_detail`
--

CREATE TABLE IF NOT EXISTS `item_adjustment_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `adjustmentID` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `unitOfMeasureID` int(11) NOT NULL,
  `umID` int(11) NOT NULL,
  `qtyOnHand` double NOT NULL COMMENT 'The number of items on the time of Adjustment',
  `counted` double NOT NULL COMMENT 'The actual number of items on the time of adjustment',
  `onDatePrice` double NOT NULL,
  `updateAble` smallint(11) NOT NULL DEFAULT '1',
  `adjustmentDate` date NOT NULL,
  `createdBy` varchar(50) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `item_details`
--

CREATE TABLE IF NOT EXISTS `item_details` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT NULL,
  `itemID` int(11) DEFAULT NULL,
  `locationID` int(11) DEFAULT NULL,
  `onHandQty` double DEFAULT NULL,
  `umID` int(11) DEFAULT NULL,
  `acctID` int(11) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `is_delete` smallint(6) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `Index 2` (`companyID`,`acctID`,`locationID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

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

CREATE TABLE IF NOT EXISTS `master` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `description` varchar(128) NOT NULL,
  `updatedby` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `usedBySystem` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `master_code`
--

CREATE TABLE IF NOT EXISTS `master_code` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `masterID` int(11) NOT NULL,
  `parentFilterID` int(11) DEFAULT NULL,
  `code` varchar(4) NOT NULL,
  `name` varchar(64) NOT NULL,
  `shortName` varchar(8) NOT NULL,
  `description` varchar(128) NOT NULL,
  `orderNo` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updateBy` int(11) NOT NULL,
  `updateTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(6) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `module`
--

CREATE TABLE IF NOT EXISTS `module` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `parentModuleID` int(11) NOT NULL,
  `moduleName` varchar(64) NOT NULL,
  `description` varchar(254) NOT NULL,
  `orderNo` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `person`
--

CREATE TABLE IF NOT EXISTS `person` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `name` int(11) NOT NULL,
  `position` varchar(64) NOT NULL,
  `employeeCode` varchar(16) NOT NULL,
  `genderID` int(11) NOT NULL,
  `dateOfBirth` date NOT NULL,
  `dateOfJoint` date NOT NULL,
  `remaks` text NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `person_contact`
--

CREATE TABLE IF NOT EXISTS `person_contact` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `personID` int(11) NOT NULL,
  `companyID` int(11) NOT NULL,
  `contactType` varchar(32) NOT NULL,
  `contact` tinytext NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `poke`
--

CREATE TABLE IF NOT EXISTS `poke` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `who` int(11) NOT NULL,
  `whom` int(11) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `prospect`
--

CREATE TABLE IF NOT EXISTS `prospect` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `email` varchar(64) NOT NULL,
  `login` varchar(32) NOT NULL,
  `paswd` varchar(32) NOT NULL,
  `tel` varchar(16) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(32) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `register`
--

CREATE TABLE IF NOT EXISTS `register` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `compName` varchar(255) NOT NULL,
  `compID` int(11) NOT NULL,
  `industryID` int(11) NOT NULL,
  `checker` varchar(255) NOT NULL,
  `returned` tinyint(1) NOT NULL DEFAULT '0',
  `disable` tinyint(1) NOT NULL DEFAULT '0',
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;

--
-- Dumping data for table `register`
--

INSERT INTO `register` (`ID`, `email`, `password`, `compName`, `compID`, `industryID`, `checker`, `returned`, `disable`, `createdTS`, `updatedTS`) VALUES
(13, 'sayem7746@gmail.com', '', '', 0, 0, 'd3ee83e56cba2e2371597a06394cabdc', 0, 0, '2015-02-12 08:16:48', '0000-00-00 00:00:00');

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

--
-- Table structure for table `supplier`
--

CREATE TABLE IF NOT EXISTS `supplier` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `supplierName` varchar(128) NOT NULL,
  `supplierCode` varchar(8) NOT NULL,
  `supplierCompanyNo` varchar(32) NOT NULL,
  `line1` varchar(128) NOT NULL,
  `line2` varchar(128) NOT NULL,
  `line3` varchar(128) NOT NULL,
  `city` varchar(128) NOT NULL,
  `supplierPostCode` varchar(8) NOT NULL,
  `supplierStateID` int(11) NOT NULL,
  `supplierCountryID` int(11) NOT NULL,
  `attention` varchar(100) NOT NULL,
  `website` varchar(32) NOT NULL,
  `phoneNumber1` varchar(50) NOT NULL,
  `phoneNumber2` varchar(50) NOT NULL,
  `fax` varchar(50) NOT NULL,
  `generalNote` varchar(255) NOT NULL,
  `gstRegNo` varchar(16) NOT NULL,
  `termsID` int(11) NOT NULL,
  `creditLimit` double NOT NULL,
  `creditLimitAlert` tinyint(1) NOT NULL,
  `linkedAPAccountID` int(11) NOT NULL,
  `createdDate` date NOT NULL,
  `currencyID` int(11) NOT NULL,
  `email` varchar(32) NOT NULL,
  `termstatus` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `ID` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Triggers `supplier`
--
DROP TRIGGER IF EXISTS `trigger_default_created_date`;
DELIMITER //
CREATE TRIGGER `trigger_default_created_date` BEFORE INSERT ON `supplier`
 FOR EACH ROW if ( isnull(new.createddate) ) then
 set new.createddate=curdate();
end if
//
DELIMITER ;

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

--
-- Table structure for table `supplier_address`
--

CREATE TABLE IF NOT EXISTS `supplier_address` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `addressCode` varchar(50) DEFAULT NULL,
  `addressName` varchar(128) DEFAULT NULL,
  `line1` varchar(128) DEFAULT NULL,
  `line2` varchar(128) DEFAULT NULL,
  `line3` varchar(128) DEFAULT NULL,
  `city` varchar(128) DEFAULT NULL,
  `postCode` varchar(8) DEFAULT NULL,
  `stateID` int(11) DEFAULT NULL,
  `countryID` int(11) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `is_delete` smallint(16) DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `supplier_contact`
--

CREATE TABLE IF NOT EXISTS `supplier_contact` (
  `ID` int(11) NOT NULL DEFAULT '0',
  `supplierID` int(11) NOT NULL,
  `personID` int(11) NOT NULL,
  `position` varchar(32) NOT NULL,
  `is_delete` smallint(16) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `tax_class`
--

CREATE TABLE IF NOT EXISTS `tax_class` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(10) DEFAULT NULL,
  `shortName` varchar(10) DEFAULT NULL,
  `description` varchar(128) DEFAULT NULL,
  `taxAccount` int(11) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `tax_group`
--

CREATE TABLE IF NOT EXISTS `tax_group` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(10) DEFAULT NULL,
  `description` varchar(128) DEFAULT NULL,
  `taxAccount` int(11) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `tax_master`
--

CREATE TABLE IF NOT EXISTS `tax_master` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL DEFAULT '0',
  `code` varchar(10) DEFAULT NULL,
  `name` varchar(128) DEFAULT NULL,
  `taxType` int(11) DEFAULT NULL,
  `taxPercentage` double DEFAULT NULL,
  `taxClass` int(11) DEFAULT NULL,
  `taxGroup` int(11) DEFAULT NULL,
  `description` varchar(128) DEFAULT NULL,
  `taxAccount` int(11) DEFAULT NULL,
  `status` tinyint(1) DEFAULT '0',
  `createdBy` int(11) DEFAULT '0',
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`,`companyID`),
  KEY `FK_tax_master_tax_class` (`taxClass`),
  KEY `FK_tax_master_tax_group` (`taxGroup`),
  KEY `FK_tax_master_tax_type` (`taxType`),
  KEY `FK_tax_master_code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `tax_type`
--

CREATE TABLE IF NOT EXISTS `tax_type` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(10) DEFAULT NULL,
  `taxGroupID` int(11) DEFAULT NULL,
  `description` varchar(128) DEFAULT NULL,
  `taxClass` int(11) NOT NULL,
  `taxAccount` int(11) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `tax_work_footer`
--

CREATE TABLE IF NOT EXISTS `tax_work_footer` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `recordID` varchar(1) DEFAULT NULL COMMENT 'Must be a single character corresponding to record type. Must be ‘F’',
  `purchaseCount` int(11) DEFAULT NULL COMMENT 'Number of P records',
  `purchaseAmount` double DEFAULT NULL COMMENT 'Debit Amount',
  `purchaseAmountGST` double DEFAULT NULL COMMENT 'Purchase GST Amount GST',
  `supplyCount` int(11) DEFAULT NULL COMMENT 'Supply Count',
  `supplyAmountSum` double DEFAULT NULL COMMENT 'Sum of all supplies',
  `supplyAmountSumGst` double DEFAULT NULL COMMENT 'Sum of GST on all supplies',
  `ledgerCount` int(11) DEFAULT NULL COMMENT 'Number of L records',
  `debitSum` double DEFAULT NULL COMMENT 'Debit Sum',
  `creditSum` double DEFAULT NULL COMMENT 'Credit Sum',
  `balanceSum` double DEFAULT NULL COMMENT 'Balance Sum',
  `status` smallint(1) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `tax_work_gl`
--

CREATE TABLE IF NOT EXISTS `tax_work_gl` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `recordID` varchar(1) DEFAULT NULL COMMENT 'Must be a single character corresponding to record type.Must be ‘L’',
  `transactionDate` date DEFAULT NULL COMMENT 'Format: dd/MM/yyyy',
  `Account ID` int(11) DEFAULT NULL COMMENT 'General Ledger Code for individual account',
  `Account Name` varchar(3) DEFAULT NULL COMMENT 'Name of individual General Ledger account',
  `description` varchar(128) DEFAULT NULL COMMENT 'Transaction Description',
  `name` varchar(128) DEFAULT NULL COMMENT 'Name of entity involved (if applicable)',
  `journalID` varchar(128) DEFAULT NULL COMMENT 'A unique number that can group related double entries',
  `documentID` varchar(128) DEFAULT NULL COMMENT 'Source document number to which line relates (For example, cheque number, invoice number, credit note number, trust receipt number) ',
  `type` varchar(128) DEFAULT NULL COMMENT 'Refers to type of transaction such as AR. Refers to the type of transaction such as AR, AP, Inventory, Sales, Purchases, Cash Disbursement, Cash Receipt, General Journal etc.',
  `amount_dr` double DEFAULT NULL COMMENT 'Debit Amount',
  `amount_cr` double DEFAULT NULL COMMENT 'Credit amount',
  `Balance` double DEFAULT NULL COMMENT 'Balance Amount',
  `status` smallint(1) DEFAULT NULL,
  `gafID` int(11) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `tax_work_header`
--

CREATE TABLE IF NOT EXISTS `tax_work_header` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `recordID` varchar(1) DEFAULT NULL COMMENT 'Must be a single character corresponding to record type. Must be ‘C’',
  `name` varchar(128) DEFAULT NULL COMMENT 'The name of the company for which this file is reporting on.',
  `BRN` varchar(128) DEFAULT NULL COMMENT 'Business registration number for company',
  `gstNo` varchar(128) DEFAULT NULL COMMENT 'Company GST number',
  `periodStart` date DEFAULT NULL COMMENT 'Filing Period Start Date Must be in format dd/MM/yyyy example: 01/12/2014’',
  `periodEnd` date DEFAULT NULL COMMENT 'Filing Period End Date Must be in format dd/MM/yyyy example: 31/12/2014’',
  `version` varchar(128) DEFAULT NULL COMMENT 'Accounting software name and version Example: XYB Accountsoft v.2.0',
  `GAFversion` varchar(128) DEFAULT NULL COMMENT 'GST Audit File (GAF) version number',
  `status` smallint(1) DEFAULT NULL,
  `gafID` smallint(1) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `tax_work_purchase`
--

CREATE TABLE IF NOT EXISTS `tax_work_purchase` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `recordID` varchar(1) DEFAULT NULL COMMENT 'Must be a single character corresponding to record type. Must be ‘P’',
  `name` varchar(128) DEFAULT NULL COMMENT 'AN Name for supplier.',
  `BRN` varchar(128) DEFAULT NULL COMMENT 'BRN for company from which purchase was made.',
  `invoiceDate` date DEFAULT NULL COMMENT 'Invoice Date Format dd/MM/yyyy',
  `invoiceNo` varchar(128) DEFAULT NULL COMMENT 'Invoice Number',
  `importDeclare` varchar(128) DEFAULT NULL COMMENT 'Import Declaration Number. (e.g. Customs Form No. 1 reference',
  `invoiceLine` varchar(3) DEFAULT NULL COMMENT 'Number of Invoice Line',
  `description` varchar(128) DEFAULT NULL COMMENT 'Description for what was purchased',
  `amount` double DEFAULT NULL COMMENT 'Value of purchase excluding GST in Malaysia Ringgit.',
  `taxAmount` double DEFAULT NULL COMMENT 'Value of GST in Malaysia Ringgit.',
  `taxID` int(11) DEFAULT NULL,
  `taxCode` varchar(128) DEFAULT NULL COMMENT 'Tax code for lookup in tables. Please refer to Appendix',
  `currencyID` int(11) DEFAULT NULL,
  `currencyCode` varchar(128) DEFAULT NULL COMMENT 'ISO’s currency codes (3-letter alphabetical code) of foreign Currency. Example: USD',
  `currencyAmount` double DEFAULT NULL COMMENT 'Value of purchase excluding GST in Foreign Currency (If applicable).',
  `taxCurrencyAmount` double DEFAULT NULL COMMENT 'Value of GST in Foreign Currency (If applicable)',
  `status` smallint(2) DEFAULT NULL,
  `gafID` int(11) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `tax_work_sales`
--

CREATE TABLE IF NOT EXISTS `tax_work_sales` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `recordID` varchar(1) DEFAULT NULL COMMENT 'Must be a single character corresponding to record type. Must be ‘S’',
  `name` varchar(128) DEFAULT NULL COMMENT 'Name of customer.',
  `BRN` varchar(128) DEFAULT NULL COMMENT 'BRN for supplier.',
  `invoiceDate` date DEFAULT NULL COMMENT 'Invoice Date Format dd/MM/yyyy',
  `invoiceNo` varchar(128) DEFAULT NULL COMMENT 'Invoice Number',
  `invoiceLine` varchar(3) DEFAULT NULL COMMENT 'Number of Invoice Line',
  `description` varchar(128) DEFAULT NULL COMMENT 'Description for what was sold',
  `amount` double DEFAULT NULL COMMENT 'Value of supply excluding GST in Malaysia Ringgit',
  `taxAmount` double DEFAULT NULL COMMENT 'Value of GST in Malaysia Ringgit',
  `taxID` int(11) DEFAULT NULL,
  `taxCode` varchar(128) DEFAULT NULL COMMENT 'Tax code for lookup in tables. Please refer to Appendix 2Example: SR',
  `countryID` int(11) DEFAULT NULL COMMENT 'Destination of goods being exported. Example: KOREA',
  `currencyID` int(11) DEFAULT NULL,
  `currencyCode` varchar(128) DEFAULT NULL COMMENT 'ISO’s currency codes (3-letter alphabetical code) of foreign Currency. Example: USD',
  `currencyAmount` double DEFAULT NULL COMMENT 'Value of purchase excluding GST in Foreign Currency (If applicable).',
  `taxCurrencyAmount` double DEFAULT NULL COMMENT 'Value of GST in Foreign Currency (If applicable)',
  `status` smallint(1) DEFAULT NULL,
  `gafID` int(11) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `tbl_department`
--

CREATE TABLE IF NOT EXISTS `tbl_department` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `code` varchar(18) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `dept_head` int(11) DEFAULT NULL,
  `createdBy` int(11) NOT NULL,
  `is_deleted` tinyint(4) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `tbl_location`
--

CREATE TABLE IF NOT EXISTS `tbl_location` (
  `fldid` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `code` varchar(20) DEFAULT NULL,
  `desc` varchar(100) DEFAULT NULL,
  `address` varchar(200) DEFAULT NULL,
  `line2` varchar(128) NOT NULL,
  `line3` varchar(128) NOT NULL,
  `postcode` varchar(10) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `state` int(10) DEFAULT NULL,
  `country` int(10) DEFAULT NULL,
  `phone_no` varchar(25) DEFAULT NULL,
  `fax_no` varchar(25) DEFAULT NULL,
  `create_by` varchar(50) DEFAULT NULL,
  `create_date` date DEFAULT NULL,
  PRIMARY KEY (`fldid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `tbl_section`
--

CREATE TABLE IF NOT EXISTS `tbl_section` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `code` varchar(18) DEFAULT NULL,
  `departmentID` int(11) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `section_head` int(11) DEFAULT NULL,
  `createdBy` int(11) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `is_deleted` tinyint(4) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `tbl_usermaster`
--

CREATE TABLE IF NOT EXISTS `tbl_usermaster` (
  `fldid` int(11) NOT NULL AUTO_INCREMENT,
  `userid` varchar(50) NOT NULL DEFAULT '0',
  `password` varchar(32) DEFAULT '0',
  `username` varchar(150) DEFAULT NULL,
  `position` varchar(50) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `homepage` varchar(100) DEFAULT NULL,
  `phone_off` varchar(30) DEFAULT NULL,
  `phone_ext` varchar(10) DEFAULT NULL,
  `phone_mobile` varchar(100) DEFAULT NULL,
  `department` varchar(18) DEFAULT NULL,
  `section` varchar(18) DEFAULT NULL,
  `role` varchar(150) DEFAULT NULL,
  `status` smallint(1) DEFAULT NULL,
  `birthday` date DEFAULT NULL,
  `online` int(5) NOT NULL,
  `last_seen` datetime NOT NULL,
  `access_comp` varchar(255) NOT NULL,
  `last_seen_ip` varchar(30) NOT NULL,
  `create_dt` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(150) DEFAULT NULL,
  `modified_dt` date DEFAULT NULL,
  `modified_user` varchar(150) DEFAULT NULL,
  `is_delete` smallint(6) DEFAULT '0',
  `language` varchar(10) NOT NULL,
  PRIMARY KEY (`fldid`),
  UNIQUE KEY `userid` (`userid`),
  KEY `Index 3` (`userid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT AUTO_INCREMENT=34 ;

--
-- Dumping data for table `tbl_usermaster`
--

INSERT INTO `tbl_usermaster` (`fldid`, `userid`, `password`, `username`, `position`, `email`, `homepage`, `phone_off`, `phone_ext`, `phone_mobile`, `department`, `section`, `role`, `status`, `birthday`, `online`, `last_seen`, `access_comp`, `last_seen_ip`, `create_dt`, `create_user`, `modified_dt`, `modified_user`, `is_delete`, `language`) VALUES
(33, 'sam', '827ccb0eea8a706c4c34a16891f84e7b', 'Sayem Ahmed', 'Senior Software Engineer', 'sayem7746@gmail.com', NULL, '', NULL, '0162393606', '0', '0', NULL, NULL, NULL, 0, '2015-02-12 08:33:52', 'Sayem demo', '192.168.1.1', '2014-07-23 10:00:10', 'akmal', '2015-01-27', 'sam', 0, 'en');

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

--
-- Table structure for table `temp`
--

CREATE TABLE IF NOT EXISTS `temp` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT NULL,
  `userId` int(11) NOT NULL,
  `menuCode` varchar(8) NOT NULL,
  `accessRight` int(11) NOT NULL,
  `createdBy` int(1) NOT NULL DEFAULT '0',
  `updatedBy` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `terms`
--

CREATE TABLE IF NOT EXISTS `terms` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `termName` varchar(64) NOT NULL,
  `termDescription` varchar(255) NOT NULL,
  `dueDays` int(11) NOT NULL,
  `termStatusID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `ug_content`
--

CREATE TABLE IF NOT EXISTS `ug_content` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ugID` int(11) NOT NULL,
  `language` varchar(8) NOT NULL,
  `title` varchar(100) NOT NULL,
  `content` text NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `ug_relatedtopic`
--

CREATE TABLE IF NOT EXISTS `ug_relatedtopic` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ugID` int(11) NOT NULL,
  `relatedUgID` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `ug_topic`
--

CREATE TABLE IF NOT EXISTS `ug_topic` (
  `fldid` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(8) CHARACTER SET utf8 DEFAULT NULL,
  `name` varchar(30) CHARACTER SET utf8 DEFAULT NULL,
  `parents` varchar(8) CHARACTER SET utf8 DEFAULT '0',
  `module` varchar(8) CHARACTER SET utf8 DEFAULT '0',
  `submenu` smallint(1) DEFAULT '0',
  `urls` varchar(100) CHARACTER SET utf8 DEFAULT '0',
  `urls2` varchar(100) CHARACTER SET utf8 DEFAULT '0',
  `access` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
  `seq` int(11) NOT NULL,
  `display` smallint(1) DEFAULT '1',
  `icons` varchar(32) CHARACTER SET utf8 DEFAULT 'i-film',
  `language` varchar(3) CHARACTER SET utf8 DEFAULT 'EN',
  PRIMARY KEY (`fldid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `ug_video`
--

CREATE TABLE IF NOT EXISTS `ug_video` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ugID` int(11) NOT NULL,
  `title` varchar(64) NOT NULL,
  `videoLink` varchar(128) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

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

CREATE TABLE IF NOT EXISTS `user` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `userName` varchar(32) NOT NULL,
  `password` varchar(64) NOT NULL,
  `fullName` varchar(64) NOT NULL,
  `telephoneNo` varchar(16) NOT NULL,
  `emailAddress` varchar(16) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `user_module_access`
--

CREATE TABLE IF NOT EXISTS `user_module_access` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT NULL,
  `userID` int(11) NOT NULL,
  `moduleID` int(11) NOT NULL,
  `transaction` smallint(2) NOT NULL DEFAULT '0',
  `reports` smallint(2) NOT NULL DEFAULT '0',
  `setup` smallint(2) NOT NULL DEFAULT '0',
  `accessRight` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1339 ;

--
-- Dumping data for table `user_module_access`
--

INSERT INTO `user_module_access` (`ID`, `companyID`, `userID`, `moduleID`, `transaction`, `reports`, `setup`, `accessRight`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1329, 121, 33, 1, 1, 1, 1, 1, 33, '2014-11-20 20:25:50', 0, '2015-02-12 07:04:33'),
(1330, 121, 33, 2, 1, 1, 1, 1, 33, '2014-11-20 20:25:53', 0, '2015-02-12 07:04:33'),
(1331, 121, 33, 3, 1, 1, 1, 1, 33, '2014-11-20 20:25:56', 0, '2015-02-12 07:04:33'),
(1332, 121, 33, 5, 1, 1, 1, 1, 33, '2014-11-20 20:25:59', 0, '2015-02-12 07:04:33'),
(1333, 121, 33, 8, 1, 1, 1, 1, 33, '2014-11-20 20:26:01', 0, '2015-02-12 07:04:33'),
(1334, 121, 33, 4, 1, 1, 1, 1, 33, '2014-11-20 20:26:03', 0, '2015-02-12 07:04:33'),
(1335, 121, 33, 6, 1, 1, 1, 1, 33, '2014-11-20 20:26:06', 0, '2015-02-12 07:04:33'),
(1336, 121, 33, 7, 1, 1, 1, 1, 33, '2014-11-20 20:26:08', 0, '2015-02-12 07:04:33'),
(1337, 121, 33, 10, 1, 1, 1, 1, 33, '2014-11-20 20:26:11', 0, '2015-02-12 07:04:33'),
(1338, 121, 33, 9, 1, 1, 1, 1, 33, '2014-11-20 20:26:13', 0, '2015-02-12 07:04:33');

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

--
-- Table structure for table `user_module_access_details`
--

CREATE TABLE IF NOT EXISTS `user_module_access_details` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT NULL,
  `userID` int(11) NOT NULL,
  `menuCode` varchar(8) NOT NULL,
  `accessRight` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=112341 ;

--
-- Dumping data for table `user_module_access_details`
--

INSERT INTO `user_module_access_details` (`ID`, `companyID`, `userID`, `menuCode`, `accessRight`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(112173, 121, 33, 'GLTRJRNL', 1, 33, '2014-11-20 20:25:51', 0, '2014-11-20 20:25:51'),
(112174, 121, 33, 'GLTRJlCY', 1, 33, '2014-11-20 20:25:51', 0, '2014-11-20 20:25:51'),
(112175, 121, 33, 'GLTRJlRV', 1, 33, '2014-11-20 20:25:51', 0, '2014-11-20 20:25:51'),
(112176, 121, 33, 'GLTRPOST', 1, 33, '2014-11-20 20:25:51', 0, '2014-11-20 20:25:51'),
(112177, 121, 33, 'APOPWOI', 1, 33, '2014-11-20 20:25:51', 0, '2014-11-20 20:25:51'),
(112178, 121, 33, 'GLTRYECL', 1, 33, '2014-11-20 20:25:51', 0, '2014-11-20 20:25:51'),
(112179, 121, 33, 'OTRPAY', 1, 33, '2014-11-20 20:25:51', 0, '2014-11-20 20:25:51'),
(112180, 121, 33, 'OTHRCV', 1, 33, '2014-11-20 20:25:51', 0, '2014-11-20 20:25:51'),
(112181, 121, 33, 'OTRCVCON', 1, 33, '2014-11-20 20:25:51', 0, '2014-11-20 20:25:51'),
(112182, 121, 33, 'GLRPBS', 1, 33, '2014-11-20 20:25:52', 0, '2014-11-20 20:25:52'),
(112183, 121, 33, 'GLRPTB', 1, 33, '2014-11-20 20:25:52', 0, '2014-11-20 20:25:52'),
(112184, 121, 33, 'GLRPJLPS', 1, 33, '2014-11-20 20:25:52', 0, '2014-11-20 20:25:52'),
(112185, 121, 33, 'GLRPJLUP', 1, 33, '2014-11-20 20:25:52', 0, '2014-11-20 20:25:52'),
(112186, 121, 33, 'GLRPTBFC', 1, 33, '2014-11-20 20:25:52', 0, '2014-11-20 20:25:52'),
(112187, 121, 33, 'GLRPABSM', 1, 33, '2014-11-20 20:25:52', 0, '2014-11-20 20:25:52'),
(112188, 121, 33, 'GLRPPNLM', 1, 33, '2014-11-20 20:25:52', 0, '2014-11-20 20:25:52'),
(112189, 121, 33, 'APRPTOPW', 1, 33, '2014-11-20 20:25:52', 0, '2014-11-20 20:25:52'),
(112190, 121, 33, 'GLRPBGLT', 1, 33, '2014-11-20 20:25:52', 0, '2014-11-20 20:25:52'),
(112191, 121, 33, 'APBANKRE', 1, 33, '2014-11-20 20:25:52', 0, '2014-11-20 20:25:52'),
(112192, 121, 33, 'OTRCVLST', 1, 33, '2014-11-20 20:25:52', 0, '2014-11-20 20:25:52'),
(112193, 121, 33, 'GLBNKRCL', 1, 33, '2014-11-20 20:25:52', 0, '2014-11-20 20:25:52'),
(112194, 121, 33, 'GLMCAL', 1, 33, '2014-11-20 20:25:53', 0, '2014-11-20 20:25:53'),
(112195, 121, 33, 'GLMCALL', 1, 33, '2014-11-20 20:25:53', 0, '2014-11-20 20:25:53'),
(112196, 121, 33, 'GLSTCOA', 1, 33, '2014-11-20 20:25:53', 0, '2014-11-20 20:25:53'),
(112197, 121, 33, 'GLSTBDGT', 1, 33, '2014-11-20 20:25:53', 0, '2014-11-20 20:25:53'),
(112198, 121, 33, 'GLSTCURC', 1, 33, '2014-11-20 20:25:53', 0, '2014-11-20 20:25:53'),
(112199, 121, 33, 'ARSALINV', 1, 33, '2014-11-20 20:25:54', 0, '2014-11-20 20:25:54'),
(112200, 121, 33, 'ARSDBN', 1, 33, '2014-11-20 20:25:54', 0, '2014-11-20 20:25:54'),
(112201, 121, 33, 'ARDBNC', 1, 33, '2014-11-20 20:25:54', 0, '2014-11-20 20:25:54'),
(112202, 121, 33, 'ARSCN', 1, 33, '2014-11-20 20:25:54', 0, '2014-11-20 20:25:54'),
(112203, 121, 33, 'ARSCNC', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112204, 121, 33, 'ARRCVP', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112205, 121, 33, 'ARRCVPC', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112206, 121, 33, 'ARDSLINV', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112207, 121, 33, 'ARDRSINV', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112208, 121, 33, 'ARCPYSI', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112209, 121, 33, 'ARTRINED', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112210, 121, 33, 'AREDSLDR', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112211, 121, 33, 'AREDCR', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112212, 121, 33, 'ARPAYEDT', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112213, 121, 33, 'ARCASH', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112214, 121, 33, 'ARCASHSC', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112215, 121, 33, 'ARINVLST', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112216, 121, 33, 'ARDBNLST', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112217, 121, 33, 'ARCDNLST', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112218, 121, 33, 'ARRCVPLS', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112219, 121, 33, 'ARCUSTST', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112220, 121, 33, 'ARCUSTAG', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112221, 121, 33, 'ARCSHS', 1, 33, '2014-11-20 20:25:55', 0, '2014-11-20 20:25:55'),
(112222, 121, 33, 'ARSETCUS', 1, 33, '2014-11-20 20:25:56', 0, '2014-11-20 20:25:56'),
(112223, 121, 33, 'ARNWCUST', 1, 33, '2014-11-20 20:25:56', 0, '2014-11-20 20:25:56'),
(112224, 121, 33, 'ARSHIP2L', 1, 33, '2014-11-20 20:25:56', 0, '2014-11-20 20:25:56'),
(112225, 121, 33, 'ARSHIP2N', 1, 33, '2014-11-20 20:25:56', 0, '2014-11-20 20:25:56'),
(112226, 121, 33, 'APSUPPAY', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112227, 121, 33, 'APPURDN', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112228, 121, 33, 'APPURCN', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112229, 121, 33, 'APPURDNC', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112230, 121, 33, 'APPURCNC', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112231, 121, 33, 'APPAYCFM', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112232, 121, 33, 'APOPWI', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112233, 121, 33, 'APPAYICM', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112234, 121, 33, 'APPURINV', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112235, 121, 33, 'APDIRINV', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112236, 121, 33, 'APDRINVC', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112237, 121, 33, 'APCPYPI', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112238, 121, 33, 'APDRNOTE', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112239, 121, 33, 'APTRETCR', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112240, 121, 33, 'APTRPYIE', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112241, 121, 33, 'APTRPYOE', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112242, 121, 33, 'APPURDNL', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112243, 121, 33, 'APPURCNL', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112244, 121, 33, 'APRPTSTL', 1, 33, '2014-11-20 20:25:58', 0, '2014-11-20 20:25:58'),
(112245, 121, 33, 'MSTRSUPP', 1, 33, '2014-11-20 20:25:59', 0, '2014-11-20 20:25:59'),
(112246, 121, 33, 'APNEWSUP', 1, 33, '2014-11-20 20:25:59', 0, '2014-11-20 20:25:59'),
(112247, 121, 33, 'APNWSHP2', 1, 33, '2014-11-20 20:25:59', 0, '2014-11-20 20:25:59'),
(112248, 121, 33, 'SOQUOT', 1, 33, '2014-11-20 20:25:59', 0, '2014-11-20 20:25:59'),
(112249, 121, 33, 'SOTRNWSO', 1, 33, '2014-11-20 20:25:59', 0, '2014-11-20 20:25:59'),
(112250, 121, 33, 'SOTRDO', 1, 33, '2014-11-20 20:26:00', 0, '2014-11-20 20:26:00'),
(112251, 121, 33, 'DELCNFRM', 1, 33, '2014-11-20 20:26:00', 0, '2014-11-20 20:26:00'),
(112252, 121, 33, 'SOTRQOLT', 1, 33, '2014-11-20 20:26:00', 0, '2014-11-20 20:26:00'),
(112253, 121, 33, 'SORPPCLT', 1, 33, '2014-11-20 20:26:00', 0, '2014-11-20 20:26:00'),
(112254, 121, 33, 'SOTRDOLT', 1, 33, '2014-11-20 20:26:00', 0, '2014-11-20 20:26:00'),
(112255, 121, 33, 'SOTRSOLT', 1, 33, '2014-11-20 20:26:00', 0, '2014-11-20 20:26:00'),
(112256, 121, 33, 'SORPSOCU', 1, 33, '2014-11-20 20:26:00', 0, '2014-11-20 20:26:00'),
(112257, 121, 33, 'SORPYRSL', 1, 33, '2014-11-20 20:26:00', 0, '2014-11-20 20:26:00'),
(112258, 121, 33, 'SORPSLIT', 1, 33, '2014-11-20 20:26:00', 0, '2014-11-20 20:26:00'),
(112259, 121, 33, 'SORPORCT', 1, 33, '2014-11-20 20:26:00', 0, '2014-11-20 20:26:00'),
(112260, 121, 33, 'SORPSOIT', 1, 33, '2014-11-20 20:26:00', 0, '2014-11-20 20:26:00'),
(112261, 121, 33, 'SORPOROT', 1, 33, '2014-11-20 20:26:00', 0, '2014-11-20 20:26:00'),
(112262, 121, 33, 'SOSTSLPC', 1, 33, '2014-11-20 20:26:01', 0, '2014-11-20 20:26:01'),
(112263, 121, 33, 'PURORDER', 1, 33, '2014-11-20 20:26:02', 0, '2014-11-20 20:26:02'),
(112264, 121, 33, 'PURRCV', 1, 33, '2014-11-20 20:26:02', 0, '2014-11-20 20:26:02'),
(112265, 121, 33, 'PURORDCF', 1, 33, '2014-11-20 20:26:02', 0, '2014-11-20 20:26:02'),
(112266, 121, 33, 'PURRCVC', 1, 33, '2014-11-20 20:26:02', 0, '2014-11-20 20:26:02'),
(112267, 121, 33, 'PURORLST', 1, 33, '2014-11-20 20:26:02', 0, '2014-11-20 20:26:02'),
(112268, 121, 33, 'PURRCVLS', 1, 33, '2014-11-20 20:26:02', 0, '2014-11-20 20:26:02'),
(112269, 121, 33, 'PUROUTGR', 1, 33, '2014-11-20 20:26:02', 0, '2014-11-20 20:26:02'),
(112270, 121, 33, 'PUPRRPT', 1, 33, '2014-11-20 20:26:02', 0, '2014-11-20 20:26:02'),
(112271, 121, 33, 'PURCNCL', 1, 33, '2014-11-20 20:26:02', 0, '2014-11-20 20:26:02'),
(112272, 121, 33, 'PURRCVCA', 1, 33, '2014-11-20 20:26:02', 0, '2014-11-20 20:26:02'),
(112273, 121, 33, 'PURSTSPL', 1, 33, '2014-11-20 20:26:03', 0, '2014-11-20 20:26:03'),
(112274, 121, 33, 'INVPURPR', 1, 33, '2014-11-20 20:26:03', 0, '2014-11-20 20:26:03'),
(112275, 121, 33, 'UMCONVNW', 1, 33, '2014-11-20 20:26:03', 0, '2014-11-20 20:26:03'),
(112276, 121, 33, 'PURUOMLS', 1, 33, '2014-11-20 20:26:03', 0, '2014-11-20 20:26:03'),
(112277, 121, 33, 'INVLOCTR', 1, 33, '2014-11-20 20:26:03', 0, '2014-11-20 20:26:03'),
(112278, 121, 33, 'INVITEMC', 1, 33, '2014-11-20 20:26:03', 0, '2014-11-20 20:26:03'),
(112279, 121, 33, 'INVLOCTC', 1, 33, '2014-11-20 20:26:03', 0, '2014-11-20 20:26:03'),
(112280, 121, 33, 'INVITCC', 1, 33, '2014-11-20 20:26:03', 0, '2014-11-20 20:26:03'),
(112281, 121, 33, 'INVPLNRP', 1, 33, '2014-11-20 20:26:04', 0, '2014-11-20 20:26:04'),
(112282, 121, 33, 'INVVALRP', 1, 33, '2014-11-20 20:26:04', 0, '2014-11-20 20:26:04'),
(112283, 121, 33, 'INVSTORP', 1, 33, '2014-11-20 20:26:04', 0, '2014-11-20 20:26:04'),
(112284, 121, 33, 'INVOUTRP', 1, 33, '2014-11-20 20:26:04', 0, '2014-11-20 20:26:04'),
(112285, 121, 33, 'INVMOVRP', 1, 33, '2014-11-20 20:26:04', 0, '2014-11-20 20:26:04'),
(112286, 121, 33, 'INVLSTRP', 1, 33, '2014-11-20 20:26:04', 0, '2014-11-20 20:26:04'),
(112287, 121, 33, 'IVSTCKCS', 1, 33, '2014-11-20 20:26:04', 0, '2014-11-20 20:26:04'),
(112288, 121, 33, 'LTL', 1, 33, '2014-11-20 20:26:04', 0, '2014-11-20 20:26:04'),
(112289, 121, 33, 'ICAA', 1, 33, '2014-11-20 20:26:04', 0, '2014-11-20 20:26:04'),
(112290, 121, 33, 'ItemDetR', 1, 33, '2014-11-20 20:26:04', 0, '2014-11-20 20:26:04'),
(112291, 121, 33, 'MSLM', 1, 33, '2014-11-20 20:26:05', 0, '2014-11-20 20:26:05'),
(112292, 121, 33, 'ITEMCAT', 1, 33, '2014-11-20 20:26:05', 0, '2014-11-20 20:26:05'),
(112293, 121, 33, 'ITEMTYP', 1, 33, '2014-11-20 20:26:05', 0, '2014-11-20 20:26:05'),
(112294, 121, 33, 'ITEMSET', 1, 33, '2014-11-20 20:26:05', 0, '2014-11-20 20:26:05'),
(112295, 121, 33, 'INVUM', 1, 33, '2014-11-20 20:26:05', 0, '2014-11-20 20:26:05'),
(112296, 121, 33, 'INEDITEM', 1, 33, '2014-11-20 20:26:05', 0, '2014-11-20 20:26:05'),
(112297, 121, 33, 'INNWITEM', 1, 33, '2014-11-20 20:26:05', 0, '2014-11-20 20:26:05'),
(112298, 121, 33, 'IVUNTMSR', 1, 33, '2014-11-20 20:26:05', 0, '2014-11-20 20:26:05'),
(112299, 121, 33, 'TXTRPROC', 1, 33, '2014-11-20 20:26:06', 0, '2014-11-20 20:26:06'),
(112300, 121, 33, 'GSBADRLF', 1, 33, '2014-11-20 20:26:06', 0, '2014-11-20 20:26:06'),
(112301, 121, 33, 'BADBTRLC', 1, 33, '2014-11-20 20:26:06', 0, '2014-11-20 20:26:06'),
(112302, 121, 33, 'GSBADBTR', 1, 33, '2014-11-20 20:26:06', 0, '2014-11-20 20:26:06'),
(112303, 121, 33, 'BDEBRCCO', 1, 33, '2014-11-20 20:26:06', 0, '2014-11-20 20:26:06'),
(112304, 121, 33, 'GST03', 1, 33, '2014-11-20 20:26:07', 0, '2014-11-20 20:26:07'),
(112305, 121, 33, 'GSTRPT01', 1, 33, '2014-11-20 20:26:07', 0, '2014-11-20 20:26:07'),
(112306, 121, 33, 'BDRETRPT', 1, 33, '2014-11-20 20:26:07', 0, '2014-11-20 20:26:07'),
(112307, 121, 33, 'BDRCVRPT', 1, 33, '2014-11-20 20:26:07', 0, '2014-11-20 20:26:07'),
(112308, 121, 33, 'GSTMSTR', 1, 33, '2014-11-20 20:26:07', 0, '2014-11-20 20:26:07'),
(112309, 121, 33, 'GSTCLASS', 1, 33, '2014-11-20 20:26:07', 0, '2014-11-20 20:26:07'),
(112310, 121, 33, 'GSTGROUP', 1, 33, '2014-11-20 20:26:07', 0, '2014-11-20 20:26:07'),
(112311, 121, 33, 'GSTTYPE', 1, 33, '2014-11-20 20:26:07', 0, '2014-11-20 20:26:07'),
(112312, 121, 33, 'ZKTTRCAL', 1, 33, '2014-11-20 20:26:08', 0, '2014-11-20 20:26:08'),
(112313, 121, 33, 'WKFCAL', 1, 33, '2014-11-20 20:26:08', 0, '2014-11-20 20:26:08'),
(112314, 121, 33, 'ZKTRGPLT', 1, 33, '2014-11-20 20:26:08', 0, '2014-11-20 20:26:08'),
(112315, 121, 33, 'ZKRPCTRL', 1, 33, '2014-11-20 20:26:08', 0, '2014-11-20 20:26:08'),
(112316, 121, 33, 'ZKRPNBLT', 1, 33, '2014-11-20 20:26:08', 0, '2014-11-20 20:26:08'),
(112317, 121, 33, 'ZKRPSMLT', 1, 33, '2014-11-20 20:26:09', 0, '2014-11-20 20:26:09'),
(112318, 121, 33, 'WKFLST', 1, 33, '2014-11-20 20:26:09', 0, '2014-11-20 20:26:09'),
(112319, 121, 33, 'ZKTSTGRP', 1, 33, '2014-11-20 20:26:09', 0, '2014-11-20 20:26:09'),
(112320, 121, 33, 'ZKTSTNSB', 1, 33, '2014-11-20 20:26:09', 0, '2014-11-20 20:26:09'),
(112321, 121, 33, 'ZKTSTNSD', 1, 33, '2014-11-20 20:26:09', 0, '2014-11-20 20:26:09'),
(112322, 121, 33, 'ZKSTCNTR', 1, 33, '2014-11-20 20:26:09', 0, '2014-11-20 20:26:09'),
(112323, 121, 33, 'WKSTMSTR', 1, 33, '2014-11-20 20:26:09', 0, '2014-11-20 20:26:09'),
(112324, 121, 33, 'WCQCNTR', 1, 33, '2014-11-20 20:26:09', 0, '2014-11-20 20:26:09'),
(112325, 121, 33, 'MSTRCOMP', 1, 33, '2014-11-20 20:26:12', 0, '2014-11-20 20:26:12'),
(112326, 121, 33, 'PROJECT', 1, 33, '2014-11-20 20:26:12', 0, '2014-11-20 20:26:12'),
(112327, 121, 33, 'TERM', 1, 33, '2014-11-20 20:26:12', 0, '2014-11-20 20:26:12'),
(112328, 121, 33, 'MSMTRCD', 1, 33, '2014-11-20 20:26:12', 0, '2014-11-20 20:26:12'),
(112329, 121, 33, 'EMP', 1, 33, '2014-11-20 20:26:12', 0, '2014-11-20 20:26:12'),
(112330, 121, 33, 'AGENTSTP', 1, 33, '2014-11-20 20:26:12', 0, '2014-11-20 20:26:12'),
(112331, 121, 33, 'BNKSETUP', 1, 33, '2014-11-20 20:26:12', 0, '2014-11-20 20:26:12'),
(112332, 121, 33, 'ShipToST', 1, 33, '2014-11-20 20:26:12', 0, '2014-11-20 20:26:12'),
(112333, 121, 33, 'UM', 1, 33, '2014-11-20 20:26:14', 0, '2014-11-20 20:26:14'),
(112334, 121, 33, 'UML', 1, 33, '2014-11-20 20:26:14', 0, '2014-11-20 20:26:14'),
(112335, 121, 33, 'MUL', 1, 33, '2014-11-20 20:26:14', 0, '2014-11-20 20:26:14'),
(112336, 121, 33, 'LOGRPT', 1, 33, '2014-11-20 20:26:14', 0, '2014-11-20 20:26:14'),
(112337, 121, 33, 'UMACCSS', 1, 33, '2014-11-20 20:26:14', 0, '2014-11-20 20:26:14'),
(112338, 121, 33, 'ADMMENU', 1, 33, '2014-11-20 20:26:14', 0, '2014-11-20 20:26:14'),
(112339, 121, 33, 'USRADD', 1, 33, '2014-11-20 20:26:14', 0, '2014-11-20 20:26:14'),
(112340, 121, 33, 'BACKUP', 1, 33, '2014-11-20 20:26:14', 0, '2014-11-20 20:26:14');

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

--
-- Stand-in structure for view `view_account_balance`
--
CREATE TABLE IF NOT EXISTS `view_account_balance` (
`companyID` int(11)
,`acctID` int(11)
,`acctName` varchar(140)
,`year` int(11)
,`period` varchar(2)
,`closing` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_ar_inventory`
--
CREATE TABLE IF NOT EXISTS `view_ar_inventory` (
`companyID` int(11)
,`customerID` int(11)
,`formNo` varchar(42)
,`salesinvoiceDate` date
,`totalReceivable` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_ar_open_position`
--
CREATE TABLE IF NOT EXISTS `view_ar_open_position` (
`companyID` int(11)
,`customerID` int(11)
,`customerName` varchar(128)
,`phoneNumber1` varchar(50)
,`email` varchar(32)
,`due120` double
,`due90` double
,`due60` double
,`due30` double
,`due0` double
,`pastDue30` double
,`pastDue60` double
,`pastDue90` double
,`pastDue120` double
,`pastDue` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_balance_sheet`
--
CREATE TABLE IF NOT EXISTS `view_balance_sheet` (
`acctCode` char(9)
,`acctName` varchar(128)
,`acctGroupID` int(11)
,`currentyeardebit` double
,`currentyearcredit` double
,`lastyeardebit` double
,`lastyearcredit` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_bank_reconcile`
--
CREATE TABLE IF NOT EXISTS `view_bank_reconcile` (
`ID` int(11)
,`companyID` int(11)
,`tableName` varchar(27)
,`bankID` int(11)
,`referenceNo` varchar(255)
,`transDate` date
,`formNo` varchar(255)
,`description` text
,`debitAmount` double
,`creditAmount` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_bank_reconcile_reverse`
--
CREATE TABLE IF NOT EXISTS `view_bank_reconcile_reverse` (
`bankReconcileID` int(11)
,`ID` int(11)
,`companyID` int(11)
,`tableName` varchar(27)
,`bankID` int(11)
,`referenceNo` varchar(255)
,`transDate` date
,`formNo` varchar(265)
,`description` text
,`debitAmount` double
,`creditAmount` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_chart_of_acct_updateable`
--
CREATE TABLE IF NOT EXISTS `view_chart_of_acct_updateable` (
`ID` int(11)
,`companyID` int(11)
,`acctGroupID` int(11)
,`acctCode` char(9)
,`acctName` varchar(128)
,`acctDesc` varchar(128)
,`updateable` int(2)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_comp_acc_det`
--
CREATE TABLE IF NOT EXISTS `view_comp_acc_det` (
`ID` int(11)
,`companyID` int(11)
,`acctGroupID` int(11)
,`acctID` int(11)
,`year` int(11)
,`period` varchar(2)
,`amountdr` double
,`amountcr` double
,`total` double
,`createdBy` int(11)
,`createdTS` timestamp
,`updatedBy` int(11)
,`updatedTS` timestamp
,`is_delete` smallint(6)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_customer_aging`
--
CREATE TABLE IF NOT EXISTS `view_customer_aging` (
`companyID` int(11)
,`customerID` int(11)
,`customerName` varchar(128)
,`phoneNumber1` varchar(50)
,`email` varchar(32)
,`current` double
,`month1` double
,`month2` double
,`month3` double
,`month4` double
,`month5` double
,`month6` double
,`month7` double
,`month8` double
,`month9` double
,`month10` double
,`month11` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_customer_statement`
--
CREATE TABLE IF NOT EXISTS `view_customer_statement` (
`ID` int(11)
,`parent` bigint(20)
,`companyID` int(11)
,`customerID` int(11)
,`transType` varchar(10)
,`transDate` date
,`refNo` varchar(42)
,`formNo` varchar(42)
,`dr` double
,`cr` double
,`seq` bigint(20)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_expence_and_income`
--
CREATE TABLE IF NOT EXISTS `view_expence_and_income` (
`acctID` int(11)
,`companyid` int(11)
,`year` int(11)
,`period` varchar(2)
,`groupID` int(11)
,`acctType` int(11)
,`totalDr` double
,`totalCr` double
,`balance` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_gaf`
--
CREATE TABLE IF NOT EXISTS `view_gaf` (
`companyID` int(11)
,`col1` varchar(1)
,`col2` varchar(128)
,`col3` varchar(32)
,`col4` date
,`col5` varchar(42)
,`col6` varchar(25)
,`col7` text
,`col8` text
,`col9` double
,`col10` varchar(22)
,`col11` varchar(45)
,`col12` varchar(5)
,`col13` double
,`col14` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_grn_report`
--
CREATE TABLE IF NOT EXISTS `view_grn_report` (
`companyID` int(11)
,`unitMesure` varchar(10)
,`ID` int(11)
,`itemCode` varchar(32)
,`itemName` varchar(64)
,`poNo` varchar(26)
,`PoDate` varchar(10)
,`unitPrice` double
,`quantityOrder` int(11)
,`total` double
,`totalRcv` double(17,0)
,`QtyLeft` double(17,0)
,`itemID` int(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_gst_report`
--
CREATE TABLE IF NOT EXISTS `view_gst_report` (
`companyid` int(11)
,`gstRegisteredDate` date
,`taxablePeriod` smallint(6)
,`financialYear` int(4)
,`startDate` date
,`endDate` date
,`period` smallint(2)
,`A1` varchar(16)
,`A2` varchar(128)
,`B5a` double
,`B5b` double
,`B6a` double
,`B6b` double
,`B7` double
,`B8` double
,`C10` double
,`C11` double
,`C12` double
,`C13` double
,`C14` double
,`C15` double
,`C16` double
,`C17` double
,`month6` double
,`C18` int(1)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_gst_tax`
--
CREATE TABLE IF NOT EXISTS `view_gst_tax` (
`companyID` int(11)
,`taxClass` int(11)
,`taxClassName` varchar(128)
,`taxGroup` int(11)
,`taxGroupName` varchar(128)
,`taxType` int(11)
,`taxTypeName` varchar(128)
,`transType` varchar(20)
,`ref` varchar(42)
,`transDate` date
,`customerID` int(11)
,`customerName` text
,`itemName` text
,`amountExcludedTax` double
,`taxRate` double
,`taxAmount` double
,`amountIncludedTax` double
,`taxID` int(11)
,`gst` varchar(10)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_inventorylist_subtotal`
--
CREATE TABLE IF NOT EXISTS `view_inventorylist_subtotal` (
`companyid` int(11)
,`quantity` double
,`locationid` int(11)
,`itemID` int(11)
,`itemName` varchar(98)
,`category` varchar(64)
,`description` text
,`stockValue` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_inventory_statement`
--
CREATE TABLE IF NOT EXISTS `view_inventory_statement` (
`companyID` int(11)
,`transactionDate` date
,`itemID` int(11)
,`name` varchar(64)
,`supplierCustomer` varchar(128)
,`transactionCode` bigint(20)
,`transactionType` varchar(15)
,`formNo` varchar(42)
,`locationID` int(11)
,`location` varchar(100)
,`unitOfMeasure` varchar(50)
,`quantityIn` double
,`quantityOut` double
,`updateable` int(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_inventory_transaction`
--
CREATE TABLE IF NOT EXISTS `view_inventory_transaction` (
`indexing` int(11)
,`ID` int(11)
,`companyID` int(11)
,`itemID` int(11)
,`locationID` int(11)
,`createdTS` timestamp
,`supplierName` varchar(150)
,`formNo` varchar(42)
,`transDate` date
,`um` varchar(50)
,`transType` varchar(12)
,`qtyIn` varchar(22)
,`qtyOut` varchar(20)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_item_details`
--
CREATE TABLE IF NOT EXISTS `view_item_details` (
`companyid` int(11)
,`itemid` int(11)
,`itemName` varchar(98)
,`description` text
,`locationid` int(11)
,`onHandQty` double
,`umID` int(11)
,`acctID` int(11)
,`location` varchar(20)
,`unitOfMeasure` varchar(10)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_item_quantityonhand`
--
CREATE TABLE IF NOT EXISTS `view_item_quantityonhand` (
`companyID` int(11)
,`locationID` int(11)
,`itemID` int(11)
,`itemCode` varchar(16)
,`itemName` varchar(128)
,`umID` int(11)
,`quantityOnHand` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_item_quantityonhand_confirm`
--
CREATE TABLE IF NOT EXISTS `view_item_quantityonhand_confirm` (
`companyID` int(11)
,`locationID` int(11)
,`itemID` int(11)
,`itemCode` varchar(16)
,`itemName` varchar(128)
,`umID` int(11)
,`quantityOnHand` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_open_ar_invoice`
--
CREATE TABLE IF NOT EXISTS `view_open_ar_invoice` (
`companyID` int(11)
,`salesInvoiceDate` date
,`salesYear` varchar(4)
,`salesMonth` varchar(2)
,`slsMonth` varchar(32)
,`totalAmount` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_salescreditnote`
--
CREATE TABLE IF NOT EXISTS `view_salescreditnote` (
`invoiceDetailID` int(11)
,`unitOfMeasure` varchar(10)
,`ID` int(11)
,`invoiceID` int(11)
,`doID` int(11)
,`lineNo` int(11)
,`itemID` int(11)
,`umID` int(11)
,`quantity` int(11)
,`unitPrice` double
,`amountExcludedTax` double
,`taxID` int(11)
,`taxRate` double
,`taxAmount` double
,`amountIncludedTax` double
,`accountID` int(11)
,`createdBy` int(11)
,`createdTS` timestamp
,`updatedBy` int(11)
,`updatedTS` timestamp
,`code` varchar(10)
,`itemCode` varchar(32)
,`name` varchar(64)
,`description` varchar(128)
,`exactQty` decimal(34,0)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_salesdebitnote`
--
CREATE TABLE IF NOT EXISTS `view_salesdebitnote` (
`invoiceDetailID` int(11)
,`unitOfMeasure` varchar(10)
,`ID` int(11)
,`invoiceID` int(11)
,`doID` int(11)
,`lineNo` int(11)
,`itemID` int(11)
,`umID` int(11)
,`quantity` int(11)
,`unitPrice` double
,`amountExcludedTax` double
,`taxID` int(11)
,`taxRate` double
,`taxAmount` double
,`amountIncludedTax` double
,`accountID` int(11)
,`createdBy` int(11)
,`createdTS` timestamp
,`updatedBy` int(11)
,`updatedTS` timestamp
,`code` varchar(10)
,`itemCode` varchar(32)
,`name` varchar(64)
,`description` varchar(128)
,`exactQty` decimal(34,0)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_search`
--
CREATE TABLE IF NOT EXISTS `view_search` (
`ID` int(11)
,`companyID` int(11)
,`searchLink` varchar(47)
,`searchKey` mediumtext
,`transDate` date
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_cash_sales`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_cash_sales` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_delivery_order`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_delivery_order` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_location_transfer`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_location_transfer` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_payment`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_payment` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_payment_others`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_payment_others` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_purchase_order`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_purchase_order` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_quotation`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_quotation` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_receive_item`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_receive_item` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_receive_payment`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_receive_payment` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_receive_payment_others`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_receive_payment_others` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_sales_creditnote`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_sales_creditnote` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_sales_debitnote`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_sales_debitnote` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_sales_invoice`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_sales_invoice` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_sales_order`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_sales_order` (
`companyID` int(11)
,`nextSerialNo` bigint(17)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_supplier_creditnote`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_supplier_creditnote` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_supplier_debitnote`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_supplier_debitnote` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_serial_comp_supplier_invoice`
--
CREATE TABLE IF NOT EXISTS `view_serial_comp_supplier_invoice` (
`companyID` int(11)
,`nextSerialNo` bigint(12)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_suppliercreditnote`
--
CREATE TABLE IF NOT EXISTS `view_suppliercreditnote` (
`invoiceDetailID` int(11)
,`invoiceUm` int(11)
,`ID` int(11)
,`invoiceID` int(11)
,`receiveID` int(11)
,`lineNo` int(11)
,`itemID` int(11)
,`itemname` varchar(64)
,`itemdescription` text
,`umID` int(11)
,`quantity` int(11)
,`unitPrice` double
,`amountExcludedTax` double
,`taxID` int(11)
,`taxRate` double
,`taxAmount` double
,`amountIncludedTax` double
,`accountID` int(11)
,`createdBy` int(11)
,`createdTS` timestamp
,`updatedBy` int(11)
,`updatedTS` timestamp
,`exactQty` decimal(34,0)
,`unitOfMeasure` varchar(10)
,`receiveDetailID` int(11)
,`code` varchar(10)
,`itemCode` varchar(32)
,`name` varchar(64)
,`description` text
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_supplierdebitnote`
--
CREATE TABLE IF NOT EXISTS `view_supplierdebitnote` (
`invoiceDetailID` int(11)
,`ID` int(11)
,`invoiceID` int(11)
,`receiveID` int(11)
,`lineNo` int(11)
,`itemID` int(11)
,`itemname` varchar(64)
,`itemdescription` text
,`umID` int(11)
,`quantity` int(11)
,`unitPrice` double
,`amountExcludedTax` double
,`taxID` int(11)
,`taxRate` double
,`taxAmount` double
,`amountIncludedTax` double
,`accountID` int(11)
,`createdBy` int(11)
,`createdTS` timestamp
,`updatedBy` int(11)
,`updatedTS` timestamp
,`unitOfMeasure` varchar(10)
,`receiveDetailID` int(11)
,`code` varchar(10)
,`itemCode` varchar(32)
,`name` varchar(64)
,`description` text
,`exactQty` decimal(34,0)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_supplier_aging`
--
CREATE TABLE IF NOT EXISTS `view_supplier_aging` (
`companyID` int(11)
,`supplierID` int(11)
,`current` double
,`month1` double
,`month2` double
,`month3` double
,`month4` double
,`month5` double
,`month6` double
,`month7` double
,`month8` double
,`month9` double
,`month10` double
,`month11` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_supplier_statement`
--
CREATE TABLE IF NOT EXISTS `view_supplier_statement` (
`ID` int(11)
,`parent` int(11)
,`companyID` int(11)
,`supplierID` int(11)
,`transType` varchar(10)
,`transDate` date
,`refNo` varchar(42)
,`formNo` varchar(42)
,`dr` double
,`cr` double
,`seq` bigint(20)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_total_comp_sales_creditnote`
--
CREATE TABLE IF NOT EXISTS `view_total_comp_sales_creditnote` (
`ID` int(11)
,`totalTaxAmount` double
,`totalAmount` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_total_comp_sales_debitnote`
--
CREATE TABLE IF NOT EXISTS `view_total_comp_sales_debitnote` (
`ID` int(11)
,`totalTaxAmount` double
,`totalAmount` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_total_comp_sales_invoice`
--
CREATE TABLE IF NOT EXISTS `view_total_comp_sales_invoice` (
`ID` int(11)
,`totalTaxAmount` double
,`totalAmount` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_total_comp_supplier_creditnote`
--
CREATE TABLE IF NOT EXISTS `view_total_comp_supplier_creditnote` (
`ID` int(11)
,`totalTaxAmount` double
,`totalAmount` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_total_comp_supplier_debitnote`
--
CREATE TABLE IF NOT EXISTS `view_total_comp_supplier_debitnote` (
`ID` int(11)
,`totalTaxAmount` double
,`totalAmount` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_total_comp_supplier_invoice`
--
CREATE TABLE IF NOT EXISTS `view_total_comp_supplier_invoice` (
`ID` int(11)
,`totalTaxAmount` double
,`totalAmount` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_transaction_summary`
--
CREATE TABLE IF NOT EXISTS `view_transaction_summary` (
`tableName` varchar(27)
,`transID` bigint(20)
,`companyid` int(11)
,`year` varchar(4)
,`Jan` bigint(21)
,`Feb` bigint(21)
,`Mar` bigint(21)
,`Apr` bigint(21)
,`may` bigint(21)
,`Jun` bigint(21)
,`Jul` bigint(21)
,`Aug` bigint(21)
,`Sept` bigint(21)
,`Oct` bigint(21)
,`Nov` bigint(21)
,`Dec` bigint(21)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_ap_creditnote`
--
CREATE TABLE IF NOT EXISTS `view_unpost_ap_creditnote` (
`supplier` varchar(128)
,`creditnoteID` int(11)
,`lineNo` int(11)
,`projectID` int(11)
,`supplierInvoiceID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`supplierID` int(11)
,`supplierInvoiceNo` varchar(32)
,`locationID` int(11)
,`umID` int(11)
,`quantity` int(11)
,`itemID` int(11)
,`itemName` text
,`amountExcludedtax` double
,`taxid` int(11)
,`taxamount` double
,`drAccountID` int(11)
,`crAccountID` int(11)
,`drTaxAccountID` int(11)
,`crTaxAccountID` int(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_ap_debitnote`
--
CREATE TABLE IF NOT EXISTS `view_unpost_ap_debitnote` (
`supplier` varchar(128)
,`debitnoteID` int(11)
,`lineNo` int(11)
,`projectID` int(11)
,`typeID` bigint(20)
,`typeDetailID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`supplierID` int(11)
,`supplierInvoiceNo` varchar(32)
,`locationID` int(11)
,`umID` int(11)
,`quantity` int(11)
,`itemID` int(11)
,`itemName` mediumtext
,`amountExcludedtax` double
,`taxid` int(11)
,`taxamount` double
,`drAccountID` int(11)
,`crAccountID` int(11)
,`drTaxAccountID` int(11)
,`crTaxAccountID` int(11)
,`cogsAcctID` binary(0)
,`inventoriesAcctID` binary(0)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_ap_invoice`
--
CREATE TABLE IF NOT EXISTS `view_unpost_ap_invoice` (
`supplier` varchar(128)
,`invoiceID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`supplierID` int(11)
,`lineNo` bigint(20)
,`itemID` int(11)
,`itemName` text
,`amountExcludedtax` double
,`taxid` int(11)
,`taxamount` double
,`drAccountID` int(11)
,`crAccountID` int(11)
,`drTaxAccountID` int(11)
,`crTaxAccountID` int(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_ar_creditnote`
--
CREATE TABLE IF NOT EXISTS `view_unpost_ar_creditnote` (
`customer` varchar(128)
,`salesinvoiceID` int(11)
,`creditnoteID` int(11)
,`projectID` int(11)
,`typeID` bigint(20)
,`typeDetailID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`customerID` int(11)
,`locationID` int(11)
,`salesInvoiceNo` varchar(42)
,`lineNo` int(11)
,`itemID` int(11)
,`umID` int(11)
,`quantity` bigint(20)
,`itemName` text
,`amountExcludedtax` double
,`taxid` int(11)
,`taxamount` double
,`drAccountID` int(11)
,`crAccountID` varchar(11)
,`drTaxAccountID` int(11)
,`crTaxAccountID` varchar(11)
,`cogsAcctID` int(11)
,`inventoriesAcctID` int(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_ar_debitnote`
--
CREATE TABLE IF NOT EXISTS `view_unpost_ar_debitnote` (
`customer` varchar(128)
,`salesinvoiceID` int(11)
,`debitnoteID` int(11)
,`projectID` int(11)
,`typeID` bigint(20)
,`typeDetailID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`customerID` int(11)
,`locationID` int(11)
,`salesInvoiceNo` varchar(42)
,`lineNo` int(11)
,`itemID` int(11)
,`umID` int(11)
,`quantity` bigint(20)
,`itemName` text
,`amountExcludedtax` double
,`taxid` int(11)
,`taxamount` double
,`currencyID` int(11)
,`drAccountID` varchar(11)
,`crAccountID` int(11)
,`drTaxAccountID` varchar(11)
,`crTaxAccountID` int(11)
,`cogsAcctID` int(11)
,`inventoriesAcctID` int(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_ar_invoice`
--
CREATE TABLE IF NOT EXISTS `view_unpost_ar_invoice` (
`projectID` int(11)
,`customer` varchar(128)
,`invoiceID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`customerID` int(11)
,`itemID` int(11)
,`lineNo` int(11)
,`itemName` mediumtext
,`amountExcludedtax` double
,`taxid` bigint(20)
,`taxamount` double
,`drAccountID` varchar(11)
,`crAccountID` int(11)
,`drTaxAccountID` varchar(11)
,`crTaxAccountID` int(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_ar_payment`
--
CREATE TABLE IF NOT EXISTS `view_unpost_ar_payment` (
`paymentID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`customerID` int(11)
,`purchaseInvoiceID` int(11)
,`customerName` varchar(128)
,`lineNo` bigint(11)
,`paymentDetailID` int(11)
,`item` varchar(42)
,`amtPaid_amtAppl` double
,`discount_bankCharges` double
,`drAccountID` int(11)
,`crAccountID` varchar(11)
,`drDiscountAccountID` int(11)
,`crDiscountAccountID` varchar(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_cash_purchase`
--
CREATE TABLE IF NOT EXISTS `view_unpost_cash_purchase` (
`lineNo` int(11)
,`quantity` int(11)
,`unitPrice` double
,`itemID` int(11)
,`itemdescription` text
,`umID` int(11)
,`locationID` int(11)
,`othersPaymentID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`supplierID` binary(0)
,`purchaseInvoiceID` binary(0)
,`paymentDetailID` int(11)
,`supplierInvoiceNo` binary(0)
,`ID` int(11)
,`itemName` varchar(64)
,`amountExcludedTax` double
,`taxid` int(11)
,`taxAmount` double
,`projectID` int(11)
,`drAccountID` bigint(11)
,`crAccountID` bigint(11)
,`drDiscountAccountID` bigint(11)
,`crDiscountAccountID` bigint(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_cash_sale`
--
CREATE TABLE IF NOT EXISTS `view_unpost_cash_sale` (
`projectID` int(11)
,`customer` varchar(128)
,`invoiceID` int(11)
,`typeID` int(1)
,`typeDetailID` int(11)
,`locationID` int(11)
,`quantity` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`itemID` int(11)
,`umID` int(11)
,`lineNo` int(11)
,`currencyID` int(11)
,`itemName` mediumtext
,`amountExcludedtax` double
,`taxid` int(11)
,`taxamount` double
,`drAccountID` bigint(11)
,`crAccountID` int(11)
,`drTaxAccountID` bigint(11)
,`crTaxAccountID` bigint(11)
,`cogsAcctID` int(11)
,`inventoriesAcctID` int(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_do`
--
CREATE TABLE IF NOT EXISTS `view_unpost_do` (
`deliveryOrderID` int(11)
,`customerID` int(11)
,`projectID` binary(0)
,`customer` binary(0)
,`invoiceID` int(11)
,`typeID` int(1)
,`typeDetailID` int(11)
,`locationID` int(11)
,`quantity` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`itemID` int(11)
,`itemName` mediumtext
,`amountExcludedtax` int(1)
,`taxid` binary(0)
,`taxamount` int(1)
,`drAccountID` binary(0)
,`crAccountID` binary(0)
,`drTaxAccountID` binary(0)
,`crTaxAccountID` binary(0)
,`cogsAcctID` bigint(11)
,`inventoriesAcctID` int(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_other_payment`
--
CREATE TABLE IF NOT EXISTS `view_unpost_other_payment` (
`othersPaymentID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`supplierID` binary(0)
,`purchaseInvoiceID` binary(0)
,`paymentDetailID` int(11)
,`supplierInvoiceNo` binary(0)
,`lineNo` int(11)
,`itemdescription` text
,`amountExcludedtax` double
,`taxid` int(11)
,`taxamount` double
,`drAccountID` int(11)
,`crAccountID` bigint(11)
,`drTaxAccountID` bigint(11)
,`crTaxAccountID` bigint(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_other_receive`
--
CREATE TABLE IF NOT EXISTS `view_unpost_other_receive` (
`projectID` int(11)
,`receiveFrom` varchar(128)
,`otherReceiveID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`NULL` binary(0)
,`itemdescription` text
,`amountExcludedtax` double
,`taxid` int(11)
,`taxamount` double
,`drAccountID` bigint(11)
,`crAccountID` int(11)
,`drTaxAccountID` bigint(11)
,`crTaxAccountID` bigint(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_payment`
--
CREATE TABLE IF NOT EXISTS `view_unpost_payment` (
`paymentID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`supplierID` int(11)
,`purchaseInvoiceID` int(11)
,`supplierName` varchar(128)
,`lineNo` bigint(11)
,`paymentDetailID` int(11)
,`supplierInvoiceNo` varchar(32)
,`item` varchar(42)
,`amtPaid_amtAppl` double
,`discount_bankCharges` double
,`drAccountID` int(11)
,`crAccountID` int(11)
,`drDiscountAccountID` int(11)
,`crDiscountAccountID` int(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_receive_item`
--
CREATE TABLE IF NOT EXISTS `view_unpost_receive_item` (
`receiveID` int(11)
,`companyID` int(11)
,`locationID` int(11)
,`transactionDate` date
,`supplierID` int(11)
,`formNo` varchar(42)
,`lineNo` int(11)
,`itemID` int(11)
,`itemName` varchar(98)
,`exchangeRate` float
,`unitPrice` double
,`quantityReceived` double
,`umID` int(11)
,`amount` double
,`drAccountID` bigint(11)
,`crAccountID` bigint(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_wakaf_accrual`
--
CREATE TABLE IF NOT EXISTS `view_wakaf_accrual` (
`companyID` int(11)
,`acctID` int(11)
,`year` int(11)
,`totalAmount` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_wakaf_from_profit`
--
CREATE TABLE IF NOT EXISTS `view_wakaf_from_profit` (
`companyid` int(11)
,`year` int(11)
,`acctType` int(11)
,`totalDr` double
,`totalCr` double
);
-- --------------------------------------------------------

--
-- Table structure for table `wakaf`
--

CREATE TABLE IF NOT EXISTS `wakaf` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `waqifID` int(11) NOT NULL COMMENT 'link to mastercode',
  `wakafCenterID` int(11) NOT NULL,
  `allocation` tinyint(4) NOT NULL COMMENT '0=lumpsum,1=percentage',
  `periodYear` smallint(6) NOT NULL,
  `periodFrom` tinyint(4) NOT NULL,
  `periodTo` tinyint(4) NOT NULL,
  `amountAllocated` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `wakaf_acrual`
--

CREATE TABLE IF NOT EXISTS `wakaf_acrual` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `salesAccountID` int(11) NOT NULL,
  `from` date NOT NULL,
  `to` date NOT NULL,
  `wakafPercent` decimal(10,0) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `wakaf_beneficiaries`
--

CREATE TABLE IF NOT EXISTS `wakaf_beneficiaries` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `shortName` varchar(12) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `wakaf_center`
--

CREATE TABLE IF NOT EXISTS `wakaf_center` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `shortName` varchar(12) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL,
  `line1` varchar(128) NOT NULL,
  `line2` varchar(128) NOT NULL,
  `line3` varchar(128) NOT NULL,
  `city` varchar(64) NOT NULL,
  `postCode` varchar(8) NOT NULL,
  `stateID` int(11) NOT NULL,
  `countryID` int(11) NOT NULL,
  `noTel` varchar(50) NOT NULL,
  `noFax` varchar(50) NOT NULL,
  `email` varchar(128) NOT NULL,
  `website` varchar(128) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `wakaf_details_allocation`
--

CREATE TABLE IF NOT EXISTS `wakaf_details_allocation` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `wakafID` varchar(64) NOT NULL DEFAULT '0',
  `accountID` int(11) NOT NULL,
  `saleAmount` double NOT NULL,
  `contributionPercentage` double NOT NULL,
  `amount` double NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `wakaf_details_distribution`
--

CREATE TABLE IF NOT EXISTS `wakaf_details_distribution` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `wakafID` varchar(64) NOT NULL DEFAULT '0',
  `beneficiariesID` int(11) NOT NULL,
  `description` varchar(128) NOT NULL,
  `contributionPercentage` double NOT NULL,
  `amount` double NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `wakaf_master`
--

CREATE TABLE IF NOT EXISTS `wakaf_master` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL DEFAULT '0',
  `waqif` varchar(64) NOT NULL DEFAULT '0',
  `category` varchar(24) NOT NULL,
  `allocationID` int(11) NOT NULL,
  `beneficiariesID` int(11) NOT NULL,
  `description` varchar(128) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `zakat_center`
--

CREATE TABLE IF NOT EXISTS `zakat_center` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `shortName` varchar(12) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL,
  `line1` varchar(128) NOT NULL,
  `line2` varchar(128) NOT NULL,
  `line3` varchar(128) NOT NULL,
  `city` varchar(64) NOT NULL,
  `postCode` varchar(8) NOT NULL,
  `stateID` int(11) NOT NULL,
  `countryID` int(11) NOT NULL,
  `noTel` varchar(50) NOT NULL,
  `noFax` varchar(50) NOT NULL,
  `email` varchar(128) NOT NULL,
  `website` varchar(128) NOT NULL,
  `is_delete` tinyint(4) NOT NULL DEFAULT '0',
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int(11) NOT NULL,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `zakat_details`
--

CREATE TABLE IF NOT EXISTS `zakat_details` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `zakatSummaryID` int(11) NOT NULL,
  `acctGroup` varchar(64) DEFAULT NULL,
  `desc` varchar(64) DEFAULT NULL,
  `amount` double DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `zakat_group`
--

CREATE TABLE IF NOT EXISTS `zakat_group` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL DEFAULT '1',
  `name` varchar(50) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `parentID` int(11) DEFAULT '0',
  `sequence` int(11) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `zakat_group_details`
--

CREATE TABLE IF NOT EXISTS `zakat_group_details` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL DEFAULT '1',
  `groupID` int(11) DEFAULT NULL,
  `acctID` int(11) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `zakat_nisab`
--

CREATE TABLE IF NOT EXISTS `zakat_nisab` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL DEFAULT '0',
  `centerID` int(11) DEFAULT NULL,
  `year` year(4) DEFAULT NULL,
  `nisab` double DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `zakat_summary`
--

CREATE TABLE IF NOT EXISTS `zakat_summary` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL DEFAULT '1',
  `centerID` int(11) NOT NULL DEFAULT '1',
  `year` varchar(4) DEFAULT NULL,
  `calculationMethod` varchar(32) NOT NULL,
  `muslimOwnershipShare` double NOT NULL,
  `nisab` double NOT NULL,
  `netCurrentAsset` double NOT NULL,
  `totalDueForZakat` double NOT NULL,
  `zakatPayableForTheYear` double NOT NULL,
  `monthlyZakatPayable` double NOT NULL,
  `totalAmount` double DEFAULT NULL,
  `totalZakatPaid` double DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `_log_query`
--

CREATE TABLE IF NOT EXISTS `_log_query` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `userID` int(11) NOT NULL,
  `userIP` varchar(30) NOT NULL,
  `type` varchar(50) NOT NULL,
  `query` text NOT NULL,
  `url` varchar(255) NOT NULL,
  `executionTime` varchar(256) NOT NULL,
  `createdTS` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=352260 ;

--
-- Dumping data for table `_log_query`
--

INSERT INTO `_log_query` (`ID`, `companyID`, `userID`, `userIP`, `type`, `query`, `url`, `executionTime`, `createdTS`) VALUES
(352238, 121, 33, '192.168.1.1', 'update', 'UPDATE `company` SET `companyName` = ''Demo'', `companyNo` = ''dmo123'', `incorporateDate` = ''2014-01-01'', `line1` = ''123, JLN 123'', `line2` = ''TMN 123'', `line3` = ''taman kelana'', `city` = ''AMPANG'', `companyPostCode` = ''33333'', `companyStateID` = ''1931'', `countryID` = ''458'', `phoneNo` = '''', `faxNo` = '''', `email` = '''', `website` = '''', `taxablePeriod` = ''3'', `currencyID` = ''1'', `muslimShareholder` = ''80'', `gstRegisteredNo` = ''111111111111'', `gstRegisteredDate` = ''2014-11-03'', `gstSubmissionBuffer` = ''0'', `updatedBy` = ''sam'' WHERE `ID` =  ''121''', 'setting/companysetup', '0.038510799407959', '2015-02-10 12:27:48'),
(352239, 121, 33, '192.168.1.1', 'update', 'UPDATE `company` SET `uploadLogo` = ''dmo123.JPG'' WHERE `ID` =  ''121''', 'setting/companysetup', '0.016669988632202', '2015-02-10 12:27:48'),
(352240, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `register` (`email`, `checker`) VALUES (''sayem7746@gmail.com'', ''d3ee83e56cba2e2371597a06394cabdc'')', 'register/regisisterEmail', '0.028134107589722', '2015-02-11 11:03:12'),
(352241, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `register` (`email`, `checker`) VALUES (''sayem7746@gmail.com'', ''d3ee83e56cba2e2371597a06394cabdc'')', 'register/regisisterEmail', '0.10409283638', '2015-02-11 11:03:39'),
(352242, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `register` (`email`, `checker`) VALUES (''sayem7746@gmail.com'', ''d3ee83e56cba2e2371597a06394cabdc'')', 'register/regisisterEmail', '0.096436977386475', '2015-02-11 11:04:02'),
(352243, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `register` (`email`, `checker`) VALUES (''sayem7746@gmail.com'', ''d3ee83e56cba2e2371597a06394cabdc'')', 'register/regisisterEmail', '0.021425008773804', '2015-02-11 11:04:37'),
(352244, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `register` (`email`, `checker`) VALUES (''sayem7746@gmail.com'', ''d3ee83e56cba2e2371597a06394cabdc'')', 'register/regisisterEmail', '0.019325971603394', '2015-02-11 11:07:11'),
(352245, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `register` (`email`, `checker`) VALUES (''sayem7746@gmail.com'', ''d3ee83e56cba2e2371597a06394cabdc'')', 'register/regisisterEmail', '0.094259023666382', '2015-02-11 11:07:49'),
(352246, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `register` (`email`, `checker`) VALUES (''sayem7746@gmail.com'', ''d3ee83e56cba2e2371597a06394cabdc'')', 'register/regisisterEmail', '0.092866897583008', '2015-02-11 11:09:04'),
(352247, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `register` (`email`, `checker`) VALUES (''sayem7746@gmail.com'', ''d3ee83e56cba2e2371597a06394cabdc'')', 'register/regisisterEmail', '0.097532033920288', '2015-02-11 11:16:13'),
(352248, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `register` (`email`, `checker`) VALUES (''sayem7746@gmail.com'', ''d3ee83e56cba2e2371597a06394cabdc'')', 'register/regisisterEmail', '0.027085065841675', '2015-02-11 11:29:57'),
(352249, 0, 0, '192.168.1.1', 'update', 'UPDATE `register` SET `compName` = ''Company Name'', `industryID` = ''2'', `password` = ''827ccb0eea8a706c4c34a16891f84e7b'' WHERE `ID` =  ''9''', 'register/configurecompany', '0.096837043762207', '2015-02-11 13:02:50'),
(352250, 0, 0, '192.168.1.1', 'update', 'UPDATE `register` SET `compName` = ''Company Name'', `industryID` = ''2'', `password` = ''827ccb0eea8a706c4c34a16891f84e7b'', `returned` = 1 WHERE `ID` =  ''9''', 'register/configurecompany', '0.018157005310059', '2015-02-11 13:03:26'),
(352251, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `register` (`email`, `checker`) VALUES (''sayem7746@gmail.com'', ''d3ee83e56cba2e2371597a06394cabdc'')', 'register/regisisterEmail', '0.0097851753234863', '2015-02-12 14:23:51'),
(352252, 0, 0, '192.168.1.1', 'update', 'UPDATE `register` SET `compName` = ''Sayem demo'', `industryID` = ''1'', `password` = ''827ccb0eea8a706c4c34a16891f84e7b'', `returned` = 1 WHERE `ID` =  ''10''', 'register/configurecompany', '0.09300708770752', '2015-02-12 14:24:21'),
(352253, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `register` (`email`, `checker`) VALUES (''sayem7746@gmail.com'', ''d3ee83e56cba2e2371597a06394cabdc'')', 'register/regisisterEmail', '0.3225200176239', '2015-02-12 15:34:15'),
(352254, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `company` (`companyName`, `companyNo`, `incorporateDate`, `businessTypeID`, `line1`, `line2`, `line3`, `city`, `companyPostCode`, `companyStateID`, `phoneNo`, `faxNo`, `email`, `website`, `uploadLogo`, `currencyID`, `languageID`, `countryID`, `muslimShareholder`, `gstRegisteredNo`, `gstRegisteredDate`, `gstSubmissionBuffer`, `taxablePeriod`, `dateFormat`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `keyCode`) VALUES (''Demo'', ''12345'', ''2014-01-01'', ''1'', ''123, JLN 123'', ''TMN 123'', ''taman kelana'', ''AMPANG'', ''33333'', ''1931'', '''', '''', '''', '''', ''dmo123.JPG'', ''1'', ''0'', ''458'', ''80'', ''111111111111'', ''2014-11-03'', ''0'', ''3'', ''1'', ''0'', ''2014-11-17 01:04:45'', ''0'', ''2015-02-10 12:30:33'', ''0'', ''vp8XYptujJYHpiFC+S7qvcaAnh2Lan6qYEbZPXSfcDE'')', 'register/configurecompany', '0.013281106948853', '2015-02-12 15:59:48'),
(352255, 0, 0, '192.168.1.1', 'update', 'UPDATE `register` SET `compName` = ''Demo company'', `compID` = 122, `industryID` = ''1'', `password` = ''827ccb0eea8a706c4c34a16891f84e7b'', `returned` = 1 WHERE `ID` =  ''11''', 'register/configurecompany', '0.010672092437744', '2015-02-12 15:59:48'),
(352256, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `register` (`email`, `checker`) VALUES (''sayem7746@gmail.com'', ''d3ee83e56cba2e2371597a06394cabdc'')', 'register/regisisterEmail', '0.30892896652222', '2015-02-12 16:00:29'),
(352257, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `company` (`companyName`, `companyNo`, `incorporateDate`, `businessTypeID`, `line1`, `line2`, `line3`, `city`, `companyPostCode`, `companyStateID`, `phoneNo`, `faxNo`, `email`, `website`, `uploadLogo`, `currencyID`, `languageID`, `countryID`, `muslimShareholder`, `gstRegisteredNo`, `gstRegisteredDate`, `gstSubmissionBuffer`, `taxablePeriod`, `dateFormat`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `keyCode`) VALUES (''Demo'', ''12345'', ''2014-01-01'', ''1'', ''123, JLN 123'', ''TMN 123'', ''taman kelana'', ''AMPANG'', ''33333'', ''1931'', '''', '''', '''', '''', ''dmo123.JPG'', ''1'', ''0'', ''458'', ''80'', ''111111111111'', ''2014-11-03'', ''0'', ''3'', ''1'', ''0'', ''2014-11-17 01:04:45'', ''0'', ''2015-02-10 12:30:33'', ''0'', ''vp8XYptujJYHpiFC+S7qvcaAnh2Lan6qYEbZPXSfcDE'')', 'register/configurecompany', '0.082798957824707', '2015-02-12 16:00:59'),
(352258, 0, 0, '192.168.1.1', 'update', 'UPDATE `register` SET `compName` = ''Sayem demo comp'', `compID` = 123, `industryID` = ''4'', `password` = ''827ccb0eea8a706c4c34a16891f84e7b'', `returned` = 1 WHERE `ID` =  ''12''', 'register/configurecompany', '0.021985769271851', '2015-02-12 16:00:59'),
(352259, 0, 0, '192.168.1.1', 'insert', 'INSERT INTO `register` (`email`, `checker`) VALUES (''sayem7746@gmail.com'', ''d3ee83e56cba2e2371597a06394cabdc'')', 'register/regisisterEmail', '0.10118317604065', '2015-02-12 16:16:48');

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

--
-- Table structure for table `_ref_acct_group`
--

CREATE TABLE IF NOT EXISTS `_ref_acct_group` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `acctTypeID` int(11) NOT NULL,
  `acctGroupName` varchar(128) NOT NULL,
  `acctCode` char(9) NOT NULL,
  `orderNo` int(11) DEFAULT NULL,
  `parentID` int(11) DEFAULT NULL,
  `title` tinyint(4) DEFAULT '0',
  `status` tinyint(4) DEFAULT '0',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`),
  KEY `ID` (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=45 ;

--
-- Dumping data for table `_ref_acct_group`
--

INSERT INTO `_ref_acct_group` (`ID`, `acctTypeID`, `acctGroupName`, `acctCode`, `orderNo`, `parentID`, `title`, `status`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 5, 'CapitalRetainedEarnings', '1200', 40, 40, 1, 1, 1, '2014-05-30 07:47:09', 0, '2014-09-24 09:26:31'),
(2, 1, 'FixedAssets', '1200', 10, 42, 1, 0, 1, '2014-05-30 07:47:09', 0, '2014-09-22 01:32:35'),
(3, 1, 'CurrentAssets', '1200', 30, 39, 1, 0, 1, '2014-05-30 07:47:09', 0, '2014-09-22 01:32:35'),
(4, 2, 'CurrentLiabilities', '1200', 40, 39, 1, 1, 1, '2014-05-30 07:47:09', 0, '2014-09-22 01:32:35'),
(5, 2, 'OtherLiabilites', '1200', 70, 40, 1, 1, 1, '2014-05-30 07:47:09', 0, '2014-09-22 01:32:35'),
(6, 2, 'LongTermLiabilities', '1200', 50, 40, 1, 1, 1, '2014-05-30 07:47:09', 0, '2014-09-22 01:32:35'),
(7, 3, 'revenue', '1200', 110, 33, 1, 1, 1, '2014-05-30 07:47:09', 0, '2014-09-22 01:32:35'),
(8, 4, 'COGS', '1200', 120, 33, 1, 0, 1, '2014-05-30 07:47:09', 0, '2014-09-22 01:32:35'),
(9, 3, 'othersincome', '1200', 200, 35, 1, 1, 1, '2014-12-19 08:23:01', 0, '2014-12-19 08:40:24'),
(10, 4, 'operatingexpenses', '1200', 190, 35, 1, 0, 1, '2014-05-30 07:47:09', 0, '2014-12-19 08:48:41'),
(12, 4, 'taxation', '1200', 400, 38, 1, 0, 1, '2014-05-30 07:47:09', 0, '2014-09-22 01:32:35'),
(31, 1, 'OthersAssets', '1200', 20, 42, 1, 0, 1, '2014-05-30 07:47:09', 0, '2014-09-22 01:32:35'),
(32, 4, 'othercomprehensiveincome', '1200', 500, 38, 1, 0, 1, '2014-05-30 07:47:09', 0, '2014-09-22 01:32:35'),
(33, 3, 'grossprofit', '1200', 100, 34, 0, 1, 1, '2014-05-30 07:47:09', 0, '2014-09-24 04:17:50'),
(34, 3, 'operatingprofit', '1200', 10, 37, 0, 0, 1, '2014-05-30 07:47:09', 0, '2014-09-24 04:21:05'),
(35, 3, 'operatingincome', '1200', 130, 34, 0, 1, 1, '2014-05-30 07:47:09', 0, '2014-12-19 10:08:25'),
(36, 3, 'financeincome', '1200', 20, 43, 1, 1, 1, '2014-05-30 07:47:09', 0, '2014-10-28 04:36:10'),
(37, 4, 'profitNlossb4tax', '1200', 30, 38, 0, 0, 1, '2014-05-30 07:47:09', 0, '2014-09-22 01:32:35'),
(38, 4, 'currentyear', '1200', 10, 0, 0, 0, 1, '2014-05-30 07:47:09', 0, '2014-09-22 01:32:35'),
(39, 1, 'NetCurrent', '1200', 30, 42, 0, 0, 1, '2014-05-30 07:47:09', 0, '2014-09-22 01:32:35'),
(40, 2, 'LiabilitiesNCapital', '1200', 50, 0, 0, 1, 0, '2014-08-27 08:53:04', 0, '2014-09-22 01:32:35'),
(42, 1, 'AssetNLiability', '1200', 30, 0, 0, 0, 0, '2014-09-03 03:27:27', 0, '2014-09-22 01:32:35'),
(43, 4, 'financeIncomeCost', '1200', 20, 37, 0, 0, 1, '2014-10-28 03:57:42', 1, '2014-10-28 04:21:09'),
(44, 4, 'financeCost', '1200', 30, 43, 1, 0, 1, '2014-05-30 07:47:09', 0, '2014-10-28 03:59:05');

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

--
-- Table structure for table `_ref_acct_group_bakup`
--

CREATE TABLE IF NOT EXISTS `_ref_acct_group_bakup` (
  `ID` int(11) NOT NULL DEFAULT '0',
  `acctTypeID` int(11) NOT NULL,
  `acctGroupName` varchar(128) NOT NULL,
  `acctCode` char(9) NOT NULL,
  `orderNo` int(11) NOT NULL,
  `parentID` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `_ref_acct_group_bakup`
--

INSERT INTO `_ref_acct_group_bakup` (`ID`, `acctTypeID`, `acctGroupName`, `acctCode`, `orderNo`, `parentID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 'Capital/Retained Earnings', '', 10, 0, 1, '2014-05-06 02:27:15', 0, '0000-00-00 00:00:00'),
(2, 1, 'Fixed Assets', '', 20, 0, 1, '2014-05-06 02:27:15', 0, '0000-00-00 00:00:00'),
(3, 1, 'Current Assets', '', 30, 0, 1, '2014-05-06 02:27:15', 0, '0000-00-00 00:00:00'),
(4, 2, 'Current Liabilities', '', 100, 0, 1, '2014-05-06 02:27:15', 0, '0000-00-00 00:00:00'),
(5, 2, 'Other Liabilites', '', 110, 0, 1, '2014-05-06 02:27:15', 0, '0000-00-00 00:00:00'),
(6, 2, 'Long-Term Liabilities', '', 120, 0, 1, '2014-05-06 02:27:15', 0, '0000-00-00 00:00:00'),
(7, 3, 'Revenue', '', 200, 0, 1, '2014-05-06 02:27:15', 0, '0000-00-00 00:00:00'),
(8, 3, 'Cost of Sales', '', 210, 0, 1, '2014-05-06 02:27:15', 0, '0000-00-00 00:00:00'),
(9, 3, 'Other Income', '', 220, 0, 1, '2014-05-06 02:27:15', 0, '0000-00-00 00:00:00'),
(10, 4, 'Expenses', '', 300, 0, 1, '2014-05-06 02:27:15', 0, '0000-00-00 00:00:00'),
(11, 4, 'Other Expenses', '', 310, 0, 1, '2014-05-06 02:27:15', 0, '0000-00-00 00:00:00'),
(12, 4, 'Taxation', '', 320, 0, 1, '2014-05-06 02:27:15', 0, '0000-00-00 00:00:00');

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

--
-- Table structure for table `_ref_acct_type`
--

CREATE TABLE IF NOT EXISTS `_ref_acct_type` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `acctTypeName` varchar(128) NOT NULL,
  `acctClass` smallint(6) NOT NULL COMMENT '0=Balance Shit, 1=Profit and Lost',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `_ref_acct_type`
--

INSERT INTO `_ref_acct_type` (`ID`, `acctTypeName`, `acctClass`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 'Assets', 0, 1, '2014-05-06 01:43:31', 0, '0000-00-00 00:00:00'),
(2, 'Liability', 0, 1, '2014-05-06 01:43:31', 0, '0000-00-00 00:00:00'),
(3, 'Income', 1, 1, '2014-05-06 01:43:31', 0, '0000-00-00 00:00:00'),
(4, 'Expences', 1, 1, '2014-05-06 01:43:31', 0, '0000-00-00 00:00:00');

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

--
-- Table structure for table `_ref_business_type`
--

CREATE TABLE IF NOT EXISTS `_ref_business_type` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `industryID` int(11) NOT NULL,
  `name` varchar(128) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=27 ;

--
-- Dumping data for table `_ref_business_type`
--

INSERT INTO `_ref_business_type` (`ID`, `industryID`, `name`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 'Manufacturing', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(2, 2, 'Audio Visual', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(3, 2, 'Bakery', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(4, 2, 'Cafe', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(5, 2, 'Car Dealer', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(6, 2, 'Furniture Dealer', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(7, 2, 'Gift Shop', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(8, 2, 'Hardware Store', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(9, 2, 'Restaurant', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(10, 2, 'Video Store', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(11, 3, 'Accounting Firm', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(12, 3, 'Advertising Agency', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(13, 3, 'Architect', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(14, 3, 'Banquet Facilty', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(15, 3, 'Beauty Salon', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(16, 3, 'Cleaning Services', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(17, 3, 'Construction Company', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(18, 3, 'Education Institution', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(19, 3, 'Financial Services', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(20, 3, 'Insurance Agency', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(21, 3, 'Legal Firm', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(22, 3, 'Non-profit Organization', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(23, 3, 'Travel Agency', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(24, 4, 'Partnership', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(25, 4, 'sole Proprietorship', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00'),
(26, 4, 'Wholesale Business', 1, '2014-05-06 01:32:56', 0, '0000-00-00 00:00:00');

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

--
-- Table structure for table `_ref_chart_of_acct`
--

CREATE TABLE IF NOT EXISTS `_ref_chart_of_acct` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `businessTypeID` int(11) NOT NULL,
  `acctGroupID` int(11) NOT NULL,
  `acctCode` char(9) NOT NULL,
  `parentID` int(11) NOT NULL,
  `acctName` varchar(128) NOT NULL,
  `acctDescription` varchar(128) NOT NULL,
  `defaultID` int(11) DEFAULT NULL COMMENT 'id default acct for general setup',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=218 ;

--
-- Dumping data for table `_ref_chart_of_acct`
--

INSERT INTO `_ref_chart_of_acct` (`ID`, `businessTypeID`, `acctGroupID`, `acctCode`, `parentID`, `acctName`, `acctDescription`, `defaultID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(100, 1, 1, '100000000', 0, 'Owner''s/Shareholder''s capital', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(101, 1, 1, '120000000', 0, 'Retained Earnings-Prior Year', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(102, 1, 1, '130000000', 0, 'Current Year Earnings', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(103, 1, 2, '200000000', 0, 'Fixed Assets', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(104, 1, 2, '200010000', 103, 'Manufacturing Plant', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(105, 1, 2, '200010010', 104, 'Manufacturing Plant at Cost', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(106, 1, 2, '200010020', 104, 'Manufacturing Plant Accum Dep''n', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(107, 1, 2, '200020000', 103, 'Manufacturing Equipment', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(108, 1, 2, '200020010', 107, 'Manufacturing Equipment at Cost', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(109, 1, 2, '200020020', 107, 'Manufacturing Equipment Accum Dep''n', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(110, 1, 2, '200030000', 103, 'Furniture & Fixtures', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(111, 1, 2, '200030010', 110, 'Furn & Fixtures at Cost', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(112, 1, 2, '200030020', 110, 'Furn & Fixtures Accum Dep''n', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(113, 1, 2, '200040000', 103, 'Office Equipment', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(114, 1, 2, '200040010', 113, 'Office Equipment at Cost', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(115, 1, 2, '200040020', 113, 'Office Equipment Accum Dep''n', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(116, 1, 2, '200050000', 103, 'Motor Vehicles', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(117, 1, 2, '200050010', 116, 'Motor Vehicles at Cost', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(118, 1, 2, '200050020', 116, 'Motor Vehicles Accum Dep''n', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(119, 1, 3, '210000000', 0, 'Trade Receivable', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(120, 1, 3, '211000000', 0, 'Goods No Bill/(Bill No Goods)', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(121, 1, 3, '220000000', 0, 'Cash and Bank Balances', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(122, 1, 3, '220010000', 121, 'Bank', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(123, 1, 3, '220020000', 121, 'Cash in Hand', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(124, 1, 3, '220030000', 121, 'Petty Cash', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(125, 1, 3, '230000000', 0, 'Inventories', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(126, 1, 3, '230010000', 125, 'Stock of Work in Progress', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(127, 1, 3, '240000000', 0, 'Other Receivables', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(128, 1, 3, '250000000', 0, 'Prepayments and Deposits', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(129, 1, 3, '250010000', 128, 'Prepayments', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(130, 1, 3, '250020000', 128, 'Deposits Paid', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(131, 1, 3, '260000000', 0, 'Tax Claimable', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(132, 1, 3, '260010000', 131, 'GST Input Tax', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(133, 1, 3, '260011000', 131, 'Provision for GST Non-Claimable', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(134, 1, 3, '260020000', 131, 'Suspense GST - Input Tax', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(135, 1, 4, '300000000', 0, 'Trade Payable', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(136, 1, 4, '310000000', 0, 'Invoice/(Goods) not receive', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(137, 1, 4, '320000000', 0, 'Other Payables', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(138, 1, 4, '330000000', 0, 'Tax Payable', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(139, 1, 4, '330010000', 138, 'GST Output Tax', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(140, 1, 4, '330020000', 138, 'Suspense GST - Output Tax', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(141, 1, 4, '330030000', 138, 'Import Duty Payable', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(142, 1, 4, '330040000', 138, 'Sales Tax Payable', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(143, 1, 4, '330050000', 138, 'Service Tax Payable', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(144, 1, 4, '340000000', 0, 'Accruals', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(145, 1, 4, '340010000', 144, 'Accrued Payroll', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(146, 1, 4, '340020000', 144, 'Payroll Deductions Payable', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(147, 1, 4, '340030000', 144, 'PAYE Tax Payable', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(148, 1, 4, '340040000', 144, 'Commission Payable', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(149, 1, 4, '340050000', 144, 'Accrual Waqaf', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(150, 1, 4, '340060000', 144, 'Zakat Payable', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(151, 1, 4, '350000000', 0, 'Client Deposits', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(152, 1, 5, '360000000', 0, 'Deffered Tax Liabilities', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(153, 1, 6, '370000000', 0, 'Borrowing', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(154, 1, 6, '370010000', 153, 'Bank Loan', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(155, 1, 6, '370080000', 153, 'Other Long-Term Liabilities', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(156, 1, 7, '400000000', 0, 'Sales', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(157, 1, 7, '400010000', 156, 'Sales Product #1', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(158, 1, 7, '400020000', 156, 'Sales Product #2', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(159, 1, 7, '400030000', 156, 'Sales Product #3', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(160, 1, 7, '410000000', 0, 'Wholesale', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(161, 1, 7, '420000000', 0, 'Consignment', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(162, 1, 7, '430000000', 0, 'Miscellaneous Income', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(163, 1, 8, '500000000', 0, 'Cost of Goods Sold', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(164, 1, 8, '510000000', 0, 'Purchases Price Variance', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(165, 1, 8, '520000000', 0, 'Purchases', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(166, 1, 8, '520010000', 165, 'Purchases #1', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(167, 1, 8, '530000000', 0, 'Wholesale Cost of Sales', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(168, 1, 8, '540000000', 0, 'Consignment Cost of Sales', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(169, 1, 8, '550000000', 0, 'Materials & Supplies', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(170, 1, 8, '560000000', 0, 'Freight', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(171, 1, 8, '570000000', 0, 'Inventory Adjustment Account', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(172, 1, 8, '580000000', 0, 'Commission Expenses', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(173, 1, 35, '710000000', 0, 'Other Operating Income', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(174, 1, 35, '710011000', 173, 'Discount Received', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(175, 1, 35, '710012000', 173, 'Late Fees Collected', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(176, 1, 35, '710013000', 173, 'Freight Collected', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(177, 1, 10, '810000000', 0, 'Administration Expenses', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(178, 1, 10, '810011000', 177, 'Legal & Accounting', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(179, 1, 10, '810012000', 177, 'Commissions', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(180, 1, 10, '810013000', 177, 'Freight', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(181, 1, 10, '810014000', 177, 'Insurance', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(182, 1, 10, '810015000', 177, 'Late Payment Charges', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(183, 1, 10, '810016000', 177, 'Rent', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(184, 1, 10, '810016010', 183, 'Machinery & Equipment', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(185, 1, 10, '810016050', 183, 'Other Business Property', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(186, 1, 10, '810017000', 177, 'Advertising', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(187, 1, 10, '810018000', 177, 'Office Supplies', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(188, 1, 10, '810020000', 177, 'Maintenance & Repairs', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(189, 1, 10, '810021000', 177, 'Shrinkage/Spoilage', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(190, 1, 10, '810022000', 177, 'Telephone', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(191, 1, 10, '810023010', 194, 'Electricity', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(192, 1, 10, '810023020', 194, 'Gas', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(193, 1, 10, '810023030', 194, 'Water', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(194, 1, 10, '810023000', 177, 'Electricity & water', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(195, 1, 10, '810024000', 177, 'Travel, Meals & Entertainment', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(196, 1, 10, '810024010', 195, 'Travel', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(197, 1, 10, '810024020', 195, 'Meals & Entertainment', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(198, 1, 10, '810025000', 177, 'Depreciation Expense', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(199, 1, 10, '810040000', 177, 'GST- Non Claimable', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(200, 1, 10, '810050000', 177, 'Bad Debt Expense', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(201, 1, 10, '810060000', 177, 'Discounts Given', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(202, 1, 10, '810060010', 201, 'Prompt Payment Discount', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(203, 1, 10, '810070000', 177, 'Zakat Expense', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(204, 1, 10, '810080000', 177, 'Waqaf Expense', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(205, 1, 10, '820000000', 177, 'Employment Expenses', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(206, 1, 10, '820010000', 205, 'Staff Amenities', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(207, 1, 10, '820020000', 205, 'Wages & Salaries', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(208, 1, 10, '820030000', 205, 'Workers'' Compensation', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(209, 1, 10, '820040000', 205, 'Other Employment Expenses', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(210, 1, 36, '900000000', 0, 'Finance Income', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(211, 1, 36, '900010000', 210, 'Interest Income', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(212, 1, 44, '850000000', 0, 'Finance cost', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(213, 1, 44, '850010000', 212, 'Bank Charges', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(214, 1, 44, '850020000', 212, 'Interest on loan', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(215, 1, 12, '860000000', 0, 'Income Tax Expense', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(216, 1, 32, '870000000', 0, 'Other Comprehensive  Income', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00'),
(217, 1, 32, '870010000', 216, 'Gain/(loss) on exchange', '', NULL, 1, '2014-11-04 03:58:20', 0, '0000-00-00 00:00:00');

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

--
-- Table structure for table `_ref_chart_of_acct_back`
--

CREATE TABLE IF NOT EXISTS `_ref_chart_of_acct_back` (
  `ID` int(11) NOT NULL DEFAULT '0',
  `businessTypeID` int(11) NOT NULL,
  `acctGroupID` int(11) NOT NULL,
  `acctCode` char(9) NOT NULL,
  `parentID` int(11) NOT NULL,
  `acctName` varchar(128) NOT NULL,
  `acctDescription` varchar(128) NOT NULL,
  `defaultID` int(11) DEFAULT NULL COMMENT 'id default acct for general setup',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `_ref_chart_of_acct_back`
--

INSERT INTO `_ref_chart_of_acct_back` (`ID`, `businessTypeID`, `acctGroupID`, `acctCode`, `parentID`, `acctName`, `acctDescription`, `defaultID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 1, '100000000', 0, 'Owner''s/Shareholder''s capital', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(2, 1, 1, '120000000', 0, 'Retained Earnings-Prior Year', '', 80, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(3, 1, 1, '130000000', 0, 'Current Year Earnings', '', 81, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(4, 1, 2, '200000000', 0, 'Fixed Assets', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(5, 1, 2, '200010000', 4, 'Manufacturing Plant', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(6, 1, 2, '200010010', 5, 'Manufacturing Plant at Cost', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(7, 1, 2, '200010020', 5, 'Manufacturing Plant Accum Dep''n', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(8, 1, 2, '200020000', 4, 'Manufacturing Equipment', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(9, 1, 2, '200020010', 8, 'Manufacturing Equipment at Cost', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(10, 1, 2, '200020020', 8, 'Manufacturing Equipment Accum Dep''n', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(11, 1, 2, '200030000', 4, 'Furniture & Fixtures', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(12, 1, 2, '200030010', 11, 'Furn & Fixtures at Cost', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(13, 1, 2, '200030020', 11, 'Furn & Fixtures Accum Dep''n', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(14, 1, 2, '200040000', 4, 'Office Equipment', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(15, 1, 2, '200040010', 14, 'Office Equipment at Cost', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(16, 1, 2, '200040020', 14, 'Office Equipment Accum Dep''n', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(17, 1, 2, '200050000', 4, 'Motor Vehicles', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(18, 1, 2, '200050010', 17, 'Motor Vehicles at Cost', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(19, 1, 2, '200050020', 17, 'Motor Vehicles Accum Dep''n', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(20, 1, 3, '210000000', 0, 'Trade Receivable', '', 84, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(21, 1, 3, '220000000', 0, 'Cash and Bank Balances', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(22, 1, 3, '220010000', 21, 'Bank', '', 107, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(23, 1, 3, '220020000', 21, 'Cash in Hand', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(24, 1, 3, '220030000', 21, 'Petty Cash''s', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(25, 1, 3, '230000000', 0, 'Inventories', '', 94, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(26, 1, 3, '230010000', 25, 'Stock of Work in Progress', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(27, 1, 3, '240000000', 0, 'Other Receivables', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(28, 1, 3, '250000000', 0, 'Prepayments and Deposits', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(29, 1, 3, '250010000', 28, 'Prepayments', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(30, 1, 3, '250020000', 28, 'Deposits Paid', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(31, 1, 3, '260000000', 0, 'Tax Claimable', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(32, 1, 3, '260010000', 31, 'GST Input Tax', '', 97, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(33, 1, 3, '260011000', 31, 'Provision for GST Non-Claimable', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(34, 1, 3, '260020000', 31, 'Suspense GST - Input Tax', '', 99, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(35, 1, 4, '300000000', 0, 'Trade Payable', '', 92, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(36, 1, 4, '320000000', 0, 'Other Payables', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(37, 1, 4, '330000000', 0, 'Tax Payable', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(38, 1, 4, '330010000', 37, 'GST Output Tax', '', 98, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(39, 1, 4, '330020000', 37, 'Suspense GST - Output Tax', '', 100, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(40, 1, 4, '330030000', 37, 'Import Duty Payable', '', 102, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(41, 1, 4, '330040000', 37, 'Sales Tax Payable', '', 103, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(42, 1, 4, '330050000', 37, 'Service Tax Payable', '', 104, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(43, 1, 4, '340000000', 0, 'Accruals', '', 106, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(44, 1, 4, '340010000', 43, 'Accrued Payroll', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(45, 1, 4, '340020000', 43, 'Payroll Deductions', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(46, 1, 4, '340030000', 43, 'PAYE Tax Payable', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(47, 1, 4, '340040000', 43, 'Commission Payable', '', 89, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(48, 1, 4, '350000000', 0, 'Client Deposits', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(49, 1, 5, '360000000', 0, 'Deffered Tax Liabilities', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(50, 1, 6, '370000000', 0, 'Borrowing', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(51, 1, 6, '370010000', 50, 'Bank Loan', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(52, 1, 6, '370080000', 50, 'Other Long-Term Liabilities', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(53, 1, 7, '400000000', 0, 'Sales', '', 85, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(54, 1, 7, '400010000', 53, 'Sales-Baked Items', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(55, 1, 7, '400020000', 53, 'Sales-Novelty Items', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(56, 1, 7, '480000000', 0, 'Miscellaneous Income', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(57, 1, 8, '500000000', 0, 'Cost of Goods Sold', '', 95, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(58, 1, 8, '500010000', 57, 'Baked Items', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(59, 1, 8, '500020000', 57, 'Novelty Items', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(60, 1, 8, '510000000', 0, 'Purchase Price Variance', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(61, 1, 8, '560000000', 0, 'Freight', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(62, 1, 8, '570000000', 0, 'Inventory Adjustment Account', '', 96, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(63, 1, 8, '580000000', 0, 'Commission Expense', '', 88, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(64, 1, 35, '710000000', 0, 'Discount Received', '', NULL, 1, '2014-05-06 04:22:45', 0, '2014-08-07 10:14:31'),
(65, 1, 35, '711000000', 0, 'Interest Income', '', NULL, 1, '2014-05-06 04:22:45', 0, '2014-08-07 10:14:31'),
(66, 1, 35, '712000000', 0, 'Late Fees Collected', '', NULL, 1, '2014-05-06 04:22:45', 0, '2014-08-07 10:14:31'),
(67, 1, 35, '713000000', 0, 'Freight Collected', '', NULL, 1, '2014-05-06 04:22:45', 0, '2014-08-07 10:14:31'),
(68, 1, 10, '810000000', 0, 'Administration Expenses', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(69, 1, 10, '810011100', 68, 'Accounting Fees', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(70, 1, 10, '810011200', 68, 'Legal Fees', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(71, 1, 10, '810014000', 68, 'Subscriptions', '', NULL, 1, '2014-05-06 04:22:45', 0, '2014-08-12 07:14:44'),
(72, 1, 10, '810015000', 68, 'Office Supplies', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(73, 1, 10, '810016000', 68, 'Freight', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(74, 1, 10, '810017000', 68, 'Late Payment Charges', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(75, 1, 10, '810019000', 68, 'Advertising & Promotion Exp', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(76, 1, 10, '810019020', 75, 'In-store Promotions', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(77, 1, 10, '810020000', 68, 'Depreciation Expense', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(78, 1, 10, '810040000', 68, 'GST- Non Claimable', '', 101, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(79, 1, 10, '810050000', 68, 'Bad Debt Expense', '', NULL, 1, '2014-05-06 04:22:45', 0, '2014-08-07 10:06:07'),
(80, 1, 10, '820000000', 0, 'Operation Expenses', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(81, 1, 10, '820011000', 80, 'Cleaning	Expenses', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(82, 1, 10, '820012000', 80, 'Postage & Delivery', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(83, 1, 10, '820013000', 80, 'Printing', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(84, 1, 10, '820014000', 80, 'Rent', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(85, 1, 10, '820015000', 80, 'Store Supplies', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(86, 1, 10, '820016000', 80, 'Telephone', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(87, 1, 10, '820017000', 80, 'Water', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(88, 1, 10, '820018000', 80, 'Shrinkage/Spoilage', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(89, 1, 10, '820019000', 80, 'Employment Expenses', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(90, 1, 10, '820019010', 80, 'Fringe Benefits Tax', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(91, 1, 10, '820019020', 80, 'Staff Amenities ', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(92, 1, 10, '820019030', 80, 'Wages & Salaries ', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(93, 1, 10, '820019040', 80, 'Workers'' Compensation', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(94, 1, 10, '820019050', 80, 'Other Employment Expenses', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(95, 1, 10, '820020000', 80, 'Uniforms & Laundry', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(96, 1, 10, '830000000', 0, 'Interest & Bank Charges', '', 83, 1, '2014-05-06 04:22:45', 0, '2014-08-11 02:00:04'),
(97, 1, 10, '810060000', 0, 'Discounts Given', '', 86, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(98, 1, 10, '810060010', 0, 'Prompt Payment Discount', '', 87, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(99, 1, 10, '810070000', 0, 'Zakat Expense', '', 105, 1, '2014-05-06 04:22:45', 0, '2014-08-11 01:58:04'),
(101, 1, 11, '870000000', 0, 'Gain/(Loss) On Exchange', '', 91, 1, '2014-05-06 04:22:45', 0, '2014-08-21 03:04:24'),
(102, 1, 12, '860000000', 0, 'Income Tax Expense', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(103, 1, 10, '810019010', 75, 'Advertising', '', NULL, 1, '2014-05-06 04:22:45', 0, '0000-00-00 00:00:00'),
(104, 2, 1, '120000000', 0, 'Retained Earnings-Prior Year', '', 80, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(105, 2, 1, '130000000', 0, 'Current Year Earnings', '', 81, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(106, 2, 2, '200000000', 0, 'Fixed Assets', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(107, 2, 2, '200010000', 106, 'Buildings & Improvements', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(108, 2, 2, '200010010', 107, 'Bldgs & Imprv at Cost', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(109, 2, 2, '200010020', 107, 'Bldgs & Imprv Accum Dep''n', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(110, 2, 2, '200020000', 106, 'Production Equipment', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(111, 2, 2, '200020010', 110, 'Production Equipment at Cost', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(112, 2, 2, '200020020', 110, 'Production Equipment Accum Dep''n', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(113, 2, 2, '200030000', 106, 'Furniture and Fixtures', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(114, 2, 2, '200030010', 113, 'Furniture & Fixtures at Cost', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(115, 2, 2, '200030020', 113, 'Furniture & Fixtures Accum Dep''n', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(116, 2, 2, '200040000', 106, 'Motor Vehicles', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(117, 2, 2, '200040010', 116, 'Motor Vehicles at Cost', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(118, 2, 2, '200040020', 116, 'Motor Vehicles Accum Dep''n', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(119, 2, 2, '200050000', 106, 'Leasehold Improvements', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(120, 2, 2, '200050010', 119, 'Improvements at Cost', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(121, 2, 2, '200050020', 119, 'Improvements Amortisation', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(122, 2, 3, '210000000', 0, 'Trade Receivable', '', 84, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(123, 2, 3, '220000000', 0, 'Cash and Bank Balances', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(124, 2, 3, '220010000', 123, 'Bank', '', 107, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(125, 2, 3, '220020000', 123, 'Cash in Hand', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(126, 2, 3, '220030000', 123, 'Petty Cash', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(127, 2, 3, '230000000', 0, 'Inventories', '', 94, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(128, 2, 3, '230010000', 128, 'Stock of Work in Progress', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(129, 2, 3, '240000000', 0, 'Other Receivables', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(130, 2, 3, '250000000', 0, 'Prepayments and Deposits', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(131, 2, 3, '250010000', 130, 'Prepayments', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(132, 2, 3, '250020000', 130, 'Deposits Paid', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(133, 2, 3, '260000000', 0, 'Tax Claimable', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(134, 2, 3, '260010000', 133, 'GST Input Tax', '', 97, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(135, 2, 3, '260011000', 133, 'Provision for GST Non-Claimable', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(136, 2, 3, '260020000', 133, 'Suspense GST - Input Tax', '', 99, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(137, 2, 4, '300000000', 0, 'Trade Payable', '', 92, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(138, 2, 4, '320000000', 0, 'Other Payables', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(139, 2, 4, '330000000', 0, 'Tax Payable', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(140, 2, 4, '330010000', 139, 'GST Output Tax', '', 98, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(141, 2, 4, '330020000', 139, 'Suspense GST - Output Tax', '', 100, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(142, 2, 4, '330030000', 139, 'Import Duty Payable', '', 102, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(143, 2, 4, '330040000', 139, 'Sales Tax Payable', '', 103, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(144, 2, 4, '330050000', 139, 'Service Tax Payable', '', 104, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(145, 2, 4, '340000000', 0, 'Accruals', '', 106, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(146, 2, 4, '340010000', 145, 'Accrued Payroll', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(147, 2, 4, '340020000', 145, 'Payroll Deductions Payable', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(148, 2, 4, '340030000', 145, 'PAYE Tax Payable', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(149, 2, 4, '340040000', 145, 'Commission Payable', '', 89, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(150, 2, 4, '350000000', 0, 'Client Deposits', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(151, 2, 5, '360000000', 0, 'Deffered Tax Liabilities', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(152, 2, 6, '370000000', 0, 'Borrowing', '', NULL, 1, '2014-05-06 07:07:01', 0, '2014-05-06 07:39:30'),
(153, 2, 6, '370010000', 152, 'Bank Loans', '', NULL, 1, '2014-05-06 07:07:01', 0, '2014-05-06 07:39:36'),
(154, 2, 6, '370080000', 152, 'Other Long-Term Liabilities', '', NULL, 1, '2014-05-06 07:07:01', 0, '2014-05-06 07:39:40'),
(155, 2, 7, '400000000', 0, 'Sales', '', 85, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(156, 2, 7, '410000000', 0, 'Audio Equip Rental Income', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(157, 2, 7, '420000000', 0, 'Video Equip Rental Income', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(158, 2, 7, '430000000', 0, 'Other Service Fees', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(159, 2, 7, '460000000', 0, 'Miscellaneous Income', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(160, 2, 8, '500000000', 0, 'Cost of Goods Sold', '', 95, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(161, 2, 8, '500010000', 160, 'Purchases - Audio Equip', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(162, 2, 8, '500020000', 160, 'Purchases - Video Equip', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(163, 2, 8, '510000000', 0, 'Purchase Price Variance', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(164, 2, 8, '560000000', 0, 'Freight', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(165, 2, 8, '570000000', 0, 'Inventory Adjustment Account', '', 96, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(166, 2, 8, '580000000', 0, 'Commission Expense', '', 88, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(167, 2, 35, '710000000', 0, 'Discount Received', '', NULL, 1, '2014-05-06 07:07:01', 0, '2014-08-07 10:14:31'),
(168, 2, 35, '711000000', 0, 'Interest Income', '', NULL, 1, '2014-05-06 07:07:01', 0, '2014-08-07 10:14:31'),
(169, 2, 35, '712000000', 0, 'Late Fees Collected', '', NULL, 1, '2014-05-06 07:07:01', 0, '2014-08-07 10:14:31'),
(170, 2, 35, '713000000', 0, 'Freight Collected', '', NULL, 1, '2014-05-06 07:07:01', 0, '2014-08-07 10:14:31'),
(171, 2, 10, '810000000', 0, 'Administration Expenses', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(172, 2, 10, '810010000', 171, 'Accounting Fees', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(173, 2, 10, '810011000', 171, 'Legal Fees', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(174, 2, 10, '810012000', 171, 'Postage & Delivery', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(175, 2, 10, '810013000', 171, 'Office Supplies', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(176, 2, 10, '810014000', 171, 'Subscriptions', '', NULL, 1, '2014-05-06 07:07:01', 0, '2014-08-12 07:14:50'),
(177, 2, 10, '810015000', 171, 'Telephone', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(178, 2, 10, '810016000', 171, 'Advertising', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(179, 2, 10, '810017000', 171, 'Maintenance & Repairs', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(180, 2, 10, '810018000', 171, 'Freight', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(181, 2, 10, '810019000', 171, 'Late Payment Charges', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(182, 2, 10, '810020000', 171, 'Rent', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(183, 2, 10, '810021000', 171, 'Electricity', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(184, 2, 10, '810022000', 171, 'Depreciation Expense', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(185, 2, 10, '810040000', 171, 'GST- Non Claimable', '', 101, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(186, 2, 10, '810050000', 171, 'Bad Debt Expense', '', NULL, 1, '2014-05-06 07:07:01', 0, '2014-08-07 10:06:07'),
(187, 2, 10, '820000000', 0, 'Employment Expenses', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(188, 2, 10, '820010000', 187, 'Staff Amenities', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(189, 2, 10, '820030000', 187, 'Wages & Salaries', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(190, 2, 10, '820040000', 187, 'Workers'' Compensation', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(191, 2, 10, '820050000', 187, 'Other Employment Expenses', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(192, 2, 10, '830000000', 187, 'Interest & Bank Charges', '', 83, 1, '2014-05-06 07:07:01', 0, '2014-08-11 02:00:04'),
(193, 2, 10, '810060000', 0, 'Discounts Given', '', 86, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(194, 2, 10, '810060010', 0, 'Prompt Payment Discount', '', 87, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(195, 2, 10, '810070000', 0, 'Zakat Expense', '', 105, 1, '2014-05-06 07:07:01', 0, '2014-08-11 01:58:04'),
(197, 2, 11, '870000000', 0, 'Gain/(Loss) On Exchange', '', 91, 1, '2014-05-06 07:07:01', 0, '2014-08-21 03:04:31'),
(198, 2, 12, '860000000', 0, 'Income Tax Expense', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(199, 2, 1, '110000000', 0, 'Share Capital', '', NULL, 1, '2014-05-06 07:07:01', 0, '0000-00-00 00:00:00'),
(200, 3, 1, '110000000', 0, 'Share Capital', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(201, 3, 1, '120000000', 0, 'Retained Earnings-Prior Year', '', 80, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(202, 3, 1, '130000000', 0, 'Current Year Earnings', '', 81, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(203, 3, 2, '200000000', 0, 'Fixed Assets', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(204, 3, 2, '200010000', 203, 'Kitchen Equipment', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(205, 3, 2, '200010010', 204, 'Kitchen Equip at Cost', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(206, 3, 2, '200010020', 204, 'Kitchen Equip Accum Depr''n', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(207, 3, 2, '200020000', 203, 'Store Equipment	', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(208, 3, 2, '200020010', 207, 'Store Equipment at Cost', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(209, 3, 2, '200020020', 207, 'Store Equipment Accum Dep''n', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(210, 3, 2, '200030000', 203, 'Building', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(211, 3, 2, '200030010', 210, 'Building at Cost', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(212, 3, 2, '200030020', 210, 'Building Accum Dep''n', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(213, 3, 2, '200050000', 203, 'Leasehold Improvements', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(214, 3, 2, '200050010', 213, 'Improvements at Cost', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(215, 3, 2, '200050020', 213, 'Improvements Amortisation', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(216, 3, 3, '210000000', 0, 'Trade Receivable', '', 84, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(217, 3, 3, '220000000', 0, 'Cash and Bank Balances', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(218, 3, 3, '220010000', 217, 'Bank', '', 107, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(219, 3, 3, '220020000', 217, 'Cash in Hand', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(220, 3, 3, '220030000', 217, 'Petty Cash', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(221, 3, 3, '230000000', 0, 'Inventories', '', 94, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(222, 3, 3, '230010000', 221, 'Stock of Work in Progress', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(223, 3, 3, '230020000', 221, 'Ingredients', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(224, 3, 3, '230030000', 221, 'Cake Boxes & Containers', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(225, 3, 3, '230040000', 221, 'Novelty Items', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(226, 3, 3, '240000000', 0, 'Other Receivables', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(227, 3, 3, '250000000', 0, 'Prepayments and Deposits', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(228, 3, 3, '250010000', 227, 'Prepayments', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(229, 3, 3, '250020000', 227, 'Deposits Paid', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(230, 3, 3, '260000000', 0, 'Tax Claimable', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(231, 3, 3, '260010000', 230, 'GST Input Tax', '', 97, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(232, 3, 3, '260011000', 230, 'Provision for GST Non-Claimable', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(233, 3, 3, '260020000', 230, 'Suspense GST - Input Tax', '', 99, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(234, 3, 4, '300000000', 0, 'Trade Payable', '', 92, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(235, 3, 4, '320000000', 0, 'Other Payables', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(236, 3, 4, '330000000', 0, 'Tax Payable', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(237, 3, 4, '330010000', 236, 'GST Output Tax', '', 98, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(238, 3, 4, '330020000', 236, 'Suspense GST - Output Tax', '', 100, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(239, 3, 4, '330030000', 236, 'Import Duty Payable', '', 102, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(240, 3, 4, '330040000', 236, 'Sales Tax Payable', '', 103, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(241, 3, 4, '330050000', 236, 'Service Tax Payable', '', 104, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(242, 3, 4, '340000000', 0, 'Accruals', '', 106, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(243, 3, 4, '340010000', 242, 'Accrued Payroll', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(244, 3, 4, '340020000', 242, 'Payroll Deductions Payable', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(245, 3, 4, '340030000', 242, 'PAYE Tax Payable', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(246, 3, 4, '340040000', 242, 'Commission Payable', '', 89, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(247, 3, 4, '350000000', 0, 'Client Deposits', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(248, 3, 5, '360000000', 0, 'Deffered Tax Liabilities', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(249, 3, 6, '370000000', 0, 'Borrowing', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(250, 3, 6, '370010000', 249, 'Bank Loans', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(251, 3, 6, '370080000', 249, 'Other Long-Term Liabilities', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(252, 3, 7, '400000000', 0, 'Sales', '', 85, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(253, 3, 7, '400010000', 252, 'Sales-Baked Items', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(254, 3, 7, '400020000', 252, 'Sales-Novelty Items', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(255, 3, 7, '480000000', 0, 'Miscellaneous Income', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(256, 3, 8, '500000000', 0, 'Cost of Goods Sold', '', 95, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(257, 3, 8, '500010000', 256, 'Baked Items', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(258, 3, 8, '500020000', 256, 'Novelty Items', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(259, 3, 8, '510000000', 0, 'Purchase Price Variance', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(260, 3, 8, '560000000', 0, 'Freight', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(261, 3, 8, '570000000', 0, 'Inventory Adjustment Account', '', 96, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(262, 3, 8, '580000000', 0, 'Commission Expense', '', 88, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(263, 3, 35, '710000000', 0, 'Discount Received', '', NULL, 1, '2014-05-06 09:16:10', 0, '2014-08-07 10:14:31'),
(264, 3, 35, '711000000', 0, 'Interest Income', '', NULL, 1, '2014-05-06 09:16:10', 0, '2014-08-07 10:14:31'),
(265, 3, 35, '712000000', 0, 'Late Fees Collected', '', NULL, 1, '2014-05-06 09:16:10', 0, '2014-08-07 10:14:31'),
(266, 3, 35, '713000000', 0, 'Freight Collected', '', NULL, 1, '2014-05-06 09:16:10', 0, '2014-08-07 10:14:31'),
(267, 3, 10, '810000000', 0, 'Administration Expenses', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(268, 3, 10, '810011100', 267, 'Accounting Fees', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(269, 3, 10, '810011200', 267, 'Legal Fees', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(270, 3, 10, '810014000', 267, 'Subscriptions', '', NULL, 1, '2014-05-06 09:16:10', 0, '2014-08-12 07:14:58'),
(271, 3, 10, '810015000', 267, 'Office Supplies', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(272, 3, 10, '810016000', 267, 'Freight', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(273, 3, 10, '810017000', 267, 'Late Payment Charges', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(274, 3, 10, '810019000', 267, 'Advertising & Promotion Ex', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(275, 3, 10, '810019010', 274, 'Advertising', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(276, 3, 10, '810019020', 274, 'In-store Promotions', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(277, 3, 10, '810020000', 267, 'Depreciation Expense', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(278, 3, 10, '810040000', 267, 'GST- Non Claimable', '', 101, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(279, 3, 10, '810050000', 267, 'Bad Debt Expense', '', NULL, 1, '2014-05-06 09:16:10', 0, '2014-08-07 10:06:07'),
(280, 3, 10, '820000000', 0, 'Operation Expenses', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(281, 3, 10, '820011000', 280, 'Cleaning', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(282, 3, 10, '820012000', 280, 'Postage & Delivery', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(283, 3, 10, '820013000', 280, 'Printing', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(284, 3, 10, '820014000', 280, 'Rent ', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(285, 3, 10, '820015000', 280, 'Store Supplies', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(286, 3, 10, '820016000', 280, 'Telephone', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(287, 3, 10, '820017000', 280, 'Water', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(288, 3, 10, '820018000', 280, 'Shrinkage/Spoilage', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(289, 3, 10, '820019000', 280, 'Employment Expenses', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(290, 3, 10, '820019010', 289, 'Fringe Benefits Tax', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(291, 3, 10, '820019020', 289, 'Staff Amenities ', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(292, 3, 10, '820019030', 289, 'Wages & Salaries ', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(293, 3, 10, '820019040', 289, 'Workers'' Compensation ', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(294, 3, 10, '820019050', 289, 'Other Employment Expenses ', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(295, 3, 10, '820020000', 280, 'Uniforms & Laundry', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(296, 3, 10, '830000000', 0, 'Interest & Bank Charges', '', 83, 1, '2014-05-06 09:16:10', 0, '2014-08-11 02:00:04'),
(297, 3, 10, '810060000', 0, 'Discounts Given', '', 86, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(298, 3, 10, '810060010', 0, 'Prompt Payment Discount', '', 87, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(299, 3, 10, '810070000', 0, 'Zakat Expense', '', 105, 1, '2014-05-06 09:16:10', 0, '2014-08-11 01:58:04'),
(301, 3, 11, '870000000', 0, 'Gain/(Loss) On Exchange', '', 91, 1, '2014-05-06 09:16:10', 0, '2014-08-21 03:04:38'),
(302, 3, 12, '860000000', 0, 'Income Tax Expense', '', NULL, 1, '2014-05-06 09:16:10', 0, '0000-00-00 00:00:00'),
(303, 4, 1, '110000000', 0, 'Share Capital', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(304, 4, 1, '120000000', 0, 'Retained Earnings-Prior Year', '', 80, 1, '2014-07-22 00:43:40', 0, '2014-08-11 01:58:04'),
(305, 4, 1, '130000000', 0, 'Current Year Earnings', '', 81, 1, '2014-07-22 00:43:40', 0, '2014-08-11 01:58:04'),
(306, 4, 2, '200000000', 0, 'Fixed Assets', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(307, 4, 2, '200010000', 306, 'Leasehold Improvements', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(308, 4, 2, '200010010', 307, 'Improvements at Cost', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(309, 4, 2, '200010020', 307, 'Improvements Amortisation', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(310, 4, 2, '200020000', 306, 'Building', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(311, 4, 2, '200020010', 310, 'Building at Cost', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(312, 4, 2, '200020020', 310, 'Building Accum Dep''n', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(313, 4, 2, '200030000', 306, 'Delivery Vehicles', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(314, 4, 2, '200030010', 313, 'Delivery Vehicles at Cost', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(315, 4, 2, '200030020', 313, 'Delivery Vehicles Accum Dep''n', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(316, 4, 2, '200040000', 306, 'Office Equipment', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(317, 4, 2, '200040010', 316, 'Office Equipment at Cost ', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(318, 4, 2, '200040020', 316, 'Office Equipment Accum Dep''n', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(319, 4, 2, '200050000', 306, 'Store Equipment ', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(320, 4, 2, '200050010', 319, 'Store Equipment at Cost ', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(321, 4, 2, '200050020', 319, 'Store Equipment Accum Dep''n', '', NULL, 1, '2014-07-22 00:43:40', 0, '0000-00-00 00:00:00'),
(330, 4, 3, '210000000', 0, 'Trade Receivable', '', 84, 1, '2014-07-22 00:43:41', 0, '2014-08-11 01:58:04'),
(331, 4, 3, '220000000', 0, 'Cash and Bank Balances', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(332, 4, 13, '220010000', 331, 'Bank	Current', '', 107, 1, '2014-07-22 00:43:41', 0, '2014-08-11 01:58:04'),
(333, 4, 3, '220020000', 331, 'Cash in Hand', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(334, 4, 3, '220030000', 331, 'Petty Cash', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(335, 4, 3, '230000000', 0, 'Inventories', '', 94, 1, '2014-07-22 00:43:41', 0, '2014-08-11 01:58:04'),
(336, 4, 3, '230010000', 335, 'Stock of Work in Progress', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(337, 4, 3, '240000000', 0, 'Other Receivables', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(338, 4, 3, '250000000', 0, 'Prepayments and Deposits', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(339, 4, 3, '250010000', 338, 'Prepayments', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(340, 4, 3, '250020000', 338, 'Deposits Paid', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(341, 4, 3, '260000000', 0, 'Tax Claimable', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(342, 4, 3, '260010000', 341, 'GST Input Tax', '', 97, 1, '2014-07-22 00:43:41', 0, '2014-08-11 01:58:04'),
(343, 4, 3, '260011000', 341, 'Provision for GST Non-Claimable', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(344, 4, 3, '260020000', 341, 'Suspense GST - Input Tax', '', 99, 1, '2014-07-22 00:43:41', 0, '2014-08-11 01:58:04'),
(345, 4, 4, '300000000', 0, 'Trade Payable', '', 92, 1, '2014-07-22 00:43:41', 0, '2014-08-11 01:58:04'),
(346, 4, 4, '320000000', 0, 'Other Payables', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(347, 4, 4, '330000000', 0, 'Tax Payable', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(348, 4, 4, '330010000', 139, 'GST Output Tax', '', 98, 1, '2014-07-22 00:43:41', 0, '2014-08-11 01:58:04'),
(349, 4, 4, '330020000', 139, 'Suspense GST - Output Tax', '', 100, 1, '2014-07-22 00:43:41', 0, '2014-08-11 01:58:04'),
(350, 4, 4, '330030000', 139, 'Import Duty Payable', '', 102, 1, '2014-07-22 00:43:41', 0, '2014-08-11 01:58:04'),
(351, 4, 4, '330040000', 139, 'Sales Tax Payable', '', 103, 1, '2014-07-22 00:43:41', 0, '2014-08-11 01:58:04'),
(352, 4, 4, '330050000', 139, 'Service Tax Payable', '', 104, 1, '2014-07-22 00:43:41', 0, '2014-08-11 01:58:04'),
(353, 4, 4, '340000000', 0, 'Accruals', '', 106, 1, '2014-07-22 00:43:41', 0, '2014-08-11 01:58:04'),
(354, 4, 4, '340010000', 145, 'Accrued Payroll', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(355, 4, 4, '340020000', 145, 'Payroll Deductions Payable', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(356, 4, 4, '340030000', 145, 'PAYE Tax Payable', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(357, 4, 4, '340040000', 145, 'Commission Payable', '', 89, 1, '2014-07-22 00:43:41', 0, '2014-08-11 01:58:04'),
(358, 4, 4, '350000000', 0, 'Client Deposits', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(359, 4, 5, '360000000', 0, 'Deffered Tax Liabilities', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(360, 4, 6, '370000000', 0, 'Borrowing', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(361, 4, 6, '370010000', 152, 'Bank Loans', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(362, 4, 6, '370080000', 152, 'Other Long-Term Liabilities', '', NULL, 1, '2014-07-22 00:43:41', 0, '0000-00-00 00:00:00'),
(363, 4, 7, '400000000', 0, 'Sales', '', 85, 1, '2014-07-22 00:55:39', 0, '2014-08-11 01:58:04'),
(364, 4, 7, '480000000', 0, 'Miscellaneous Income', '', NULL, 1, '2014-07-22 00:55:39', 0, '0000-00-00 00:00:00'),
(365, 4, 8, '500000000', 0, 'Cost of Good Sold', '', 95, 1, '2014-07-22 00:55:39', 0, '2014-08-11 01:58:04'),
(366, 4, 8, '510000000', 0, 'Purchase Price Variance', '', NULL, 1, '2014-07-22 00:55:39', 0, '0000-00-00 00:00:00'),
(367, 4, 8, '520000000', 0, 'Purchase Returns & Allowance', '', NULL, 1, '2014-07-22 00:55:39', 0, '0000-00-00 00:00:00'),
(368, 4, 8, '560000000', 0, 'Freight', '', NULL, 1, '2014-07-22 00:55:39', 0, '0000-00-00 00:00:00'),
(369, 4, 8, '570000000', 0, 'Inventory Adjustment Account', '', 96, 1, '2014-07-22 00:55:39', 0, '2014-08-11 01:58:04'),
(370, 4, 8, '580000000', 0, 'Commission Expense', '', 88, 1, '2014-07-22 00:56:33', 0, '2014-08-11 01:58:04'),
(371, 4, 35, '710000000', 0, 'Discount Received', '', NULL, 1, '2014-07-22 00:56:33', 0, '2014-08-07 10:14:31'),
(372, 4, 35, '711000000', 0, 'Interest Income ', '', NULL, 1, '2014-07-22 00:56:33', 0, '2014-08-07 10:14:31'),
(373, 4, 35, '712000000', 0, 'Late Fees Collected', '', NULL, 1, '2014-07-22 00:56:33', 0, '2014-08-07 10:14:31'),
(374, 4, 35, '713000000', 0, 'Freight Collected', '', NULL, 1, '2014-07-22 00:56:33', 0, '2014-08-07 10:14:31'),
(375, 4, 10, '810000000', 0, 'Administration Expenses', '', NULL, 1, '2014-07-22 00:56:33', 0, '0000-00-00 00:00:00'),
(376, 4, 10, '810011100', 375, 'Accounting Fees', '', NULL, 1, '2014-07-22 00:56:33', 0, '0000-00-00 00:00:00'),
(377, 4, 10, '810011200', 375, 'Legal Fees', '', NULL, 1, '2014-07-22 00:57:59', 0, '0000-00-00 00:00:00'),
(378, 4, 10, '810014000', 375, 'Office Supplies', '', NULL, 1, '2014-07-22 00:57:59', 0, '0000-00-00 00:00:00'),
(379, 4, 10, '810015000', 375, 'Dues & Subscriptions', '', NULL, 1, '2014-07-22 00:57:59', 0, '0000-00-00 00:00:00'),
(380, 4, 10, '810016000', 375, 'Telephone', '', NULL, 1, '2014-07-22 00:57:59', 0, '0000-00-00 00:00:00'),
(381, 4, 10, '810017000', 375, 'Repairs & Maintenance', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(382, 4, 10, '810019000', 375, 'Freight', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(383, 4, 10, '810020000', 375, 'Late Payment Charges', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(384, 4, 10, '810021000', 375, 'Advertising & Promotion Exp', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(385, 4, 10, '810022000', 375, 'Advertising', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(386, 4, 10, '810023000', 375, 'In-store Promotions', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(387, 4, 10, '810024000', 375, 'Depreciation Expense', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(388, 4, 10, '810040000', 375, 'GST- Non Claimable', '', 101, 1, '2014-07-22 00:58:19', 0, '2014-08-11 01:58:04'),
(389, 4, 10, '810050000', 375, 'Bad Debt Expense', '', NULL, 1, '2014-07-22 00:58:19', 0, '2014-08-07 10:06:07'),
(390, 4, 10, '820000000', 0, 'Operation Expenses', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(391, 4, 10, '820011000', 390, 'Cleaning', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(392, 4, 10, '820012000', 390, 'Postage & Delivery', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(393, 4, 10, '820013000', 390, 'Printing', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(394, 4, 10, '820014000', 390, 'Store Supplies', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(395, 4, 10, '820015000', 390, 'Shrinkage/Spoilage', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(396, 4, 10, '820017000', 390, 'Employment Expenses', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(397, 4, 10, '820017010', 396, 'Fringe Benefits Tax', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(398, 4, 10, '820017020', 396, 'Staff Amenities', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(399, 4, 10, '820017030', 396, 'Wages & Salaries', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(400, 4, 10, '820017040', 396, 'Workers\n'' Compensation', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(401, 4, 10, '820017080', 396, 'Other Employment Expenses', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(402, 4, 10, '820018000', 390, 'Occupancy Costs', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(403, 4, 10, '820018010', 402, 'Rent', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(404, 4, 10, '820018020', 402, 'Property Taxes', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(405, 4, 10, '820018030', 402, 'Electricity', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(406, 4, 10, '820018040', 402, 'Water', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(407, 4, 10, '830000000', 0, 'Interest & Bank Charges', '', 83, 1, '2014-07-22 00:58:19', 0, '2014-08-11 02:00:04'),
(408, 4, 10, '810060000', 0, 'Discounts Given', '', 86, 1, '2014-07-22 00:58:19', 0, '2014-08-11 01:58:04'),
(409, 4, 10, '810060010', 0, 'Prompt Payment Discount', '', 87, 1, '2014-07-22 00:58:19', 0, '2014-08-11 01:58:04'),
(410, 4, 10, '810070000', 0, 'Zakat Expense', '', 105, 1, '2014-07-22 00:58:19', 0, '2014-08-11 01:58:04'),
(412, 4, 11, '870000000', 0, 'Gain/(Loss) On Exchange', '', 91, 1, '2014-07-22 00:58:19', 0, '2014-08-21 03:04:43'),
(413, 4, 12, '860000000', 0, 'Income Tax Expense', '', NULL, 1, '2014-07-22 00:58:19', 0, '0000-00-00 00:00:00'),
(414, 1, 10, '810080000', 0, 'Wakaf Expense', '', NULL, 1, '2014-08-08 00:34:56', 0, '0000-00-00 00:00:00'),
(415, 1, 4, '340050000', 0, 'Wakaf Accrual', '', 112, 1, '2014-08-08 00:34:56', 0, '2014-08-11 01:58:04'),
(416, 2, 10, '810080000', 0, 'Wakaf Expense', '', NULL, 1, '2014-08-08 00:34:56', 0, '0000-00-00 00:00:00'),
(417, 2, 4, '340050000', 0, 'Wakaf Accrual', '', 112, 1, '2014-08-08 00:34:56', 0, '2014-08-11 01:58:04'),
(418, 3, 10, '810080000', 0, 'Wakaf Expense', '', NULL, 1, '2014-08-08 00:34:56', 0, '0000-00-00 00:00:00'),
(419, 3, 4, '340050000', 0, 'Wakaf Accrual', '', 112, 1, '2014-08-08 00:34:56', 0, '2014-08-11 01:58:04'),
(420, 4, 10, '810080000', 0, 'Wakaf Expense', '', NULL, 1, '2014-08-08 00:34:56', 0, '0000-00-00 00:00:00'),
(421, 4, 4, '340050000', 0, 'Wakaf Accrual', '', 112, 1, '2014-08-08 00:34:56', 0, '2014-08-11 01:58:04'),
(422, 1, 4, '340060000', 0, 'Zakat Payable', '', NULL, 0, '2014-08-12 09:04:56', 0, '0000-00-00 00:00:00'),
(423, 2, 4, '340060000', 0, 'Zakat Payable', '', NULL, 0, '2014-08-12 09:04:56', 0, '0000-00-00 00:00:00'),
(424, 3, 4, '340060000', 0, 'Zakat Payable', '', NULL, 0, '2014-08-12 09:04:56', 0, '0000-00-00 00:00:00'),
(425, 4, 4, '340060000', 0, 'Zakat Payable', '', NULL, 0, '2014-08-12 09:04:56', 0, '0000-00-00 00:00:00'),
(426, 1, 4, '310000000', 0, 'AP Accrual Inventory', '', NULL, 1, '2014-08-13 08:39:20', 0, '0000-00-00 00:00:00'),
(427, 2, 4, '310000000', 0, 'AP Accrual Inventory', '', NULL, 1, '2014-08-13 08:39:20', 0, '0000-00-00 00:00:00'),
(428, 3, 4, '310000000', 0, 'AP Accrual Inventory', '', NULL, 1, '2014-08-13 08:39:20', 0, '0000-00-00 00:00:00'),
(429, 4, 4, '310000000', 0, 'AP Accrual Inventory', '', NULL, 1, '2014-08-13 08:39:20', 0, '0000-00-00 00:00:00'),
(430, 1, 10, '810031000', 68, 'Sales Tax', '', NULL, 1, '2014-08-14 02:41:00', 0, '0000-00-00 00:00:00'),
(431, 1, 10, '810032000', 68, 'Service Tax', '', NULL, 1, '2014-08-14 02:41:00', 0, '0000-00-00 00:00:00'),
(432, 1, 10, '810033000', 68, 'Import Duty', '', NULL, 1, '2014-08-14 02:41:00', 0, '0000-00-00 00:00:00'),
(433, 2, 10, '810031000', 171, 'Sales Tax', '', NULL, 1, '2014-08-14 02:41:00', 0, '0000-00-00 00:00:00'),
(434, 2, 10, '810032000', 171, 'Service Tax', '', NULL, 1, '2014-08-14 02:41:00', 0, '0000-00-00 00:00:00'),
(435, 2, 10, '810033000', 171, 'Import Duty', '', NULL, 1, '2014-08-14 02:41:00', 0, '0000-00-00 00:00:00'),
(436, 3, 10, '810031000', 267, 'Sales Tax', '', NULL, 1, '2014-08-14 02:41:00', 0, '0000-00-00 00:00:00'),
(437, 3, 10, '810032000', 267, 'Service Tax', '', NULL, 1, '2014-08-14 02:41:00', 0, '0000-00-00 00:00:00'),
(438, 3, 10, '810033000', 267, 'Import Duty', '', NULL, 1, '2014-08-14 02:41:00', 0, '0000-00-00 00:00:00'),
(439, 4, 10, '810031000', 375, 'Sales Tax', '', NULL, 1, '2014-08-14 02:41:00', 0, '0000-00-00 00:00:00'),
(440, 4, 10, '810032000', 375, 'Service Tax', '', NULL, 1, '2014-08-14 02:41:00', 0, '0000-00-00 00:00:00'),
(441, 4, 10, '810033000', 375, 'Import Duty', '', NULL, 1, '2014-08-14 02:41:00', 0, '0000-00-00 00:00:00');

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

--
