-- 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=18 ;

--
-- Dumping data for table `comp_jl_seq`
--

INSERT INTO `comp_jl_seq` (`ID`, `compID`, `moduleID`, `initial`, `year`, `period`, `seqNo`) VALUES
(1, 1, 1, 'JL', 2014, 5, 27),
(2, 1, 1, 'JL', 2014, 6, 6),
(3, 1, 1, 'JL', 2013, 12, 2),
(4, 1, 3, 'AP', 2014, 5, 6),
(9, 1, 3, 'AP', 2014, 6, 13),
(10, 7, 3, 'AP', 2014, 6, 3),
(11, 1, 2, 'AR', 2014, 6, 8),
(12, 16, 2, 'AR', 2014, 6, 1),
(13, 1, 5, 'SO', 2014, 12, 30),
(14, 1, 5, 'SO', 2014, 6, 31),
(15, 1, 8, 'PO', 2014, 6, 11),
(16, 1, 1, 'JL', 2014, 7, 3),
(17, 1, 2, 'AR', 2014, 7, 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',
  `remarks` varchar(128) DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdTS` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `formNo` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=177 ;

--
-- Dumping data for table `comp_journal`
--

INSERT INTO `comp_journal` (`ID`, `companyID`, `journalID`, `description`, `referrence`, `batch`, `module`, `effective_date`, `entered_date`, `period`, `year`, `total_amount_dr`, `total_amount_cr`, `total_amount`, `status`, `remarks`, `createdBy`, `createdTS`, `formNo`) VALUES
(1, 1, 'JL20140500000014', 'Testing Journal entry', NULL, NULL, 1, '2014-05-28', NULL, 5, 2014, 100600, 100600, 0, 1, NULL, 0, '2014-05-28 10:46:07', NULL),
(2, 1, 'JL20140500000015', 'Testing journal', NULL, NULL, 1, '2014-05-28', NULL, 5, 2014, 301800, 301800, 0, 1, NULL, 0, '2014-05-28 10:47:50', NULL),
(3, 1, 'JL20140500000016', 'Testing Journal', NULL, NULL, 1, '2014-05-28', NULL, 5, 2014, 1000000, 1000000, 0, 1, NULL, 0, '2014-05-28 10:49:03', NULL),
(4, 1, 'JL20140500000017', 'Testing Journal', NULL, NULL, 1, '2014-05-28', NULL, 5, 2014, 50000, 50000, 0, 1, NULL, 0, '2014-05-28 10:50:03', NULL),
(5, 1, 'JL20140500000018', 'testing journal', NULL, NULL, 1, '2014-05-28', NULL, 5, 2014, 150200, 150200, 0, 1, NULL, 0, '2014-05-28 10:52:00', NULL),
(6, 1, 'JL20140500000019', 'Testing', NULL, NULL, 1, '2014-05-28', NULL, 5, 2014, 6750, 6750, 0, 1, NULL, 0, '2014-05-28 10:54:15', NULL),
(7, 1, 'JL20140500000020', 'Salary And Wages', NULL, NULL, 1, '2014-05-28', NULL, 5, 2014, 55000, 55000, 0, 1, NULL, 0, '2014-05-28 10:58:50', NULL),
(8, 1, 'JL20140500000021', 'Asset Equipment', NULL, NULL, 1, '2014-05-28', NULL, 5, 2014, 100000, 100000, 0, 1, NULL, 0, '2014-05-28 10:59:38', NULL),
(9, 1, 'JL20140500000022', 'Depreciation', NULL, NULL, 1, '2014-05-28', NULL, 5, 2014, 20000, 20000, 0, 1, NULL, 0, '2014-05-28 11:00:52', NULL),
(10, 1, 'JL20140500000023', 'Operating Income', NULL, NULL, 1, '2014-05-28', NULL, 5, 2014, 2300, 2300, 0, 1, NULL, 0, '2014-05-28 11:02:19', NULL),
(11, 1, 'JL20140500000024', 'Finance Income', NULL, NULL, 1, '2014-05-28', NULL, 5, 2014, 1500, 1500, 0, 1, NULL, 0, '2014-05-28 11:03:30', NULL),
(12, 1, 'JL20140500000025', 'Finance Cost', NULL, NULL, 1, '2014-05-28', NULL, 5, 2014, 500, 500, 0, 1, NULL, 0, '2014-05-28 11:04:25', NULL),
(13, 1, 'JL20140500000026', 'wrong account', NULL, NULL, 1, '2014-05-29', NULL, 5, 2014, 3800, 3800, 0, 1, NULL, 0, '2014-05-29 04:20:48', NULL),
(14, 1, 'JL20140500000027', 'Test Entry', NULL, NULL, 1, '2014-05-30', NULL, 5, 2014, NULL, NULL, NULL, 0, NULL, 0, '2014-05-30 08:55:31', NULL),
(15, 1, 'JL20140600000002', 'rantal', NULL, NULL, 1, '2014-06-02', NULL, 6, 2014, NULL, NULL, NULL, 0, NULL, 0, '2014-06-02 07:16:05', NULL),
(16, 1, 'JL20140600000003', 'yahaya', NULL, NULL, 1, '2014-06-02', NULL, 6, 2014, NULL, NULL, NULL, 0, NULL, 0, '2014-06-02 10:35:55', NULL),
(17, 1, 'JL20140600000004', 'Zadss', NULL, NULL, 1, '2014-06-02', NULL, 6, 2014, NULL, NULL, NULL, 0, NULL, 0, '2014-06-02 10:51:42', NULL),
(18, 1, 'JL20140600000005', 'TEST', NULL, NULL, 1, '2014-06-03', NULL, 6, 2014, NULL, NULL, NULL, 0, NULL, 0, '2014-06-03 11:22:46', NULL),
(81, 1, 'AP20140600000004', 'Posting Credit Note Confirm[ PCN00000001 ]', NULL, NULL, 3, '2014-06-16', NULL, 6, 2014, 0, 0, 0, 0, NULL, 1, '2014-06-16 07:55:49', 'PCN00000001'),
(82, 1, 'AP20140600000005', 'Posting Credit Note Confirm[ PCN00000002 ]', NULL, NULL, 3, '2014-06-16', NULL, 6, 2014, 0, 0, 0, 0, NULL, 1, '2014-06-16 07:55:49', 'PCN00000002'),
(83, 1, 'AP20140600000006', 'Posting Credit Note Confirm[ PCN00000003 ]', NULL, NULL, 3, '2014-06-16', NULL, 6, 2014, 0, 0, 0, 0, NULL, 1, '2014-06-16 07:55:49', 'PCN00000003'),
(84, 1, 'AP20140600000007', NULL, NULL, NULL, 3, '2014-06-16', NULL, 6, 2014, NULL, NULL, 0, 0, NULL, 1, '2014-06-16 09:12:02', NULL),
(85, 1, 'AP20140600000008', NULL, NULL, NULL, 3, '2014-06-12', NULL, 6, 2014, NULL, NULL, 0, 0, NULL, 1, '2014-06-16 09:12:02', NULL),
(86, 1, 'AP20140600000009', ' [ PDN[00000003] ]', NULL, NULL, 3, '2014-06-11', NULL, 6, 2014, NULL, NULL, 0, 0, NULL, 1, '2014-06-16 09:14:42', NULL),
(90, 1, 'AP20140600000010', 'Posting Debit Note Confirm [ PDN[00000005] ]', NULL, NULL, 3, '2014-06-20', NULL, 6, 2014, 0, 0, 0, 0, NULL, 1, '2014-06-20 04:24:20', 'PDN[00000005]'),
(91, 1, 'AP20140600000011', 'Posting Debit Note Confirm [ PDN[00000005] ]', NULL, NULL, 3, '2014-06-20', NULL, 6, 2014, 0, 0, 0, 0, NULL, 1, '2014-06-20 04:24:54', 'PDN[00000005]'),
(92, 1, 'AP20140600000012', 'Posting Debit Note Confirm [ PDN[00000005] ]', NULL, NULL, 3, '2014-06-12', NULL, 6, 2014, 0, 0, 0, 0, NULL, 1, '2014-06-20 04:27:28', 'PDN[00000005]'),
(93, 1, 'AP20140600000013', 'Posting Debit Note Confirm [ PDN[00000005] ]', NULL, NULL, 3, '2014-06-12', NULL, 6, 2014, 0, 0, 0, 0, NULL, 1, '2014-06-20 04:28:10', 'PDN[00000005]'),
(98, 1, 'AR20140600000005', ' [ SON20140618[00000018] ]', NULL, NULL, 2, '2014-06-18', NULL, 6, 2014, 2509.44, 2509.44, 0, 0, NULL, 1, '2014-06-23 11:37:42', 'SON20140618[00000018]'),
(99, 1, 'AR20140600000006', ' [ SDN[00000007] ]', NULL, NULL, 2, '2014-06-23', NULL, 6, 2014, 0, 0, 0, 0, NULL, 1, '2014-06-24 00:57:14', 'SDN[00000007]'),
(100, 1, 'AR20140600000007', ' [ SDN[00000007] ]', NULL, NULL, 2, '2014-06-23', NULL, 6, 2014, 0, 0, 0, 0, NULL, 1, '2014-06-24 00:57:26', 'SDN[00000007]'),
(101, 1, 'AR20140600000008', ' [ SDN[00000007] ]', NULL, NULL, 2, '2014-06-23', NULL, 6, 2014, 0, 0, 0, 0, NULL, 1, '2014-06-24 01:01:34', 'SDN[00000007]'),
(102, 1, 'JL20140600000006', 'TEST', NULL, NULL, 1, '2014-06-24', NULL, 6, 2014, NULL, NULL, 0, 0, NULL, 0, '2014-06-24 09:44:05', NULL),
(162, 1, 'SO20140600000031', 'Details has been saved. [ SDN2014-00000002 ]', NULL, NULL, 5, '2014-06-12', NULL, 6, 2014, 372.5, 372.5, 0, 0, NULL, 1, '2014-07-01 04:37:15', 'SDN2014-00000002'),
(163, 1, 'PO20140600000002', ' [ GRN ]', NULL, NULL, 0, '2014-06-25', NULL, 6, 2014, NULL, NULL, 0, 0, NULL, 1, '2014-07-01 07:50:41', 'GRN'),
(164, 1, 'PO20140600000003', ' [ GRN ]', NULL, NULL, 8, '2014-06-25', NULL, 6, 2014, NULL, NULL, 0, 0, NULL, 1, '2014-07-01 07:59:55', 'GRN'),
(165, 1, 'PO20140600000004', ' [ GRN ]', NULL, NULL, 8, '2014-06-25', NULL, 6, 2014, NULL, NULL, 0, 0, NULL, 1, '2014-07-01 08:00:35', 'GRN'),
(166, 1, 'PO20140600000005', ' [ GRN ]', NULL, NULL, 8, '2014-06-25', NULL, 6, 2014, NULL, NULL, 0, 0, NULL, 1, '2014-07-01 08:01:09', 'GRN'),
(167, 1, 'PO20140600000006', ' [ GRN[00000045] ]', NULL, NULL, 8, '2014-06-25', NULL, 6, 2014, NULL, NULL, 0, 0, NULL, 1, '2014-07-01 08:13:14', 'GRN[00000045]'),
(168, 1, 'PO20140600000007', ' [ GRN[00000045] ]', NULL, NULL, 8, '2014-06-25', NULL, 6, 2014, NULL, NULL, 0, 0, NULL, 1, '2014-07-01 08:13:38', 'GRN[00000045]'),
(169, 1, 'PO20140600000008', ' [ GRN[00000045] ]', NULL, NULL, 8, '2014-06-25', NULL, 6, 2014, NULL, NULL, 0, 0, NULL, 1, '2014-07-01 08:14:08', 'GRN[00000045]'),
(170, 1, 'PO20140600000009', ' [ GRN[00000045] ]', NULL, NULL, 8, '2014-06-25', NULL, 6, 2014, NULL, NULL, 0, 0, NULL, 1, '2014-07-02 08:31:57', 'GRN[00000045]'),
(171, 1, 'PO20140600000010', ' [ GRN[00000045] ]', NULL, NULL, 8, '2014-06-25', NULL, 6, 2014, 2, 2, 0, 0, NULL, 1, '2014-07-02 08:33:13', 'GRN[00000045]'),
(172, 1, 'PO20140600000011', ' [ GRN[00000045] ]', NULL, NULL, 8, '2014-06-25', NULL, 6, 2014, 156, 156, 0, 0, NULL, 1, '2014-07-02 08:34:52', 'GRN[00000045]'),
(173, 1, 'JL20140700000001', 'hhh', NULL, NULL, 1, '2014-07-03', NULL, 7, 2014, NULL, NULL, 0, 0, NULL, 0, '2014-07-03 09:11:02', NULL),
(174, 1, 'AR20140700000001', 'Posting Sales Direct Invoices [ SON20140702[00000033] ]', NULL, NULL, 2, '2014-07-02', NULL, 7, 2014, 3195.55179, 3195.55179, 0, 0, NULL, 1, '2014-07-04 01:26:02', 'SON20140702[00000033]'),
(175, 1, 'JL20140700000002', 'dd', NULL, NULL, 1, '2014-07-04', NULL, 7, 2014, NULL, NULL, 0, 0, NULL, 0, '2014-07-04 02:07:20', NULL),
(176, 1, 'JL20140700000003', 'qwe', 'wqe', NULL, 1, '2014-07-04', NULL, 7, 2014, NULL, NULL, 0, 0, NULL, 0, '2014-07-04 02:14:12', NULL);

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

--
-- 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',
  `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,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=376 ;

--
-- Dumping data for table `comp_journal_detail`
--

INSERT INTO `comp_journal_detail` (`ID`, `companyID`, `journalID`, `sequence`, `acctCode`, `description`, `amount_cr`, `amount_dr`, `currencyID`, `currency_amount`, `exchange_rate`, `enter_exchange_rate`, `period`, `year`, `formNo`, `supplier`, `line`, `status`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 'JL20140500000014', 1, 57, 'Testing', 0, 100000, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:47:39', NULL, '2014-05-28 11:05:42'),
(2, 1, 'JL20140500000014', 2, 32, 'GST input', 0, 600, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:47:40', NULL, '2014-05-28 11:05:42'),
(3, 1, 'JL20140500000014', 3, 35, '', 100600, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:47:40', NULL, '2014-05-28 11:05:42'),
(4, 1, 'JL20140500000015', 1, 20, 'Testing', 0, 301800, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:48:50', NULL, '2014-05-28 11:05:42'),
(5, 1, 'JL20140500000015', 2, 53, 'testing sales', 300000, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:48:50', NULL, '2014-05-28 11:05:42'),
(6, 1, 'JL20140500000015', 3, 38, '', 1800, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:48:50', NULL, '2014-05-28 11:05:42'),
(7, 1, 'JL20140500000016', 1, 22, 'Bank input', 0, 1000000, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:49:44', NULL, '2014-05-28 11:05:42'),
(8, 1, 'JL20140500000016', 2, 1, '', 1000000, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:49:44', NULL, '2014-05-28 11:05:42'),
(9, 1, 'JL20140500000017', 1, 35, 'Test payables', 0, 50000, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:50:46', NULL, '2014-05-28 11:05:42'),
(10, 1, 'JL20140500000017', 2, 22, '', 50000, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:50:46', NULL, '2014-05-28 11:05:42'),
(11, 1, 'JL20140500000018', 1, 22, 'testing', 0, 150200, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:54:08', NULL, '2014-05-28 11:05:42'),
(12, 1, 'JL20140500000018', 2, 101, 'testing', 200, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:54:08', NULL, '2014-05-28 11:05:42'),
(13, 1, 'JL20140500000018', 3, 20, '', 150000, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:54:08', NULL, '2014-05-28 11:05:42'),
(14, 1, 'JL20140500000019', 1, 81, 'testing', 0, 1500, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:58:32', NULL, '2014-05-28 11:05:42'),
(15, 1, 'JL20140500000019', 2, 82, 'testing', 0, 300, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:58:32', NULL, '2014-05-28 11:05:42'),
(16, 1, 'JL20140500000019', 3, 83, 'testing', 0, 200, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:58:32', NULL, '2014-05-28 11:05:42'),
(17, 1, 'JL20140500000019', 4, 84, 'testing', 0, 4500, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:58:32', NULL, '2014-05-28 11:05:42'),
(18, 1, 'JL20140500000019', 5, 86, 'telephone', 0, 150, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:58:32', NULL, '2014-05-28 11:05:42'),
(19, 1, 'JL20140500000019', 6, 87, 'water bill', 0, 100, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:58:32', NULL, '2014-05-28 11:05:42'),
(20, 1, 'JL20140500000019', 7, 22, '', 6750, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:58:32', NULL, '2014-05-28 11:05:42'),
(21, 1, 'JL20140500000020', 1, 92, 'Salary', 0, 55000, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:59:24', NULL, '2014-05-28 11:05:42'),
(22, 1, 'JL20140500000020', 2, 22, '', 55000, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 10:59:24', NULL, '2014-05-28 11:05:42'),
(23, 1, 'JL20140500000021', 1, 9, 'Office Equipme', 0, 100000, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 11:00:43', NULL, '2014-05-28 11:05:42'),
(24, 1, 'JL20140500000021', 2, 22, '', 100000, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 11:00:43', NULL, '2014-05-28 11:05:42'),
(25, 1, 'JL20140500000022', 1, 77, 'Depreciation', 0, 20000, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 11:02:07', NULL, '2014-05-28 11:05:42'),
(26, 1, 'JL20140500000022', 2, 16, 'Depreciation', 20000, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 11:02:07', NULL, '2014-05-28 11:05:42'),
(27, 1, 'JL20140500000023', 1, 22, 'Operationg Inc', 0, 2300, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 11:03:19', NULL, '2014-05-28 11:05:42'),
(28, 1, 'JL20140500000023', 2, 56, 'Operationg Inc', 2300, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 11:03:19', NULL, '2014-05-28 11:05:42'),
(29, 1, 'JL20140500000024', 1, 22, 'Finance Income', 0, 1500, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 11:04:08', NULL, '2014-05-28 11:05:42'),
(30, 1, 'JL20140500000024', 2, 56, 'Finance Income', 1500, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 11:04:08', NULL, '2014-05-28 11:05:42'),
(31, 1, 'JL20140500000025', 1, 80, 'Finance Cost', 0, 500, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 11:05:27', NULL, '2014-05-28 11:05:43'),
(32, 1, 'JL20140500000025', 2, 22, 'Finance Cost', 500, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-28 11:05:27', NULL, '2014-05-28 11:05:43'),
(33, 1, 'JL20140500000026', 1, 56, '', 0, 3800, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-29 04:21:57', NULL, '2014-05-29 04:22:04'),
(34, 1, 'JL20140500000026', 2, 64, '', 2300, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-29 04:21:57', NULL, '2014-05-29 04:22:04'),
(35, 1, 'JL20140500000026', 3, 97, '', 1500, 0, 0, 0, 0, 0, 5, 2014, NULL, NULL, NULL, 1, 0, '2014-05-29 04:21:57', NULL, '2014-05-29 04:22:04'),
(204, 1, 'AP20140600000004', 1, 0, '[331000200]Plastic Chair - Red', 60, 0, 1, 60, 1, 0, 6, 2014, 'PCN00000001', NULL, 2, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(205, 1, 'AP20140600000004', 2, 0, '[331000200]Plastic Chair - Red', 0, 60, 1, 60, 1, 0, 6, 2014, 'PCN00000001', NULL, 2, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(206, 1, 'AP20140600000004', 3, 38, '[331000200]Plastic Chair - Red', 0, 3.6, 1, 3.6, 1, 0, 6, 2014, 'PCN00000001', NULL, 2, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(207, 1, 'AP20140600000004', 4, 0, '[331000200]Plastic Chair - Red', 3.6, 0, 1, 3.6, 1, 0, 6, 2014, 'PCN00000001', NULL, 2, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(208, 1, 'AP20140600000004', 5, 0, '[331000100]Plastic Chair - Blue', 240, 0, 1, 240, 1, 0, 6, 2014, 'PCN00000001', NULL, 1, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(209, 1, 'AP20140600000004', 6, 0, '[331000100]Plastic Chair - Blue', 0, 240, 1, 240, 1, 0, 6, 2014, 'PCN00000001', NULL, 1, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(210, 1, 'AP20140600000004', 7, 38, '[331000100]Plastic Chair - Blue', 0, 14.4, 1, 14.4, 1, 0, 6, 2014, 'PCN00000001', NULL, 1, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(211, 1, 'AP20140600000004', 8, 0, '[331000100]Plastic Chair - Blue', 14.4, 0, 1, 14.4, 1, 0, 6, 2014, 'PCN00000001', NULL, 1, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(212, 1, 'AP20140600000005', 1, 13, '[501012000]Nasi Goreng Ayam', 575, 0, 1, 575, 1, 0, 6, 2014, 'PCN00000002', NULL, 4, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(213, 1, 'AP20140600000005', 2, 12, '[501012000]Nasi Goreng Ayam', 0, 575, 1, 575, 1, 0, 6, 2014, 'PCN00000002', NULL, 4, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(214, 1, 'AP20140600000005', 3, 38, '[501012000]Nasi Goreng Ayam', 0, 34.5, 1, 34.5, 1, 0, 6, 2014, 'PCN00000002', NULL, 4, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(215, 1, 'AP20140600000005', 4, 13, '[501012000]Nasi Goreng Ayam', 34.5, 0, 1, 34.5, 1, 0, 6, 2014, 'PCN00000002', NULL, 4, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(216, 1, 'AP20140600000005', 5, 13, '[331000300]Plastic Chair - White', 3400, 0, 1, 3400, 1, 0, 6, 2014, 'PCN00000002', NULL, 3, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(217, 1, 'AP20140600000005', 6, 16, '[331000300]Plastic Chair - White', 0, 3400, 1, 3400, 1, 0, 6, 2014, 'PCN00000002', NULL, 3, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(218, 1, 'AP20140600000005', 7, 38, '[331000300]Plastic Chair - White', 0, 340, 1, 340, 1, 0, 6, 2014, 'PCN00000002', NULL, 3, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(219, 1, 'AP20140600000005', 8, 13, '[331000300]Plastic Chair - White', 340, 0, 1, 340, 1, 0, 6, 2014, 'PCN00000002', NULL, 3, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(220, 1, 'AP20140600000006', 1, 13, '[100300100]Steel chair for outdoor', 1450, 0, 1, 1450, 1, 0, 6, 2014, 'PCN00000003', NULL, 6, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(221, 1, 'AP20140600000006', 2, 3, '[100300100]Steel chair for outdoor', 0, 1450, 1, 1450, 1, 0, 6, 2014, 'PCN00000003', NULL, 6, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(222, 1, 'AP20140600000006', 3, 38, '[100300100]Steel chair for outdoor', 0, 87, 1, 87, 1, 0, 6, 2014, 'PCN00000003', NULL, 6, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(223, 1, 'AP20140600000006', 4, 13, '[100300100]Steel chair for outdoor', 87, 0, 1, 87, 1, 0, 6, 2014, 'PCN00000003', NULL, 6, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(224, 1, 'AP20140600000006', 5, 13, '[100300100]Steel chair for outdoor', 60000, 0, 1, 60000, 1, 0, 6, 2014, 'PCN00000003', NULL, 5, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(225, 1, 'AP20140600000006', 6, 3, '[100300100]Steel chair for outdoor', 0, 60000, 1, 60000, 1, 0, 6, 2014, 'PCN00000003', NULL, 5, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(226, 1, 'AP20140600000006', 7, 38, '[100300100]Steel chair for outdoor', 0, 3600, 1, 3600, 1, 0, 6, 2014, 'PCN00000003', NULL, 5, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(227, 1, 'AP20140600000006', 8, 13, '[100300100]Steel chair for outdoor', 3600, 0, 1, 3600, 1, 0, 6, 2014, 'PCN00000003', NULL, 5, 0, 1, '2014-06-16 07:55:49', NULL, '2014-06-16 07:55:49'),
(228, 1, 'AP20140600000007', 1, 0, '[331000100]Plastic Chair - Blue', 18, 0, 1, 9, 2, 0, 6, 2014, 'PDN[00000005]', NULL, 7, 0, 1, '2014-06-16 09:12:02', NULL, '2014-06-16 09:12:02'),
(229, 1, 'AP20140600000007', 2, 0, '[331000100]Plastic Chair - Blue', 0, 18, 1, 9, 2, 0, 6, 2014, 'PDN[00000005]', NULL, 7, 0, 1, '2014-06-16 09:12:02', NULL, '2014-06-16 09:12:02'),
(230, 1, 'AP20140600000007', 3, 0, '[331000100]Plastic Chair - Blue', 0, 1.08, 1, 0.54, 2, 0, 6, 2014, 'PDN[00000005]', NULL, 7, 0, 1, '2014-06-16 09:12:02', NULL, '2014-06-16 09:12:02'),
(231, 1, 'AP20140600000007', 4, 38, '[331000100]Plastic Chair - Blue', 1.08, 0, 1, 0.54, 2, 0, 6, 2014, 'PDN[00000005]', NULL, 7, 0, 1, '2014-06-16 09:12:02', NULL, '2014-06-16 09:12:02'),
(232, 1, 'AP20140600000008', 1, 0, '[321000100]Teak wooden chair with natural finish', 1, 0, 1, 1, 1, 0, 6, 2014, 'PDN[00000004]', NULL, 6, 0, 1, '2014-06-16 09:12:02', NULL, '2014-06-16 09:12:02'),
(233, 1, 'AP20140600000008', 2, 0, '[321000100]Teak wooden chair with natural finish', 0, 1, 1, 1, 1, 0, 6, 2014, 'PDN[00000004]', NULL, 6, 0, 1, '2014-06-16 09:12:02', NULL, '2014-06-16 09:12:02'),
(234, 1, 'AP20140600000008', 3, 0, '[321000100]Teak wooden chair with natural finish', 0, 0.01, 1, 0.01, 1, 0, 6, 2014, 'PDN[00000004]', NULL, 6, 0, 1, '2014-06-16 09:12:02', NULL, '2014-06-16 09:12:02'),
(235, 1, 'AP20140600000008', 4, NULL, '[321000100]Teak wooden chair with natural finish', 0.01, 0, 1, 0.01, 1, 0, 6, 2014, 'PDN[00000004]', NULL, 6, 0, 1, '2014-06-16 09:12:02', NULL, '2014-06-16 09:12:02'),
(236, 1, 'AP20140600000008', 5, 3, '[100300100]Steel chair for outdoor', 24, 0, 1, 24, 1, 0, 6, 2014, 'PDN[00000004]', NULL, 5, 0, 1, '2014-06-16 09:12:02', NULL, '2014-06-16 09:12:02'),
(237, 1, 'AP20140600000008', 6, 0, '[100300100]Steel chair for outdoor', 0, 24, 1, 24, 1, 0, 6, 2014, 'PDN[00000004]', NULL, 5, 0, 1, '2014-06-16 09:12:02', NULL, '2014-06-16 09:12:02'),
(238, 1, 'AP20140600000008', 7, 0, '[100300100]Steel chair for outdoor', 0, 1.44, 1, 1.44, 1, 0, 6, 2014, 'PDN[00000004]', NULL, 5, 0, 1, '2014-06-16 09:12:02', NULL, '2014-06-16 09:12:02'),
(239, 1, 'AP20140600000008', 8, 38, '[100300100]Steel chair for outdoor', 1.44, 0, 1, 1.44, 1, 0, 6, 2014, 'PDN[00000004]', NULL, 5, 0, 1, '2014-06-16 09:12:02', NULL, '2014-06-16 09:12:02'),
(240, 1, 'AP20140600000009', 1, 3, '[100300100]Steel chair for outdoor', 2, 0, 1, 2, 1, 0, 6, 2014, 'PDN[00000003]', NULL, 4, 0, 1, '2014-06-16 09:14:42', NULL, '2014-06-16 09:14:42'),
(241, 1, 'AP20140600000009', 2, 13, '[100300100]Steel chair for outdoor', 0, 2, 1, 2, 1, 0, 6, 2014, 'PDN[00000003]', NULL, 4, 0, 1, '2014-06-16 09:14:42', NULL, '2014-06-16 09:14:42'),
(242, 1, 'AP20140600000009', 3, 13, '[100300100]Steel chair for outdoor', 0, 0.12, 1, 0.12, 1, 0, 6, 2014, 'PDN[00000003]', NULL, 4, 0, 1, '2014-06-16 09:14:42', NULL, '2014-06-16 09:14:42'),
(243, 1, 'AP20140600000009', 4, 38, '[100300100]Steel chair for outdoor', 0.12, 0, 1, 0.12, 1, 0, 6, 2014, 'PDN[00000003]', NULL, 4, 0, 1, '2014-06-16 09:14:42', NULL, '2014-06-16 09:14:42'),
(246, 1, 'AR20140600000005', 1, 20, '[331000100]Plastic Chair - Blue', 1212, 0, 1, 1212, 1, 0, 6, 2014, 'SON20140618[00000018]', NULL, 1, 0, 1, '2014-06-23 11:37:42', NULL, '2014-06-23 11:37:42'),
(247, 1, 'AR20140600000005', 2, 79, '[331000100]Plastic Chair - Blue', 0, 1212, 1, 1212, 1, 0, 6, 2014, 'SON20140618[00000018]', NULL, 1, 0, 1, '2014-06-23 11:37:42', NULL, '2014-06-23 11:37:42'),
(248, 1, 'AR20140600000005', 3, 38, '[331000100]Plastic Chair - Blue', 0, 72.72, 1, 72.72, 1, 0, 6, 2014, 'SON20140618[00000018]', NULL, 1, 0, 1, '2014-06-23 11:37:42', NULL, '2014-06-23 11:37:42'),
(249, 1, 'AR20140600000005', 4, 20, '[331000100]Plastic Chair - Blue', 72.72, 0, 1, 72.72, 1, 0, 6, 2014, 'SON20140618[00000018]', NULL, 1, 0, 1, '2014-06-23 11:37:42', NULL, '2014-06-23 11:37:42'),
(250, 1, 'AR20140600000005', 5, 20, '[321000100]Teak wooden chair with natural finish', 12, 0, 1, 12, 1, 0, 6, 2014, 'SON20140618[00000018]', NULL, 2, 0, 1, '2014-06-23 11:37:42', NULL, '2014-06-23 11:37:42'),
(251, 1, 'AR20140600000005', 6, 79, '[321000100]Teak wooden chair with natural finish', 0, 12, 1, 12, 1, 0, 6, 2014, 'SON20140618[00000018]', NULL, 2, 0, 1, '2014-06-23 11:37:42', NULL, '2014-06-23 11:37:42'),
(252, 1, 'AR20140600000005', 7, 38, '[321000100]Teak wooden chair with natural finish', 0, 0.72, 1, 0.72, 1, 0, 6, 2014, 'SON20140618[00000018]', NULL, 2, 0, 1, '2014-06-23 11:37:42', NULL, '2014-06-23 11:37:42'),
(253, 1, 'AR20140600000005', 8, 20, '[321000100]Teak wooden chair with natural finish', 0.72, 0, 1, 0.72, 1, 0, 6, 2014, 'SON20140618[00000018]', NULL, 2, 0, 1, '2014-06-23 11:37:42', NULL, '2014-06-23 11:37:42'),
(254, 1, 'AR20140600000005', 9, 20, 'delivery charges', 0, 0, 1, 0, 1, 0, 6, 2014, 'SON20140618[00000018]', NULL, 1, 0, 1, '2014-06-23 11:37:42', NULL, '2014-06-23 11:37:42'),
(255, 1, 'AR20140600000005', 10, 86, 'delivery charges', 0, 0, 1, 0, 1, 0, 6, 2014, 'SON20140618[00000018]', NULL, 1, 0, 1, '2014-06-23 11:37:42', NULL, '2014-06-23 11:37:42'),
(256, 1, 'AR20140600000005', 11, 38, 'delivery charges', 0, 0, 1, 0, 1, 0, 6, 2014, 'SON20140618[00000018]', NULL, 1, 0, 1, '2014-06-23 11:37:42', NULL, '2014-06-23 11:37:42'),
(257, 1, 'AR20140600000005', 12, 20, 'delivery charges', 0, 0, 1, 0, 1, 0, 6, 2014, 'SON20140618[00000018]', NULL, 1, 0, 1, '2014-06-23 11:37:42', NULL, '2014-06-23 11:37:42'),
(258, 1, 'AR20140600000006', 1, 79, '[100300100]Steel chair for outdoor', 1, 0, 1, 1, 1, 0, 6, 2014, 'SDN[00000007]', NULL, 1, 0, 1, '2014-06-24 00:57:14', NULL, '2014-06-24 00:57:14'),
(259, 1, 'AR20140600000006', 2, 20, '[100300100]Steel chair for outdoor', 0, 1, 1, 1, 1, 0, 6, 2014, 'SDN[00000007]', NULL, 1, 0, 1, '2014-06-24 00:57:14', NULL, '2014-06-24 00:57:14'),
(260, 1, 'AR20140600000006', 3, 20, '[100300100]Steel chair for outdoor', 0, 0.06, 1, 0.06, 1, 0, 6, 2014, 'SDN[00000007]', NULL, 1, 0, 1, '2014-06-24 00:57:14', NULL, '2014-06-24 00:57:14'),
(261, 1, 'AR20140600000006', 4, 38, '[100300100]Steel chair for outdoor', 0.06, 0, 1, 0.06, 1, 0, 6, 2014, 'SDN[00000007]', NULL, 1, 0, 1, '2014-06-24 00:57:14', NULL, '2014-06-24 00:57:14'),
(262, 1, 'AR20140600000008', 1, 79, '[100300100]Steel chair for outdoor', 1, 0, 1, 1, 1, 0, 6, 2014, 'SDN[00000007]', NULL, 1, 0, 1, '2014-06-24 01:01:34', NULL, '2014-06-24 01:01:34'),
(263, 1, 'AR20140600000008', 2, 20, '[100300100]Steel chair for outdoor', 0, 1, 1, 1, 1, 0, 6, 2014, 'SDN[00000007]', NULL, 1, 0, 1, '2014-06-24 01:01:34', NULL, '2014-06-24 01:01:34'),
(264, 1, 'AR20140600000008', 3, 20, '[100300100]Steel chair for outdoor', 0, 0.06, 1, 0.06, 1, 0, 6, 2014, 'SDN[00000007]', NULL, 1, 0, 1, '2014-06-24 01:01:34', NULL, '2014-06-24 01:01:34'),
(265, 1, 'AR20140600000008', 4, 38, '[100300100]Steel chair for outdoor', 0.06, 0, 1, 0.06, 1, 0, 6, 2014, 'SDN[00000007]', NULL, 1, 0, 1, '2014-06-24 01:01:34', NULL, '2014-06-24 01:01:34'),
(266, 16, 'AR20140600000001', 1, 20, NULL, 0, 121, 1, 121, 1, 0, 6, 2014, 'PP20140617[00000008]', NULL, NULL, 0, 1, '2014-06-26 08:19:27', NULL, '2014-06-26 08:19:27'),
(267, 16, 'AR20140600000001', 2, NULL, NULL, 121, 0, 1, 121, 1, 0, 6, 2014, 'PP20140617[00000008]', NULL, NULL, 0, 1, '2014-06-26 08:19:27', NULL, '2014-06-26 08:19:27'),
(268, 16, 'AR20140600000001', 3, 20, NULL, 0, 121, 1, 121, 1, 0, 6, 2014, 'PP20140617[00000008]', NULL, NULL, 0, 1, '2014-06-26 08:19:27', NULL, '2014-06-26 08:19:27'),
(269, 16, 'AR20140600000001', 4, NULL, NULL, 121, 0, 1, 121, 1, 0, 6, 2014, 'PP20140617[00000008]', NULL, NULL, 0, 1, '2014-06-26 08:19:27', NULL, '2014-06-26 08:19:27'),
(354, 1, 'SO20140600000031', 1, 79, '321000100 [ Teak wooden chair with natural finish ]19', 12.5, 0, 1, 12.5, 1, 0, 6, 2014, 'SDN2014-00000002[00000002]', NULL, 3, 0, 1, '2014-07-01 04:37:15', NULL, '2014-07-01 04:37:15'),
(355, 1, 'SO20140600000031', 2, 57, '321000100 [ Teak wooden chair with natural finish ]', 0, 12.5, 1, 12.5, 1, 0, 6, 2014, 'SDN2014-00000002[00000002]', NULL, 3, 0, 1, '2014-07-01 04:37:15', NULL, '2014-07-01 04:37:15'),
(356, 1, 'SO20140600000031', 3, 79, '321000100 [ Teak wooden chair with natural finish ]', 110, 0, 1, 110, 1, 0, 6, 2014, 'SDN2014-00000002[00000002]', NULL, 3, 0, 1, '2014-07-01 04:37:15', NULL, '2014-07-01 04:37:15'),
(357, 1, 'SO20140600000031', 4, 57, '321000100 [ Teak wooden chair with natural finish ]', 0, 110, 1, 110, 1, 0, 6, 2014, 'SDN2014-00000002[00000002]', NULL, 3, 0, 1, '2014-07-01 04:37:15', NULL, '2014-07-01 04:37:15'),
(358, 1, 'SO20140600000031', 5, 79, '331000300 [ Plastic Chair - White ]', 120, 0, 1, 120, 1, 0, 6, 2014, 'SDN2014-00000002[00000002]', NULL, 4, 0, 1, '2014-07-01 04:37:15', NULL, '2014-07-01 04:37:15'),
(359, 1, 'SO20140600000031', 6, 15, '331000300 [ Plastic Chair - White ]', 0, 120, 1, 120, 1, 0, 6, 2014, 'SDN2014-00000002[00000002]', NULL, 4, 0, 1, '2014-07-01 04:37:15', NULL, '2014-07-01 04:37:15'),
(360, 1, 'PO20140600000009', 1, 0, '[321000100]A12 Wooden Chair', 0, 0, 1, 144, 0, 0, 6, 2014, 'GRN[00000045]', NULL, 0, 0, 1, '2014-07-02 08:31:57', NULL, '2014-07-02 08:31:57'),
(361, 1, 'PO20140600000009', 2, 79, '[321000100]A12 Wooden Chair', 0, 0, 1, 144, 0, 0, 6, 2014, 'GRN[00000045]', NULL, 0, 0, 1, '2014-07-02 08:31:57', NULL, '2014-07-02 08:31:57'),
(362, 1, 'PO20140600000009', 3, 0, '[321000100]A12 Wooden Chair', 0, 0, 1, 12, 0, 0, 6, 2014, 'GRN[00000045]', NULL, 1, 0, 1, '2014-07-02 08:31:57', NULL, '2014-07-02 08:31:57'),
(363, 1, 'PO20140600000009', 4, 79, '[321000100]A12 Wooden Chair', 0, 0, 1, 12, 0, 0, 6, 2014, 'GRN[00000045]', NULL, 1, 0, 1, '2014-07-02 08:31:57', NULL, '2014-07-02 08:31:57'),
(364, 1, 'PO20140600000010', 1, 0, '[321000100]A12 Wooden Chair', 1, 0, 1, 144, 0, 0, 6, 2014, 'GRN[00000045]', NULL, 0, 0, 1, '2014-07-02 08:33:13', NULL, '2014-07-02 08:33:13'),
(365, 1, 'PO20140600000010', 2, 79, '[321000100]A12 Wooden Chair', 0, 1, 1, 144, 0, 0, 6, 2014, 'GRN[00000045]', NULL, 0, 0, 1, '2014-07-02 08:33:13', NULL, '2014-07-02 08:33:13'),
(366, 1, 'PO20140600000010', 3, 0, '[321000100]A12 Wooden Chair', 1, 0, 1, 12, 0, 0, 6, 2014, 'GRN[00000045]', NULL, 1, 0, 1, '2014-07-02 08:33:13', NULL, '2014-07-02 08:33:13'),
(367, 1, 'PO20140600000010', 4, 79, '[321000100]A12 Wooden Chair', 0, 1, 1, 12, 0, 0, 6, 2014, 'GRN[00000045]', NULL, 1, 0, 1, '2014-07-02 08:33:13', NULL, '2014-07-02 08:33:13'),
(368, 1, 'PO20140600000011', 1, 0, '[321000100]A12 Wooden Chair', 144, 0, 1, 144, 0, 0, 6, 2014, 'GRN[00000045]', NULL, 0, 0, 1, '2014-07-02 08:34:52', NULL, '2014-07-02 08:34:52'),
(369, 1, 'PO20140600000011', 2, 79, '[321000100]A12 Wooden Chair', 0, 144, 1, 144, 0, 0, 6, 2014, 'GRN[00000045]', NULL, 0, 0, 1, '2014-07-02 08:34:52', NULL, '2014-07-02 08:34:52'),
(370, 1, 'PO20140600000011', 3, 0, '[321000100]A12 Wooden Chair', 12, 0, 1, 12, 0, 0, 6, 2014, 'GRN[00000045]', NULL, 1, 0, 1, '2014-07-02 08:34:52', NULL, '2014-07-02 08:34:52'),
(371, 1, 'PO20140600000011', 4, 79, '[321000100]A12 Wooden Chair', 0, 12, 1, 12, 0, 0, 6, 2014, 'GRN[00000045]', NULL, 1, 0, 1, '2014-07-02 08:34:52', NULL, '2014-07-02 08:34:52'),
(372, 1, 'AR20140700000001', 1, 20, '[321000100]Teak wooden chair with natural finish', 3014.6715, 0, 1, 963, 3.1305, 0, 7, 2014, 'SON20140702[00000033]', NULL, 1, 0, 1, '2014-07-04 01:26:02', NULL, '2014-07-04 01:26:02'),
(373, 1, 'AR20140700000001', 2, 79, '[321000100]Teak wooden chair with natural finish', 0, 3014.6715, 1, 963, 3.1305, 0, 7, 2014, 'SON20140702[00000033]', NULL, 1, 0, 1, '2014-07-04 01:26:02', NULL, '2014-07-04 01:26:02'),
(374, 1, 'AR20140700000001', 3, 38, '[321000100]Teak wooden chair with natural finish', 0, 180.88029, 1, 57.78, 3.1305, 0, 7, 2014, 'SON20140702[00000033]', NULL, 1, 0, 1, '2014-07-04 01:26:02', NULL, '2014-07-04 01:26:02'),
(375, 1, 'AR20140700000001', 4, 20, '[321000100]Teak wooden chair with natural finish', 180.88029, 0, 1, 57.78, 3.1305, 0, 7, 2014, 'SON20140702[00000033]', NULL, 1, 0, 1, '2014-07-04 01:26:02', NULL, '2014-07-04 01:26:02');

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

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

CREATE TABLE IF NOT EXISTS `comp_location_transfer` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `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=17 ;

--
-- Dumping data for table `comp_location_transfer`
--

INSERT INTO `comp_location_transfer` (`ID`, `companyID`, `fromLocationID`, `toLocationID`, `formNo`, `movementTypeID`, `dateTransfer`, `memo`, `is_delete`, `updateable`, `createdby`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(4, 27, 0, 0, 'LT', 0, '2014-06-11', '', 0, 1, 0, '2014-06-11 02:05:32', 0, '2014-06-19 10:43:54'),
(6, 1, 1, 2, 'LT', 79, '2014-06-12', 'asfda sdfa sdfa', 0, 0, 0, '2014-06-12 05:13:19', 0, '2014-06-20 02:19:41'),
(7, 1, 1, 2, 'LT234', 79, '2014-06-17', 'Lorem ipsum dolor sit emet', 0, 0, 16, '2014-06-17 03:02:16', 0, '2014-06-20 02:19:41'),
(8, 1, 1, 2, 'LT', 79, '2014-06-19', 'sdfasdf asdf asdf ', 0, 0, 16, '2014-06-19 10:40:43', 0, '2014-06-20 02:19:36'),
(9, 1, 1, 2, 'LT', 79, '2014-06-19', 'asdff df sadf', 0, 0, 16, '2014-06-19 10:42:13', 0, '2014-06-19 10:44:52'),
(10, 1, 1, 2, 'LT', 79, '2014-06-20', 'fda fasd f', 0, 0, 16, '2014-06-20 02:17:55', 0, '2014-06-20 02:19:36'),
(11, 1, 2, 1, 'LT', 78, '2014-06-20', 'test from main off 2 to main off', 0, 0, 16, '2014-06-20 03:19:18', 0, '2014-06-24 02:21:50'),
(12, 1, 1, 2, 'LT', 78, '2014-06-26', 'sdfg sd sdgf ', 0, 0, 16, '2014-06-26 02:57:52', 0, '2014-06-26 02:58:38'),
(13, 1, 1, 2, 'LT', 78, '1970-01-01', 'sdASD a dA DS SDa da', 0, 1, 16, '2014-06-30 04:23:39', 0, '0000-00-00 00:00:00'),
(14, 1, 1, 2, 'LT', 78, '1970-01-01', 'sadf asdf sa', 0, 1, 16, '2014-06-30 04:36:02', 0, '0000-00-00 00:00:00'),
(15, 1, 1, 2, 'LT', 79, '2014-07-02', 'ae wfasdf asfd', 0, 1, 16, '2014-06-30 04:37:04', 0, '0000-00-00 00:00:00'),
(16, 1, 1, 1, 'LT', 78, '2014-07-04', 'wdew', 0, 1, 16, '2014-07-04 04:16:54', 0, '0000-00-00 00:00:00');

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

--
-- 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=22 ;

--
-- Dumping data for table `comp_location_transfer_detail`
--

INSERT INTO `comp_location_transfer_detail` (`ID`, `locationTransferID`, `LineNo`, `itemID`, `quantity`, `fromStock`, `is_delete`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(4, 6, 1, 9, 678, 675, 0, 16, '2014-06-17 03:01:39', 0, '2014-06-20 01:01:55'),
(5, 7, 1, 7, 45, 564, 0, 16, '2014-06-17 03:02:16', 0, '2014-06-20 02:18:23'),
(6, 7, 2, 7, 34, 565, 0, 16, '2014-06-17 03:02:28', 0, '2014-06-20 02:18:26'),
(7, 8, 0, 4, 2, 10, 0, 16, '2014-06-19 10:40:43', 0, '0000-00-00 00:00:00'),
(8, 9, 0, 4, 2, 10, 0, 16, '2014-06-19 10:42:13', 0, '0000-00-00 00:00:00'),
(9, 9, 0, 1, 2, 6, 0, 16, '2014-06-19 10:43:01', 0, '0000-00-00 00:00:00'),
(10, 10, 0, 1, 4, 4, 0, 16, '2014-06-20 02:17:55', 0, '0000-00-00 00:00:00'),
(11, 10, 0, 4, 3, 8, 0, 16, '2014-06-20 02:18:04', 0, '0000-00-00 00:00:00'),
(12, 7, 0, 7, 2, 10, 0, 16, '2014-06-20 02:18:33', 0, '0000-00-00 00:00:00'),
(13, 11, 0, 1, 1, 10, 0, 16, '2014-06-20 03:19:18', 0, '0000-00-00 00:00:00'),
(14, 11, 0, 8, 2, 10, 0, 16, '2014-06-20 03:19:29', 0, '0000-00-00 00:00:00'),
(15, 12, 0, 4, 2, 3, 0, 16, '2014-06-26 02:57:52', 0, '0000-00-00 00:00:00'),
(16, 13, 0, 4, 1, 1, 0, 16, '2014-06-30 04:23:39', 0, '0000-00-00 00:00:00'),
(17, 14, 0, 1, 1, 7, 0, 16, '2014-06-30 04:36:02', 0, '0000-00-00 00:00:00'),
(18, 14, 0, 7, 4, 6, 0, 16, '2014-06-30 04:36:19', 0, '0000-00-00 00:00:00'),
(19, 15, 0, 7, 5, 6, 0, 16, '2014-06-30 04:37:04', 0, '2014-06-30 04:38:20'),
(20, 15, 0, 7, 6, 6, 0, 16, '2014-06-30 04:38:30', 0, '0000-00-00 00:00:00');

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

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

CREATE TABLE IF NOT EXISTS `comp_payment` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `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` int(11) 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,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=74 ;

--
-- Dumping data for table `comp_payment`
--

INSERT INTO `comp_payment` (`ID`, `companyID`, `supplierID`, `projectID`, `amountPaid`, `paymentMethodID`, `referenceNo`, `bankID`, `reconcile`, `accountID`, `formNo`, `paymentDate`, `updateAble`, `currencyID`, `exchangeRate`, `addressID`, `memo`, `totalDiscount`, `bankCharges`, `totalOtherCharge`, `totalPaid`, `totalApplied`, `outOfBalance`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `accountDescription`, `paymentID`, `journalNo`) VALUES
(1, 1, 0, 0, 0, 0, 0, 15, 1, 0, 'PP201459', '2014-06-27', 1, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, '2014-05-09 08:43:00', 0, '2014-06-30 01:59:07', 0, 'Temp Description', 0, ''),
(17, 1, 0, 0, 0, 0, 0, 12, 0, 0, 'PP201459', '0000-00-00', 1, 0, 0, 0, '0', 0, 0, 0, 0, 0, 0, 0, '2014-05-09 11:03:45', 0, '2014-06-26 08:11:36', 0, 'Temp Description', 0, ''),
(18, 1, 0, 0, 0, 0, 0, 12, 0, 0, 'PP201459', '0000-00-00', 0, 0, 0, 0, '0', 0, 0, 0, 0, 0, 0, 0, '2014-05-09 11:05:46', 0, '2014-06-26 08:11:39', 0, 'Temp Description', 0, ''),
(19, 1, 0, 0, 0, 0, 0, 16, 0, 0, 'PP201459', '0000-00-00', 0, 0, 0, 0, '0', 0, 0, 0, 0, 0, 0, 0, '2014-05-09 11:08:34', 0, '2014-06-26 08:11:44', 0, 'Temp Description', 0, ''),
(20, 1, 0, 0, 0, 0, 0, 20, 0, 0, 'PP201459', '0000-00-00', 0, 0, 0, 0, '0', 0, 0, 0, 0, 0, 0, 0, '2014-05-09 11:13:47', 0, '2014-06-26 08:11:50', 0, 'Temp Description', 0, ''),
(21, 1, 0, 0, 20, 0, 0, 27, 0, 0, 'PP201459', '0000-00-00', 0, 0, 0, 0, '0', 0, 0, 0, 0, 0, 50, 0, '2014-05-09 11:24:07', 0, '2014-06-26 08:12:00', 0, 'Temp Description', 0, ''),
(22, 1, 0, 0, 0, 0, 0, 28, 0, 0, 'PP2014514', '0000-00-00', 0, 0, 0, 0, '0', 0, 0, 0, 0, 0, 0, 0, '2014-05-14 01:03:46', 0, '2014-06-26 08:12:06', 0, 'Temp Description', 0, ''),
(23, 1, 0, 0, 0, 0, 0, 16, 0, 0, 'PP2014514', '0000-00-00', 0, 0, 0, 0, '0', 0, 0, 0, 0, 0, 0, 0, '2014-05-14 01:15:23', 0, '2014-06-26 08:12:11', 0, 'Temp Description', 0, ''),
(24, 1, 1, 0, 0, 0, 0, 12, 0, 0, 'PP2014514', '2014-05-15', 0, 0, 0, 0, '0', 0, 0, 0, 0, 0, 0, 0, '2014-05-14 01:24:02', 0, '2014-06-26 08:12:16', 0, 'Temp Description', 0, ''),
(25, 1, 1, 0, 0, 0, 0, 15, 1, 0, 'PP2014514', '2014-06-26', 1, 0, 0, 0, '0', 0, 0, 0, 0, 0, 0, 0, '2014-05-14 01:29:53', 0, '2014-06-30 01:59:11', 0, 'Temp Description', 0, ''),
(26, 1, 1, 0, 0, 0, 0, 16, 0, 0, 'PP2014514', '2014-05-14', 1, 0, 0, 0, '0', 0, 0, 0, 0, 0, 0, 0, '2014-05-14 01:36:34', 0, '2014-06-26 08:12:24', 0, 'Temp Description', 0, ''),
(27, 1, 23, 0, 0, 0, 0, 15, 0, 0, 'PP2014526', '2014-05-14', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, '2014-05-26 04:23:36', 0, '2014-06-30 05:44:46', 0, 'Temp Description', 0, ''),
(28, 0, 1, 0, 104.19, 0, 0, 0, 0, 0, 'PP2014526', '0000-00-00', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, '2014-05-26 07:46:57', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(29, 0, 1, 0, 15.85, 0, 0, 0, 0, 0, 'PP2014526', '0000-00-00', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, '2014-05-26 07:51:32', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(30, 0, 1, 0, 100, 0, 0, 0, 0, 0, 'PP2014526', '0000-00-00', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, '2014-05-26 08:05:23', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(31, 0, 1, 0, 2.12, 0, 0, 0, 0, 0, 'PP2014526', '0000-00-00', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, '2014-05-26 08:21:22', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(32, 0, 1, 0, 97, 0, 0, 0, 0, 0, 'PP2014527', '0000-00-00', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-05-27 10:02:34', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(33, 0, 1, 0, 11, 0, 0, 0, 0, 0, 'PP2014527', '0000-00-00', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-05-27 10:09:04', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(34, 0, 1, 0, 11, 0, 0, 0, 0, 0, 'PP2014527', '0000-00-00', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-05-27 10:15:12', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(35, 0, 1, 0, 11, 0, 0, 0, 0, 0, 'PP2014527', '0000-00-00', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-05-27 10:17:50', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(36, 0, 1, 0, 1, 0, 0, 0, 0, 0, 'PP2014527', '0000-00-00', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-05-27 10:21:42', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(37, 0, 1, 0, 1, 0, 0, 0, 0, 0, 'PP2014527', '0000-00-00', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-05-27 10:22:52', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(38, 0, 1, 0, 1, 0, 0, 0, 0, 0, 'PP2014527', '0000-00-00', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-05-27 10:26:08', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(39, 0, 1, 0, 1, 0, 0, 0, 0, 0, 'PP2014527', '0000-00-00', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-05-27 10:27:11', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(40, 0, 1, 0, 1, 0, 0, 0, 0, 0, 'PP2014527', '0000-00-00', 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-05-27 10:29:07', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'PP2014529', '0000-00-00', 1, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 1, '2014-05-29 09:38:45', 0, '2014-06-02 01:01:56', 0, 'Temp Description', 0, ''),
(42, 1, 1, 0, 2, 0, 0, 20, 0, 0, 'PP201462', '0000-00-00', 1, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 00:31:56', 0, '2014-06-26 08:12:34', 0, 'Temp Description', 0, ''),
(43, 1, 1, 0, 4, 0, 0, 27, 0, 0, 'PP20140602', '0000-00-00', 1, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 00:49:53', 0, '2014-06-26 08:12:40', 0, 'Temp Description', 0, ''),
(44, 1, 1, 0, 4, 0, 0, 12, 0, 0, 'PP20140602', '0000-00-00', 1, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 01:13:51', 0, '2014-06-26 08:12:44', 0, 'Temp Description', 0, ''),
(45, 1, 1, 0, 4, 0, 0, 12, 0, 0, 'PP20140602', '0000-00-00', 1, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 01:16:54', 0, '2014-06-26 08:12:47', 0, 'Temp Description', 0, ''),
(46, 1, 1, 0, 4, 0, 0, 15, 0, 0, 'PP20140602', '2014-04-16', 1, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 01:18:05', 0, '2014-06-30 05:44:49', 0, 'Temp Description', 0, ''),
(47, 1, 1, 0, 4, 0, 0, 28, 0, 0, 'PP20140602', '0000-00-00', 1, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 01:18:38', 0, '2014-06-26 08:12:57', 0, 'Temp Description', 0, ''),
(48, 1, 1, 1, 1, 0, 0, 28, 0, 0, 'PP20140602', '0000-00-00', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 01:38:43', 0, '2014-06-26 08:13:03', 0, 'Temp Description', 0, ''),
(49, 1, 1, 1, 1, 0, 0, 27, 0, 0, 'PP20140602', '0000-00-00', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 01:40:39', 0, '2014-06-26 08:13:08', 0, 'Temp Description', 0, ''),
(50, 1, 1, 1, 1, 0, 0, 28, 0, 0, 'PP20140602', '0000-00-00', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 01:41:18', 0, '2014-06-26 08:13:12', 0, 'Temp Description', 0, ''),
(51, 1, 1, 1, 1, 0, 0, 15, 0, 0, 'PP20140602', '2014-06-27', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 01:42:53', 0, '2014-06-30 05:44:52', 0, 'Temp Description', 0, ''),
(52, 1, 1, 0, 2, 0, 0, 15, 0, 0, 'PP20140602', '2014-06-26', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 01:45:41', 0, '2014-06-30 05:44:54', 0, 'Temp Description', 0, ''),
(53, 1, 1, 0, 2, 0, 0, 16, 0, 0, 'PP20140602', '0000-00-00', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 01:46:26', 0, '2014-06-26 08:13:27', 0, 'Temp Description', 0, ''),
(54, 1, 1, 0, 3, 0, 0, 16, 0, 0, 'PP20140602', '0000-00-00', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 01:49:07', 0, '2014-06-26 08:13:31', 0, 'Temp Description', 0, ''),
(55, 1, 1, 0, 3, 0, 0, 0, 0, 0, 'PP20140602', '0000-00-00', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 01:50:03', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(56, 1, 1, 0, 1, 0, 0, 0, 0, 0, 'PP20140602', '0000-00-00', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 01:59:32', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(57, 1, 1, 0, 1, 0, 0, 0, 0, 0, 'PP20140602', '0000-00-00', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 02:01:00', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(58, 1, 1, 0, 1, 0, 0, 0, 0, 0, 'PP20140602', '0000-00-00', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 02:10:04', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(59, 1, 1, 0, 1, 0, 0, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 02:13:49', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(60, 1, 1, 0, 3, 0, 0, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 02:18:49', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(61, 1, 1, 0, 3, 0, 0, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 02:19:29', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(62, 1, 1, 1, 1, 0, 0, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 02:37:14', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(63, 1, 1, 1, 1, 0, 0, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 02:51:46', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(64, 1, 1, 1, 1, 0, 0, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-02 02:55:12', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(65, 1, 1, 0, 2, 0, 0, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 2, 2, 0, 2, 2, 0, 16, '2014-06-02 03:13:43', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(66, 1, 1, 2, 12, 0, 0, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 0, 3, 0, 0, 0, 0, 16, '2014-06-02 03:41:13', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(67, 1, 1, 2, 12, 0, 0, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 0, 3, 0, 0, 0, 0, 16, '2014-06-02 03:46:20', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(68, 1, 1, 0, 11, 0, 0, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 0, 3, 0, 0, 0, 0, 16, '2014-06-02 04:20:27', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(69, 1, 1, 0, 0, 0, 0, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 1, 0, 0, 0, 0, 0, 16, '2014-06-02 04:29:45', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(70, 1, 1, 0, 1, 0, 0, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 1, 1, 0, 1, 0, 0, 16, '2014-06-02 04:31:38', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(71, 1, 1, 0, 2, 0, 0, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 2, 3, -1, 2, 1, 0, 16, '2014-06-02 04:33:52', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(72, 1, 1, 1, 2, 0, 112233, 0, 0, 0, 'PP20140602', '2014-06-02', 1, 1, 0, 0, '', 2, 3, -1, 2, 1, 0, 16, '2014-06-02 04:44:30', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, ''),
(73, 1, 1, 0, 0, 0, 0, 0, 0, 0, 'PP20140613', '2014-06-13', 1, 1, 0, 0, '', 0, 0, 0, 0, 0, 0, 16, '2014-06-13 10:35:38', 0, '0000-00-00 00:00:00', 0, 'Temp Description', 0, '');

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

--
-- 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=57 ;

--
-- Dumping data for table `comp_payment_detail`
--

INSERT INTO `comp_payment_detail` (`ID`, `paymentID`, `lineNo`, `purchaseInvoiceID`, `totalAmount`, `APBalance`, `discount`, `amountApplied`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(1, 1, 0, 71, 0, 100, 1, 100, 1, '2014-05-27 01:19:27', 0, '0000-00-00 00:00:00', 0),
(2, 0, 0, 71, 0, 100, 71, 100, 16, '2014-05-27 06:58:59', 0, '0000-00-00 00:00:00', 0),
(3, 0, 0, 71, 0, 0, 71, 100, 16, '2014-05-27 07:03:22', 0, '0000-00-00 00:00:00', 0),
(4, 0, 0, 71, 0, -100, 0, 100, 16, '2014-05-27 07:10:18', 0, '0000-00-00 00:00:00', 0),
(5, 40, 0, 71, 0, -300, 1, 0, 16, '2014-05-27 10:29:07', 0, '0000-00-00 00:00:00', 0),
(6, 40, 0, 72, 0, 1, 1, 1, 16, '2014-05-27 10:29:07', 0, '0000-00-00 00:00:00', 0),
(7, 40, 0, 73, 0, 1, 0, 1, 16, '2014-05-27 10:29:07', 0, '0000-00-00 00:00:00', 0),
(8, 40, 0, 75, 0, 1, 0, 1, 16, '2014-05-27 10:29:07', 0, '0000-00-00 00:00:00', 0),
(9, 42, 0, 77, 0, 1, 0, 1, 16, '2014-06-02 00:31:56', 0, '0000-00-00 00:00:00', 0),
(10, 42, 0, 78, 0, 1, 0, 1, 16, '2014-06-02 00:31:56', 0, '0000-00-00 00:00:00', 0),
(11, 42, 0, 79, 0, 1, 2, 1, 16, '2014-06-02 00:31:56', 0, '0000-00-00 00:00:00', 0),
(12, 42, 0, 80, 0, 1, 0, 1, 16, '2014-06-02 00:31:56', 0, '0000-00-00 00:00:00', 0),
(13, 43, 0, 82, 0, 1, 0, 1, 16, '2014-06-02 00:49:53', 0, '0000-00-00 00:00:00', 0),
(14, 43, 0, 83, 0, 1, 0, 1, 16, '2014-06-02 00:49:53', 0, '0000-00-00 00:00:00', 0),
(15, 43, 0, 84, 0, 1, 0, 1, 16, '2014-06-02 00:49:53', 0, '0000-00-00 00:00:00', 0),
(16, 44, 0, 82, 0, 0, 0, 1, 16, '2014-06-02 01:13:51', 0, '0000-00-00 00:00:00', 0),
(17, 44, 0, 83, 0, 0, 0, 1, 16, '2014-06-02 01:13:51', 0, '0000-00-00 00:00:00', 0),
(18, 44, 0, 84, 0, 0, 0, 1, 16, '2014-06-02 01:13:51', 0, '0000-00-00 00:00:00', 0),
(19, 45, 0, 82, 0, -1, 0, 1, 16, '2014-06-02 01:16:54', 0, '0000-00-00 00:00:00', 0),
(20, 45, 0, 83, 0, -1, 0, 1, 16, '2014-06-02 01:16:54', 0, '0000-00-00 00:00:00', 0),
(21, 45, 0, 84, 0, -1, 0, 1, 16, '2014-06-02 01:16:54', 0, '0000-00-00 00:00:00', 0),
(22, 46, 0, 82, 0, -2, 0, 1, 16, '2014-06-02 01:18:05', 0, '0000-00-00 00:00:00', 0),
(23, 46, 0, 83, 0, -2, 0, 1, 16, '2014-06-02 01:18:05', 0, '0000-00-00 00:00:00', 0),
(24, 46, 0, 84, 0, -2, 0, 1, 16, '2014-06-02 01:18:05', 0, '0000-00-00 00:00:00', 0),
(25, 47, 0, 82, 0, -3, 0, 1, 16, '2014-06-02 01:18:38', 0, '0000-00-00 00:00:00', 0),
(26, 47, 0, 83, 0, -3, 0, 1, 16, '2014-06-02 01:18:38', 0, '0000-00-00 00:00:00', 0),
(27, 47, 0, 84, 0, -3, 0, 1, 16, '2014-06-02 01:18:38', 0, '0000-00-00 00:00:00', 0),
(28, 48, 0, 81, 0, 1, 0, 1, 16, '2014-06-02 01:38:43', 0, '0000-00-00 00:00:00', 0),
(29, 49, 0, 81, 0, 0, 0, 1, 16, '2014-06-02 01:40:39', 0, '0000-00-00 00:00:00', 0),
(30, 50, 0, 81, 0, -1, 0, 1, 16, '2014-06-02 01:41:18', 0, '0000-00-00 00:00:00', 0),
(31, 51, 0, 81, 0, -2, 0, 1, 16, '2014-06-02 01:42:53', 0, '0000-00-00 00:00:00', 0),
(32, 52, 0, 72, 0, 0, 0, 1, 16, '2014-06-02 01:45:41', 0, '0000-00-00 00:00:00', 0),
(33, 52, 0, 73, 0, 0, 0, 1, 16, '2014-06-02 01:45:41', 0, '0000-00-00 00:00:00', 0),
(34, 53, 0, 71, 0, -299, 0, 1, 16, '2014-06-02 01:46:26', 0, '0000-00-00 00:00:00', 0),
(35, 53, 0, 75, 0, 0, 0, 1, 16, '2014-06-02 01:46:26', 0, '0000-00-00 00:00:00', 0),
(36, 54, 0, 77, 0, 0, 0, 1, 16, '2014-06-02 01:49:07', 0, '0000-00-00 00:00:00', 0),
(37, 54, 0, 78, 0, 0, 0, 1, 16, '2014-06-02 01:49:07', 0, '0000-00-00 00:00:00', 0),
(38, 54, 0, 79, 0, 0, 0, 1, 16, '2014-06-02 01:49:07', 0, '0000-00-00 00:00:00', 0),
(39, 56, 0, 80, 0, 0, 0, 1, 16, '2014-06-02 01:59:32', 0, '0000-00-00 00:00:00', 0),
(40, 58, 0, 80, 0, -1, 0, 1, 16, '2014-06-02 02:10:04', 0, '0000-00-00 00:00:00', 0),
(41, 59, 0, 80, 0, -2, 0, 1, 16, '2014-06-02 02:13:49', 0, '0000-00-00 00:00:00', 0),
(42, 60, 0, 80, 0, -3, 0, 1, 16, '2014-06-02 02:18:49', 0, '0000-00-00 00:00:00', 0),
(43, 61, 0, 80, 0, -3, 0, 1, 16, '2014-06-02 02:19:29', 0, '0000-00-00 00:00:00', 0),
(44, 61, 0, 81, 0, -3, 0, 1, 16, '2014-06-02 02:19:29', 0, '0000-00-00 00:00:00', 0),
(45, 61, 0, 82, 0, -4, 0, 1, 16, '2014-06-02 02:19:29', 0, '0000-00-00 00:00:00', 0),
(46, 62, 0, 82, 100700, 100695, 1, 1, 16, '2014-06-02 02:37:14', 0, '0000-00-00 00:00:00', 0),
(47, 63, 0, 82, 100700, 100694, 1, 1, 16, '2014-06-02 02:51:46', 0, '0000-00-00 00:00:00', 0),
(48, 64, 0, 82, 100700, 100691, 1, 1, 16, '2014-06-02 02:55:12', 0, '0000-00-00 00:00:00', 0),
(49, 65, 0, 82, 100700, 100689, 2, 2, 16, '2014-06-02 03:13:43', 0, '0000-00-00 00:00:00', 0),
(50, 66, 0, 74, 0, 1000, 1, 10, 16, '2014-06-02 03:41:13', 0, '0000-00-00 00:00:00', 0),
(51, 67, 0, 74, 0, -11, 1, 10, 16, '2014-06-02 03:46:20', 0, '0000-00-00 00:00:00', 0),
(52, 68, 0, 82, 100700, 100685, 1, 9, 16, '2014-06-02 04:20:27', 0, '0000-00-00 00:00:00', 0),
(53, 69, 0, 82, 100700, 100675, 1, 1, 16, '2014-06-02 04:29:45', 0, '0000-00-00 00:00:00', 0),
(54, 70, 0, 82, 100700, 100673, 1, 1, 16, '2014-06-02 04:31:38', 0, '0000-00-00 00:00:00', 0),
(55, 71, 0, 82, 100700, 100671, 2, 1, 16, '2014-06-02 04:33:52', 0, '0000-00-00 00:00:00', 0),
(56, 72, 0, 82, 100700, 100668, 2, 1, 16, '2014-06-02 04:44:30', 0, '0000-00-00 00:00:00', 0);

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

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

CREATE TABLE IF NOT EXISTS `comp_payment_others` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `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` int(11) 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,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=35 ;

--
-- Dumping data for table `comp_payment_others`
--

INSERT INTO `comp_payment_others` (`ID`, `otherPaymentType`, `companyID`, `payTo`, `projectID`, `amountPaid`, `paymentMethodID`, `referenceNo`, `accountID`, `formNo`, `paymentDate`, `updateAble`, `currencyID`, `exchangeRate`, `addressID`, `locationID`, `memo`, `totalDiscount`, `bankCharges`, `bankId`, `totalOtherCharge`, `totalPaid`, `totalApplied`, `outOfBalance`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `accountDescription`, `paymentID`, `journalNo`, `reconcile`) VALUES
(11, 0, 1, 'Me', 2, 1030, 68, 3, 101, 'OPN', '2014-05-14', 1, 1, 0, 0, 2, 'Yup', 0, 0, 0, 0, 0, 0, 0, 0, '2014-06-03 09:55:44', 0, '2014-06-26 01:12:38', 0, 'aaw', 0, '', 0),
(12, 1, 1, 'Inspire Garage', 1, 121, 68, 3, 101, 'OPN', '2014-06-12', 1, 1, 0, 0, 2, 'sds', 0, 0, 0, 0, 0, 0, 0, 0, '2014-06-03 10:23:30', 0, '2014-07-01 00:53:55', 0, '', 0, '', 0),
(18, 1, 16, 'sd', 2, 12, 68, 4, 101, 'OPN', '2014-06-04', 1, 0, 0, 0, 1, 'dsd', 0, 0, 0, 0, 0, 0, 0, 16, '2014-06-04 10:35:05', 0, '2014-06-30 08:02:18', 0, 'sds', 0, '', 0),
(19, 0, 16, 'wew', 2, 11, 68, 5, 99, 'OPN', '2014-06-08', 1, 0, 0, 0, 1, 'sds', 0, 0, 0, 0, 0, 0, 0, 16, '2014-06-05 04:50:00', 0, '2014-06-20 02:44:30', 0, 'aad', 0, 'AP20140600000002', 0),
(20, 0, 16, '12s', 2, 12, 69, 5, 101, 'OPN', '2014-06-20', 1, 0, 0, 0, 2, 'qwqd', 0, 0, 0, 0, 0, 0, 0, 16, '2014-06-05 05:11:06', 0, '2014-06-20 02:44:29', 0, 'weeqw', 0, 'AP20140600000003', 0),
(21, 0, 16, 'ewqe', 1, 12, 69, 5, 102, 'OPN', '2014-06-05', 1, 0, 0, 0, 2, 'dqwd', 0, 0, 0, 0, 0, 0, 0, 16, '2014-06-05 05:13:29', 0, '2014-06-18 04:19:38', 0, 'qwq', 0, '', 0),
(22, 0, 16, 'sds', 1, 112, 68, 5, 100, 'OPN', '0000-00-00', 1, 0, 0, 0, 1, '', 0, 0, 0, 0, 0, 0, 0, 16, '2014-06-05 06:48:21', 0, '0000-00-00 00:00:00', 0, 'ae', 0, '', 0),
(23, 1, 16, 'rtr', 1, 45, 68, 5, 99, 'OPN', '0000-00-00', 1, 0, 0, 0, 1, '', 0, 0, 0, 0, 0, 0, 0, 16, '2014-06-05 10:15:02', 0, '0000-00-00 00:00:00', 0, 'fd', 0, '', 0),
(24, 1, 16, 'asa', 10, 12, 69, 5, 34, 'OPN', '0000-00-00', 1, 0, 0, 0, 1, 'aq sasxw', 0, 0, 0, 0, 0, 0, 0, 16, '2014-06-05 10:22:19', 0, '0000-00-00 00:00:00', 0, 'wqw', 0, '', 0),
(25, 0, 16, 'dada', 17, 12, 69, 26, 102, 'OPN', '0000-00-00', 1, 0, 0, 0, 1, 'asa', 0, 0, 0, 0, 0, 0, 0, 16, '2014-06-26 03:32:04', 0, '0000-00-00 00:00:00', 0, 'asa', 0, '', 0),
(26, 0, 16, 'asa', 15, 12, 68, 6, 101, 'OPN', '0000-00-00', 1, 0, 0, 0, 2, 'asa', 0, 0, 0, 0, 0, 0, 0, 16, '2014-06-26 03:35:02', 0, '0000-00-00 00:00:00', 0, '12', 0, '', 0),
(27, 0, 16, 'asa', 15, 12, 68, 6, 101, 'OPN', '0000-00-00', 1, 0, 0, 0, 2, 'asa', 0, 0, 0, 0, 0, 0, 0, 16, '2014-06-26 03:36:16', 0, '0000-00-00 00:00:00', 0, '12', 0, '', 0),
(28, 0, 16, 'sds', 10, 12, 69, 26, 101, 'OPN', '0000-00-00', 1, 0, 0, 0, 2, 'as', 0, 0, 0, 0, 0, 0, 0, 16, '2014-06-26 03:39:56', 0, '0000-00-00 00:00:00', 0, 'asa', 0, '', 0),
(29, 0, 16, 'sdwe', 1, 233, 68, 26, 0, 'OPN', '0000-00-00', 1, 0, 0, 0, 1, 'adad', 0, 0, 28, 0, 0, 0, 0, 16, '2014-06-26 04:53:00', 0, '0000-00-00 00:00:00', 0, '', 0, '', 0),
(30, 0, 16, 'sdwe', 1, 233, 68, 26, 0, 'OPN', '0000-00-00', 1, 0, 0, 0, 1, 'adad', 0, 0, 28, 0, 0, 0, 0, 16, '2014-06-26 04:53:00', 0, '0000-00-00 00:00:00', 0, '', 0, '', 0),
(31, 0, 16, 'sdwe', 1, 233, 68, 26, 0, 'OPN', '0000-00-00', 1, 0, 0, 0, 1, 'adad', 0, 0, 28, 0, 0, 0, 0, 16, '2014-06-26 04:53:00', 0, '0000-00-00 00:00:00', 0, '', 0, '', 0),
(32, 0, 16, 'wew afaf', 17, 121, 68, 26, 0, 'OPN', '0000-00-00', 1, 0, 0, 0, 2, 's af ', 0, 0, 28, 0, 0, 0, 0, 16, '2014-06-26 04:54:53', 0, '0000-00-00 00:00:00', 0, '', 0, '', 0),
(33, 1, 16, 'sds', 15, 121, 68, 2, 101, 'OPN', '0000-00-00', 1, 0, 0, 0, 2, 'asda sdsd', 0, 0, 0, 0, 0, 0, 0, 16, '2014-07-02 01:34:26', 0, '0000-00-00 00:00:00', 0, '', 0, '', 0),
(34, 1, 16, 'sasasax', 15, 121, 69, 2, 0, 'OPN', '0000-00-00', 1, 0, 0, 0, 2, 'asas  ww', 0, 0, 0, 0, 0, 0, 0, 16, '2014-07-02 03:16:18', 0, '0000-00-00 00:00:00', 0, '', 0, '', 0);

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

--
-- 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,
  `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=44 ;

--
-- Dumping data for table `comp_payment_others_with_item`
--

INSERT INTO `comp_payment_others_with_item` (`ID`, `otherPaymentID`, `lineNo`, `itemID`, `itemname`, `itemdescription`, `quantity`, `unitPrice`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `accountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(21, 11, 1, 2, 'Steel chair for outdoor', '100300100', 1, 500, 1, 1, 6, 30, 530, 13, 0, '2014-06-20 02:46:17', 0, '0000-00-00 00:00:00', 0),
(22, 11, 2, 1, 'Teak wooden chair with natural finish', '321000100', 100, 50, 1, 0, 0, 0, 500, 14, 0, '2014-06-20 02:46:38', 0, '0000-00-00 00:00:00', 0),
(23, 12, 1, 2, 'Steel chair for outdoor', '100300100', 1, 1, 1, 1, 6, 0, 0, 0, 0, '2014-06-20 02:46:28', 0, '0000-00-00 00:00:00', 0),
(24, 19, 1, 2, '100300100', 'Steel chair for outdoor', 1, 11, 11, 1, 6, 0, 0, 0, 16, '2014-06-20 02:46:44', 0, '0000-00-00 00:00:00', 0),
(25, 19, 2, 7, '331000200', 'Plastic Chair - Red', 12, 12, 144, 12, 5, 0, 0, 0, 16, '2014-06-20 02:46:48', 0, '0000-00-00 00:00:00', 0),
(26, 20, 1, 2, 'B13 Steel Chair', 'Steel chair for outdoor', 12, 1, 12, 1, 6, 0, 0, 0, 16, '2014-06-20 02:46:52', 0, '0000-00-00 00:00:00', 0),
(27, 20, 2, 4, 'A23 Plastic Chair', 'Plastic Chair - Blue', 1, 12, 12, 1, 6, 0, 0, 0, 16, '2014-06-20 02:46:59', 0, '0000-00-00 00:00:00', 0),
(28, 21, 1, 2, 'B13 Steel Chair', 'Steel chair for outdoor', 2, 12, 24, 1, 6, 0, 0, 0, 16, '2014-06-20 02:47:03', 0, '0000-00-00 00:00:00', 0),
(29, 21, 2, 9, 'Nasi Goreng', 'Nasi Goreng Ayam', 12, 21, 252, 26, 12, 0, 0, 0, 16, '2014-06-20 02:47:07', 0, '0000-00-00 00:00:00', 0),
(30, 21, 3, 7, 'A24 Plastic Chair', 'Plastic Chair - Red', 1, 1, 1, 0, 0, 0, 0, 0, 16, '2014-06-20 02:47:17', 0, '0000-00-00 00:00:00', 0),
(31, 22, 1, 2, 'B13 Steel Chair', 'Steel chair for outdoor', 1, 12, 12, 1, 6, 0.72, 12.72, 0, 16, '2014-06-20 02:47:20', 0, '0000-00-00 00:00:00', 0),
(32, 22, 2, 0, 'A12 Wooden Chair', 'Teak wooden chair with natural finish', 1, 12, 12, 1, 6, 0.72, 12.72, 0, 16, '2014-06-20 02:47:24', 16, '0000-00-00 00:00:00', 0),
(33, 25, 0, 0, '', 'Plastic Chair - Red', 2, 2345, 4690, 0, 0, 0, 4690, 0, 16, '2014-06-26 03:32:04', 0, '0000-00-00 00:00:00', 0),
(34, 26, 0, 1, '', 'Teak wooden chair with natural finish', 223, 12, 2676, 6, 0, 0, 2676, 0, 16, '2014-06-26 03:35:02', 0, '0000-00-00 00:00:00', 0),
(35, 27, 0, 1, '', 'Teak wooden chair with natural finish', 223, 12, 2676, 6, 0, 0, 2676, 0, 16, '2014-06-26 03:36:17', 0, '0000-00-00 00:00:00', 0),
(36, 28, 0, 1, '', 'Teak wooden chair with natural finish', 1, 12, 12, 0, 6, 0.72, 12.72, 0, 16, '2014-06-26 03:39:56', 0, '0000-00-00 00:00:00', 0),
(37, 28, 0, 7, '0', 'Plastic Chair - Red', 1, 2345, 2345, 0, 0, 0, 2345, 0, 16, '2014-06-26 03:40:13', 0, '0000-00-00 00:00:00', 0),
(38, 29, 0, 1, '', 'Teak wooden chair with natural finish', 2, 12, 24, 0, 6, 1.44, 25.44, 0, 16, '2014-06-26 04:53:00', 0, '0000-00-00 00:00:00', 0),
(39, 30, 0, 1, '', 'Teak wooden chair with natural finish', 2, 12, 24, 0, 6, 1.44, 25.44, 0, 16, '2014-06-26 04:53:00', 0, '0000-00-00 00:00:00', 0),
(40, 31, 0, 1, '', 'Teak wooden chair with natural finish', 2, 12, 24, 0, 6, 1.44, 25.44, 0, 16, '2014-06-26 04:53:00', 0, '0000-00-00 00:00:00', 0),
(42, 32, 2, 4, '', 'Plastic Chair - Blue', 1, 1, 1, 1, 6, 0.06, 1.06, 0, 16, '2014-06-26 09:36:43', 16, '0000-00-00 00:00:00', 0),
(43, 32, 3, 1, '', 'Teak wooden chair with natural finish', 1, 10, 10, 0, 6, 0.6, 10.6, 0, 16, '2014-07-07 00:36:49', 0, '0000-00-00 00:00:00', 0);

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

--
-- 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=28 ;

--
-- Dumping data for table `comp_payment_others_without_item`
--

INSERT INTO `comp_payment_others_without_item` (`ID`, `otherPaymentID`, `lineNo`, `accountID`, `itemdescription`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(12, 18, 1, 102, 'sd', 2, 1, 6, 2.12, 2.12, 16, '2014-06-04 10:35:05', 0, '2014-06-20 02:45:33'),
(13, 18, 2, 101, 'xcx', 21, 7, 0, 21, 21, 16, '2014-06-04 10:37:24', 0, '2014-06-20 02:45:38'),
(14, 23, 1, 101, 'ytyt', 45, 1, 6, 47.7, 47.7, 16, '2014-06-05 10:15:02', 0, '2014-06-20 02:45:42'),
(15, 12, 2, 102, 'Fad', 3, 1, 6, 3.18, 3.18, 16, '2014-06-05 10:20:27', 0, '2014-07-01 00:47:03'),
(16, 24, 1, 100, 'qwqw', 12, 14, 6, 0.72, 12.72, 16, '2014-06-05 10:22:19', 0, '2014-06-20 02:45:52'),
(17, 24, 2, 85, 'wew', 1, 15, 6, 0.06, 1.06, 16, '2014-06-05 10:22:36', 0, '2014-06-20 02:45:55'),
(18, 24, 3, 84, 'wewe', 1, 17, 0, 0, 1, 16, '2014-06-05 10:22:55', 16, '2014-06-20 02:45:59'),
(19, 33, 1, 100, 'qwq sd', 21, 10, 6, 1.26, 22.26, 16, '2014-07-02 01:34:26', 0, '0000-00-00 00:00:00'),
(20, 33, 2, 100, 'dsds', 12, 7, 0, 0, 12, 16, '2014-07-02 01:34:56', 0, '0000-00-00 00:00:00'),
(21, 34, 1, 100, 'asa', 121, 1, 6, 7.26, 128.26, 16, '2014-07-02 03:16:18', 0, '0000-00-00 00:00:00'),
(22, 34, 2, 102, 'aerewq21', 22, 4, 0, 0, 22, 16, '2014-07-02 03:20:39', 16, '2014-07-04 08:55:26'),
(27, 34, 4, 100, 'asa', 1, 4, 0, 0, 1, 16, '2014-07-07 01:05:05', 0, '0000-00-00 00:00:00');

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

--
-- 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=20 ;

--
-- Dumping data for table `comp_project`
--

INSERT INTO `comp_project` (`ID`, `companyID`, `project_name`, `projectManagerID`, `totalBudget`, `remarks`, `createdID`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(1, 1, 'cuci servicesa', 1, 20, 'ntaha', 0, '2014-05-09 02:23:25', 0, '2014-06-02 11:05:38', 0),
(2, 1, 'cuci', 0, 0, 'dfdfd', 0, '2014-05-14 11:12:08', 0, '2014-05-14 11:23:41', 0),
(10, 1, 'software development', 0, 0, 'tender', 0, '2014-06-02 08:56:28', 0, '0000-00-00 00:00:00', 0),
(15, 1, 'clean', 0, 12, 'project baru', 0, '2014-06-02 10:55:12', 0, '0000-00-00 00:00:00', 0),
(16, 1, 'clean', 0, 20, 'project baru', 0, '2014-06-02 11:04:25', 0, '2014-06-24 09:56:53', 1),
(17, 1, 'project management', 0, 0, 'deposit', 0, '2014-06-03 01:16:15', 0, '0000-00-00 00:00:00', 0),
(18, 27, 'project management', 0, 0, 'depositdeposit', 0, '2014-06-06 09:30:03', 0, '2014-06-06 09:30:17', 0),
(19, 15, 'project A', 8, 100000, 'remarks projek A', 0, '2014-06-10 12:08:51', 0, '2014-06-10 12:11:43', 0);

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

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

CREATE TABLE IF NOT EXISTS `comp_purchase_order` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `purchaserID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `invoiceID` int(11) NOT NULL DEFAULT '0',
  `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=24 ;

--
-- Dumping data for table `comp_purchase_order`
--

INSERT INTO `comp_purchase_order` (`ID`, `companyID`, `purchaserID`, `supplierID`, `invoiceID`, `purchaseOrderNo`, `salesAgentName`, `formNo`, `poDate`, `exchangeRate`, `termAndConditionID`, `currencyID`, `createdBy`, `createdTS`, `updatedBy`, `updateAble`, `updatedTS`, `memo`, `is_delete`, `journalNo`) VALUES
(1, 1, 6, 20, 0, 'PI2014nasi goren-00000001', '', 'PI2014nasi goren', '2014-05-26', 1, 5, 0, 0, '2014-05-26 03:07:21', 0, 1, '2014-07-07 01:53:58', '', 0, ''),
(2, 1, 6, 1, 127, 'PI2014nasi goren-00000002', 'fad', 'PI2014nasi goren', '2014-05-26', 1, 5, 0, 0, '2014-05-26 04:13:24', 0, 1, '2014-07-07 05:39:00', '', 0, ''),
(3, 1, 6, 1, 137, 'PI2014nasi goren-00000003', 'hilmi', 'PI2014nasi goren', '2014-05-26', 1, 6, 0, 0, '2014-05-26 04:31:08', 0, 1, '2014-07-07 05:59:38', '', 0, ''),
(4, 1, 6, 1, 0, 'PI2014nasi goren-00000004', '', 'PI2014nasi goren', '2014-05-26', 1, 6, 0, 0, '2014-05-26 04:34:12', 0, 1, '2014-07-07 01:54:12', '', 0, ''),
(5, 1, 7, 20, 0, 'PI2014nasi goren-00000005', '', 'PI2014nasi goren', '2014-05-26', 1, 5, 0, 0, '2014-05-26 04:44:44', 0, 1, '2014-07-04 08:58:26', 'sds', 0, ''),
(6, 1, 7, 1, 138, 'PI2014nasi goren-00000006', '', 'PI2014nasi goren', '2014-05-26', 1, 6, 0, 0, '2014-05-26 04:45:32', 0, 1, '2014-07-07 06:00:01', 'asa', 0, ''),
(7, 1, 6, 23, 0, 'PI2014nasi goren-00000007', '', 'PI2014nasi goren', '2014-05-26', 3.6, 5, 0, 0, '2014-05-26 04:48:50', 0, 1, '2014-07-04 08:58:26', 'sdwew', 0, ''),
(8, 1, 7, 20, 147, 'PI2014nasi goren-00000008', '', 'PI2014nasi goren', '2014-05-26', 1, 7, 0, 16, '2014-05-26 04:59:47', 0, 0, '2014-07-07 06:28:20', 'sdsd', 0, ''),
(9, 1, 7, 1, 0, 'PI2014nasi goren-00000009', 'fadhirul', 'PI2014nasi goren', '2014-05-26', 1, 5, 0, 16, '2014-05-26 05:07:29', 0, 0, '2014-07-04 08:58:27', 'dss', 0, ''),
(10, 1, 7, 20, 149, 'PI2014nasi goren-00000010', '', 'PI2014nasi goren', '2014-06-02', 1, 5, 0, 1, '2014-06-02 05:47:20', 0, 0, '2014-07-07 06:49:31', '', 0, ''),
(11, 15, 9, 26, 0, 'PI2014-00000011', '', 'PI2014', '2014-06-11', 0, 5, 0, 16, '2014-06-11 04:09:12', 0, 0, '2014-07-04 08:58:27', '', 0, ''),
(12, 15, 8, 27, 0, 'PI2014-00000012', '', 'PI2014', '2014-06-12', 0, 5, 0, 16, '2014-06-12 02:14:41', 0, 0, '2014-07-04 08:58:27', '', 0, ''),
(13, 1, 7, 1, 148, 'PI2014-00000013', '', 'PI2014', '2014-06-12', 1, 5, 0, 16, '2014-06-12 04:56:18', 0, 0, '2014-07-07 06:48:23', 'ww', 0, ''),
(14, 1, 6, 1, 141, 'PI2014-00000014', '', 'PI2014', '2014-06-19', 1, 1, 0, 16, '2014-06-19 10:24:58', 0, 1, '2014-07-07 06:17:43', 'qw', 0, ''),
(15, 1, 6, 1, 144, 'PI2014-00000015', '', 'PI2014', '2014-06-19', 1, 1, 0, 16, '2014-06-19 10:25:00', 0, 1, '2014-07-07 06:21:37', 'qw', 0, ''),
(16, 1, 6, 1, 145, 'PI2014-00000016', '', 'PI2014', '2014-06-19', 1, 1, 0, 16, '2014-06-19 10:25:10', 0, 1, '2014-07-07 06:22:38', 'qw', 0, ''),
(17, 1, 6, 1, 131, 'PI2014-00000017', '', 'PI2014', '2014-06-19', 1, 1, 0, 16, '2014-06-19 10:27:45', 0, 1, '2014-07-07 05:46:42', 'qw', 0, ''),
(18, 1, 7, 1, 135, 'PI2014-00000018', '', 'PI2014', '2014-06-20', 23, 1, 1, 16, '2014-06-20 01:12:13', 0, 0, '2014-07-07 05:57:08', 'ASA', 0, ''),
(19, 1, 7, 1, 0, 'PI2014-00000019', '', 'PI2014', '2014-06-20', 12, 6, 1, 16, '2014-06-20 01:15:57', 0, 1, '2014-07-04 08:58:27', 'ewq', 0, ''),
(20, 15, 8, 26, 0, 'PI2014-00000020', '', 'PI2014', '2014-06-21', 3.6, 5, 2, 16, '2014-06-21 03:28:06', 1, 1, '2014-07-04 08:58:27', '', 0, ''),
(21, 15, 12, 27, 0, 'PO2014-00000021', '', 'PO2014', '2014-06-21', 1, 5, 1, 16, '2014-06-21 03:37:57', 1, 0, '2014-07-04 08:58:27', '', 0, ''),
(22, 15, 12, 26, 0, 'PO2014-00000022', '', 'PO2014', '2014-06-21', 3.6, 5, 2, 16, '2014-06-21 03:47:24', 1, 0, '2014-07-04 08:58:27', '', 0, ''),
(23, 15, 8, 26, 0, 'PO2014-00000023', '', 'PO2014', '2014-06-26', 3.2, 5, 2, 16, '2014-06-26 02:57:24', 1, 1, '2014-07-04 08:58:27', '', 0, '');

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

--
-- 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,
  `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=44 ;

--
-- Dumping data for table `comp_purchase_order_detail`
--

INSERT INTO `comp_purchase_order_detail` (`ID`, `purchaseOrderID`, `lineNo`, `itemID`, `itemCode`, `itemName`, `description`, `unitPrice`, `quantityOrder`, `quantityReceivedTotal`, `amount`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(2, 2, 0, 2, '', 'kelapa muda hijau', 'kelapa', 1, 11, 11, 11, 0, '2014-05-26 04:13:24', 0, '2014-07-07 02:15:43'),
(3, 2, 0, 4, '', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 12, 0, 0, '2014-05-26 04:13:52', 0, '2014-06-25 02:15:13'),
(4, 2, 0, 7, '', 'jackfruit', 'Buah', 1, 11, 11, 0, 0, '2014-05-26 04:28:35', 0, '2014-06-24 09:31:20'),
(5, 0, 0, 2, '', 'Steel chair for outdoor', 'B13 Steel Chair', 1, 11, 5, 0, 0, '2014-05-26 04:31:08', 16, '2014-06-12 06:12:33'),
(6, 0, 0, 1, '', 'SDSFSF', '1212', 1, 1, 0, 0, 0, '2014-05-26 04:34:13', 16, '2014-06-12 06:13:04'),
(8, 6, 0, 2, '', 'kelapa muda hijau', 'kelapa', 1, 22, 2, 0, 0, '2014-05-26 04:45:32', 0, '2014-07-03 09:10:37'),
(9, 7, 0, 2, '', 'kelapa muda hijau', 'kelapa', 1, 12, 3, 0, 0, '2014-05-26 04:48:50', 0, '2014-06-25 06:03:17'),
(10, 7, 0, 0, '', 'S', 'S', 1, 1, 1, 0, 0, '2014-05-26 04:51:55', 0, '2014-06-25 06:03:09'),
(12, 8, 0, 4, 'loo kok ilang', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 22, 22, 2, 0, 0, '2014-05-26 05:00:03', 16, '2014-06-24 10:01:02'),
(13, 10, 0, 0, '', 'Nasi Lemak', 'fad', 12, 5, 1, 0, 0, '2014-06-02 05:47:20', 0, '2014-06-25 03:05:20'),
(14, 11, 0, 11, '', 'saiz 10. warna gold', 'Meja makan bulat', 125, 5, 5, 0, 0, '2014-06-11 04:09:12', 0, '2014-06-11 05:10:38'),
(15, 11, 0, 11, '', 'saiz 10. warna gold', 'Meja makan bulat', 100, 1, 1, 0, 0, '2014-06-11 04:13:51', 0, '2014-06-11 05:10:47'),
(16, 11, 0, 12, '', 'saiz 10. warna hitam', 'Meja makan lonjong', 250, 1, 1, 0, 0, '2014-06-11 04:14:08', 0, '2014-06-11 05:10:48'),
(17, 12, 0, 11, '', 'saiz 10. warna gold', 'Meja makan bulat', 100, 5, 5, 0, 0, '2014-06-12 02:14:41', 0, '2014-06-12 09:43:40'),
(18, 12, 0, 12, '', 'saiz 10. warna hitam', 'Meja makan lonjong', 125, 1, 1, 0, 0, '2014-06-12 02:14:57', 0, '2014-06-12 09:43:50'),
(19, 14, 0, 2, 'dfsdf', 'Steel chair for outdoor', 'B13 Steel Chair', 111, 2, 0, 0, 0, '2014-06-12 04:56:18', 16, '2014-07-03 02:49:11'),
(20, 0, 0, 4, '', 'Plastic Chair - Blue', 'A23 Plastic Chair', 11111, 1, 0, 0, 0, '2014-06-12 04:56:32', 16, '2014-06-12 05:21:07'),
(21, 0, 0, 2, '', 'Steel chair for outdoor', 'B13 Steel Chair', 1, 2, 0, 0, 0, '2014-06-12 05:14:47', 0, '0000-00-00 00:00:00'),
(22, 14, 1, 1, '', 'Blackboard', 'Teak wooden chair with natural finish', 1, 12, 2, 12, 16, '2014-06-19 10:24:58', 0, '2014-07-03 09:13:03'),
(23, 15, 1, 1, '', '', 'Teak wooden chair with natural finish', 1, 12, 1, 12, 16, '2014-06-19 10:25:00', 0, '2014-06-25 05:24:09'),
(24, 16, 1, 1, '', '', 'Teak wooden chair with natural finish', 1, 12, 0, 12, 16, '2014-06-19 10:25:10', 0, '0000-00-00 00:00:00'),
(25, 17, 1, 10, '', '', 'Teak wooden chair with natural finish', 1, 1, 1, 12, 16, '2014-06-19 10:27:45', 16, '2014-06-25 05:21:54'),
(26, 17, 2, 8, '', '', 'Plastic Chair - White', 1, 1, 0, 144, 16, '2014-06-19 10:28:10', 16, '2014-06-21 00:58:56'),
(28, 18, 1, 1, '', '', 'Teak wooden chair with natural finish', 12, 12, 12, 144, 16, '2014-06-20 01:12:13', 0, '2014-06-24 06:45:36'),
(29, 19, 1, 4, '', '', 'Plastic Chair - Blue', 1212, 12, 7, 14, 16, '2014-06-20 01:15:57', 0, '2014-06-26 01:56:34'),
(30, 19, 2, 10, '', '', 'Bola Tampar Buaya', 111, 12, 6, 1, 16, '2014-06-20 01:16:59', 0, '2014-06-26 01:52:44'),
(31, 20, 1, 11, '', '', 'saiz 10. warna gold', 2, 10, 1, 22, 16, '2014-06-21 03:28:07', 0, '2014-07-02 08:10:27'),
(32, 20, 2, 12, '', '', 'saiz 10. warna merah', 3, 5, 1, 16, 16, '2014-06-21 03:33:12', 0, '2014-07-02 08:10:32'),
(33, 21, 1, 11, '', '', 'saiz 10. warna gold', 2, 2, 0, 4, 16, '2014-06-21 03:37:57', 0, '0000-00-00 00:00:00'),
(34, 21, 2, 12, '', '', 'saiz 10. warna hitam', 3, 1, 0, 3, 16, '2014-06-21 03:38:11', 0, '0000-00-00 00:00:00'),
(35, 22, 1, 11, '', '', 'saiz 10. warna gold', 12, 1, 0, 12, 16, '2014-06-21 03:47:24', 0, '0000-00-00 00:00:00'),
(36, 22, 2, 12, '', '', 'saiz 10. warna merah', 1, 2, 0, 2, 16, '2014-06-21 03:47:56', 0, '0000-00-00 00:00:00'),
(37, 23, 1, 11, '', '', 'saiz 10. warna gold', 1222, 5, 0, 6110, 16, '2014-06-26 02:57:24', 0, '0000-00-00 00:00:00'),
(38, 17, 3, 1, '', '', 'Teak wooden chair with natural finish', 1, 1, 0, 1, 16, '2014-07-07 01:12:50', 0, '0000-00-00 00:00:00'),
(39, 17, 4, 4, '', '', 'Plastic Chair - Blue', 1, 1, 0, 1, 16, '2014-07-07 01:13:07', 0, '0000-00-00 00:00:00'),
(41, 17, 5, 1, '', '', 'Teak wooden chair with natural finish', 10, 1, 0, 10, 16, '2014-07-07 01:14:24', 16, '2014-07-07 01:15:29'),
(42, 17, 6, 1, '', '', 'Teak wooden chair with natural finish', 0, 1, 0, 0, 16, '2014-07-07 01:15:47', 0, '0000-00-00 00:00:00');

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

--
-- 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,
  `price` double NOT NULL,
  `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=21 ;

--
-- Dumping data for table `comp_purchase_price`
--

INSERT INTO `comp_purchase_price` (`ID`, `companyID`, `itemID`, `supplierID`, `price`, `updatedBy`, `updatedTS`) VALUES
(17, 1, 1, 1, 567, 'akmal', '2014-06-05 04:50:09'),
(19, 1, 9, 24, 768, 'akmal', '2014-06-05 04:50:39'),
(20, 1, 7, 1, 8769, 'akmal', '2014-06-05 04:50:52');

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

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

CREATE TABLE IF NOT EXISTS `comp_quotation` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `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=15 ;

--
-- Dumping data for table `comp_quotation`
--

INSERT INTO `comp_quotation` (`ID`, `companyID`, `customerID`, `quotationCode`, `salesAgentID`, `employeeID`, `formNo`, `quotationDate`, `deliverToID`, `currencyID`, `supplierID`, `memo`, `totalTaxAmount`, `exchangeRate`, `totalReceivable`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 12, '', 0, 6, 'AQ12343242', '2014-06-06', 7, 1, '', 'test memo', 28980, 1, 0, 1, '2014-06-06 02:21:02', 0, '0000-00-00 00:00:00'),
(3, 1, 12, '', 0, 7, 'SA1213434', '2014-06-06', 7, 1, '', 'testttt', 5040, 1, 0, 1, '2014-06-06 02:26:19', 0, '0000-00-00 00:00:00'),
(4, 1, 12, '', 0, 6, 'saasda', '2014-06-06', 8, 1, '', 'dasd', 3780, 1, 0, 1, '2014-06-06 02:28:04', 0, '0000-00-00 00:00:00'),
(5, 1, 12, '', 0, 6, 'SQN2014-00000005', '2014-06-06', 7, 1, '', 'dfsd', 1260, 1, 0, 1, '2014-06-06 04:12:32', 0, '2014-06-06 04:12:32'),
(6, 1, 12, '', 0, 6, 'SQN2014-00000006', '2014-06-06', 7, 1, '', 'afs', 44100, 1, 0, 1, '2014-06-06 04:22:54', 1, '2014-06-06 04:23:03'),
(7, 1, 12, '', 0, 6, 'SQN2014-00000007', '2014-06-06', 7, 1, '', 'dsfs', 15120, 1, 0, 1, '2014-06-06 07:09:39', 1, '2014-06-06 07:09:53'),
(8, 1, 12, '', 0, 6, 'SQN2014-00000007-00000008', '2014-06-06', 7, 1, '', 'dsfs', 15498, 1, 0, 1, '2014-06-06 07:10:06', 0, '2014-06-06 07:10:06'),
(9, 1, 12, '', 0, 6, 'SQN2014-00000009', '2014-06-06', 7, 1, '', 'dsfds', 1764, 1, 0, 1, '2014-06-06 07:14:44', 1, '2014-06-06 07:14:54'),
(10, 1, 12, '', 0, 6, 'SQN2014-00000009-00000010', '2014-06-06', 7, 1, '', 'dsfds', 4662, 1, 0, 1, '2014-06-06 07:15:02', 0, '2014-06-06 07:15:02'),
(11, 1, 12, '', 0, 6, 'SQN2014-00000011', '2014-06-06', 8, 1, '', 'hgh', 14616, 1, 0, 1, '2014-06-06 07:17:50', 1, '2014-06-06 07:17:58'),
(12, 1, 12, '', 0, 6, 'SQN2014-00000011-00000012', '2014-06-06', 8, 1, '', 'hgh', 15246, 1, 0, 1, '2014-06-06 07:18:08', 0, '2014-06-06 07:18:08'),
(13, 1, 12, '', 0, 6, 'SQN2014-00000013', '2014-06-06', 8, 1, '', 'fgdfg', 4914, 1, 0, 1, '2014-06-06 07:19:07', 1, '2014-06-06 07:19:17'),
(14, 1, 12, '', 0, 6, 'SQN2014-00000013-00000014', '2014-06-06', 8, 1, '', 'fgdfg', 20286, 1, 0, 1, '2014-06-06 07:19:27', 0, '2014-06-06 07:19:27');

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

--
-- 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=21 ;

--
-- Dumping data for table `comp_quotation_detail`
--

INSERT INTO `comp_quotation_detail` (`ID`, `quotationID`, `lineNo`, `itemID`, `description`, `unitOfPrice`, `quantityOrder`, `amountExcludeTax`, `taxID`, `umID`, `taxRate`, `taxAmount`, `amountIncudeTax`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 0, 1, 'Teak wooden chair with natural finish', 120, 230, 27600, 12, 2, 5, 1380, 28980, 1, '2014-06-06 02:21:02', 0, '0000-00-00 00:00:00'),
(4, 3, 0, 1, 'Teak wooden chair with natural finish', 120, 40, 4800, 12, 2, 5, 240, 5040, 1, '2014-06-06 02:26:19', 0, '0000-00-00 00:00:00'),
(5, 4, 0, 1, 'Teak wooden chair with natural finish', 120, 30, 3600, 12, 2, 5, 180, 3780, 1, '2014-06-06 02:28:04', 0, '0000-00-00 00:00:00'),
(7, 6, 0, 1, 'Teak wooden chair with natural finish', 120, 20, 2400, 12, 2, 5, 120, 2520, 1, '2014-06-06 04:22:54', 0, '0000-00-00 00:00:00'),
(8, 6, 0, 1, 'Teak wooden chair with natural finish', 120, 330, 39600, 12, 2, 5, 1980, 41580, 1, '2014-06-06 04:23:03', 0, '0000-00-00 00:00:00'),
(9, 7, 0, 1, 'Teak wooden chair with natural finish', 120, 10, 1200, 12, 2, 5, 60, 1260, 1, '2014-06-06 07:09:39', 0, '0000-00-00 00:00:00'),
(10, 7, 0, 1, 'Teak wooden chair with natural finish', 120, 110, 13200, 12, 2, 5, 660, 13860, 1, '2014-06-06 07:09:53', 0, '0000-00-00 00:00:00'),
(11, 8, 0, 1, 'Teak wooden chair with natural finish', 120, 3, 360, 12, 2, 5, 18, 378, 1, '2014-06-06 07:10:06', 0, '0000-00-00 00:00:00'),
(12, 9, 0, 1, 'Teak wooden chair with natural finish', 120, 10, 1200, 12, 2, 5, 60, 1260, 1, '2014-06-06 07:14:44', 0, '0000-00-00 00:00:00'),
(13, 9, 0, 1, 'Teak wooden chair with natural finish', 120, 4, 480, 12, 2, 5, 24, 504, 1, '2014-06-06 07:14:54', 0, '0000-00-00 00:00:00'),
(14, 10, 0, 1, 'Teak wooden chair with natural finish', 120, 23, 2760, 12, 2, 5, 138, 2898, 1, '2014-06-06 07:15:02', 0, '0000-00-00 00:00:00'),
(15, 11, 0, 1, 'Teak wooden chair with natural finish', 120, 4, 480, 12, 2, 5, 24, 504, 1, '2014-06-06 07:17:50', 0, '0000-00-00 00:00:00'),
(16, 11, 0, 1, 'Teak wooden chair with natural finish', 120, 112, 13440, 12, 2, 5, 672, 14112, 1, '2014-06-06 07:17:58', 0, '0000-00-00 00:00:00'),
(17, 12, 0, 1, 'Teak wooden chair with natural finish', 120, 5, 600, 12, 2, 5, 30, 630, 1, '2014-06-06 07:18:08', 0, '0000-00-00 00:00:00'),
(18, 13, 0, 1, 'Teak wooden chair with natural finish', 120, 34, 4080, 12, 2, 5, 204, 4284, 1, '2014-06-06 07:19:07', 0, '0000-00-00 00:00:00'),
(19, 13, 0, 1, 'Teak wooden chair with natural finish', 120, 5, 600, 12, 2, 5, 30, 630, 1, '2014-06-06 07:19:17', 0, '0000-00-00 00:00:00'),
(20, 14, 0, 1, 'Teak wooden chair with natural finish', 120, 122, 14640, 12, 2, 5, 732, 15372, 1, '2014-06-06 07:19:27', 0, '0000-00-00 00:00:00');

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

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

CREATE TABLE IF NOT EXISTS `comp_receive_item` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) NOT NULL,
  `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',
  `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=68 ;

--
-- Dumping data for table `comp_receive_item`
--

INSERT INTO `comp_receive_item` (`ID`, `companyID`, `supplierDoNo`, `purchaseOrderID`, `supplierID`, `formNo`, `deliveryDate`, `locationID`, `deliverToID`, `currencyID`, `exchangeRate`, `employeeID`, `memo`, `shippingMethodID`, `totalAmount`, `totalPayable`, `journalNo`, `updateAble`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(8, 1, 'fds', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 04:51:53', 0, '2014-06-13 10:47:37'),
(9, 1, 'd', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 04:58:34', 0, '2014-05-29 10:54:31'),
(10, 1, 's', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 05:00:14', 0, '2014-05-29 10:54:31'),
(11, 1, 'ada', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 05:03:29', 0, '2014-05-29 10:54:31'),
(12, 1, 's', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 05:04:35', 0, '2014-05-29 10:54:31'),
(13, 1, 'GU', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 06:09:27', 0, '2014-05-29 10:54:31'),
(14, 1, 'sd', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '                                  \n                             ', 0, 0, 0, '', 1, 0, '2014-05-28 07:33:16', 0, '2014-05-29 10:54:31'),
(15, 1, 'as', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '                                  \n                             ', 0, 0, 0, '', 1, 0, '2014-05-28 07:35:37', 0, '2014-05-29 10:54:31'),
(16, 1, 'as', 2, 1, 'GRN', '2014-05-28', 1, 0, 1, 1, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 07:52:13', 0, '2014-07-01 01:43:29'),
(17, 1, 'bnvb', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 08:05:33', 0, '2014-05-29 10:54:31'),
(18, 1, 'sds', 2, 1, 'GRN', '2014-05-13', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 08:19:27', 0, '2014-05-29 10:54:31'),
(19, 1, 'ds', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 08:21:06', 0, '2014-05-29 10:54:31'),
(20, 1, 'dfd', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 08:21:40', 0, '2014-05-29 10:54:31'),
(21, 1, 'sd', 2, 1, 'GRN', '2014-05-28', 1, 0, 1, 1, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 08:24:02', 0, '2014-07-01 01:43:41'),
(22, 1, 'd', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 08:31:14', 0, '2014-05-29 10:54:31'),
(23, 1, 'dfd', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, 'xasa', 0, 0, 0, '', 1, 0, '2014-05-28 08:32:30', 0, '2014-05-29 10:54:31'),
(24, 1, '', 2, 1, 'GRN', '2014-05-28', 2, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, '2014-05-28 08:33:14', 0, '2014-06-19 07:00:06'),
(25, 1, 'ds', 2, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 6, 'sdsd', 0, 0, 0, '', 1, 0, '2014-05-29 07:14:24', 0, '2014-05-29 10:54:31'),
(26, 1, 'bvgmj', 2, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, '2014-05-29 07:23:51', 0, '2014-05-29 10:54:31'),
(27, 1, 'as', 2, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 6, 'dsd', 0, 0, 0, '', 1, 0, '2014-05-29 08:04:01', 0, '2014-05-29 10:54:31'),
(28, 1, 'as', 2, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 6, 'sds', 0, 0, 0, '', 1, 0, '2014-05-29 08:06:57', 0, '2014-05-29 10:54:31'),
(29, 1, 'sds', 2, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 0, 'ada', 0, 0, 0, '', 1, 0, '2014-05-29 10:57:01', 0, '0000-00-00 00:00:00'),
(30, 1, 'asa', 2, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 7, 'ad', 0, 0, 0, '', 1, 0, '2014-05-29 11:06:33', 0, '0000-00-00 00:00:00'),
(31, 1, 'sd', 3, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 7, 'dsd', 3, 0, 0, '', 1, 0, '2014-05-29 11:12:57', 0, '0000-00-00 00:00:00'),
(32, 15, 'supplier do no', 11, 26, 'GRN2014', '2014-06-11', 3, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-11 05:10:38', 0, '2014-07-03 00:28:35'),
(33, 15, 'hk', 12, 27, 'GRN2014', '2014-06-12', 4, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-12 09:43:40', 0, '2014-07-03 00:28:40'),
(34, 1, '0', 0, 0, '0', '1970-01-01', 0, 0, 0, 0, 0, '0', 0, 0, 0, '', 1, 0, '2014-06-16 07:20:43', 0, '0000-00-00 00:00:00'),
(35, 1, '0', 0, 0, '0', '1970-01-01', 0, 0, 0, 0, 0, '0', 0, 0, 0, '', 1, 0, '2014-06-16 07:20:58', 0, '0000-00-00 00:00:00'),
(36, 1, '0', 0, 0, '0', '1970-01-01', 0, 0, 0, 0, 0, '0', 0, 0, 0, '', 1, 0, '2014-06-16 07:22:21', 0, '0000-00-00 00:00:00'),
(37, 1, 'wew', 18, 1, 'GRN', '2014-06-24', 1, 0, 0, 0, 7, 'ew', 0, 0, 0, '', 1, 0, '2014-06-24 06:45:36', 0, '0000-00-00 00:00:00'),
(38, 1, 'as', 2, 1, 'GRN', '2014-06-24', 1, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-24 08:25:19', 0, '0000-00-00 00:00:00'),
(39, 1, 'sds', 2, 1, 'GRN', '2014-06-24', 0, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-24 09:23:56', 0, '0000-00-00 00:00:00'),
(40, 1, 'qwq', 2, 1, 'GRN', '2014-06-24', 2, 0, 0, 0, 6, 'assasas', 74, 0, 0, '', 1, 0, '2014-06-24 09:31:20', 0, '0000-00-00 00:00:00'),
(41, 1, 'asa', 8, 20, 'GRN', '2014-06-24', 1, 0, 0, 0, 0, 'qwq', 0, 0, 0, '', 1, 0, '2014-06-24 09:41:19', 0, '0000-00-00 00:00:00'),
(42, 1, 'wqw', 8, 20, 'GRN', '2014-06-24', 1, 0, 0, 0, 7, 'qw', 74, 0, 0, '', 1, 0, '2014-06-24 10:01:02', 0, '0000-00-00 00:00:00'),
(43, 1, 'asa', 7, 23, 'GRN', '2014-06-24', 2, 0, 0, 0, 7, 'asa', 5, 0, 0, '', 1, 0, '2014-06-24 11:47:22', 0, '0000-00-00 00:00:00'),
(44, 1, 'qwq', 14, 1, 'GRN', '2014-06-25', 2, 0, 0, 0, 6, 'wq wqewx weq wdqe', 74, 0, 0, 'PO20140600000002', 1, 0, '2014-06-25 00:43:14', 0, '2014-07-01 08:01:02'),
(45, 1, 'sdw', 10, 20, 'GRN', '2014-06-25', 1, 0, 0, 0, 0, '', 0, 0, 0, 'PO20140600000011', 1, 0, '2014-06-25 00:48:52', 0, '2014-07-02 08:34:52'),
(46, 1, 'SDSAD', 7, 23, 'GRN', '2014-06-25', 1, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-25 02:03:10', 0, '0000-00-00 00:00:00'),
(47, 1, 'WE', 19, 1, 'GRN', '2014-06-25', 1, 0, 0, 0, 7, 'SD SDS', 73, 0, 0, '', 1, 0, '2014-06-25 02:04:01', 0, '0000-00-00 00:00:00'),
(48, 1, 'SDW', 2, 1, 'GRN', '2014-06-25', 1, 0, 0, 0, 7, 'SDW', 73, 0, 0, '', 1, 0, '2014-06-25 02:15:12', 0, '0000-00-00 00:00:00'),
(49, 1, 'EWE', 14, 1, 'GRN', '2014-06-25', 2, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-25 02:26:18', 0, '0000-00-00 00:00:00'),
(50, 1, 'SDA', 19, 1, 'GRN', '2014-06-25', 1, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-25 05:09:57', 0, '0000-00-00 00:00:00'),
(51, 1, 'qwq', 19, 1, 'GRN', '2014-06-25', 2, 0, 0, 0, 7, 'wqwq', 8, 0, 0, '', 1, 0, '2014-06-25 05:16:08', 0, '0000-00-00 00:00:00'),
(52, 1, '12', 17, 1, 'GRN', '2014-06-25', 2, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-25 05:21:54', 0, '0000-00-00 00:00:00'),
(53, 1, 'ewe', 15, 1, 'GRN', '2014-06-25', 1, 0, 0, 0, 7, 'wewewe', 8, 0, 0, '', 1, 0, '2014-06-25 05:24:09', 0, '0000-00-00 00:00:00'),
(54, 1, 'DWQ', 7, 23, 'GRN', '2014-06-25', 1, 0, 2, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-25 06:03:09', 0, '0000-00-00 00:00:00'),
(55, 1, '23', -1, 1, 'GRN', '2014-06-25', 2, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-25 06:04:49', 0, '0000-00-00 00:00:00'),
(56, 1, 'WE', 19, 1, 'GRN', '2014-06-25', 1, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-25 06:06:09', 0, '0000-00-00 00:00:00'),
(57, 1, '', 19, 1, 'GRN', '2014-06-25', 0, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-25 06:10:38', 0, '0000-00-00 00:00:00'),
(58, 1, 'QWQ', 19, 1, 'GRN', '2014-06-25', 2, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-25 06:14:02', 0, '0000-00-00 00:00:00'),
(59, 1, 'sd', 19, 1, 'GRN', '2014-06-25', 1, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-06-25 06:38:17', 0, '0000-00-00 00:00:00'),
(60, 1, 'sd', 19, 1, 'GRN', '2014-06-25', 1, 0, 1, 0, 7, 'sqaa', 8, 0, 0, '', 1, 0, '2014-06-25 06:42:52', 0, '0000-00-00 00:00:00'),
(61, 1, 'sda', 19, 1, 'GRN', '2014-06-26', 1, 0, 1, 0, 0, '', 0, 0, 0, '', 0, 0, '2014-06-26 01:56:34', 0, '2014-07-01 07:47:58'),
(62, 15, 'sup do', 20, 26, 'GRN2014', '2014-07-02', 5, 0, 2, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-07-02 08:10:27', 0, '0000-00-00 00:00:00'),
(63, 1, 'gfgdt', 6, 1, 'GRN', '2014-07-03', 1, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-07-03 09:06:26', 0, '0000-00-00 00:00:00'),
(64, 1, 'asa', 6, 1, 'GRN', '2014-07-03', 1, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-07-03 09:10:37', 0, '0000-00-00 00:00:00'),
(65, 1, 'frgf', 14, 1, 'GRN', '2014-07-03', 2, 0, 1, 1, 0, '', 0, 0, 0, '', 1, 0, '2014-07-03 09:13:03', 0, '0000-00-00 00:00:00'),
(66, 1, '', 0, 0, 'GRN', '2014-07-03', 0, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, '2014-07-03 09:15:13', 0, '0000-00-00 00:00:00'),
(67, 1, 'df', 15, 1, 'GRN', '2014-07-03', 1, 0, 1, 23, 0, 'sdsdfs', 0, 0, 0, '', 1, 0, '2014-07-03 09:16:18', 0, '0000-00-00 00:00:00');

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

--
-- 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,
  `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',
  `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=118 ;

--
-- Dumping data for table `comp_receive_item_detail`
--

INSERT INTO `comp_receive_item_detail` (`ID`, `receiveID`, `lineNo`, `poDetailID`, `itemID`, `itemCode`, `itemName`, `description`, `unitPrice`, `quantityOrder`, `quantityReceived`, `umID`, `amount`, `balanceItem`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(7, 8, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 0, 16, '2014-05-28 04:51:53', 0, '2014-07-07 01:39:03'),
(8, 8, 0, 3, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 2, 2, 12, 0, 16, '2014-05-28 04:52:16', 0, '2014-07-07 01:39:03'),
(9, 9, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 0, 16, '2014-05-28 04:58:34', 0, '2014-07-07 01:39:03'),
(10, 9, 0, 3, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 1, 2, 12, 0, 16, '2014-05-28 04:58:48', 0, '2014-07-07 01:39:03'),
(11, 10, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 4, 16, '2014-05-28 05:00:14', 0, '2014-07-07 01:39:03'),
(12, 10, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 05:00:19', 0, '2014-07-07 01:39:03'),
(13, 11, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 05:03:29', 0, '2014-07-07 01:39:03'),
(14, 11, 0, 3, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 1, 2, 12, 0, 16, '2014-05-28 05:03:33', 0, '2014-07-07 01:39:03'),
(15, 12, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 05:04:35', 0, '2014-07-07 01:39:03'),
(16, 13, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 06:09:27', 0, '2014-07-07 01:39:03'),
(17, 14, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 07:33:16', 0, '2014-07-07 01:39:03'),
(18, 15, 0, 3, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 1, 2, 12, 0, 16, '2014-05-28 07:35:37', 0, '2014-07-07 01:39:03'),
(19, 16, 0, -1, 1, '321000100', 'SDSFSF', 'AAA', 12.5, 0, 1, 2, 1, 0, 16, '2014-05-28 07:52:13', 0, '2014-07-07 01:39:03'),
(20, 16, 0, 3, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 5, 2, 12, 0, 16, '2014-05-28 07:52:55', 0, '2014-07-07 01:39:03'),
(21, 17, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 08:05:33', 0, '2014-07-07 01:39:03'),
(22, 18, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 08:19:27', 0, '2014-07-07 01:39:03'),
(24, 20, 0, 3, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 1, 2, 12, 0, 16, '2014-05-28 08:21:40', 0, '2014-07-07 01:39:03'),
(25, 21, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 08:24:02', 0, '2014-07-07 01:39:03'),
(26, 21, 0, -1, 1, '321000100', 'SDSFSF', 'AAA', 10, 13, 12, 2, 12, 1, 16, '2014-05-28 08:24:16', 0, '2014-07-07 01:39:03'),
(27, 22, 0, -1, 1, '321000100', 'SDSFSF', 'AAA', 9, 22, 11, 2, 11, 11, 16, '2014-05-28 08:31:14', 0, '2014-07-07 01:39:03'),
(28, 23, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 08:32:30', 0, '2014-07-07 01:39:03'),
(30, 24, 0, 3, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 1, 2, 12, 1, 16, '2014-05-28 08:33:22', 0, '2014-07-07 01:39:03'),
(31, 25, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 5, 16, '2014-05-29 07:14:24', 0, '2014-07-07 01:39:03'),
(32, 25, 0, -1, 9, '501012000', 'sadd', 'NGA', 12, 0, 122, 2, 1464, 122, 16, '2014-05-29 07:15:04', 16, '2014-07-07 01:39:03'),
(33, 26, 0, 3, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 1, 2, 12, 1, 16, '2014-05-29 07:23:51', 0, '2014-07-07 01:39:03'),
(34, 26, 0, -1, 1, '321000100', 'SDSFSF', 'AAA', 13, 2, 1, 2, 1, 1, 16, '2014-05-29 07:24:19', 0, '2014-07-07 01:39:03'),
(35, 27, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 1, 2, 11, 1, 16, '2014-05-29 08:04:01', 0, '2014-07-07 01:39:03'),
(36, 28, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 1, 2, 11, 1, 16, '2014-05-29 08:06:57', 0, '2014-07-07 01:39:03'),
(37, 28, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 1, 2, 11, 1, 16, '2014-05-29 08:07:09', 0, '2014-07-07 01:39:03'),
(39, 29, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 1, 2, 11, 1, 16, '2014-05-29 10:57:01', 0, '2014-07-07 01:39:03'),
(40, 29, 0, -1, 1, '321000100', 'SDSFSF', 'AAA', 12, 23, 21, 2, 252, 21, 16, '2014-05-29 10:57:27', 0, '2014-07-07 01:39:03'),
(41, 30, 0, 3, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 1, 2, 12, 1, 16, '2014-05-29 11:06:33', 0, '2014-07-07 01:39:03'),
(44, 32, 0, 14, 11, 'M001', 'saiz 10. warna gold', 'Meja makan bulat', 125, 5, 5, 2, 625, 5, 16, '2014-06-11 05:10:38', 0, '2014-07-03 03:19:23'),
(45, 32, 0, 15, 11, 'M001', 'saiz 10. warna gold', 'Meja makan bulat', 100, 1, 1, 2, 100, 5, 16, '2014-06-11 05:10:47', 0, '2014-07-03 03:19:30'),
(46, 0, 0, 16, 12, 'M002', 'saiz 10. warna hitam', 'Meja makan lonjong', 250, 1, 1, 2, 250, 0, 16, '2014-06-11 05:10:48', 0, '2014-07-01 04:12:13'),
(47, 33, 0, 17, 11, 'M001', 'saiz 10. warna gold', 'Meja makan bulat', 100, 5, 5, 2, 500, 0, 16, '2014-06-12 09:43:40', 0, '2014-07-01 04:12:13'),
(48, 33, 0, 18, 12, 'M002', 'saiz 10. warna hitam', 'Meja makan lonjong', 125, 1, 1, 2, 125, 0, 16, '2014-06-12 09:43:50', 0, '2014-07-01 04:12:13'),
(52, 37, 0, 28, 1, '321000100', '', 'Teak wooden chair with natural finish', 12, 24, 12, 2, 144, 12, 16, '2014-06-24 06:45:36', 0, '2014-07-07 01:31:40'),
(53, 38, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 1, 2, 11, 0, 16, '2014-06-24 08:25:19', 0, '2014-07-01 04:12:13'),
(54, 39, 1, -1, 7, '331000200', '0', 'Plastic Chair - Red', 2345, 0, 12, 2, 28140, 12, 16, '2014-06-24 09:23:56', 0, '2014-07-07 01:39:03'),
(57, 41, 1, -1, 4, '331000100', '0', 'Plastic Chair - Blue', 12, 0, 2, 2, 24, 0, 16, '2014-06-24 09:41:19', 0, '2014-07-07 01:39:03'),
(60, 0, 0, 12, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 22, 22, 1, 2, 484, 0, 16, '2014-06-24 09:48:04', 0, '2014-07-01 04:12:13'),
(64, 45, 1, 13, 1, '321000100', '0', 'fad', 12, 1, 1, 2, 12, 0, 16, '2014-06-25 00:48:52', 0, '2014-07-07 01:39:03'),
(65, 45, 0, -1, 1, '321000100', '0', 'Nasi Goreng Ayam', 12, 0, 12, 2, 144, 0, 16, '2014-06-25 00:49:14', 0, '2014-07-07 01:39:03'),
(66, 46, 1, 9, 1, '321000100', '0', 'kelapa', 1, 12, 1, 2, 12, 0, 16, '2014-06-25 02:03:10', 0, '2014-07-07 01:39:03'),
(73, 49, 1, -1, 4, '331000100', '0', 'Plastic Chair - Blue', 12, 0, 2, 2, 24, 0, 16, '2014-06-25 02:26:19', 0, '2014-07-07 01:39:03'),
(78, 52, 1, 25, 10, '801010001', '0', 'Teak wooden chair with natural finish', 1, 1, 1, 2, 1, 0, 16, '2014-06-25 05:21:54', 0, '2014-07-07 01:39:03'),
(79, 52, 0, -1, 7, '331000200', '', 'Plastic Chair - Red', 2345, 0, 1, 2, 2345, 1, 16, '2014-06-25 05:22:24', 0, '2014-07-07 01:39:03'),
(80, 52, 0, -1, 7, '331000200', '', 'Plastic Chair - Red', 2345, 0, 1, 2, 2345, 1, 16, '2014-06-25 05:22:26', 0, '2014-07-07 01:39:03'),
(81, 52, 0, -1, 7, '331000200', '', 'Plastic Chair - Red', 2345, 0, 1, 2, 2345, 1, 16, '2014-06-25 05:23:08', 0, '2014-07-07 01:39:03'),
(82, 53, 1, 23, 1, '321000100', '0', 'Teak wooden chair with natural finish', 1, 2, 1, 2, 12, 1, 16, '2014-06-25 05:24:09', 16, '2014-07-07 01:39:03'),
(83, 53, 0, -1, 8, '331000300', '', 'Plastic Chair - White', 12, 0, 20, 2, 24, 10, 16, '2014-06-25 05:27:03', 0, '2014-07-07 01:39:03'),
(85, 54, 0, 9, 2, '100300100', '', 'kelapa', 1, 12, 1, 2, 12, 0, 16, '2014-06-25 06:03:17', 0, '2014-07-07 01:39:03'),
(86, 0, 0, -1, 1, '321000100', '', 'Teak wooden chair with natural finish', 12, 24, 12, 2, 144, 12, 16, '2014-06-25 06:03:30', 0, '2014-07-07 01:39:03'),
(87, 0, 0, -1, 7, '331000200', '', 'Plastic Chair - Red', 2345, 0, 1, 2, 2345, 1, 16, '2014-06-25 06:03:38', 0, '2014-07-07 01:39:03'),
(88, 0, 0, -1, 4, '331000100', '', 'Plastic Chair - Blue', 12, 0, 2, 2, 24, 0, 16, '2014-06-25 06:04:15', 0, '2014-07-07 01:39:03'),
(89, 55, 1, -1, 7, '331000200', '0', 'Plastic Chair - Red', 2345, 0, 1, 2, 2345, 1, 16, '2014-06-25 06:04:50', 0, '2014-07-07 01:39:03'),
(90, 56, 1, 29, 4, '331000100', '0', 'Plastic Chair - Blue', 1212, 12, 1, 2, 14544, 0, 16, '2014-06-25 06:06:09', 0, '2014-07-07 01:39:03'),
(91, 56, 0, 30, 10, '801010001', '', 'Bola Tampar Buaya', 111, 12, 1, 2, 1332, 0, 16, '2014-06-25 06:06:13', 0, '2014-07-07 01:39:03'),
(92, 0, 0, -1, 7, '331000200', '', 'Plastic Chair - Red', 2345, 0, 1, 2, 2345, 1, 16, '2014-06-25 06:06:39', 0, '2014-07-07 01:39:03'),
(93, 0, 0, -1, 7, '331000200', '', 'Plastic Chair - Red', 2345, 0, 1, 2, 2345, 1, 16, '2014-06-25 06:06:52', 0, '2014-07-07 01:39:03'),
(94, 0, 0, -1, 7, '331000200', '', 'Plastic Chair - Red', 2345, 0, 1, 2, 2345, 1, 16, '2014-06-25 06:09:43', 0, '2014-07-07 01:39:03'),
(95, 57, 1, -1, 4, '331000100', '0', 'Plastic Chair - Blue', 1, 0, 9, 2, 9, 0, 16, '2014-06-25 06:10:38', 16, '2014-07-07 01:39:03'),
(98, 0, 0, -1, 4, '331000100', '', 'Plastic Chair - Blue', 1, 0, 1, 2, 1, 0, 16, '2014-06-25 06:12:32', 0, '2014-07-07 01:39:03'),
(103, 59, 1, 29, 4, '331000100', '0', 'Plastic Chair - Blue', 1212, 12, 1, 2, 14544, 0, 16, '2014-06-25 06:38:17', 0, '2014-07-07 01:39:03'),
(104, 59, 0, 30, 10, '801010001', '', 'Bola Tampar Buaya', 111, 12, 1, 2, 1332, 0, 16, '2014-06-25 06:38:43', 0, '2014-07-07 01:39:03'),
(105, 60, 1, 29, 4, '331000100', '0', 'Plastic Chair - Blue', 1212, 12, 2, 2, 14544, 0, 16, '2014-06-25 06:42:52', 16, '2014-07-07 01:39:03'),
(106, 60, 2, 30, 10, '801010001', '', 'Bola Tampar Buaya', 111, 12, 1, 2, 111, 0, 16, '2014-06-25 06:42:57', 16, '2014-07-07 01:39:03'),
(107, 60, 1, -1, 7, '331000200', '0', 'Plastic Chair - Red', 1, 0, 1, 2, 1, 1, 16, '2014-06-25 06:43:07', 16, '2014-07-07 01:39:03'),
(108, 60, 2, -1, 7, '331000200', '', 'Plastic Chair - Red', 2345, 0, 1, 2, 2345, 1, 16, '2014-06-25 06:43:14', 0, '2014-07-07 01:39:03'),
(109, 61, 1, 29, 4, '331000100', '', 'Plastic Chair - Blue', 1212, 12, 1, 2, 14544, 0, 16, '2014-06-26 01:56:34', 0, '2014-07-07 01:39:03'),
(110, 61, 1, -1, 7, '331000200', '', 'Plastic Chair - Red', 2345, 0, 12, 2, 28140, 12, 16, '2014-06-26 01:57:01', 16, '2014-07-07 01:39:03'),
(111, 62, 1, 31, 11, 'M001', '', 'saiz 10. warna gold', 2, 10, 1, 0, 20, 0, 16, '2014-07-02 08:10:27', 0, '2014-07-07 01:39:03'),
(112, 62, 2, 32, 12, 'M002', '', 'saiz 10. warna merah', 3, 5, 1, 0, 15, 0, 16, '2014-07-02 08:10:32', 0, '2014-07-07 01:39:03'),
(113, 63, 1, 8, 2, '100300100', '', 'kelapa', 1, 22, 1, 0, 22, 0, 16, '2014-07-03 09:06:26', 0, '2014-07-07 01:39:03'),
(114, 64, 1, 8, 2, '100300100', '', 'kelapa', 1, 22, 1, 0, 22, 0, 16, '2014-07-03 09:10:37', 0, '2014-07-07 01:39:03'),
(115, 65, 1, 22, 1, '321000100', '', 'Teak wooden chair with natural finish', 1, 12, 1, 0, 12, 0, 16, '2014-07-03 09:13:03', 0, '2014-07-07 01:39:03'),
(116, 66, 1, -1, 7, '331000200', '', 'Plastic Chair - Red', 2345, 0, 1, 0, 2345, 0, 16, '2014-07-03 09:15:13', 0, '2014-07-07 01:39:03'),
(117, 67, 1, -1, 1, '321000100', '', 'Teak wooden chair with natural finish', 1, 0, 12, 0, 12, 0, 16, '2014-07-03 09:16:18', 0, '2014-07-07 01:39:03');

--
-- 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,
  `companyID` int(11) NOT NULL,
  `customerID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `paymentMethodID` int(11) NOT NULL,
  `referenceNo` int(11) 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,
  `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,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=31 ;

--
-- Dumping data for table `comp_receive_payment`
--

INSERT INTO `comp_receive_payment` (`ID`, `companyID`, `customerID`, `projectID`, `paymentMethodID`, `referenceNo`, `bankID`, `accountID`, `formNo`, `receivePaymentDate`, `currencyID`, `exchangeRate`, `addressID`, `memo`, `totalDiscount`, `bankCharges`, `totalOtherCharge`, `totalReceived`, `totalApplied`, `outOfBalance`, `updateAble`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `journalNo`) VALUES
(8, 16, 12, 17, 69, 121, 0, 101, 'PP20140617', '2014-06-17', 1, 1, 0, '', 242, 21, -221, 0, 20000, 12101433, 0, 16, '2014-06-17 10:50:32', 0, '2014-06-26 08:19:27', 0, 'AR20140600000001'),
(9, 1, 12, 17, 69, 121, 0, 101, 'PP20140617', '2014-06-17', 1, 1, 0, '', 242, 21, -221, 0, 20000, 12101433, 1, 16, '2014-06-17 10:56:34', 0, '2014-06-17 12:21:02', 0, ''),
(10, 1, 12, 1, 69, 212, 0, 101, 'PP20140617', '2014-06-17', 1, 3, 0, 'sds', 0, 0, 0, 0, 20000, 1191900, 1, 16, '2014-06-17 12:10:23', 0, '2014-06-26 04:43:10', 0, ''),
(11, 1, 12, 1, 69, 212, 0, 101, 'PP20140617', '2014-06-17', 1, 3, 0, 'sds', 0, 0, 0, 0, 20000, 1191900, 1, 16, '2014-06-17 12:10:28', 0, '2014-06-26 04:43:10', 0, ''),
(12, 1, 12, 1, 69, 212, 0, 101, 'PP20140617', '2014-06-17', 1, 3, 0, 'sds', 0, 0, 0, 0, 20000, 1191900, 1, 16, '2014-06-17 12:10:29', 0, '2014-06-26 04:43:11', 0, ''),
(13, 1, 12, 1, 69, 0, 0, 101, 'PP20140617', '2014-06-18', 1, 1, 0, '', 0, 0, 0, 0, 10000, -9577, 1, 16, '2014-06-17 12:13:35', 0, '2014-07-04 01:38:49', 0, ''),
(14, 1, 12, 1, 69, 0, 0, 101, 'PP20140617', '2014-06-17', 1, 1, 0, '', 0, 0, 0, 0, 10000, -9577, 1, 16, '2014-06-17 12:13:42', 0, '2014-06-26 04:43:12', 0, ''),
(15, 1, 12, 1, 69, 0, 0, 101, 'PP20140617', '2014-06-17', 1, 1, 0, '', 0, 0, 0, 0, 10000, -9577, 1, 16, '2014-06-17 12:13:44', 0, '2014-06-26 04:43:12', 0, ''),
(16, 1, 12, 1, 69, 0, 0, 101, 'PP20140617', '2014-06-17', 1, 1, 0, '', 0, 0, 0, 0, 10000, -9577, 1, 16, '2014-06-17 12:13:47', 0, '2014-06-26 04:43:13', 0, ''),
(17, 1, 12, 1, 68, 0, 0, 0, 'PP20140627', '2014-06-27', 1, 3.1305, 0, '', 1, 0, -1, 0, 2509.44, 11999493.56, 0, 16, '2014-06-27 02:30:38', 0, '0000-00-00 00:00:00', 0, ''),
(18, 1, 12, 1, 68, 0, 0, 0, 'PP20140627', '2014-06-27', 1, 3.1305, 0, '', 1, 0, -1, 0, 2509.44, 11999493.56, 0, 16, '2014-06-27 02:30:46', 0, '0000-00-00 00:00:00', 0, ''),
(19, 1, 12, 1, 68, 0, 0, 0, 'PP20140627', '2014-06-27', 1, 3.1305, 0, '', 0, 0, 0, 0, 1, 9, 0, 16, '2014-06-27 02:33:52', 0, '0000-00-00 00:00:00', 0, ''),
(20, 1, 15, 1, 68, 0, 0, 0, 'PP20140627', '2014-06-11', 2, 3.1305, 0, 'sdsdfq', 0, 0, 0, 0, 12, 18977, 0, 16, '2014-06-27 07:18:03', 0, '0000-00-00 00:00:00', 0, ''),
(21, 1, 15, 1, 68, 0, 0, 0, 'PP20140627', '2014-06-11', 2, 3.1305, 0, 'sdsdfq', 0, 0, 0, 0, 0, 18989, 0, 16, '2014-06-27 07:20:18', 0, '0000-00-00 00:00:00', 0, ''),
(22, 1, 12, 1, 68, 0, 0, 0, 'PP20140627', '2014-06-24', 1, 3.1305, 0, 'qwq', 0, 0, 0, 0, 1.01, 1219.99, 0, 16, '2014-06-27 07:24:55', 0, '0000-00-00 00:00:00', 0, ''),
(23, 1, 12, 2, 68, 1, 12, 0, 'PP20140627', '2014-06-24', 1, 3.1305, 0, 'asa', 11, 0, -11, 0, 3.16, 1218.84, 0, 16, '2014-06-27 07:28:48', 0, '0000-00-00 00:00:00', 0, ''),
(24, 1, 12, 17, 68, 0, 12, 0, 'PP20140627', '2014-06-23', 1, 3.1305, 0, '23', 0, 0, 0, 0, 2, -12, 0, 16, '2014-06-27 07:38:00', 0, '0000-00-00 00:00:00', 0, ''),
(25, 1, 15, 1, 68, 12, 12, 0, 'PP20140627', '2014-06-11', 2, 3.1305, 0, 'sds', 2, 1, -1, 0, 2, 3, 0, 16, '2014-06-27 07:49:42', 0, '0000-00-00 00:00:00', 0, ''),
(26, 1, 16, 1, 68, 0, 12, 0, 'PP20140630', '1970-01-01', 1, 3.1305, 0, 'sds', 1, 0, -1, 0, 1, 2, 0, 16, '2014-06-30 03:57:14', 0, '0000-00-00 00:00:00', 0, ''),
(27, 1, 12, 10, 69, 121, 12, 0, 'PP20140630', '1970-01-01', 1, 3.1305, 0, 'awq', 1, 0, -1, 0, 1, 2, 0, 16, '2014-06-30 04:00:22', 0, '0000-00-00 00:00:00', 0, ''),
(28, 1, 12, 10, 68, 0, 12, 0, 'PP20140630', '1970-01-01', 1, 3.1305, 0, 'asa', 11, 0, -11, 2008, 13, 0, 0, 16, '2014-06-30 04:02:31', 0, '2014-07-01 08:18:11', 0, ''),
(29, 1, 12, 1, 68, 0, 12, 0, 'PP20140630', '1970-01-01', 1, 3.1305, 0, 'asax', 2, 0, -2, 0, 4, 8, 0, 16, '2014-06-30 04:51:01', 0, '0000-00-00 00:00:00', 0, ''),
(30, 1, 12, 17, 68, 0, 12, 0, 'PP20140630', '1970-01-01', 1, 3.1305, 0, 'dsmf sdldf,a', 13, 1, -12, 1111, 2, 0, 0, 16, '2014-06-30 05:01:25', 0, '2014-07-01 01:42:58', 0, '');

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

--
-- 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,
  `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=41 ;

--
-- Dumping data for table `comp_receive_payment_detail`
--

INSERT INTO `comp_receive_payment_detail` (`ID`, `receivePaymentID`, `lineNo`, `invoiceID`, `totalAmount`, `ARBalance`, `discount`, `amountApplied`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 8, 0, 18, 0, 0, 121, 10000, 0, '2014-06-26 07:12:55', 0, '0000-00-00 00:00:00'),
(2, 8, 0, 19, 0, 0, 121, 10000, 0, '2014-06-26 07:14:52', 0, '0000-00-00 00:00:00'),
(3, 10, 0, 18, 0, 0, 0, 10000, 0, '2014-07-03 01:21:11', 0, '0000-00-00 00:00:00'),
(4, 10, 0, 19, 0, 0, 0, 10000, 0, '2014-07-03 01:22:59', 0, '0000-00-00 00:00:00'),
(5, 11, 0, 0, 0, 0, 0, 10000, 0, '2014-06-17 12:10:28', 0, '0000-00-00 00:00:00'),
(6, 11, 0, 0, 0, 0, 0, 10000, 0, '2014-06-17 12:10:28', 0, '0000-00-00 00:00:00'),
(7, 12, 0, 0, 0, 0, 0, 10000, 0, '2014-06-17 12:10:29', 0, '0000-00-00 00:00:00'),
(8, 12, 0, 0, 0, 0, 0, 10000, 0, '2014-06-17 12:10:29', 0, '0000-00-00 00:00:00'),
(9, 13, 0, 0, 0, 0, 0, 10000, 0, '2014-06-17 12:13:35', 0, '0000-00-00 00:00:00'),
(10, 14, 0, 0, 0, 0, 0, 10000, 0, '2014-07-03 01:21:00', 0, '0000-00-00 00:00:00'),
(11, 15, 0, 0, 0, 0, 0, 10000, 0, '2014-06-17 12:13:44', 0, '0000-00-00 00:00:00'),
(12, 16, 0, 0, 0, 0, 0, 10000, 0, '2014-06-17 12:13:48', 0, '0000-00-00 00:00:00'),
(13, 17, 0, 18, 0, 0, 1, 2509.44, 0, '2014-06-27 02:30:38', 0, '0000-00-00 00:00:00'),
(14, 18, 0, 18, 0, 0, 1, 2509.44, 0, '2014-06-27 02:30:46', 0, '0000-00-00 00:00:00'),
(15, 19, 0, 19, 0, 0, 0, 1, 0, '2014-06-27 02:33:52', 0, '0000-00-00 00:00:00'),
(16, 20, 0, 20, 0, 0, 0, 12, 0, '2014-06-27 07:18:03', 0, '0000-00-00 00:00:00'),
(17, 22, 0, 21, 0, 0, 0, 1.01, 0, '2014-06-27 07:24:55', 0, '0000-00-00 00:00:00'),
(18, 23, 0, 22, 0, 0, 11, 3.16, 0, '2014-06-27 07:28:48', 0, '0000-00-00 00:00:00'),
(19, 24, 0, 23, 0, 0, 0, 1, 0, '2014-06-27 07:38:01', 0, '0000-00-00 00:00:00'),
(20, 24, 0, 24, 0, 0, 0, 1, 0, '2014-06-27 07:38:01', 0, '0000-00-00 00:00:00'),
(21, 25, 1, 26, 0, 0, 1, 1, 0, '2014-06-27 07:49:42', 0, '0000-00-00 00:00:00'),
(22, 25, 2, 27, 0, 0, 1, 1, 0, '2014-06-27 07:49:42', 0, '0000-00-00 00:00:00'),
(23, 26, 1, 32, 0, 0, 1, 1, 0, '2014-06-30 03:57:14', 0, '0000-00-00 00:00:00'),
(24, 27, 1, 30, 0, 0, 1, 1, 0, '2014-06-30 04:00:22', 0, '0000-00-00 00:00:00'),
(28, 28, 4, 30, 0, 0, 11, 0, 0, '2014-07-01 05:20:23', 0, '0000-00-00 00:00:00'),
(29, 28, 5, 31, 0, 0, 0, 12, 0, '2014-07-01 05:20:34', 0, '0000-00-00 00:00:00'),
(30, 29, 1, 28, 0, 0, 1, 1, 0, '2014-06-30 04:51:01', 0, '0000-00-00 00:00:00'),
(31, 29, 2, 29, 0, 0, 0, 1, 0, '2014-06-30 04:51:01', 0, '0000-00-00 00:00:00'),
(32, 29, 3, 30, 0, 0, 0, 1, 0, '2014-06-30 04:51:01', 0, '0000-00-00 00:00:00'),
(33, 29, 4, 31, 0, 0, 1, 1, 0, '2014-06-30 04:51:01', 0, '0000-00-00 00:00:00'),
(34, 30, 1, 28, 0, 0, 0, 1, 0, '2014-07-01 01:42:58', 0, '0000-00-00 00:00:00'),
(35, 30, 2, 30, 0, 0, 12, 0, 0, '2014-07-01 01:30:42', 0, '0000-00-00 00:00:00'),
(36, 30, 3, 31, 0, 0, 1, 1, 0, '2014-06-30 05:01:26', 0, '0000-00-00 00:00:00'),
(37, 28, 6, 30, 0, 0, 0, 1, 0, '2014-07-01 08:15:41', 0, '0000-00-00 00:00:00'),
(39, 28, 7, 29, 0, 0, 0, 1, 0, '2014-07-01 08:18:47', 0, '0000-00-00 00:00:00'),
(40, 28, 8, 31, 0, 0, 0, 1, 0, '2014-07-01 08:18:47', 0, '0000-00-00 00:00:00');

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

--
-- 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,
  `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=7 ;

--
-- Dumping data for table `comp_sales_agent`
--

INSERT INTO `comp_sales_agent` (`ID`, `companyID`, `agentName`, `position`, `telOffice`, `telHp`, `email`, `commisionRate`, `remarks`, `createdID`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 'sdsd', 'sdsd', 'sds', '', '', 0, '', 0, '2014-06-09 07:15:56', 0, '0000-00-00 00:00:00'),
(2, 27, 'farhana', 'agent01', '', '', 'bee@gmail.com', 10, '', 0, '2014-06-10 02:15:27', 0, '2014-06-10 04:46:12'),
(5, 27, 'Aizat Jamil', 'Executive', '012 61778564', '012 61778564', 'aizat@salihin.com.my', 10, 'new agent', 0, '2014-06-10 07:02:36', 0, '0000-00-00 00:00:00'),
(6, 55, 'Wan Amin', 'Pengurus Rangkaian', '012 5678798', '012 5678798', 'amin@fabrica.com.my', 10, '', 0, '2014-07-03 01:59:23', 0, '0000-00-00 00:00:00');

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

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

CREATE TABLE IF NOT EXISTS `comp_sales_creditnote` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `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=10 ;

--
-- Dumping data for table `comp_sales_creditnote`
--

INSERT INTO `comp_sales_creditnote` (`ID`, `companyID`, `customerID`, `formNo`, `creditNoteDate`, `salesInvoiceID`, `projectID`, `termsID`, `currencyID`, `exchangeRate`, `agentID`, `memo`, `employeeID`, `shippingMethodID`, `totalAmount`, `amountPaid`, `totalTaxAmount`, `totalPayable`, `total`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `updateAble`, `journalNo`) VALUES
(1, 1, 12, 'CRN', '2014-06-04', 18, 0, 0, 1, 1, 0, '', 0, 0, 10000, '0', 600, 0, 0, 0, '2014-06-24 01:39:38', 0, '2014-06-24 01:41:34', 0, 1, ''),
(2, 1, 12, 'SCN', '2014-07-02', 21, 17, 0, 0, 3.1305, 0, 'ergfwr', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-02 07:40:30', 0, '0000-00-00 00:00:00', 0, 1, ''),
(3, 1, 12, 'SCN', '2014-07-02', 19, 1, 0, 0, 3.1305, 0, 'ewwew', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-02 07:47:10', 0, '0000-00-00 00:00:00', 0, 1, ''),
(4, 1, 12, 'SCN', '2014-07-03', 18, 15, 0, 0, 3.1305, 0, 'ghf fhymf', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-03 01:25:05', 0, '0000-00-00 00:00:00', 0, 1, ''),
(5, 1, 12, 'SCN', '2014-07-03', 18, 1, 0, 0, 3.1305, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-03 01:30:10', 0, '0000-00-00 00:00:00', 0, 1, ''),
(6, 1, 12, 'SCN', '2014-07-03', 18, 15, 0, 0, 3.1305, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-03 04:02:06', 0, '0000-00-00 00:00:00', 0, 1, ''),
(7, 1, 12, 'SCN', '2014-07-03', 18, 0, 0, 0, 3.1305, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-03 04:06:00', 0, '0000-00-00 00:00:00', 0, 1, ''),
(8, 1, 0, 'SCN', '2014-07-03', 0, 0, 0, 0, 0, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-03 04:11:55', 0, '0000-00-00 00:00:00', 0, 1, ''),
(9, 1, 12, 'SCN', '2014-07-03', 18, 10, 0, 0, 3.1305, 0, 'asda', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-03 04:14:29', 0, '0000-00-00 00:00:00', 0, 1, '');

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

--
-- 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=47 ;

--
-- Dumping data for table `comp_sales_creditnote_charges`
--

INSERT INTO `comp_sales_creditnote_charges` (`ID`, `creditNoteID`, `lineNo`, `accountNoID`, `chargeDescription`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `drAccountID`, `crAccountID`, `drTaxAccountID`, `crTaxAccountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(37, 18, 1, 86, 'delivery charges', 0, 9, 0, 0, 1212, 0, 0, 0, 0, 16, '2014-06-18 02:19:53', 0, '2014-06-18 04:06:10'),
(39, 7, 1, 102, 'ghkjh', 0, 11, 10, 1.2, 12, 0, 0, 0, 0, 16, '2014-07-03 04:06:00', 0, '0000-00-00 00:00:00'),
(40, 7, 2, 100, 'sdsw', 0, 3, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-03 04:06:23', 0, '0000-00-00 00:00:00'),
(41, 8, 1, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, '2014-07-03 04:11:56', 0, '0000-00-00 00:00:00'),
(43, 4, 1, 101, 'ASA', 0, 1, 6, 0.06, 1, 0, 0, 0, 0, 16, '2014-07-07 07:52:02', 0, '0000-00-00 00:00:00'),
(44, 4, 2, 101, 'DS', 0, 2, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-07 07:56:54', 0, '0000-00-00 00:00:00'),
(46, 4, 3, 102, 'WEW', 0, 1, 6, 0.06, 1, 0, 0, 0, 0, 16, '2014-07-07 07:58:41', 0, '0000-00-00 00:00:00');

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

--
-- 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,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text 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=13 ;

--
-- Dumping data for table `comp_sales_creditnote_detail`
--

INSERT INTO `comp_sales_creditnote_detail` (`ID`, `creditnoteID`, `lineNo`, `itemID`, `itemname`, `itemdescription`, `quantity`, `unitPrice`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `accountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 1, 8, 'A25 Plastic Chair', 'Plastic Chair - White', 10, 200, 2000, 1, 6, 120, 2120, 0, 0, '2014-06-24 02:16:19', 0, '0000-00-00 00:00:00'),
(2, 2, 1, 9, '', 'Nasi Goreng Ayam', 1, 652, 652, 26, 11, 71.72, 723.72, 0, 16, '2014-07-02 07:40:30', 0, '0000-00-00 00:00:00'),
(3, 2, 2, 4, '', 'Plastic Chair - Blue', 3, 3, 9, 1, 0, 0, 9, 0, 16, '2014-07-02 07:41:19', 0, '0000-00-00 00:00:00'),
(4, 2, 3, 7, '', 'Plastic Chair - Red', 1, 0, 0, 0, 0, 0, 0, 0, 16, '2014-07-02 07:43:48', 0, '0000-00-00 00:00:00'),
(5, 3, 1, 8, '', 'Plastic Chair - White', 1, 1, 1, 28, 0, 0, 1, 0, 16, '2014-07-02 07:47:10', 0, '0000-00-00 00:00:00'),
(6, 4, 1, 4, '', 'Plastic Chair - Blue', 2, 1, 2, 0, 0, 0, 2, 0, 16, '2014-07-03 01:25:05', 0, '0000-00-00 00:00:00'),
(7, 4, 2, 10, '', 'Bola Tampar Buaya', 12, 1, 12, 1, 6, 0.72, 12.72, 0, 16, '2014-07-03 02:39:30', 16, '0000-00-00 00:00:00'),
(9, 5, 1, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 12, 6, 19.26, 340.26, 0, 16, '2014-07-03 01:30:10', 0, '0000-00-00 00:00:00'),
(10, 5, 2, 8, '', 'Plastic Chair - White', 1, 0, 321, 10, 0, 19.26, 340.26, 0, 16, '2014-07-03 01:30:25', 0, '0000-00-00 00:00:00'),
(11, 7, 1, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 12, 6, 19.26, 340.26, 0, 16, '2014-07-03 04:06:47', 0, '0000-00-00 00:00:00'),
(12, 9, 1, 7, '', 'Plastic Chair - Red', 1, 1, 1, 0, 0, 0, 1, 0, 16, '2014-07-03 04:14:43', 0, '0000-00-00 00:00:00');

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

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

CREATE TABLE IF NOT EXISTS `comp_sales_debitnote` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `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=13 ;

--
-- Dumping data for table `comp_sales_debitnote`
--

INSERT INTO `comp_sales_debitnote` (`ID`, `companyID`, `customerID`, `formNo`, `debitNoteDate`, `salesInvoiceID`, `projectID`, `termsID`, `currencyID`, `exchangeRate`, `agentID`, `memo`, `employeeID`, `shippingMethodID`, `totalAmount`, `amountPaid`, `totalTaxAmount`, `totalPayable`, `total`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `updateAble`, `journalNo`) VALUES
(5, 1, 12, 'SDN', '2014-06-12', 17, 1, 0, 0, 1, 0, 'ewe', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-12 09:52:06', 0, '2014-06-23 02:39:10', 0, 1, 'AR20140600000004'),
(6, 1, 12, 'SDN', '2014-06-20', 18, 2, 0, 0, 1, 0, '', 0, 0, 0, '0', 0, 0, 0, 1, '2014-06-20 03:57:55', 0, '2014-06-20 04:32:04', 0, 1, 'AR20140600000002'),
(7, 1, 12, 'SDN', '2014-06-23', 18, 2, 0, 0, 1, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-23 09:52:58', 0, '2014-06-24 01:01:34', 0, 0, 'AR20140600000008'),
(8, 1, 15, 'SDN', '2014-07-02', 20, 1, 0, 0, 3.1305, 0, 'sdsf', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-02 06:49:41', 0, '0000-00-00 00:00:00', 0, 1, ''),
(9, 1, 12, 'SDN', '2014-07-02', 18, 15, 0, 0, 3.1305, 0, 'dfd', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-02 06:52:25', 0, '0000-00-00 00:00:00', 0, 1, ''),
(10, 1, 12, 'SDN', '2014-07-03', 18, 1, 0, 0, 3.1305, 0, 'GDF GH', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-03 00:07:54', 0, '0000-00-00 00:00:00', 0, 1, ''),
(11, 1, 12, 'SDN', '2014-07-03', 18, 15, 0, 0, 3.1305, 0, 'sds', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-03 05:00:15', 0, '0000-00-00 00:00:00', 0, 1, ''),
(12, 1, 12, 'SDN', '2014-07-03', 18, 1, 0, 0, 3.1305, 0, '', 0, 0, 0, '0', 0, 0, 0, 1, '2014-07-03 08:16:47', 0, '0000-00-00 00:00:00', 0, 1, '');

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

--
-- 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=48 ;

--
-- Dumping data for table `comp_sales_debitnote_charges`
--

INSERT INTO `comp_sales_debitnote_charges` (`ID`, `debitNoteID`, `lineNo`, `accountNoID`, `chargeDescription`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `drAccountID`, `crAccountID`, `drTaxAccountID`, `crTaxAccountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(38, 11, 1, 102, 'dsa', 0, 5, 0, 0, 12, 0, 0, 0, 0, 16, '2014-07-03 05:00:15', 0, '0000-00-00 00:00:00'),
(39, 0, 2, 102, 'dewe', 0, 11, 10, 0.1, 1, 0, 0, 0, 0, 16, '2014-07-03 05:00:35', 0, '0000-00-00 00:00:00'),
(40, 0, 3, 100, 'we', 0, 5, 0, 1, 1, 0, 0, 0, 0, 16, '2014-07-03 05:02:36', 0, '0000-00-00 00:00:00'),
(41, 0, 4, 100, 'as', 0, 5, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-03 05:04:17', 0, '0000-00-00 00:00:00'),
(42, 0, 1, 101, 'dfd', 0, 1, 6, 0.06, 1, 0, 0, 0, 0, 16, '2014-07-07 08:24:59', 0, '0000-00-00 00:00:00'),
(43, 0, 1, 101, 'sd', 0, 1, 6, 0.06, 1, 0, 0, 0, 0, 16, '2014-07-07 08:27:25', 0, '0000-00-00 00:00:00'),
(44, 10, 1, 101, 'WE', 0, 2, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-07 08:29:31', 0, '0000-00-00 00:00:00'),
(45, 10, 2, 101, '12', 0, 1, 6, 0.06, 1, 0, 0, 0, 0, 16, '2014-07-07 08:29:56', 0, '0000-00-00 00:00:00'),
(46, 10, 3, 101, 'sds', 0, 1, 6, 0.06, 1, 0, 0, 0, 0, 16, '2014-07-07 08:46:25', 0, '0000-00-00 00:00:00'),
(47, 10, 4, 98, 'sds', 0, 2, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-07 08:46:44', 0, '0000-00-00 00:00:00');

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

--
-- 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,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text 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=23 ;

--
-- Dumping data for table `comp_sales_debitnote_detail`
--

INSERT INTO `comp_sales_debitnote_detail` (`ID`, `debitnoteID`, `lineNo`, `itemID`, `itemname`, `itemdescription`, `quantity`, `unitPrice`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `accountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(6, 5, 1, 2, 'Steel chair for outdoor', 'B13 Steel Chair', 1, 1, 1, 1, 6, 0.06, 1.06, 0, 16, '2014-06-18 04:06:39', 0, '0000-00-00 00:00:00'),
(7, 6, 1, 1, 'Teak wooden chair with natural finish', 'A12 Wooden Chair', 1, 120, 120, 10, 6, 7.2, 127.2, 0, 1, '2014-06-20 03:59:35', 0, '0000-00-00 00:00:00'),
(9, 7, 1, 2, 'Steel chair for outdoor', 'B13 Steel Chair', 1, 1, 1, 1, 6, 0.06, 1.06, 0, 16, '2014-06-24 00:50:01', 0, '0000-00-00 00:00:00'),
(10, 8, 0, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 0, 6, 19.26, 340.26, 0, 16, '2014-07-02 06:49:41', 0, '0000-00-00 00:00:00'),
(11, 8, 0, 10, '', 'Bola Tampar Buaya', 1, 1, 1, 0, 6, 0.06, 1.06, 0, 16, '2014-07-02 06:51:41', 0, '0000-00-00 00:00:00'),
(12, 9, 0, 4, '', 'Plastic Chair - Blue', 12, 1, 12, 1, 0, 0, 12, 0, 16, '2014-07-02 06:52:25', 0, '0000-00-00 00:00:00'),
(13, 9, 0, 7, '', 'Plastic Chair - Red', 21, 12, 252, 0, 0, 0, 252, 0, 16, '2014-07-02 06:52:36', 0, '0000-00-00 00:00:00'),
(15, 10, 1, 4, '', 'Plastic Chair - Blue', 1, 1, 1, 6, 1, 0.01, 1.01, 0, 16, '2014-07-03 00:07:54', 0, '0000-00-00 00:00:00'),
(16, 10, 2, 8, '', 'Plastic Chair - White', 2, 1, 2, 5, 1, 0.02, 2.02, 0, 16, '2014-07-03 01:22:03', 16, '0000-00-00 00:00:00'),
(17, 11, 1, 7, '', 'Plastic Chair - Red', 1, 1, 1, 0, 0, 0, 1, 0, 16, '2014-07-03 05:00:48', 0, '0000-00-00 00:00:00'),
(18, 11, 2, 7, '', 'Plastic Chair - Red', 1, 1, 1, 0, 1, 0.01, 1.01, 0, 16, '2014-07-03 05:01:17', 0, '0000-00-00 00:00:00'),
(19, 12, 1, 1, '', 'Teak wooden chair with natural finish', 10, 321, 3210, 12, 6, 192.6, 3402.6, 0, 1, '2014-07-03 08:16:47', 0, '0000-00-00 00:00:00'),
(20, 10, 3, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 1, 6, 19.26, 340.26, 0, 16, '2014-07-07 08:53:03', 0, '0000-00-00 00:00:00'),
(22, 10, 4, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 1, 6, 19.26, 340.26, 0, 16, '2014-07-07 08:54:59', 0, '0000-00-00 00:00:00');

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

--
-- 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,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `description` varchar(200) DEFAULT NULL,
  `unitPrice` double DEFAULT NULL,
  `unitmeasure` int(11) DEFAULT 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=12 ;

--
-- Dumping data for table `comp_sales_detail`
--

INSERT INTO `comp_sales_detail` (`ID`, `salesID`, `lineNo`, `itemID`, `description`, `unitPrice`, `unitmeasure`, `quantityOrder`, `quantityShip`, `amount`, `requiredDate`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 0, 1, 'Teak wooden chair with natural finish', 120, 2, 120, 83, 14400, '2014-06-11', 1, '2014-06-11 07:24:02', 1, '2014-06-11 07:24:02'),
(2, 1, 0, 7, 'Plastic Chair - Red', 15, 2, 1000, 500, 15000, '2014-06-11', 1, '2014-06-11 07:24:16', 1, '2014-06-11 07:24:16'),
(3, 1, 0, 2, 'Steel chair for outdoor', 90, 2, 250, 0, 22500, '2014-06-11', 1, '2014-06-11 07:24:37', NULL, '2014-06-11 07:24:37'),
(4, 2, 0, 1, 'Teak wooden chair with natural finish', 30, 2, 1200, 12, 36000, '2014-06-11', 1, '2014-06-11 07:25:26', 1, '2014-06-11 07:25:26'),
(5, 2, 0, 8, 'Plastic Chair - White', 122, 2, 120, 10, 14640, '2014-06-11', 1, '2014-06-11 07:25:39', 1, '2014-06-11 07:25:39'),
(6, 2, 0, 10, 'Bola Tampar Buaya', 30, 2, 20, 0, 600, '2014-06-11', 1, '2014-06-11 07:25:52', NULL, '2014-06-11 07:25:52'),
(7, 3, 0, 1, 'Teak wooden chair with natural finish', 120, 2, 10, 0, 1200, '2014-06-18', 1, '2014-06-18 01:45:07', NULL, '2014-06-18 01:45:07'),
(8, 3, 0, 2, 'Steel chair for outdoor', 230, 2, 2300, 0, 529000, '2014-06-18', 1, '2014-06-18 01:45:21', NULL, '2014-06-18 01:45:21'),
(9, 2, 0, 7, 'Plastic Chair - Red', 10, 2, 1234, 0, 12340, '2014-06-18', 1, '2014-06-18 01:45:35', NULL, '2014-06-18 01:45:35'),
(10, 4, 0, 8, 'Plastic Chair - White', 1000, 2, 1000, 0, 1000000, '2014-06-18', 1, '2014-06-18 03:49:20', NULL, '2014-06-18 03:49:20'),
(11, 5, 0, 10, 'Bola Tampar Buaya', 35, 2, 1000, 0, 35000, '2014-06-18', 1, '2014-06-18 03:49:52', NULL, '2014-06-18 03:49:52');

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

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

CREATE TABLE IF NOT EXISTS `comp_sales_invoice` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `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,
  `memo` text NOT NULL,
  `employeeID` int(11) 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,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=42 ;

--
-- Dumping data for table `comp_sales_invoice`
--

INSERT INTO `comp_sales_invoice` (`ID`, `companyID`, `invoiceCodeID`, `salesID`, `customerID`, `formNo`, `salesInvoiceDate`, `customerPoNo`, `locationID`, `projectID`, `termsID`, `shipToID`, `currencyID`, `exchangeRate`, `agentID`, `memo`, `employeeID`, `shippingMethodID`, `totalTaxAmount`, `totalReceivable`, `totalamount`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `updateAble`, `journalNo`, `salesOrderID`) VALUES
(18, 1, 0, 0, 12, 'SON20140618', '2014-06-18', 'aaw', 1, 1, 5, 1, 1, 1, 1, 'sdadc', 7, 3, 0, -2509.44, 2509.44, 16, '2014-06-18 02:11:17', 0, '2014-06-27 02:30:38', 0, 1, 'AR20140600000005', NULL),
(19, 1, 0, 0, 12, 'SON20140626', '2014-06-26', 'ghj', 1, 1, 5, 1, 1, 0, 1, '1ygul', 7, 4, 0, -1, 13, 16, '2014-06-26 06:49:57', 0, '2014-07-02 04:27:52', 0, 1, '', NULL),
(20, 1, 0, 0, 15, 'SON20140627', '2014-06-17', '12', 1, 1, 6, 1, 0, 3.1305, 1, 'sds', 7, 4, 0, -12, 36.72, 16, '2014-06-27 07:11:02', 0, '2014-06-27 07:18:03', 0, 1, '', NULL),
(21, 1, 0, 0, 12, 'SON20140627', '2014-06-25', 'w3', 1, 2, 5, 1, 0, 3.1305, 1, 'de', 7, 4, 0, -1.01, 1.01, 16, '2014-06-27 07:22:31', 0, '2014-06-27 07:24:55', 0, 1, '', NULL),
(22, 1, 0, 0, 12, 'SON20140627', '2014-06-24', 'sd', 1, 2, 5, 1, 0, 3.1305, 1, 'wew', 7, 3, 0, -3.16, 3.16, 16, '2014-06-27 07:27:12', 0, '2014-06-27 07:28:48', 0, 1, '', NULL),
(23, 1, 0, 0, 12, 'SON20140627', '2014-06-10', 'sds', 1, 2, 7, 1, 0, 3.1305, 1, 'sds', 6, 5, 0, -1, 12, 16, '2014-06-27 07:34:10', 0, '2014-06-27 07:38:01', 0, 1, '', NULL),
(24, 1, 0, 0, 12, 'SON20140627', '2014-06-04', 'w', 1, 1, 7, 2, 0, 3.1305, 1, 'sds', 6, 5, 0, -1, 1, 16, '2014-06-27 07:34:59', 0, '2014-06-27 07:38:01', 0, 1, '', NULL),
(25, 1, 0, 0, 12, 'SON20140627', '2014-06-06', 'q1', 2, 1, 5, 1, 0, 3.1305, 1, 'ada', 7, 5, 0, 1, 1, 16, '2014-06-27 07:46:47', 0, '2014-07-01 03:04:08', 0, 1, '', NULL),
(26, 1, 0, 0, 15, 'SON20140627', '2014-06-06', 'we', 2, 1, 5, 2, 0, 3.1305, 1, 'wew', 7, 8, 0, -1, 1, 16, '2014-06-27 07:47:23', 0, '2014-06-27 07:49:42', 0, 1, '', NULL),
(27, 1, 0, 0, 15, 'SON20140627', '2014-06-03', 'as', 2, 1, 5, 2, 0, 3.1305, 1, 'as', 6, 8, 0, -1, 1, 16, '2014-06-27 07:48:33', 0, '2014-06-27 07:49:42', 0, 1, '', NULL),
(28, 1, 0, 0, 12, 'SON20140627', '2014-06-25', '12', 2, 1, 8, 1, 0, 3.1305, 1, 'sd', 6, 5, 0, 1060.31, 1394.36, 16, '2014-06-30 00:35:53', 0, '2014-07-01 03:10:54', 0, 1, '', NULL),
(29, 1, 0, 0, 12, 'SON20140630', '1970-01-01', 'we', 2, 15, 7, 1, 0, 3.1305, 1, 'sdw', 6, 8, 0, 650, 652, 16, '2014-06-30 00:42:25', 0, '2014-07-01 08:18:47', 0, 1, '', NULL),
(30, 1, 0, 0, 12, 'SON20140630', '2014-06-24', 'sew', 2, 17, 7, 1, 0, 3.1305, 1, 'sdw', 6, 5, 0, 0, 12, 16, '2014-06-30 00:44:08', 0, '2014-07-01 08:15:41', 0, 1, '', NULL),
(31, 1, 0, 0, 12, 'SON20140630', '1970-01-01', 'sew', 2, 17, 7, 1, 0, 3.1305, 1, 'ewe', 6, 8, 0, 678.72, 678.72, 16, '2014-06-30 01:01:13', 0, '2014-07-07 05:50:10', 0, 1, '', NULL),
(32, 1, 0, 0, 16, 'SON20140630', '1970-01-01', 'as', 2, 1, 5, 1, 0, 3.1305, 1, 'wewd', 7, 8, 0, -1, 654.06, 16, '2014-06-30 03:42:50', 0, '2014-06-30 03:57:14', 0, 1, '', NULL),
(33, 1, 0, 0, 12, 'SON20140702', '2014-07-02', 'asdfasdf245345345', 1, 1, 5, 1, 0, 3.1305, 1, '', 6, 73, 0, 1020.78, 1020.78, 16, '2014-07-02 06:40:16', 0, '2014-07-04 01:26:02', 0, 0, 'AR20140700000001', NULL),
(34, 1, 0, 0, 12, 'SON20140702', '2014-07-02', 'wafasdfasdf', 1, 1, 5, 1, 0, 3.1305, 1, '', 7, 74, 0, 3103.68, 3103.68, 16, '2014-07-02 07:54:56', 0, '2014-07-02 07:55:50', 0, 1, '', NULL),
(35, 1, 2, 0, 12, 'SON20140704', '2014-06-11', 'safsfg234', 1, 2, 5, 8, 0, 1, 1, 'test memo', 6, 73, 2, 24830.5, 24830.5, 16, '2014-07-04 03:43:21', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(36, 1, 2, 0, 12, 'SON20140704', '2014-06-11', 'dsfas2452345', 1, 2, 8, 1, 0, 1, 1, 'test memo', 6, 74, 207.18, 42671.04, 42671.04, 16, '2014-07-04 03:45:10', 0, '2014-07-04 03:47:24', 0, 1, '', NULL),
(37, 1, 1, 0, 12, 'SON20140704', '2014-06-11', 'ADASR353254', 1, 1, 6, 8, 0, 1, 1, 'test memo', 6, 73, 2, 26017.7, 26017.7, 16, '2014-07-04 03:53:15', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(38, 1, 2, 0, 12, 'SON20140707', '2014-07-07', 'd', 1, 1, 5, 2, 0, 3.1305, 1, 'vcv s', 7, 5, 0.72, 13, 13, 16, '2014-07-07 06:04:17', 0, '2014-07-07 06:06:10', 0, 1, '', NULL),
(39, 1, 2, 0, 12, 'SON20140707', '2014-07-07', 'er', 2, 1, 7, 1, 0, 3.1305, 1, 'er', 7, 8, 0, 686.58, 686.58, 16, '2014-07-07 06:13:13', 0, '2014-07-07 06:59:04', 0, 1, '', NULL),
(40, 1, 1, 0, 12, 'SON20140707', '2014-06-18', 'asdfas45345', 2, 2, 6, 7, 0, 1, 1, '', 7, 73, 31, 0, 0, 16, '2014-07-07 06:42:29', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(41, 1, 1, 0, 15, 'SON20140707', '2014-06-18', 'asdfasdf23452345', 1, 1, 5, 7, 0, 1, 1, 'sfdgsdfgsdg', 7, 74, 272.7, 58223.4, 58223.4, 16, '2014-07-07 06:45:19', 0, '2014-07-07 06:45:33', 0, 1, '', NULL);

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

--
-- 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=58 ;

--
-- Dumping data for table `comp_sales_invoice_charges`
--

INSERT INTO `comp_sales_invoice_charges` (`ID`, `invoiceID`, `lineNo`, `accountNoID`, `chargeDescription`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `drAccountID`, `crAccountID`, `drTaxAccountID`, `crTaxAccountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(37, 18, 1, 86, 'delivery charges', 1212, 9, 0, 0, 1212, 0, 0, 0, 0, 16, '2014-06-18 02:19:53', 0, '2014-06-24 00:42:54'),
(38, 20, 0, 101, '11sd', 0, 1, 6, 0.72, 12, 0, 0, 0, 0, 16, '2014-06-27 07:11:30', 0, '0000-00-00 00:00:00'),
(39, 22, 0, 101, '1', 0, 1, 6, 0.06, 1, 0, 0, 0, 0, 16, '2014-06-27 07:27:41', 0, '0000-00-00 00:00:00'),
(40, 23, 0, 88, 'wew', 1, 18, 6, 0.72, 12, 0, 0, 0, 0, 16, '2014-06-27 07:34:11', 0, '0000-00-00 00:00:00'),
(41, 26, 0, 86, 'we', 0, 15, 6, 0.06, 1, 0, 0, 0, 0, 16, '2014-06-27 07:47:23', 0, '0000-00-00 00:00:00'),
(42, 27, 0, 88, 'qw', 0, 15, 6, 0.06, 1, 0, 0, 0, 0, 16, '2014-06-27 07:48:34', 0, '0000-00-00 00:00:00'),
(43, 30, 0, 100, 'we', 0, 1, 6, 0.72, 12, 0, 0, 0, 0, 16, '2014-06-30 00:44:08', 0, '0000-00-00 00:00:00'),
(44, 31, 1, 100, '111111111', 0, 1, 6, 0.72, 12, 0, 0, 0, 0, 16, '2014-06-30 01:02:05', 16, '2014-06-30 03:22:57'),
(45, 31, 2, 102, '121sda', 0, 4, 0, 12, 1, 0, 0, 0, 0, 16, '2014-06-30 01:02:57', 16, '2014-06-30 03:21:16'),
(46, 32, 1, 102, 'qwqw', 0, 5, 0, 0, 1, 0, 0, 0, 0, 16, '2014-06-30 03:45:03', 0, '0000-00-00 00:00:00'),
(47, 21, 1, 100, 'asa', 0, 5, 0, 1, 1, 0, 0, 0, 0, 16, '2014-07-03 04:28:29', 0, '2014-07-07 02:33:20'),
(48, 35, 1, 101, 'asdfasdfa fas', 23425, 1, 6, 1405.5, 24830.5, 0, 0, 0, 0, 16, '2014-07-04 03:43:21', 0, '0000-00-00 00:00:00'),
(49, 36, 1, 101, 'adadf12313', 234, 1, 6, 14.04, 248.04, 0, 0, 0, 0, 16, '2014-07-04 03:45:10', 0, '0000-00-00 00:00:00'),
(50, 36, 2, 102, 'asdfas245235342', 0, 1, 6, 207.18, 3453, 0, 0, 0, 0, 16, '2014-07-04 03:47:24', 0, '0000-00-00 00:00:00'),
(51, 37, 1, 101, 'ASDFASDF', 24545, 1, 6, 1472.7, 26017.7, 0, 0, 0, 0, 16, '2014-07-04 03:53:16', 0, '0000-00-00 00:00:00'),
(52, 38, 1, 100, 'trr', 0, 1, 6, 0.72, 12, 0, 0, 0, 0, 16, '2014-07-07 06:06:10', 0, '0000-00-00 00:00:00'),
(53, 39, 1, 100, 'sd', 1, 5, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-07 06:13:13', 0, '0000-00-00 00:00:00'),
(54, 39, 2, 98, 'ew', 1, 1, 6, 0.06, 1.06, 0, 0, 0, 0, 16, '2014-07-07 06:13:50', 0, '0000-00-00 00:00:00'),
(55, 41, 1, 101, 'sfgsdfg35356', 0, 1, 6, 272.7, 4545, 0, 0, 0, 0, 16, '2014-07-07 06:45:33', 0, '0000-00-00 00:00:00'),
(56, 39, 3, 102, 'WWWWWWWWWWW', 1, 2, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-07 06:55:27', 16, '2014-07-07 06:59:17');

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

--
-- 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,
  `lineNo` int(11) NOT NULL,
  `itemID` 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=56 ;

--
-- Dumping data for table `comp_sales_invoice_detail`
--

INSERT INTO `comp_sales_invoice_detail` (`ID`, `invoiceID`, `lineNo`, `itemID`, `quantity`, `unitPrice`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `accountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(21, 18, 1, 7, 1, 1212, 1212, 1, 6, 72.72, 1284.72, 0, 16, '2014-07-07 01:54:09', 0, '0000-00-00 00:00:00'),
(22, 18, 2, 1, 1, 12, 12, 1, 6, 0.72, 12.72, 0, 16, '2014-06-18 03:52:34', 0, '0000-00-00 00:00:00'),
(23, 19, 0, 1, 1, 13, 13, 4, 0, 0, 13, 0, 16, '2014-06-26 06:49:57', 0, '0000-00-00 00:00:00'),
(24, 20, 0, 1, 1, 12, 12, 1, 6, 0.72, 12.72, 0, 16, '2014-06-27 07:11:02', 0, '0000-00-00 00:00:00'),
(25, 20, 0, 4, 1, 12, 12, 3, 0, 0, 12, 0, 16, '2014-06-27 07:11:17', 0, '0000-00-00 00:00:00'),
(26, 21, 0, 1, 1, 1, 1, 0, 1, 0.01, 1.01, 0, 16, '2014-06-27 07:22:31', 0, '0000-00-00 00:00:00'),
(27, 22, 0, 1, 1, 1, 1, 1, 6, 0.06, 1.06, 0, 16, '2014-06-27 07:27:12', 0, '0000-00-00 00:00:00'),
(28, 22, 0, 7, 1, 1, 1, 11, 10, 0.1, 1.1, 0, 16, '2014-06-27 07:27:29', 0, '0000-00-00 00:00:00'),
(29, 24, 0, 1, 1, 1, 1, 2, 0, 0, 1, 0, 16, '2014-06-27 07:34:59', 0, '0000-00-00 00:00:00'),
(30, 25, 0, 8, 1, 1, 1, 3, 0, 0, 1, 0, 16, '2014-06-27 07:46:47', 0, '0000-00-00 00:00:00'),
(31, 28, 0, 9, 2, 652, 1304, 1, 6, 78.24, 1382.24, 0, 16, '2014-06-30 00:35:53', 0, '0000-00-00 00:00:00'),
(32, 28, 0, 10, 1, 12, 12, 0, 1, 0.12, 12.12, 0, 16, '2014-06-30 00:37:45', 0, '0000-00-00 00:00:00'),
(33, 29, 0, 9, 1, 652, 652, 5, 0, 0, 652, 0, 16, '2014-06-30 00:42:26', 0, '0000-00-00 00:00:00'),
(34, 31, 1, 9, 1, 652, 652, 5, 0, 0, 652, 0, 16, '2014-06-30 01:01:13', 0, '0000-00-00 00:00:00'),
(35, 31, 2, 8, 1, 0, 12, 10, 0, 0.72, 12.72, 0, 16, '2014-06-30 02:36:39', 16, '0000-00-00 00:00:00'),
(36, 32, 1, 9, 1, 652, 652, 5, 0, 0, 652, 0, 16, '2014-06-30 03:42:50', 0, '0000-00-00 00:00:00'),
(37, 32, 2, 10, 1, 1, 1, 0, 6, 0.06, 1.06, 0, 16, '2014-06-30 03:43:49', 0, '0000-00-00 00:00:00'),
(38, 33, 1, 1, 3, 321, 963, 12, 6, 57.78, 1020.78, 0, 16, '2014-07-02 06:40:16', 0, '0000-00-00 00:00:00'),
(39, 34, 1, 1, 8, 321, 2568, 12, 6, 154.08, 2722.08, 0, 16, '2014-07-02 07:54:56', 0, '0000-00-00 00:00:00'),
(40, 34, 2, 7, 3, 120, 360, 14, 6, 21.6, 381.6, 0, 16, '2014-07-02 07:55:49', 0, '0000-00-00 00:00:00'),
(41, 37, 1, 1, 120, 120, 14400, 12, 0, 720, 15120, 0, 16, '2014-07-04 03:53:16', 0, '0000-00-00 00:00:00'),
(42, 37, 2, 2, 250, 90, 22500, 13, 0, 1350, 23850, 0, 16, '2014-07-04 03:53:16', 0, '0000-00-00 00:00:00'),
(43, 110, 1, 2, 11, 1, 11, 1, 0, 0.66, 11.66, 0, 16, '2014-07-07 04:53:28', 0, '0000-00-00 00:00:00'),
(44, 111, 1, 2, 11, 1, 11, 1, 0, 0.66, 11.66, 0, 16, '2014-07-07 04:56:36', 0, '0000-00-00 00:00:00'),
(45, 112, 1, 2, 11, 1, 11, 1, 0, 0.66, 11.66, 0, 16, '2014-07-07 04:59:31', 0, '0000-00-00 00:00:00'),
(47, 31, 3, 7, 1, 1, 1, 0, 0, 0, 1, 0, 16, '2014-07-07 05:52:21', 16, '0000-00-00 00:00:00'),
(48, 38, 1, 7, 1, 1, 1, 0, 0, 0, 1, 0, 16, '2014-07-07 06:04:17', 0, '0000-00-00 00:00:00'),
(49, 39, 1, 1, 1, 321, 321, 1, 6, 19.26, 340.26, 0, 16, '2014-07-07 06:16:42', 16, '0000-00-00 00:00:00'),
(50, 39, 2, 4, 2, 1, 2, 0, 0, 0, 2, 0, 16, '2014-07-07 06:16:08', 0, '0000-00-00 00:00:00'),
(51, 39, 3, 1, 1, 321, 321, 1, 6, 19.26, 340.26, 0, 16, '2014-07-07 06:29:34', 0, '0000-00-00 00:00:00'),
(52, 40, 1, 1, 10, 120, 1200, 1, 0, 72, 1272, 0, 16, '2014-07-07 06:42:29', 0, '0000-00-00 00:00:00'),
(53, 40, 2, 2, 2300, 230, 529000, 1, 0, 31740, 560740, 0, 16, '2014-07-07 06:42:29', 0, '0000-00-00 00:00:00'),
(54, 41, 1, 1, 1200, 30, 36000, 1, 0, 2160, 38160, 0, 16, '2014-07-07 06:45:19', 0, '0000-00-00 00:00:00'),
(55, 41, 2, 8, 120, 122, 14640, 10, 0, 878.4, 15518.4, 0, 16, '2014-07-07 06:45:19', 0, '0000-00-00 00:00:00');

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

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

CREATE TABLE IF NOT EXISTS `comp_sales_order` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `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=6 ;

--
-- Dumping data for table `comp_sales_order`
--

INSERT INTO `comp_sales_order` (`ID`, `companyID`, `invoiceID`, `customerID`, `OrderNo`, `formNo`, `currencyID`, `exchangeRate`, `salesOrderDate`, `dateRequired`, `deliveryToID`, `salesPerson`, `memo`, `supplierID`, `totalAmount`, `totalReceivable`, `status`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(1, 1, 37, 12, 'SON20140611-00000001', NULL, 1, 1, '2014-06-11', NULL, 8, 6, 'test memo', NULL, 29400, NULL, 1, 1, '2014-07-04 03:53:16', 1, '0000-00-00 00:00:00', 0),
(2, 1, 41, 15, 'SON20140618-00000003', NULL, 2, 1, '2014-06-18', NULL, 7, 0, '', NULL, 542540, NULL, 1, 1, '2014-07-07 06:45:20', 1, '0000-00-00 00:00:00', 0),
(3, 1, 40, 12, 'SON20140618-00000003', NULL, 1, 1, '2014-06-18', NULL, 7, 0, '', NULL, 530200, NULL, 1, 1, '2014-07-07 06:42:29', 1, '0000-00-00 00:00:00', 0),
(4, 1, 0, 16, 'SON20140618-00000004', NULL, 1, 1, '2014-06-18', NULL, 0, 0, '', NULL, 1000000, NULL, 1, 1, '2014-06-18 03:49:20', 0, '0000-00-00 00:00:00', 0),
(5, 1, 0, 20, 'SON20140618-00000005', NULL, 1, 1, '2014-06-18', NULL, 0, 0, '', NULL, 35000, NULL, 1, 1, '2014-06-18 03:49:52', 0, '0000-00-00 00:00:00', 0);

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

--
-- 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=4 ;

--
-- Dumping data for table `comp_sales_price`
--

INSERT INTO `comp_sales_price` (`ID`, `companyID`, `customerID`, `itemID`, `currencyID`, `umID`, `startDate`, `endDate`, `price`, `updatedBy`, `createdBy`, `createdTS`, `updatedTS`) VALUES
(1, 1, 12, 1, 1, 2, '2014-06-05', '2014-12-31', 120, 0, 1, '2014-06-05 08:56:27', '2014-06-05 10:58:00'),
(2, 1, 15, 4, 2, 2, '2014-06-05', '2014-10-21', 50, 1, 1, '2014-06-05 08:59:21', '2014-06-05 09:48:21'),
(3, 1, 15, 8, 2, 2, '2014-06-05', '2014-06-24', 122, 0, 1, '2014-06-05 09:14:48', '2014-06-05 09:14:48');

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

--
-- 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=4 ;

--
-- Dumping data for table `comp_supplier_closing`
--

INSERT INTO `comp_supplier_closing` (`ID`, `companyID`, `supplierID`, `yearMonth`, `openBalance`, `totalDr`, `totalCr`, `balance`) VALUES
(1, 1, 1, '201406', 0, 30763, 62639, -93402),
(2, 1, 20, '201406', 0, 0, 2429, -2429),
(3, 1, 23, '201406', 0, 0, 144, -144);

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

--
-- 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=157 ;

--
-- Dumping data for table `comp_supplier_closing_daily`
--

INSERT INTO `comp_supplier_closing_daily` (`ID`, `companyID`, `supplierID`, `transDate`, `openBalance`, `totalDr`, `totalCr`, `balance`, `createdTS`) VALUES
(1, 1, 1, '2014-06-11', 0, 0, 0, 0, '2014-06-30 00:33:48'),
(2, 1, 1, '2014-06-11', 0, 0, 0, 0, '2014-06-30 00:33:48'),
(3, 1, 20, '2014-06-12', 0, 0, 0, 0, '2014-06-30 00:33:48'),
(4, 1, 1, '2014-06-16', 0, 0, 0, 0, '2014-06-30 00:33:48'),
(5, 1, 20, '2014-06-16', 0, 0, 0, 0, '2014-06-30 00:33:48'),
(6, 1, 1, '2014-06-19', 0, 0, 0, 0, '2014-06-30 00:33:48'),
(7, 0, 1, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:12'),
(8, 0, 20, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:12'),
(9, 0, 23, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:12'),
(10, 0, 24, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:12'),
(11, 0, 25, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:12'),
(12, 0, 26, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:12'),
(13, 0, 27, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:12'),
(14, 0, 28, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:12'),
(22, 0, 1, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:16'),
(23, 0, 20, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:16'),
(24, 0, 23, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:16'),
(25, 0, 24, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:16'),
(26, 0, 25, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:16'),
(27, 0, 26, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:16'),
(28, 0, 27, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:16'),
(29, 0, 28, '0000-00-00', 0, 0, 0, 0, '2014-06-30 04:35:16'),
(37, 0, 1, '0000-00-00', 0, 0, 0, 0, '2014-06-30 16:00:00'),
(38, 0, 20, '0000-00-00', 0, 0, 0, 0, '2014-06-30 16:00:00'),
(39, 0, 23, '0000-00-00', 0, 0, 0, 0, '2014-06-30 16:00:00'),
(40, 0, 24, '0000-00-00', 0, 0, 0, 0, '2014-06-30 16:00:00'),
(41, 0, 25, '0000-00-00', 0, 0, 0, 0, '2014-06-30 16:00:00'),
(42, 0, 26, '0000-00-00', 0, 0, 0, 0, '2014-06-30 16:00:00'),
(43, 0, 27, '0000-00-00', 0, 0, 0, 0, '2014-06-30 16:00:00'),
(44, 0, 28, '0000-00-00', 0, 0, 0, 0, '2014-06-30 16:00:00'),
(52, 0, 1, '2014-07-02', 0, 0, 0, 0, '2014-07-01 16:00:00'),
(53, 0, 20, '2014-07-02', 0, 0, 0, 0, '2014-07-01 16:00:00'),
(54, 0, 23, '2014-07-02', 0, 0, 0, 0, '2014-07-01 16:00:00'),
(55, 0, 24, '2014-07-02', 0, 0, 0, 0, '2014-07-01 16:00:00'),
(56, 0, 25, '2014-07-02', 0, 0, 0, 0, '2014-07-01 16:00:00'),
(57, 0, 26, '2014-07-02', 0, 0, 0, 0, '2014-07-01 16:00:00'),
(58, 0, 27, '2014-07-02', 0, 0, 0, 0, '2014-07-01 16:00:00'),
(59, 0, 28, '2014-07-02', 0, 0, 0, 0, '2014-07-01 16:00:00'),
(67, 1, 1, '2014-07-03', 0, 0, 0, 0, '2014-07-02 16:00:00'),
(68, 1, 20, '2014-07-03', 0, 0, 0, 0, '2014-07-02 16:00:00'),
(69, 1, 23, '2014-07-03', 0, 0, 0, 0, '2014-07-02 16:00:00'),
(70, 1, 24, '2014-07-03', 0, 0, 0, 0, '2014-07-02 16:00:00'),
(71, 27, 25, '2014-07-03', 0, 0, 0, 0, '2014-07-02 16:00:00'),
(72, 15, 26, '2014-07-03', 0, 0, 0, 0, '2014-07-02 16:00:00'),
(73, 15, 27, '2014-07-03', 0, 0, 0, 0, '2014-07-02 16:00:00'),
(74, 15, 28, '2014-07-03', 0, 0, 0, 0, '2014-07-02 16:00:00'),
(82, 1, 1, '2014-07-04', 0, 0, 0, 0, '2014-07-03 16:00:18'),
(83, 1, 20, '2014-07-04', 0, 0, 0, 0, '2014-07-03 16:00:18'),
(84, 1, 23, '2014-07-04', 0, 0, 0, 0, '2014-07-03 16:00:18'),
(85, 1, 24, '2014-07-04', 0, 0, 0, 0, '2014-07-03 16:00:18'),
(86, 27, 25, '2014-07-04', 0, 0, 0, 0, '2014-07-03 16:00:18'),
(87, 15, 26, '2014-07-04', 0, 0, 0, 0, '2014-07-03 16:00:18'),
(88, 15, 27, '2014-07-04', 0, 0, 0, 0, '2014-07-03 16:00:18'),
(89, 15, 28, '2014-07-04', 0, 0, 0, 0, '2014-07-03 16:00:18'),
(90, 45, 29, '2014-07-04', 0, 0, 0, 0, '2014-07-03 16:00:18'),
(97, 1, 1, '2014-07-05', 0, 0, 0, 0, '2014-07-04 16:00:05'),
(98, 1, 20, '2014-07-05', 0, 0, 0, 0, '2014-07-04 16:00:05'),
(99, 1, 23, '2014-07-05', 0, 0, 0, 0, '2014-07-04 16:00:05'),
(100, 1, 24, '2014-07-05', 0, 0, 0, 0, '2014-07-04 16:00:05'),
(101, 27, 25, '2014-07-05', 0, 0, 0, 0, '2014-07-04 16:00:05'),
(102, 15, 26, '2014-07-05', 0, 0, 0, 0, '2014-07-04 16:00:05'),
(103, 15, 27, '2014-07-05', 0, 0, 0, 0, '2014-07-04 16:00:05'),
(104, 15, 28, '2014-07-05', 0, 0, 0, 0, '2014-07-04 16:00:05'),
(105, 45, 29, '2014-07-05', 0, 0, 0, 0, '2014-07-04 16:00:05'),
(112, 1, 1, '2014-07-06', 0, 0, 0, 0, '2014-07-05 16:00:00'),
(113, 1, 20, '2014-07-06', 0, 0, 0, 0, '2014-07-05 16:00:00'),
(114, 1, 23, '2014-07-06', 0, 0, 0, 0, '2014-07-05 16:00:00'),
(115, 1, 24, '2014-07-06', 0, 0, 0, 0, '2014-07-05 16:00:00'),
(116, 27, 25, '2014-07-06', 0, 0, 0, 0, '2014-07-05 16:00:00'),
(117, 15, 26, '2014-07-06', 0, 0, 0, 0, '2014-07-05 16:00:00'),
(118, 15, 27, '2014-07-06', 0, 0, 0, 0, '2014-07-05 16:00:00'),
(119, 15, 28, '2014-07-06', 0, 0, 0, 0, '2014-07-05 16:00:00'),
(120, 45, 29, '2014-07-06', 0, 0, 0, 0, '2014-07-05 16:00:00'),
(127, 1, 1, '2014-07-07', 0, 0, 0, 0, '2014-07-06 16:00:00'),
(128, 1, 20, '2014-07-07', 0, 0, 0, 0, '2014-07-06 16:00:00'),
(129, 1, 23, '2014-07-07', 0, 0, 0, 0, '2014-07-06 16:00:00'),
(130, 1, 24, '2014-07-07', 0, 0, 0, 0, '2014-07-06 16:00:00'),
(131, 27, 25, '2014-07-07', 0, 0, 0, 0, '2014-07-06 16:00:00'),
(132, 15, 26, '2014-07-07', 0, 0, 0, 0, '2014-07-06 16:00:00'),
(133, 15, 27, '2014-07-07', 0, 0, 0, 0, '2014-07-06 16:00:00'),
(134, 15, 28, '2014-07-07', 0, 0, 0, 0, '2014-07-06 16:00:00'),
(135, 45, 29, '2014-07-07', 0, 0, 0, 0, '2014-07-06 16:00:00'),
(142, 1, 1, '2014-07-08', 0, 0, 0, 0, '2014-07-07 16:00:00'),
(143, 1, 20, '2014-07-08', 0, 0, 0, 0, '2014-07-07 16:00:00'),
(144, 1, 23, '2014-07-08', 0, 0, 0, 0, '2014-07-07 16:00:00'),
(145, 1, 24, '2014-07-08', 0, 0, 0, 0, '2014-07-07 16:00:00'),
(146, 27, 25, '2014-07-08', 0, 0, 0, 0, '2014-07-07 16:00:00'),
(147, 15, 26, '2014-07-08', 0, 0, 0, 0, '2014-07-07 16:00:00'),
(148, 15, 27, '2014-07-08', 0, 0, 0, 0, '2014-07-07 16:00:00'),
(149, 15, 28, '2014-07-08', 0, 0, 0, 0, '2014-07-07 16:00:00'),
(150, 45, 29, '2014-07-08', 0, 0, 0, 0, '2014-07-07 16:00:00');

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

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

CREATE TABLE IF NOT EXISTS `comp_supplier_creditnote` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `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=21 ;

--
-- Dumping data for table `comp_supplier_creditnote`
--

INSERT INTO `comp_supplier_creditnote` (`ID`, `companyID`, `supplierID`, `formNo`, `creditNoteDate`, `supplierInvoiceID`, `projectID`, `termsID`, `currencyID`, `exchangeRate`, `agentID`, `memo`, `employeeID`, `shippingMethodID`, `totalAmount`, `amountPaid`, `totalTaxAmount`, `totalPayable`, `total`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `updateAble`, `journalNo`) VALUES
(1, 1, 20, 'PCN', '2014-06-16', 76, 15, 0, 1, 1, 0, '', 0, 0, 0, '0', 1, 0, 0, 1, '2014-06-16 01:54:00', 0, '2014-06-16 07:55:49', 0, 0, ''),
(2, 1, 1, 'PCN', '2014-06-16', 77, 1, 0, 1, 1, 0, '', 0, 0, 12, '0', 0.72, 12.72, 0, 1, '2014-06-16 03:16:12', 0, '2014-06-23 08:49:57', 0, 0, ''),
(3, 1, 1, 'PCN', '2014-06-16', 82, 10, 0, 1, 1, 0, '', 0, 0, 0, '0', 1, 0, 0, 1, '2014-06-16 03:17:20', 0, '2014-06-16 07:55:49', 0, 0, ''),
(4, 1, 1, 'PCN', '2014-06-23', 71, 2, 0, 0, 1, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-23 05:06:24', 0, '0000-00-00 00:00:00', 0, 1, ''),
(5, 1, 1, 'PCN', '2014-06-23', 71, 15, 0, 0, 1, 0, 'asa', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-23 07:36:57', 0, '0000-00-00 00:00:00', 0, 1, ''),
(6, 1, 1, 'PCN', '2014-06-23', 71, 1, 0, 0, 23, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-23 07:51:34', 0, '0000-00-00 00:00:00', 0, 1, ''),
(7, 1, 1, 'PCN', '2014-06-23', 71, 15, 0, 0, 1, 0, 'zdaq', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-23 08:00:38', 0, '0000-00-00 00:00:00', 0, 1, ''),
(8, 1, 1, 'PCN', '2014-06-23', 71, 17, 0, 0, 1, 0, 'asa', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-23 08:02:28', 0, '0000-00-00 00:00:00', 0, 1, ''),
(9, 1, 1, 'PCN', '2014-06-23', 71, 0, 0, 0, 0, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-23 08:41:22', 0, '0000-00-00 00:00:00', 0, 1, ''),
(10, 1, 1, 'PCN', '2014-06-23', 71, 0, 0, 0, 0, 0, 'asa as', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-23 08:46:39', 0, '0000-00-00 00:00:00', 0, 1, ''),
(11, 1, 1, 'PCN', '2014-06-23', 71, 0, 0, 0, 0, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-23 08:58:43', 0, '0000-00-00 00:00:00', 0, 1, ''),
(12, 1, 1, 'PCN', '2014-06-23', 71, 0, 0, 0, 0, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-23 09:03:08', 0, '0000-00-00 00:00:00', 0, 1, ''),
(13, 1, 1, 'PCN', '2014-06-23', 71, 16, 0, 0, 1, 0, 'ASA', 0, 0, 2357, '0', 0.72, 2357.72, 0, 16, '2014-06-23 11:03:40', 0, '2014-06-23 11:04:08', 0, 1, ''),
(14, 1, 1, 'PCN', '2014-06-23', 71, 2, 0, 0, 1, 0, 'QWEQ', 0, 0, 133, '0', 1.32, 134, 0, 16, '2014-06-23 11:15:20', 0, '2014-06-23 11:16:07', 0, 1, ''),
(15, 1, 1, 'PCN', '2014-06-23', 71, 0, 0, 0, 0, 0, 'sds', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-23 11:24:43', 0, '0000-00-00 00:00:00', 0, 1, ''),
(16, 1, 1, 'PCN', '2014-06-23', 71, 0, 0, 0, 0, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-23 11:26:05', 0, '0000-00-00 00:00:00', 0, 1, ''),
(17, 1, 1, 'PCN', '2014-06-23', 71, 0, 0, 0, 0, 0, 'da', 0, 0, 48, '0', 0.24, 48, 0, 16, '2014-06-23 11:28:30', 0, '2014-06-23 11:59:16', 0, 1, ''),
(18, 1, 1, 'PCN', '2014-06-24', 73, 16, 0, 0, 12, 0, '', 0, 0, 28176, '0', 5910.84, 34087, 0, 16, '2014-06-24 01:18:33', 0, '2014-06-24 01:20:25', 0, 1, ''),
(19, 1, 1, 'PCN', '2014-06-24', 72, 17, 0, 0, 1, 0, 'sds', 0, 0, 13, '0', 0.72, 13.72, 0, 16, '2014-06-24 01:26:34', 0, '2014-06-24 01:26:57', 0, 1, ''),
(20, 1, 1, 'PCN', '2014-06-24', 72, 16, 0, 0, 1, 0, 'sds', 0, 0, 1268, '0', 366.96, 29734.96, 0, 16, '2014-06-24 01:28:45', 0, '2014-07-07 02:41:38', 0, 1, '');

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

--
-- 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,
  `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=32 ;

--
-- Dumping data for table `comp_supplier_creditnote_charges`
--

INSERT INTO `comp_supplier_creditnote_charges` (`ID`, `creditNoteID`, `lineNo`, `accountNoID`, `itemname`, `itemdescription`, `quantity`, `unitPrice`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `drAccountID`, `crAccountID`, `drTaxAccountID`, `crTaxAccountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 9, 1, 100, '', 'sds', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 0, '2014-06-23 08:41:22', 0, '0000-00-00 00:00:00'),
(2, 10, 1, 102, '', 'asa', 0, 0, 12, 4, 0, 0, 12, 0, 0, 0, 0, 0, '2014-06-23 08:46:39', 0, '0000-00-00 00:00:00'),
(3, 2, 2, 98, '', 'qwwwwwwwwwwwwwwwww', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 0, '2014-06-23 08:49:57', 0, '0000-00-00 00:00:00'),
(4, 11, 1, 100, '', 'sddddddddddda', 0, 0, 12, 5, 0, 122, 12, 0, 0, 0, 0, 0, '2014-06-23 08:58:43', 0, '0000-00-00 00:00:00'),
(5, 12, 1, 100, '', 'asa', 0, 0, 12, 5, 0, 0, 12, 0, 0, 0, 0, 0, '2014-06-23 09:03:08', 0, '0000-00-00 00:00:00'),
(6, 27, 1, 101, '', 'DAS', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 16, '2014-06-23 10:39:20', 0, '0000-00-00 00:00:00'),
(7, 0, 2, 102, '', 'FEWEQW', 0, 0, 12, 4, 0, 0, 12, 0, 0, 0, 0, 16, '2014-06-23 10:39:34', 0, '0000-00-00 00:00:00'),
(8, 0, 3, 98, '', 'ASA', 0, 0, 12, 6, 0, 12, 12, 0, 0, 0, 0, 16, '2014-06-23 10:40:00', 0, '0000-00-00 00:00:00'),
(9, 28, 1, 100, '', 'AS', 0, 0, 12, 5, 0, 0, 12, 0, 0, 0, 0, 16, '2014-06-23 10:49:52', 0, '0000-00-00 00:00:00'),
(10, 13, 1, 101, '', '12', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 16, '2014-06-23 11:04:08', 0, '0000-00-00 00:00:00'),
(11, 0, 2, 101, '', 'SDS', 0, 0, 12, 3, 0, 0, 12, 0, 0, 0, 0, 16, '2014-06-23 11:13:28', 0, '0000-00-00 00:00:00'),
(12, 14, 1, 100, '', 'ASQ', 0, 0, 1, 4, 0, 0, 1, 0, 0, 0, 0, 16, '2014-06-23 11:16:07', 0, '0000-00-00 00:00:00'),
(13, 0, 2, 101, '', 'sds', 0, 0, 12, 4, 0, 0, 12, 0, 0, 0, 0, 16, '2014-06-23 11:20:57', 0, '0000-00-00 00:00:00'),
(14, 15, 1, 100, '', 'sds', 0, 0, 12, 5, 0, 0, 12, 0, 0, 0, 0, 16, '2014-06-23 11:24:43', 0, '0000-00-00 00:00:00'),
(15, 16, 1, 102, '', 'asa', 0, 0, 12, 4, 0, 0, 12, 0, 0, 0, 0, 16, '2014-06-23 11:26:05', 0, '0000-00-00 00:00:00'),
(16, 17, 1, 100, '', 'wq', 0, 0, 12, 4, 0, 0, 12, 0, 0, 0, 0, 16, '2014-06-23 11:28:30', 0, '0000-00-00 00:00:00'),
(17, 17, 2, 97, '', 'dasda', 0, 0, 12, 2, 0, 0, 12, 0, 0, 0, 0, 16, '2014-06-23 11:59:16', 0, '0000-00-00 00:00:00'),
(18, 18, 1, 102, '', 'sda', 0, 0, 12, 3, 0, 0, 12, 0, 0, 0, 0, 16, '2014-06-24 01:20:25', 0, '0000-00-00 00:00:00'),
(19, 0, 2, 98, '', 'weac', 0, 0, 12, 16, 0, 0.72, 12.72, 0, 0, 0, 0, 16, '2014-06-24 01:20:48', 0, '0000-00-00 00:00:00'),
(20, 19, 1, 101, '', 'wew', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 16, '2014-06-24 01:26:57', 0, '0000-00-00 00:00:00'),
(21, 20, 1, 102, '', 'qwqwqwqwqwq', 0, 0, 12, 4, 0, 12, 12, 0, 0, 0, 0, 16, '2014-06-24 01:28:59', 16, '2014-06-24 02:16:44'),
(22, 20, 2, 2, '', 'qwq', 0, 0, 2, 1, 0, 0.12, 2.12, 0, 0, 0, 0, 16, '2014-06-24 01:29:26', 16, '2014-06-24 03:04:04'),
(23, 20, 3, 101, '', 'JKGGGM DGW', 0, 0, 1, 3, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-07 01:52:24', 0, '0000-00-00 00:00:00'),
(24, 20, 4, 102, '', 'SD', 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-07 01:54:24', 0, '0000-00-00 00:00:00'),
(25, 20, 5, 101, '', 'DSD', 0, 0, 1, 1, 0, 0.06, 1.06, 0, 0, 0, 0, 16, '2014-07-07 02:03:58', 0, '0000-00-00 00:00:00'),
(26, 20, 6, 101, '', 'DSD', 0, 0, 1, 1, 0, 0.06, 1.06, 0, 0, 0, 0, 16, '2014-07-07 02:06:24', 16, '2014-07-07 02:41:01'),
(28, 20, 8, 99, '', 'SD', 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-07 02:10:41', 0, '0000-00-00 00:00:00'),
(31, 20, 7, 101, '', 'sds', 0, 0, 1221, 1, 0, 73.26, 1294.26, 0, 0, 0, 0, 16, '2014-07-07 02:41:38', 0, '0000-00-00 00:00:00');

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

--
-- 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,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text 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=32 ;

--
-- Dumping data for table `comp_supplier_creditnote_detail`
--

INSERT INTO `comp_supplier_creditnote_detail` (`ID`, `creditnoteID`, `lineNo`, `itemID`, `itemname`, `itemdescription`, `quantity`, `unitPrice`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `accountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 1, 4, 'Plastic Chair - Blue', '331000100', 2, 120, 240, 1, 6, 14.4, 254.4, 0, 1, '2014-06-17 05:35:04', 0, '0000-00-00 00:00:00'),
(2, 1, 2, 7, 'Plastic Chair - Red', '331000200', 5, 12, 60, 18, 6, 3.6, 63.6, 0, 1, '2014-06-17 05:35:06', 0, '0000-00-00 00:00:00'),
(3, 2, 1, 8, 'Plastic Chair - White', '331000300', 100, 34, 3400, 28, 10, 340, 3740, 0, 1, '2014-06-17 05:35:07', 0, '0000-00-00 00:00:00'),
(4, 2, 2, 9, 'Nasi Goreng Ayam', '501012000', 25, 23, 575, 10, 6, 34.5, 609.5, 0, 1, '2014-06-17 05:35:09', 0, '0000-00-00 00:00:00'),
(5, 3, 1, 2, 'Steel chair for outdoor', '100300100', 200, 300, 60000, 1, 6, 3600, 63600, 0, 1, '2014-06-17 05:35:10', 0, '0000-00-00 00:00:00'),
(6, 3, 2, 2, 'Steel chair for outdoor', '100300100', 5, 290, 1450, 1, 6, 87, 1537, 0, 1, '2014-06-17 05:35:12', 0, '0000-00-00 00:00:00'),
(7, 4, 0, 0, '0', 'Teak wooden chair with natural finish', 2, 10, 20, 0, 6, 1.2, 21.2, 0, 16, '2014-06-23 05:06:24', 0, '0000-00-00 00:00:00'),
(8, 5, 0, 1, '0', 'Teak wooden chair with natural finish', 12, 12, 144, 0, 6, 8.64, 152.64, 0, 16, '2014-06-23 07:36:57', 0, '0000-00-00 00:00:00'),
(9, 5, 0, 0, '0', 'Teak wooden chair with natural finish', 12, 12, 144, 0, 6, 8.64, 152.64, 0, 16, '2014-06-23 07:38:23', 0, '0000-00-00 00:00:00'),
(10, 6, 0, 7, '0', 'Plastic Chair - Red', 12, 2, 28, 5, 12, 3376.8, 31516.8, 0, 16, '2014-06-23 07:51:34', 0, '0000-00-00 00:00:00'),
(11, 6, 0, 0, '0', 'Teak wooden chair with natural finish', 12, 12, 144, 0, 6, 8.64, 152.64, 0, 16, '2014-06-23 07:51:57', 0, '0000-00-00 00:00:00'),
(12, 7, 0, 1, '0', 'Teak wooden chair with natural finish', 1, 0.12, 0, 0, 6, 0.0072, 0.1272, 0, 16, '2014-06-23 08:00:38', 0, '0000-00-00 00:00:00'),
(13, 7, 0, 0, '0', 'Plastic Chair - Red', 12, 2, 28, 0, 1, 281.4, 28421.4, 0, 16, '2014-06-23 08:00:54', 0, '0000-00-00 00:00:00'),
(14, 8, 0, 1, '0', 'Teak wooden chair with natural finish', 12, 12, 144, 0, 6, 8.64, 152.64, 0, 16, '2014-06-23 08:02:28', 0, '0000-00-00 00:00:00'),
(15, 8, 0, 0, '0', 'Plastic Chair - Red', 1, 2, 2, 0, 0, 0, 2345, 0, 16, '2014-06-23 08:02:39', 0, '0000-00-00 00:00:00'),
(16, 13, 0, 7, '0', 'Plastic Chair - Red', 1, 2, 2, 0, 0, 0, 2345, 0, 16, '2014-06-23 11:03:41', 0, '0000-00-00 00:00:00'),
(17, 0, 0, 4, '', 'Plastic Chair - Blue', 1, 0.12, 0, 1, 0, 0, 0.12, 0, 16, '2014-06-23 11:09:19', 0, '0000-00-00 00:00:00'),
(18, 14, 0, 4, '0', 'Plastic Chair - Blue', 1, 120, 120, 4, 1, 1.2, 121.2, 0, 16, '2014-06-23 11:15:20', 0, '0000-00-00 00:00:00'),
(19, 14, 0, 4, '', 'Plastic Chair - Blue', 1, 12, 12, 1, 1, 0.12, 12.12, 0, 16, '2014-06-23 11:15:42', 0, '0000-00-00 00:00:00'),
(20, 17, 0, 4, '', 'Plastic Chair - Blue', 12, 0, 0, 1, 0, 0, 0, 0, 16, '2014-06-23 11:29:21', 0, '0000-00-00 00:00:00'),
(21, 17, 0, 4, '', 'Plastic Chair - Blue', 2, 12, 24, 6, 1, 0.24, 24.24, 0, 16, '2014-06-23 11:30:03', 0, '0000-00-00 00:00:00'),
(22, 18, 1, 1, '0', 'Teak wooden chair with natural finish', 2, 12, 24, 13, 6, 1.44, 25.44, 0, 16, '2014-06-24 01:18:33', 0, '0000-00-00 00:00:00'),
(23, 18, 2, 7, '', 'Plastic Chair - Red', 12, 2, 28, 0, 21, 5909.4, 34049.4, 0, 16, '2014-06-24 01:19:41', 0, '0000-00-00 00:00:00'),
(24, 19, 1, 4, '0', 'Plastic Chair - Blue', 1, 1, 1, 1, 0, 0, 1, 0, 16, '2014-06-24 01:26:34', 0, '0000-00-00 00:00:00'),
(25, 20, 1, 4, '0', 'Plastic Chair - Blue', 1, 1, 1, 1, 6, 0.06, 1.06, 0, 16, '2014-06-24 02:55:48', 16, '0000-00-00 00:00:00'),
(26, 20, 2, 7, '', 'Plastic Chair - Red', 12, 2, 28, 0, 1, 281.4, 28421.4, 0, 16, '2014-06-24 01:30:15', 0, '0000-00-00 00:00:00'),
(31, 20, 3, 1, '', 'Teak wooden chair with natural finish', 1, 0, 10, 0, 6, 0.6, 10.6, 0, 16, '2014-07-07 04:12:19', 16, '0000-00-00 00:00:00');

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

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

CREATE TABLE IF NOT EXISTS `comp_supplier_debitnote` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `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=32 ;

--
-- Dumping data for table `comp_supplier_debitnote`
--

INSERT INTO `comp_supplier_debitnote` (`ID`, `companyID`, `supplierID`, `formNo`, `debitNoteDate`, `supplierInvoiceID`, `projectID`, `termsID`, `currencyID`, `exchangeRate`, `agentID`, `memo`, `employeeID`, `shippingMethodID`, `totalAmount`, `amountPaid`, `totalTaxAmount`, `totalPayable`, `total`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `updateAble`, `journalNo`) VALUES
(1, 1, 20, 'PDN', '2014-06-02', 74, 1, 0, 1, 1, 0, 'fdv dfd', 0, 0, 0, '0', 0, 0, 0, 0, '2014-06-02 04:20:32', 0, '2014-06-17 11:22:11', 0, 1, ''),
(2, 1, 1, 'PDN', '2014-06-03', 73, 1, 0, 1, 1, 0, 'fdv dfd', 0, 0, 0, '0', 0, 0, 0, 0, '2014-06-03 03:36:57', 0, '2014-06-17 11:22:13', 0, 1, ''),
(3, 1, 1, 'PDN', '2014-06-11', 71, 1, 0, 1, 1, 0, 'fdv dfd', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-11 08:47:00', 0, '2014-06-17 11:22:17', 0, 0, ''),
(4, 1, 20, 'PDN', '2014-06-12', 74, 10, 0, 1, 1, 0, 'fdv dfd', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-12 01:05:39', 0, '2014-06-17 11:22:18', 0, 0, ''),
(5, 1, 20, 'PDN', '2014-06-16', 74, 10, 0, 2, 2, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-06-16 06:46:52', 0, '2014-06-20 04:28:10', 0, 0, 'AP20140600000013'),
(6, 1, 1, 'PDN', '2014-06-21', 71, 10, 0, 1, 1, 0, 'sdsdca', 0, 0, 28140, '0', 1688.4, 29828.4, 0, 16, '2014-06-21 04:32:45', 0, '0000-00-00 00:00:00', 0, 1, ''),
(7, 1, 1, 'PDN', '2014-06-21', 71, 10, 0, 1, 2, 0, 'sa adED AE', 0, 0, 144, '0', 8.64, 152.64, 0, 16, '2014-06-21 05:08:45', 0, '0000-00-00 00:00:00', 0, 1, ''),
(8, 1, 1, 'PDN', '2014-06-21', 72, 1, 0, 1, 2, 0, 'sdsds', 0, 0, 144, '0', 8.64, 152.64, 0, 16, '2014-06-21 05:17:14', 0, '0000-00-00 00:00:00', 0, 1, ''),
(9, 1, 1, 'PDN', '2014-06-21', 71, 1, 0, 1, 1, 0, 'sds', 0, 0, 1200, '0', 72, 1272, 0, 16, '2014-06-21 05:43:08', 0, '0000-00-00 00:00:00', 0, 1, ''),
(10, 1, 1, 'PDN', '2014-06-21', 71, 1, 0, 1, 1, 0, 'as', 0, 0, 0, '0', 0, 2, 0, 16, '2014-06-21 07:06:53', 0, '2014-06-21 07:07:53', 0, 1, ''),
(11, 1, 20, 'PDN', '2014-06-21', 76, 10, 0, 1, 1, 0, 'as', 0, 0, 2345, '0', 281.4, 2626.4, 0, 16, '2014-06-21 07:23:44', 0, '0000-00-00 00:00:00', 0, 1, ''),
(12, 1, 1, 'PDN', '2014-06-21', 71, 16, 0, 1, 2, 0, 'sds', 0, 0, 28140, '0', 281.4, 28421.4, 0, 16, '2014-06-21 07:41:36', 0, '0000-00-00 00:00:00', 0, 1, ''),
(13, 1, 20, 'PDN', '2014-06-21', 74, 2, 0, 1, 1, 0, 'asa', 0, 0, 12, '0', 0, 144, 0, 16, '2014-06-21 07:49:30', 0, '2014-06-21 08:10:23', 0, 1, ''),
(14, 1, 1, 'PDN', '2014-06-21', 72, 17, 0, 1, 1, 0, 'qwq', 0, 0, 2, '0', 0.12, 2.12, 0, 16, '2014-06-21 08:21:50', 0, '0000-00-00 00:00:00', 0, 1, ''),
(15, 1, 1, 'PDN', '2014-06-21', 71, 17, 0, 1, 2, 0, 'asasdad', 0, 0, 144, '0', 8.64, 0, 0, 16, '2014-06-21 08:50:38', 0, '2014-06-21 08:51:07', 0, 1, ''),
(16, 1, 20, 'PDN', '2014-06-23', 74, 16, 0, 1, 1, 0, 'dsd', 0, 0, 12, '0', 0.72, 12.72, 0, 16, '2014-06-23 03:33:39', 0, '0000-00-00 00:00:00', 0, 1, ''),
(17, 1, 20, 'PDN', '2014-06-23', 74, 16, 0, 1, 1, 0, 'dsd', 0, 0, 12, '0', 0.72, 12.72, 0, 16, '2014-06-23 03:35:57', 0, '0000-00-00 00:00:00', 0, 1, ''),
(18, 1, 20, 'PDN', '2014-06-23', 74, 16, 0, 1, 1, 0, 'dsd', 0, 0, 12, '0', 0.72, 12.72, 0, 16, '2014-06-23 03:37:06', 0, '0000-00-00 00:00:00', 0, 1, ''),
(19, 1, 20, 'PDN', '2014-06-23', 74, 16, 0, 1, 1, 0, 'dsd', 0, 0, 12, '0', 0.72, 12.72, 0, 16, '2014-06-23 03:38:33', 0, '0000-00-00 00:00:00', 0, 1, ''),
(20, 1, 20, 'PDN', '2014-06-23', 74, 16, 0, 1, 1, 0, 'dsd', 0, 0, 12, '0', 0.72, 12.72, 0, 16, '2014-06-23 03:39:30', 0, '0000-00-00 00:00:00', 0, 1, ''),
(21, 1, 1, 'PDN', '2014-06-23', 71, 1, 0, 1, 1, 0, '', 0, 0, 12, '0', 0, 12, 0, 16, '2014-06-23 03:50:34', 0, '0000-00-00 00:00:00', 0, 1, ''),
(22, 1, 1, 'PDN', '2014-06-23', 71, 1, 0, 1, 1, 0, 'ccxc', 0, 0, 156, '0', 0.72, 156.72, 0, 16, '2014-06-23 04:20:21', 0, '2014-06-23 04:20:39', 0, 1, ''),
(23, 1, 1, 'PDN', '2014-06-23', 71, 1, 0, 1, 1, 0, '', 0, 0, 265, '0', 24.54, 289.53999999999996, 0, 16, '2014-06-23 04:25:24', 0, '2014-06-23 04:25:38', 0, 1, ''),
(24, 1, 20, 'PDN', '2014-06-23', 74, 15, 0, 1, 1, 0, 'fac sfa', 0, 0, 12, '0', 0.72, 12.72, 0, 16, '2014-06-23 09:47:53', 0, '0000-00-00 00:00:00', 0, 1, ''),
(25, 1, 1, 'PDN', '2014-06-23', 71, 16, 0, 1, 1, 0, '', 0, 0, 1, '0', 0.06, 1.06, 0, 16, '2014-06-23 09:50:16', 0, '0000-00-00 00:00:00', 0, 1, ''),
(26, 1, 1, 'PDN', '2014-06-23', 71, 10, 0, 1, 1, 0, 'sa DEc', 0, 0, 1596, '0', 72, 1668, 0, 16, '2014-06-23 10:35:58', 0, '2014-06-23 10:36:38', 0, 1, ''),
(27, 1, 23, 'PCN', '2014-06-23', 93, 2, 0, 0, 3.6, 0, '', 0, 0, 144, '0', 0, 0, 0, 16, '2014-06-23 10:38:49', 0, '2014-06-23 10:38:59', 0, 1, ''),
(28, 1, 1, 'PCN', '2014-06-23', 71, 1, 0, 0, 1, 0, 'SDSD', 0, 0, 144, '0', 8.64, 0, 0, 16, '2014-06-23 10:48:49', 0, '2014-06-23 10:49:09', 0, 1, ''),
(29, 1, 1, 'PCN', '2014-06-23', 71, 16, 0, 0, 1, 0, 'SSDS', 0, 0, 2345, '0', 0, 2345, 0, 16, '2014-06-23 10:56:46', 0, '0000-00-00 00:00:00', 0, 1, ''),
(30, 1, 1, 'PDN', '2014-06-24', 71, 1, 0, 0, 0, 0, '', 0, 0, 26, '0', 1.56, 0, 0, 16, '2014-06-24 04:21:28', 0, '2014-07-04 07:40:27', 0, 1, ''),
(31, 1, 1, 'PDN', '2014-06-24', 71, 17, 0, 0, 12, 0, 'wdee', 0, 0, 125, '0', 7.32, 0, 0, 16, '2014-06-24 04:53:19', 0, '2014-06-24 04:54:10', 0, 1, '');

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

--
-- 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,
  `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=48 ;

--
-- Dumping data for table `comp_supplier_debitnote_charges`
--

INSERT INTO `comp_supplier_debitnote_charges` (`ID`, `debitNoteID`, `lineNo`, `accountNoID`, `itemname`, `itemdescription`, `quantity`, `unitPrice`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `drAccountID`, `crAccountID`, `drTaxAccountID`, `crTaxAccountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(26, 19, 1, 102, '', 'qwq', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 0, '2014-06-23 03:38:33', 0, '0000-00-00 00:00:00'),
(27, 20, 1, 102, '', 'qwq', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 0, '2014-06-23 03:39:30', 0, '0000-00-00 00:00:00'),
(28, 27, 1, 102, '', 'qwq', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 0, '2014-06-23 03:39:47', 0, '0000-00-00 00:00:00'),
(29, 21, 1, 100, '', 'sd', 0, 0, 12, 4, 0, 0, 12, 0, 0, 0, 0, 0, '2014-06-23 03:50:34', 0, '0000-00-00 00:00:00'),
(30, 22, 1, 101, '', 'sdsd', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 0, '2014-06-23 04:20:39', 0, '0000-00-00 00:00:00'),
(31, 0, 2, 102, '', 'aasa', 0, 0, 12, 18, 0, 0.72, 12.72, 0, 0, 0, 0, 0, '2014-06-23 04:21:37', 0, '0000-00-00 00:00:00'),
(32, 23, 1, 101, '', '121as', 0, 0, 121, 1, 0, 7.26, 128.26, 0, 0, 0, 0, 0, '2014-06-23 04:25:38', 0, '0000-00-00 00:00:00'),
(33, 24, 1, 102, '', '12sds', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 0, '2014-06-23 09:47:53', 0, '0000-00-00 00:00:00'),
(34, 25, 1, 102, '', 'asa', 0, 0, 1, 1, 0, 0.06, 1.06, 0, 0, 0, 0, 0, '2014-06-23 09:50:16', 0, '0000-00-00 00:00:00'),
(35, 26, 1, 102, '', 'ASA', 0, 0, 12, 4, 0, 0, 12, 0, 0, 0, 0, 16, '2014-06-23 10:36:38', 0, '0000-00-00 00:00:00'),
(36, 0, 2, 102, '', 'ASA', 0, 0, 1, 12, 0, 0.05, 1.05, 0, 0, 0, 0, 16, '2014-06-23 10:36:55', 0, '0000-00-00 00:00:00'),
(37, 30, 1, 101, '', '1sdas', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 16, '2014-06-24 04:35:41', 0, '0000-00-00 00:00:00'),
(38, 0, 2, 97, '', 'xad', 0, 0, 1, 3, 0, 0, 1, 0, 0, 0, 0, 16, '2014-06-24 04:49:56', 0, '0000-00-00 00:00:00'),
(39, 31, 1, 99, '', 'sdaqw', 0, 0, 2, 14, 0, 7.32, 129.32, 0, 0, 0, 0, 16, '2014-06-24 04:53:20', 16, '2014-06-24 06:19:19'),
(40, 31, 2, 85, '', '2323211', 0, 0, 122, 13, 0, 12, 3, 0, 0, 0, 0, 16, '2014-06-24 04:53:42', 16, '2014-06-24 06:35:37'),
(41, 0, 2, 102, '', 'SDS', 0, 0, 12, 4, 0, 0, 12, 0, 0, 0, 0, 16, '2014-07-04 06:39:50', 0, '0000-00-00 00:00:00'),
(42, 0, 2, 101, '', 'SD', 0, 0, 1, 1, 0, 0.06, 1.06, 0, 0, 0, 0, 16, '2014-07-04 06:40:41', 0, '0000-00-00 00:00:00'),
(43, 30, 2, 101, '', 'asa', 0, 0, 1, 1, 0, 0.06, 1.06, 0, 0, 0, 0, 16, '2014-07-04 06:44:55', 0, '0000-00-00 00:00:00'),
(47, 30, 3, 101, '', 'vvc', 0, 0, 1, 1, 0, 0.06, 1.06, 0, 0, 0, 0, 16, '2014-07-04 07:25:54', 0, '0000-00-00 00:00:00');

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

--
-- 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,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text 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=45 ;

--
-- Dumping data for table `comp_supplier_debitnote_detail`
--

INSERT INTO `comp_supplier_debitnote_detail` (`ID`, `debitnoteID`, `lineNo`, `itemID`, `itemname`, `itemdescription`, `quantity`, `unitPrice`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `accountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 1, 4, 'Plastic Chair - Blue', '331000100', 1, 300, 300, 1, 6, 18, 318, 0, 0, '2014-06-17 11:21:33', 0, '0000-00-00 00:00:00'),
(2, 1, 2, 8, 'Plastic Chair - White', '331000300', 1, 450, 450, 28, 10, 45, 495, 0, 0, '2014-06-17 11:21:35', 0, '0000-00-00 00:00:00'),
(3, 2, 1, 10, 'Bola Tampar Buaya', 'B01', 3, 10, 30, 0, 0, 0, 30, 0, 0, '2014-06-17 11:21:37', 0, '0000-00-00 00:00:00'),
(4, 3, 1, 2, 'Steel chair for outdoor', 'B13 Steel Chair', 2, 1, 2, 1, 6, 0.12, 2.12, 0, 16, '2014-06-17 11:21:38', 0, '0000-00-00 00:00:00'),
(5, 4, 1, 2, 'Steel chair for outdoor', 'B13 Steel Chair', 2, 12, 24, 1, 6, 1.44, 25.44, 0, 16, '2014-06-17 11:21:40', 0, '0000-00-00 00:00:00'),
(6, 4, 2, 1, 'Teak wooden chair with natural finish', 'A12 Wooden Chair', 1, 1, 1, 0, 1, 0.01, 1.01, 0, 16, '2014-06-17 11:21:41', 0, '0000-00-00 00:00:00'),
(7, 5, 1, 4, 'Plastic Chair - Blue', 'A23 Plastic Chair', 3, 3, 9, 1, 6, 0.54, 9.54, 0, 16, '2014-06-17 11:21:43', 0, '0000-00-00 00:00:00'),
(8, 7, 0, 4, '', 'Plastic Chair - Blue', 12, 12, 0, 1, 6, 0, 0, 0, 16, '2014-06-21 05:08:45', 0, '0000-00-00 00:00:00'),
(9, 8, 0, 1, '', 'Teak wooden chair with natural finish', 12, 12, 0, 1, 6, 0, 0, 0, 16, '2014-06-21 05:17:14', 0, '0000-00-00 00:00:00'),
(10, 8, 0, 1, '', 'Teak wooden chair with natural finish', 12, 12, 0, 14, 6, 0, 0, 0, 16, '2014-06-21 05:17:42', 0, '0000-00-00 00:00:00'),
(11, 9, 0, 1, '', 'Teak wooden chair with natural finish', 1, 1200, 0, 1, 6, 0, 0, 0, 16, '2014-06-21 05:43:08', 0, '0000-00-00 00:00:00'),
(12, 10, 0, 1, '', 'Teak wooden chair with natural finish', 12, 0, 0, 3, 0, 0, 0, 0, 16, '2014-06-21 07:06:53', 0, '0000-00-00 00:00:00'),
(13, 10, 0, 1, '', 'Teak wooden chair with natural finish', 1, 12, 0, 6, 0, 0, 0, 0, 16, '2014-06-21 07:07:12', 0, '0000-00-00 00:00:00'),
(14, 10, 0, 8, '', 'Plastic Chair - White', 2, 0, 0, 3, 0, 0, 0, 0, 16, '2014-06-21 07:07:53', 0, '0000-00-00 00:00:00'),
(15, 11, 0, 7, '', 'Plastic Chair - Red', 1, 2345, 0, 0, 12, 0, 0, 0, 16, '2014-06-21 07:23:44', 0, '0000-00-00 00:00:00'),
(16, 12, 0, 7, '', 'Plastic Chair - Red', 12, 2345, 28140, 0, 1, 281.4, 28421.4, 0, 16, '2014-06-21 07:41:36', 0, '0000-00-00 00:00:00'),
(17, 13, 0, 8, '', 'Plastic Chair - White', 12, 1, 12, 28, 0, 0, 12, 0, 16, '2014-06-21 07:49:31', 0, '0000-00-00 00:00:00'),
(18, 13, 0, 9, '', 'Nasi Goreng Ayam', 21, 1, 0, 26, 2, 0, 0, 0, 16, '2014-06-21 07:49:54', 0, '0000-00-00 00:00:00'),
(19, 13, 0, 8, '', 'Plastic Chair - White', 12, 12, 0, 28, 0, 0, 0, 0, 16, '2014-06-21 08:10:23', 0, '0000-00-00 00:00:00'),
(20, 14, 0, 1, '', 'Teak wooden chair with natural finish', 2, 1, 2, 0, 6, 0.12, 2.12, 0, 16, '2014-06-21 08:21:50', 0, '0000-00-00 00:00:00'),
(21, 15, 1, 1, '0', 'Teak wooden chair with natural finish', 12, 12, 144, 13, 6, 8.64, 152.64, 0, 16, '2014-06-23 01:57:22', 16, '0000-00-00 00:00:00'),
(22, 15, 2, 8, '0', 'Plastic Chair - White', 12, 3244, 38928, 28, 1, 389.28, 39317.28, 0, 16, '2014-06-23 01:57:30', 16, '0000-00-00 00:00:00'),
(23, 15, 3, 10, '0', 'Bola Tampar Buaya', 22, 12, 264, 13, 1, 2.64, 266.64, 0, 16, '2014-06-23 01:57:39', 16, '0000-00-00 00:00:00'),
(24, 15, 4, 8, '', 'Plastic Chair - White', 23, 12, 276, 28, 12, 33.12, 309.12, 0, 16, '2014-06-21 08:59:54', 0, '0000-00-00 00:00:00'),
(25, 29, 1, 7, '', 'Plastic Chair - Red', 1, 2345, 2345, 0, 0, 0, 2345, 0, 16, '2014-06-23 03:51:06', 0, '0000-00-00 00:00:00'),
(26, 22, 1, 4, '', 'Plastic Chair - Blue', 12, 12, 144, 4, 0, 0, 144, 0, 16, '2014-06-23 04:20:21', 0, '0000-00-00 00:00:00'),
(27, 23, 1, 1, '', 'Teak wooden chair with natural finish', 12, 12, 144, 7, 12, 17.28, 161.28, 0, 16, '2014-06-23 04:25:24', 0, '0000-00-00 00:00:00'),
(28, 0, 1, 7, '', 'Plastic Chair - Red', 9, 2345, 21105, 0, 0, 0, 21105, 0, 16, '2014-06-23 08:51:32', 0, '0000-00-00 00:00:00'),
(29, 26, 1, 4, '', 'Plastic Chair - Blue', 12, 12, 144, 3, 0, 0, 144, 0, 16, '2014-06-23 10:35:58', 0, '0000-00-00 00:00:00'),
(30, 26, 2, 1, '', 'Teak wooden chair with natural finish', 12, 120, 1440, 12, 5, 72, 1512, 0, 16, '2014-06-23 10:36:24', 0, '0000-00-00 00:00:00'),
(31, 27, 1, 1, '', 'Teak wooden chair with natural finish', 12, 12, 144, 3, 0, 0, 144, 0, 16, '2014-06-23 10:38:49', 0, '0000-00-00 00:00:00'),
(32, 27, 2, 10, '', 'Bola Tampar Buaya', 1, 111, 111, 0, 6, 6.66, 117.66, 0, 16, '2014-06-23 10:38:59', 0, '0000-00-00 00:00:00'),
(33, 0, 3, 2, '', 'Steel chair for outdoor', 12, 3244, 38928, 1, 0, 0, 38928, 0, 16, '2014-06-23 10:41:59', 0, '0000-00-00 00:00:00'),
(34, 28, 1, 4, '', 'Plastic Chair - Blue', 12, 12, 144, 13, 6, 8.64, 152.64, 0, 16, '2014-06-23 10:48:49', 0, '0000-00-00 00:00:00'),
(35, 28, 2, 7, '', 'Plastic Chair - Red', 1, 2345, 2345, 0, 0, 0, 2345, 0, 16, '2014-06-23 10:49:09', 0, '0000-00-00 00:00:00'),
(36, 29, 1, 7, '', 'Plastic Chair - Red', 1, 2345, 2345, 0, 0, 0, 2345, 0, 16, '2014-06-23 10:56:46', 0, '0000-00-00 00:00:00'),
(37, 30, 1, 4, '', 'Plastic Chair - Blue', 1, 1, 1, 1, 0, 0, 1, 0, 16, '2014-07-04 07:39:00', 16, '0000-00-00 00:00:00'),
(38, 31, 1, 7, '', 'Plastic Chair - Red', 1, 2345, 2345, 0, 12, 281.4, 2626.4, 0, 16, '2014-06-24 04:54:10', 0, '0000-00-00 00:00:00'),
(40, 30, 2, 1, '', 'Teak wooden chair with natural finish', 1, 1, 1, 0, 6, 0.06, 1.06, 0, 16, '2014-07-04 07:45:05', 0, '0000-00-00 00:00:00'),
(41, 30, 3, 1, '', 'Teak wooden chair with natural finish', 1, 1, 1, 0, 6, 0.06, 1.06, 0, 16, '2014-07-04 07:54:53', 0, '0000-00-00 00:00:00'),
(43, 30, 4, 1, '', 'Teak wooden chair with natural finish', 1, 1, 1, 0, 6, 0.06, 1.06, 0, 16, '2014-07-04 07:57:03', 0, '0000-00-00 00:00:00');

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

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

CREATE TABLE IF NOT EXISTS `comp_supplier_invoice` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `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`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=150 ;

--
-- Dumping data for table `comp_supplier_invoice`
--

INSERT INTO `comp_supplier_invoice` (`ID`, `companyID`, `purchaseInvoiceCodeID`, `purchaserID`, `supplierID`, `formNo`, `invoiceDate`, `supplierInvoiceNo`, `projectID`, `termsID`, `shipToID`, `locationID`, `currencyID`, `exchangeRate`, `agentID`, `memo`, `employeeID`, `shippingMethodID`, `totalAmount`, `amountPaid`, `totalTaxAmount`, `totalPayable`, `total`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `updateAble`, `journalNo`) VALUES
(71, 1, 1, 0, 1, 'PI2014 - invoice', '2013-04-22', 'apr 2013', 2, 7, 1, 1, 1, 1, 0, '', 0, 0, 0, '301', 0, -301, 0, 0, '2014-05-22 03:06:36', 0, '2014-06-17 10:20:43', 0, 1, ''),
(72, 1, 1, 0, 1, 'PI2014nasi goreng', '2013-05-22', 'may 2013', 1, 5, 1, 1, 1, 1, 0, '', 0, 0, 0, '2', 0, -2, 0, 0, '2014-05-22 03:09:47', 0, '2014-06-17 10:20:49', 0, 1, ''),
(73, 1, 2, 0, 1, 'sds', '2013-06-22', 'jun 2013', 2, 5, 1, 1, 1, 1, 0, '', 0, 0, 0, '2', 0, -2, 0, 0, '2014-05-22 03:23:12', 0, '2014-06-17 10:23:17', 0, 1, ''),
(74, 1, 2, 0, 20, 'PI2tr14nasi goreng', '2013-07-22', 'jul 2013', 2, 6, 1, 1, 1, 1, 0, '', 0, 0, 0, '22', 0, -22, 0, 0, '2014-05-22 03:31:55', 0, '2014-06-17 10:23:19', 0, 1, ''),
(75, 1, 2, 0, 1, 'A', '2013-08-22', 'aug 2013', 1, 6, 1, 1, 1, 1, 0, '', 0, 0, 0, '2', 0, -2, 0, 0, '2014-05-22 03:42:36', 0, '2014-06-17 10:23:20', 0, 1, ''),
(76, 1, 2, 0, 20, 'PI2014nasi goreng', '2013-09-22', 'sept 2013', 1, 5, 1, 1, 1, 1, 0, '', 0, 0, 0, '0', 0, 25580, 0, 0, '2014-05-22 03:51:54', 0, '2014-06-17 10:23:20', 0, 1, ''),
(77, 1, 2, 0, 1, 'PI2014nasi goreng', '2013-10-22', 'oct 2013', 1, 5, 1, 1, 1, 1, 0, '', 0, 0, 0, '2', 0, -2, 0, 0, '2014-05-22 03:58:24', 0, '2014-06-17 10:23:21', 0, 1, ''),
(78, 1, 2, 0, 1, 'df', '2013-11-22', 'nov 2013', 1, 5, 1, 0, 1, 1, 0, '', 0, 0, 0, '2', 0, 11.66, 0, 0, '2014-05-22 04:01:44', 0, '2014-06-17 10:23:21', 0, 1, ''),
(79, 1, 2, 0, 1, 'PI2014nasi goreng', '2013-12-22', 'dec 2013', 1, 5, 1, 0, 1, 1, 0, '', 0, 0, 0, '2', 0, -2, 0, 0, '2014-05-22 04:15:09', 0, '2014-06-17 10:23:22', 0, 1, ''),
(80, 1, 2, 0, 1, 'PI2014nasi goreng', '2014-01-22', ' jan 2014.', 2, 6, 1, 2, 1, 1, 0, '', 0, 0, 0, '5', 0, -4, 0, 0, '2014-05-22 11:17:23', 0, '2014-06-17 10:23:23', 0, 1, ''),
(81, 1, 2, 0, 1, 'as', '2014-02-13', 'feb 2014', 1, 5, 1, 1, 1, 1, 0, '', 0, 0, 0, '5', 0, -4, 0, 0, '2014-05-23 07:34:21', 0, '2014-06-17 10:23:24', 0, 1, ''),
(82, 1, 2, 0, 1, 'PI2014-82', '2014-03-07', 'mac 2014', 2, 5, 1, 1, 1, 1, 0, 'xcxx', 0, 0, 100700, '35', 0, 100665, 0, 0, '2014-05-29 01:25:00', 0, '2014-06-17 10:23:24', 0, 1, ''),
(83, 1, 2, 0, 1, 'PI2014nasi goreng', '2014-04-29', 'apr 2014', 1, 5, 1, 1, 1, 1, 0, 'sdsdsd', 0, 0, 0, '5', 0, 100000, 0, 0, '2014-05-29 01:27:20', 0, '2014-06-17 10:23:25', 0, 1, ''),
(84, 1, 2, 7, 1, 'PI2014nasi goreng', '2014-05-29', 'fd', 1, 5, 1, 1, 1, 1, 0, 'dfsger', 0, 73, 0, '5', 30, 100000, 0, 0, '2014-05-29 01:33:15', 0, '2014-07-01 08:51:37', 0, 1, ''),
(85, 1, 2, 6, 1, 'PI2014nasi goreng', '2014-06-03', '006', 1, 5, 1, 1, 1, 1, 0, '', 0, 7, 0, '0', 0, 6100, 0, 0, '2014-06-03 03:30:34', 0, '2014-06-17 10:23:26', 0, 1, ''),
(86, 1, 2, 9, 1, 'PI2014nasi goreng', '2014-06-03', 'supplier invoice no 00000011111', 2, 5, 3, 1, 1, 1, 0, '', 0, 6, 0, '0', 0, 473.82, 0, 0, '2014-06-03 10:38:31', 0, '2014-06-17 10:23:26', 0, 1, ''),
(87, 1, 2, 9, 1, 'PI2014', '2014-06-04', '34ssss', 2, 6, 4, 1, 1, 1, 0, '', 0, 4, 0, '0', 0, 154, 0, 0, '2014-06-04 11:06:46', 0, '2014-06-17 10:23:27', 0, 1, ''),
(88, 1, 2, 7, 1, 'PI2014', '2014-06-11', 'wew', 1, 5, 2, 1, 1, 1, 0, 'sds', 0, 3, 0, '0', 0, 13.780000000000001, 0, 0, '2014-06-11 12:13:17', 0, '2014-06-17 11:02:53', 0, 1, ''),
(89, 1, 2, 6, 1, 'PI2014', '2014-06-18', 'sd', 1, 5, 1, 1, 0, 2, 0, 'dsds', 0, 73, 0, '0', 0, 0, 0, 0, '2014-06-18 09:09:02', 0, '0000-00-00 00:00:00', 0, 1, ''),
(90, 1, 2, 6, 20, 'PI2014', '2014-06-18', '.,mjl;l', 1, 5, 1, 1, 0, 1, 0, 'uiuop', 0, 5, 0, '0', 0, 0, 0, 0, '2014-06-18 09:40:46', 0, '0000-00-00 00:00:00', 0, 1, ''),
(91, 1, 2, 6, 1, 'PI2014', '2014-06-18', 'da', 1, 6, 3, 1, 0, 1, 0, 'asaaa', 0, 73, 0, '0', 0, 0, 0, 0, '2014-06-18 10:11:37', 0, '0000-00-00 00:00:00', 0, 1, ''),
(92, 1, 2, 7, 1, 'PI2014', '2014-06-18', 'da', 1, 5, 1, 1, 0, 1, 0, 'asa', 0, 74, 0, '0', 0, 0, 0, 0, '2014-06-18 10:27:37', 0, '0000-00-00 00:00:00', 0, 1, ''),
(93, 1, 2, 7, 1, 'PI2014', '2014-06-19', 'qeq', 10, 6, 5, 1, 0, 1, 0, 'acw weqwq', 0, 73, 0, '0', 0, 133.72, 0, 0, '2014-06-19 01:02:31', 0, '2014-06-19 01:03:37', 0, 1, ''),
(94, 1, 2, 7, 1, 'PI2014', '2014-06-19', 'qwq', 16, 7, 1, 1, 0, 1, 0, 'adwe', 0, 5, 0, '0', 0, 0, 0, 0, '2014-06-19 01:09:11', 0, '0000-00-00 00:00:00', 0, 1, ''),
(95, 1, 2, 7, 1, 'PI2014', '2014-06-19', 'asq', 1, 5, 1, 1, 0, 1, 0, 'sdq', 0, 73, 0, '0', 0, 12.72, 0, 0, '2014-06-19 01:27:02', 0, '2014-06-19 01:28:57', 0, 1, ''),
(96, 1, 2, 6, 1, 'PI2014', '2014-06-19', 'wqw', 1, 5, 1, 1, 0, 1, 0, 'weqwq', 0, 5, 0, '0', 0, 12, 0, 0, '2014-06-19 01:37:31', 0, '2014-06-19 01:38:49', 0, 1, ''),
(97, 1, 2, 7, 1, 'PI2014', '2014-06-19', 'dwe', 10, 5, 1, 1, 0, 1, 0, '21da', 0, 74, 0, '0', 0, 62, 0, 0, '2014-06-19 01:59:53', 0, '2014-06-21 00:56:12', 0, 1, ''),
(98, 1, 2, 7, 1, 'PI2014', '2014-06-20', '90', 1, 5, 3, 1, 0, 1, 0, 'kjl;', 0, 6, 0, '0', 0, 839.52, 0, 0, '2014-06-20 09:36:39', 0, '2014-06-20 09:36:39', 0, 1, ''),
(99, 1, 2, 6, 1, 'PI2014', '2014-06-23', 'jklk', 16, 6, 1, 1, 0, 1, 0, 'lkl', 0, 5, 0, '0', 0, 0, 0, 0, '2014-06-23 03:21:52', 0, '0000-00-00 00:00:00', 0, 1, ''),
(100, 1, 2, 7, 1, 'PI2014', '2014-06-24', '234234', 1, 6, 2, 1, 0, 0, 0, '', 0, 73, 0, '0', 0, 103180, 0, 16, '2014-06-24 08:19:17', 16, '2014-06-24 08:20:48', 0, 1, ''),
(101, 1, 2, 7, 1, 'PI2014', '2014-06-26', 'kl09887', 1, 5, 2, 1, 0, 1, 0, '', 0, 5, 0, '0', 0, 28149.54, 0, 16, '2014-06-26 06:44:47', 16, '2014-06-26 06:45:10', 0, 1, ''),
(102, 15, 2, 12, 26, 'PI2014', '2014-07-01', 'sup inv 321', 19, 5, 1, 3, 0, 1, 0, '', 0, 5, 0, '0', 0, 7332.6, 0, 16, '2014-07-01 05:04:07', 16, '2014-07-01 05:04:07', 0, 1, ''),
(103, 1, 2, 7, 1, 'PI2014', '2014-07-04', 'as', 1, 5, 1, 1, 0, 1, 0, 'sdsd', 0, 74, 0, '0', 0, 122.84, 0, 16, '2014-07-04 00:14:51', 16, '2014-07-04 01:24:05', 0, 1, ''),
(104, 1, 2, 6, 1, 'PI2014', '2014-05-26', '2452354', 1, 5, 1, 0, 0, 1, 0, 'dfa dfasfd ', 0, 3, 0, '0', 0, 0, 0, 16, '2014-07-07 02:45:16', 0, '0000-00-00 00:00:00', 0, 1, ''),
(105, 1, 2, 6, 1, 'PI2014', '2014-05-26', '24', 1, 5, 1, 0, 0, 1, 0, 'we rtwe r', 0, 6, 0, '0', 0, 0, 0, 16, '2014-07-07 02:46:54', 0, '0000-00-00 00:00:00', 0, 1, ''),
(106, 1, 2, 6, 1, 'PI2014', '2014-05-26', '345234', 1, 5, 1, 0, 0, 1, 0, 'afsdasdf asdf asfd', 0, 3, 0, '0', 0, 0, 0, 16, '2014-07-07 03:44:54', 0, '0000-00-00 00:00:00', 0, 1, ''),
(107, 1, 2, 6, 1, 'PI2014', '2014-05-26', '345234', 1, 5, 1, 0, 0, 1, 0, 'afsdasdf asdf asfd', 0, 3, 0, '0', 0, 0, 0, 16, '2014-07-07 03:45:03', 0, '0000-00-00 00:00:00', 0, 1, ''),
(108, 1, 2, 6, 1, 'PI2014', '2014-05-26', '0', 17, 5, 1, 0, 0, 1, 0, 'zcsdfas', 0, 74, 0, '0', 0, 0, 0, 16, '2014-07-07 03:47:27', 0, '0000-00-00 00:00:00', 0, 1, ''),
(109, 1, 2, 6, 1, 'PI2014', '2014-05-26', '342', 1, 5, 1, 0, 0, 1, 0, '', 0, 74, 0, '0', 0, 0, 0, 16, '2014-07-07 03:48:51', 0, '0000-00-00 00:00:00', 0, 1, ''),
(112, 1, 1, 6, 0, 'PI2014', '2014-05-26', '0', 10, 5, 1, 1, 0, 1, 0, 'WAE DADFSDF ASDFASFD ', 6, 74, 345, '0', 20.7, 365.7, 0, 16, '2014-07-07 04:59:30', 0, '0000-00-00 00:00:00', 0, 1, ''),
(113, 1, 1, 6, 0, 'PI2014', '2014-05-26', '0', 10, 5, 1, 1, 0, 1, 0, 'WAE DADFSDF ASDFASFD ', 6, 74, 345, '0', 20.7, 365.7, 0, 16, '2014-07-07 05:01:40', 0, '0000-00-00 00:00:00', 0, 1, ''),
(114, 1, 1, 6, 0, 'PI2014', '2014-05-26', '0', 10, 5, 1, 1, 0, 1, 0, 'WAE DADFSDF ASDFASFD ', 6, 74, 345, '0', 20.7, 365.7, 0, 16, '2014-07-07 05:03:39', 0, '0000-00-00 00:00:00', 0, 1, ''),
(115, 1, 1, 6, 0, 'PI2014', '2014-05-26', '0', 1, 5, 1, 1, 0, 1, 0, '', 6, 5, 345, '0', 20.7, 365.7, 0, 16, '2014-07-07 05:05:18', 0, '0000-00-00 00:00:00', 0, 1, ''),
(116, 1, 1, 6, 0, 'PI2014', '2014-05-26', '0', 1, 5, 1, 1, 0, 1, 0, '', 6, 5, 345, '0', 20.7, 365.7, 0, 16, '2014-07-07 05:07:02', 0, '0000-00-00 00:00:00', 0, 1, ''),
(117, 1, 1, 6, 0, 'PI2014', '2014-05-26', '0', 1, 5, 1, 1, 0, 1, 0, '', 6, 74, 345, '0', 20.7, 365.7, 0, 16, '2014-07-07 05:09:32', 0, '0000-00-00 00:00:00', 0, 1, ''),
(118, 1, 1, 6, 0, 'PI2014', '2014-05-26', '0', 1, 5, 1, 1, 0, 1, 0, '', 6, 74, 345, '0', 20.7, 365.7, 0, 16, '2014-07-07 05:10:16', 0, '0000-00-00 00:00:00', 0, 1, ''),
(119, 1, 1, 6, 0, 'PI2014', '2014-05-26', '0', 1, 5, 1, 1, 0, 1, 0, '', 6, 74, 345, '0', 20.7, 365.7, 0, 16, '2014-07-07 05:10:31', 0, '0000-00-00 00:00:00', 0, 1, ''),
(120, 1, 1, 6, 0, 'PI2014', '2014-05-26', '0', 1, 5, 1, 1, 0, 1, 0, '', 6, 74, 345, '0', 20.7, 365.7, 0, 16, '2014-07-07 05:10:48', 0, '0000-00-00 00:00:00', 0, 1, ''),
(121, 1, 1, 6, 0, 'PI2014', '2014-05-26', '0', 10, 5, 1, 1, 0, 1, 0, 'qwefqwerwqr', 6, 73, 456, '0', 27.36, 483.36, 0, 16, '2014-07-07 05:13:10', 0, '0000-00-00 00:00:00', 0, 1, ''),
(122, 1, 1, 6, 0, 'PI2014', '2014-05-26', '0', 10, 5, 1, 1, 0, 1, 0, 'qwefqwerwqr', 6, 73, 456, '0', 27.36, 483.36, 0, 16, '2014-07-07 05:13:53', 0, '0000-00-00 00:00:00', 0, 1, ''),
(123, 1, 1, 6, 0, 'PI2014', '2014-05-26', '0', 1, 5, 1, 1, 0, 1, 0, '', 6, 6, 345, '0', 20.7, 365.7, 0, 16, '2014-07-07 05:15:55', 0, '0000-00-00 00:00:00', 0, 1, ''),
(124, 1, 1, 6, 1, 'PI2014', '2014-05-26', 'fghdfhg7464356', 10, 5, 1, 1, 0, 1, 0, '', 6, 6, 345, '0', 20.7, 365.7, 0, 16, '2014-07-07 05:21:03', 0, '0000-00-00 00:00:00', 0, 1, ''),
(125, 1, 1, 6, 1, 'PI2014', '2014-05-26', 'fghdfhg7464356', 10, 5, 1, 1, 0, 1, 0, '', 6, 6, 345, '0', 20.7, 365.7, 0, 16, '2014-07-07 05:23:41', 0, '0000-00-00 00:00:00', 0, 1, ''),
(126, 1, 1, 6, 1, 'PI2014', '2014-05-26', 'fghdfhg7464356', 10, 5, 1, 1, 0, 1, 0, '', 6, 6, 345, '0', 20.7, 365.7, 0, 16, '2014-07-07 05:24:45', 0, '0000-00-00 00:00:00', 0, 1, ''),
(127, 1, 1, 6, 1, 'PI2014', '2014-05-26', 'fghdfhg7464356', 10, 5, 1, 1, 0, 1, 0, '', 6, 6, 345, '0', 0, 836.78, 0, 16, '2014-07-07 05:39:00', 16, '2014-07-07 05:40:23', 0, 1, ''),
(128, 1, 1, 6, 1, 'PI2014', '2014-06-19', 'ert3453', 1, 6, 1, 1, 0, 1, 0, 'qw', 6, 73, 456, '0', 27.36, 483.36, 0, 16, '2014-07-07 05:43:02', 0, '0000-00-00 00:00:00', 0, 1, ''),
(129, 1, 1, 6, 1, 'PI2014', '2014-06-19', 'ert3453', 1, 6, 1, 1, 0, 1, 0, 'qw', 6, 73, 456, '0', 27.36, 483.36, 0, 16, '2014-07-07 05:43:24', 0, '0000-00-00 00:00:00', 0, 1, ''),
(130, 1, 1, 6, 1, 'PI2014', '2014-06-19', 'ert3453', 1, 6, 1, 1, 0, 1, 0, 'qw', 6, 73, 456, '0', 27.36, 483.36, 0, 16, '2014-07-07 05:43:34', 0, '0000-00-00 00:00:00', 0, 1, ''),
(131, 1, 1, 6, 1, 'PI2014', '2014-06-19', 'sdfg356345', 1, 5, 1, 1, 0, 1, 0, 'qw', 6, 5, 345, '0', 0, 1190.38, 0, 16, '2014-07-07 05:46:41', 16, '2014-07-07 05:49:43', 0, 1, ''),
(132, 1, 2, 7, 1, 'PI2014', '2014-07-07', '326523', 1, 5, 1, 0, 0, 1, 0, 'efgsdfg', 0, 4, 0, '0', 0, 0, 0, 16, '2014-07-07 05:51:45', 0, '0000-00-00 00:00:00', 0, 1, ''),
(133, 1, 2, 7, 1, 'PI2014', '2014-07-07', '326523', 1, 5, 1, 0, 0, 1, 0, 'efgsdfg', 0, 4, 0, '0', 0, 0, 0, 16, '2014-07-07 05:51:55', 0, '0000-00-00 00:00:00', 0, 1, ''),
(134, 1, 2, 7, 1, 'PI2014', '2014-07-07', 'wetwert326523', 1, 5, 1, 1, 0, 1, 0, 'efgsdfg', 0, 4, 0, '0', 0, 0, 0, 16, '2014-07-07 05:52:17', 16, '2014-07-07 05:52:18', 0, 1, ''),
(135, 1, 1, 7, 1, 'PI2014', '2014-06-20', 'xfgsd35365', 10, 5, 1, 1, 0, 1, 0, 'ASA', 7, 73, 4356, '0', 0, 5231.1, 0, 16, '2014-07-07 05:57:08', 16, '2014-07-07 05:57:31', 0, 1, ''),
(136, 1, 1, 6, 1, 'PI2014', '2014-05-26', 'sf3535634', 1, 6, 2, 1, 0, 1, 0, 'fsgdsfg', 6, 5, 567, '0', 34.02, 601.02, 0, 16, '2014-07-07 05:59:07', 0, '0000-00-00 00:00:00', 0, 1, ''),
(137, 1, 1, 6, 1, 'PI2014', '2014-05-26', 'sf3535634', 1, 6, 2, 1, 0, 1, 0, 'fsgdsfg', 6, 5, 567, '0', 34.02, 601.02, 0, 16, '2014-07-07 05:59:38', 0, '0000-00-00 00:00:00', 0, 1, ''),
(138, 1, 1, 7, 1, 'PI2014', '2014-05-26', 'sf3535634', 1, 6, 2, 1, 0, 1, 0, 'asa', 7, 5, 567, '0', 0, 483.36, 0, 16, '2014-07-07 06:00:01', 16, '2014-07-07 06:01:35', 0, 1, ''),
(139, 1, 1, 6, 1, 'PI2014', '2014-06-19', 'dafd2345234', 1, 5, 1, 1, 0, 1, 0, 'qw', 6, 3, 0, '0', 0, 0, 0, 16, '2014-07-07 06:17:13', 0, '0000-00-00 00:00:00', 0, 1, ''),
(140, 1, 1, 6, 1, 'PI2014', '2014-06-19', 'dafd2345234', 1, 5, 1, 1, 0, 1, 0, 'qw', 6, 3, 0, '0', 0, 0, 0, 16, '2014-07-07 06:17:37', 0, '0000-00-00 00:00:00', 0, 1, ''),
(141, 1, 1, 6, 1, 'PI2014', '2014-06-19', 'dafd2345234', 1, 5, 1, 1, 0, 1, 0, 'qw', 6, 3, 0, '0', 0, 0, 0, 16, '2014-07-07 06:17:43', 0, '0000-00-00 00:00:00', 0, 1, ''),
(142, 1, 1, 6, 1, 'PI2014', '2014-06-19', 'zsfsf324523', 1, 5, 1, 1, 0, 1, 0, 'qw', 6, 74, 0, '0', 0, 0, 0, 16, '2014-07-07 06:20:29', 0, '0000-00-00 00:00:00', 0, 1, ''),
(143, 1, 1, 6, 1, 'PI2014', '2014-06-19', 'zsfsf324523', 1, 5, 1, 1, 0, 1, 0, 'qw', 6, 74, 0, '0', 0, 0, 0, 16, '2014-07-07 06:20:40', 0, '0000-00-00 00:00:00', 0, 1, ''),
(144, 1, 1, 6, 1, 'PI2014', '2014-06-19', 'zsfsf324523', 1, 5, 1, 1, 0, 1, 0, 'qw', 6, 74, 0, '0', 0, 0, 0, 16, '2014-07-07 06:21:36', 0, '0000-00-00 00:00:00', 0, 1, ''),
(145, 1, 1, 6, 1, 'PI2014', '2014-06-19', 'dfgd345634', 1, 5, 2, 1, 0, 1, 0, 'qw', 6, 3, 0, '0', 0, 0, 0, 16, '2014-07-07 06:22:37', 0, '0000-00-00 00:00:00', 0, 1, ''),
(146, 1, 1, 7, 20, 'PI2014', '2014-05-26', 'sdfgsd3456346', 17, 7, 2, 1, 0, 1, 0, 'sdsd', 7, 74, 0, '0', 0, 0, 0, 16, '2014-07-07 06:27:14', 0, '0000-00-00 00:00:00', 0, 1, ''),
(147, 1, 1, 7, 20, 'PI2014', '2014-05-26', 'sdfgsd3456346', 17, 7, 2, 1, 0, 1, 0, 'sdsd', 7, 74, 0, '0', 0, 0, 0, 16, '2014-07-07 06:28:19', 0, '0000-00-00 00:00:00', 0, 1, ''),
(148, 1, 1, 7, 1, 'PI2014', '2014-06-12', 'asdfasfd23452354', 1, 5, 2, 1, 0, 1, 0, 'ww', 7, 74, 0, '0', 0, 0, 0, 16, '2014-07-07 06:48:23', 0, '0000-00-00 00:00:00', 0, 1, ''),
(149, 1, 1, 7, 20, 'PI2014', '2014-06-02', 'dfsagf2353', 1, 5, 1, 1, 0, 1, 0, '', 7, 74, 0, '0', 0, 0, 0, 16, '2014-07-07 06:49:31', 0, '0000-00-00 00:00:00', 0, 1, '');

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

--
-- 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,
  `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=54 ;

--
-- Dumping data for table `comp_supplier_invoice_charges`
--

INSERT INTO `comp_supplier_invoice_charges` (`ID`, `invoiceID`, `lineNo`, `accountNoID`, `chargeDescription`, `itemname`, `itemdescription`, `quantity`, `unitPrice`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `drAccountID`, `crAccountID`, `drTaxAccountID`, `crTaxAccountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(19, 88, 1, 101, '', '', 'sds', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 0, '2014-06-11 12:13:28', 0, '2014-06-18 02:00:50'),
(20, 93, 1, 101, '', '', 'qwqwq', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 0, '2014-06-19 01:03:13', 0, '0000-00-00 00:00:00'),
(21, 93, 2, 100, '', '', '1213 weq', 0, 0, 121, 5, 0, 0, 121, 0, 0, 0, 0, 0, '2014-06-19 01:03:36', 0, '0000-00-00 00:00:00'),
(22, 95, 1, 101, '', '', 'qwq', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 0, '2014-06-19 01:28:57', 0, '0000-00-00 00:00:00'),
(23, 96, 1, 102, '', '', 'qwq', 0, 0, 12, 4, 0, 0, 12, 0, 0, 0, 0, 0, '2014-06-19 01:38:49', 0, '0000-00-00 00:00:00'),
(24, 97, 1, 101, '', '', 'gcfdzhsKL;ASKJV', 0, 0, 12, 1, 0, 0.72, 12.72, 0, 0, 0, 0, 0, '2014-06-19 02:14:49', 0, '2014-06-19 05:31:57'),
(25, 97, 2, 101, '', '', 'FVFBSG', 0, 0, 12313, 1, 0, 738.78, 13051.78, 0, 0, 0, 0, 0, '2014-06-19 06:13:18', 0, '0000-00-00 00:00:00'),
(26, 103, 0, 100, '', '', 'df desfr', 0, 0, 1, 5, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-04 01:03:16', 0, '0000-00-00 00:00:00'),
(27, 103, 1, 101, '', '', 'sdsd sd', 0, 0, 1, 1, 0, 0.06, 1.06, 0, 0, 0, 0, 16, '2014-07-04 01:05:32', 0, '0000-00-00 00:00:00'),
(28, 103, 2, 100, '', '', 'wewrw', 0, 0, 1, 3, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-04 01:10:02', 0, '0000-00-00 00:00:00'),
(29, 103, 3, 101, '', '', 'sds', 0, 0, 1, 1, 0, 0.06, 1.06, 0, 0, 0, 0, 16, '2014-07-04 01:11:22', 0, '0000-00-00 00:00:00'),
(30, 103, 4, 101, '', '', 'dfdr', 0, 0, 111, 1, 0, 6.66, 117.66, 0, 0, 0, 0, 16, '2014-07-04 01:15:11', 16, '2014-07-04 01:24:04'),
(31, 103, 5, 101, '', '', 'tgrt', 0, 0, 1, 1, 0, 0.06, 1.06, 0, 0, 0, 0, 16, '2014-07-04 01:24:21', 0, '0000-00-00 00:00:00'),
(32, 104, 1, 101, '', '', 'asdfas12341234', 0, 0, 345, 1, 0, 20.7, 365.7, 0, 0, 0, 0, 16, '2014-07-07 02:45:16', 0, '0000-00-00 00:00:00'),
(33, 105, 1, 100, '', '', 'sgf sfg s', 0, 0, 2345, 1, 0, 140.7, 2485.7, 0, 0, 0, 0, 16, '2014-07-07 02:46:54', 0, '0000-00-00 00:00:00'),
(34, 106, 1, 101, '', '', 'adfs32452354', 0, 0, 345, 1, 0, 20.7, 365.7, 0, 0, 0, 0, 16, '2014-07-07 03:44:54', 0, '0000-00-00 00:00:00'),
(35, 107, 1, 101, '', '', 'adfs32452354', 0, 0, 345, 1, 0, 20.7, 365.7, 0, 0, 0, 0, 16, '2014-07-07 03:45:03', 0, '0000-00-00 00:00:00'),
(36, 108, 1, 100, '', '', 'awer23452354', 0, 0, 4546, 1, 0, 272.76, 4818.76, 0, 0, 0, 0, 16, '2014-07-07 03:47:27', 0, '0000-00-00 00:00:00'),
(37, 109, 1, 100, '', '', 'asdf23452', 0, 0, 454, 1, 0, 27.24, 481.24, 0, 0, 0, 0, 16, '2014-07-07 03:48:51', 0, '0000-00-00 00:00:00'),
(38, 127, 1, 101, '0', '', '', 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, '2014-07-07 05:39:00', 0, '0000-00-00 00:00:00'),
(39, 127, 2, 102, '', '', 'asdf234234', 0, 0, 433, 1, 0, 25.98, 458.98, 0, 0, 0, 0, 16, '2014-07-07 05:40:23', 0, '0000-00-00 00:00:00'),
(40, 128, 1, 101, '0', '', '', 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, '2014-07-07 05:43:02', 0, '0000-00-00 00:00:00'),
(41, 129, 1, 101, '0', '', '', 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, '2014-07-07 05:43:24', 0, '0000-00-00 00:00:00'),
(42, 130, 1, 101, '0', '', '', 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, '2014-07-07 05:43:34', 0, '0000-00-00 00:00:00'),
(43, 131, 1, 101, '0', '', '', 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, '2014-07-07 05:46:42', 0, '0000-00-00 00:00:00'),
(44, 131, 2, 101, '', '', 'dddde455', 0, 0, 56, 1, 0, 3.36, 59.36, 0, 0, 0, 0, 16, '2014-07-07 05:49:25', 0, '0000-00-00 00:00:00'),
(45, 131, 3, 102, '', '', 'dsg345', 0, 0, 567, 1, 0, 34.02, 601.02, 0, 0, 0, 0, 16, '2014-07-07 05:49:42', 0, '0000-00-00 00:00:00'),
(46, 132, 1, 101, '', '', 'asdf asdf 243', 0, 0, 456, 1, 0, 27.36, 483.36, 0, 0, 0, 0, 16, '2014-07-07 05:51:45', 0, '0000-00-00 00:00:00'),
(47, 133, 1, 101, '', '', 'asdf asdf 243', 0, 0, 456, 1, 0, 27.36, 483.36, 0, 0, 0, 0, 16, '2014-07-07 05:51:55', 0, '0000-00-00 00:00:00'),
(48, 135, 1, 101, '0', '', '', 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, '2014-07-07 05:57:08', 0, '0000-00-00 00:00:00'),
(49, 135, 2, 102, '', '', 'qwer245', 0, 0, 435, 1, 0, 26.1, 461.1, 0, 0, 0, 0, 16, '2014-07-07 05:57:31', 0, '0000-00-00 00:00:00'),
(50, 136, 1, 101, '0', '', '', 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, '2014-07-07 05:59:07', 0, '0000-00-00 00:00:00'),
(51, 137, 1, 101, '0', '', '', 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, '2014-07-07 05:59:38', 0, '0000-00-00 00:00:00'),
(52, 138, 1, 101, '0', '', '', 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, '2014-07-07 06:00:01', 0, '0000-00-00 00:00:00'),
(53, 138, 2, 101, '', '', 'sfdg456456', 0, 0, 456, 1, 0, 27.36, 483.36, 0, 0, 0, 0, 16, '2014-07-07 06:01:35', 0, '0000-00-00 00:00:00');

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

--
-- 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,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text 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=210 ;

--
-- Dumping data for table `comp_supplier_invoice_detail`
--

INSERT INTO `comp_supplier_invoice_detail` (`ID`, `invoiceID`, `lineNo`, `itemID`, `itemname`, `itemdescription`, `quantity`, `unitPrice`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `accountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(146, 88, 1, 2, '100300100', 'Steel chair for outdoor', 1, 1, 1, 1, 6, 0, 0, 0, 0, '2014-06-18 01:57:50', 0, '0000-00-00 00:00:00'),
(147, 89, 1, 0, '', 'Teak wooden chair with natural finish', 123, 0, 0, 0, 6, 0, 0, 0, 0, '2014-06-18 09:09:02', 0, '0000-00-00 00:00:00'),
(148, 90, 1, 0, '', 'Plastic Chair - White', 1, 0, 0, 28, 0, 0, 0, 0, 0, '2014-06-18 09:40:46', 0, '0000-00-00 00:00:00'),
(149, 90, 2, 0, '', 'Plastic Chair - Blue', 54, 1112, 60048, 1, 0, 0, 0, 0, 0, '2014-06-18 09:41:12', 0, '0000-00-00 00:00:00'),
(150, 91, 1, 0, '', 'Plastic Chair - Red', 12, 2345, 28140, 0, 0, 0, 0, 0, 0, '2014-06-18 10:11:37', 0, '0000-00-00 00:00:00'),
(151, 91, 2, 0, '', 'Plastic Chair - Red', 1, 2345, 2345, 0, 12, 0, 0, 0, 0, '2014-06-18 10:12:23', 0, '0000-00-00 00:00:00'),
(152, 92, 1, 0, '', 'Teak wooden chair with natural finish', 21, 120, 2520, 0, 6, 0, 0, 0, 0, '2014-06-18 10:27:37', 0, '0000-00-00 00:00:00'),
(153, 93, 1, 1, '', 'Teak wooden chair with natural finish', 12, 122, 1464, 0, 6, 0, 0, 0, 0, '2014-06-19 01:02:31', 0, '0000-00-00 00:00:00'),
(154, 93, 2, 0, '', 'Plastic Chair - Blue', 123, 0.12, 14.76, 1, 0, 0, 0, 0, 0, '2014-06-19 01:02:58', 0, '0000-00-00 00:00:00'),
(155, 93, 3, 0, '', 'Teak wooden chair with natural finish', 212, 12, 2544, 0, 6, 0, 0, 0, 0, '2014-06-19 01:04:20', 0, '0000-00-00 00:00:00'),
(156, 93, 4, 0, '', 'Steel chair for outdoor', 12, 3244, 38928, 1, 0, 0, 0, 0, 0, '2014-06-19 01:07:38', 0, '0000-00-00 00:00:00'),
(157, 94, 1, 4, '', 'Plastic Chair - Blue', 12, 12, 144, 1, 0, 0, 0, 0, 0, '2014-06-19 01:09:11', 0, '0000-00-00 00:00:00'),
(158, 94, 2, 0, '', 'Plastic Chair - Red', 12, 2345, 28140, 1, 6, 0, 0, 0, 0, '2014-06-19 01:09:53', 0, '0000-00-00 00:00:00'),
(159, 94, 3, 0, '', 'Plastic Chair - Blue', 12, 12, 144, 1, 0, 0, 0, 0, 0, '2014-06-19 01:10:41', 0, '0000-00-00 00:00:00'),
(160, 94, 4, 0, '', 'Plastic Chair - Blue', 2, 12, 24, 1, 0, 0, 0, 0, 0, '2014-06-19 01:12:34', 0, '0000-00-00 00:00:00'),
(161, 95, 1, 7, '', 'Plastic Chair - Red', 12, 2, 144, 0, 0, 0, 0, 0, 0, '2014-06-21 00:55:47', 0, '0000-00-00 00:00:00'),
(162, 95, 2, 7, '', 'Plastic Chair - Red', 2, 2, 24, 0, 0, 0, 0, 0, 0, '2014-06-21 00:55:38', 0, '0000-00-00 00:00:00'),
(163, 95, 3, 1, '', 'Teak wooden chair with natural finish', 12, 0, 38, 0, 6, 0, 0, 0, 0, '2014-06-21 00:55:24', 0, '0000-00-00 00:00:00'),
(164, 96, 1, 1, '', 'Teak wooden chair with natural finish', 12, 12, 144, 0, 6, 0, 0, 0, 0, '2014-06-19 01:37:31', 0, '0000-00-00 00:00:00'),
(165, 96, 2, 4, '', 'Plastic Chair - Blue', 12, 12, 144, 10, 6, 0, 0, 0, 0, '2014-06-19 01:38:11', 0, '0000-00-00 00:00:00'),
(166, 96, 3, 10, '', 'Bola Tampar Buaya', 12, 111, 1332, 0, 6, 0, 0, 0, 0, '2014-06-19 01:54:18', 0, '0000-00-00 00:00:00'),
(167, 97, 1, 1, '', 'Teak wooden chair with natural finish', 2, 12, 24, 0, 6, 1.44, 0, 0, 0, '2014-06-19 01:59:53', 0, '0000-00-00 00:00:00'),
(168, 97, 2, 4, '', 'Plastic Chair - Blue', 12, 12, 144, 1, 12, 17.28, 161.28, 0, 0, '2014-06-19 04:33:34', 0, '0000-00-00 00:00:00'),
(169, 97, 3, 9, '', 'Nasi Goreng Ayam', 1, 12, 12, 26, 0, 0, 12, 0, 0, '2014-06-21 02:01:28', 0, '0000-00-00 00:00:00'),
(170, 97, 4, 7, '', 'Plastic Chair - Red', 21, 2345, 49245, 0, 0, 0, 49245, 0, 0, '2014-06-19 02:03:17', 0, '0000-00-00 00:00:00'),
(171, 97, 5, 10, '', 'Bola Tampar Buaya', 1, 111, 111, 0, 1, 1.11, 112.11, 0, 0, '2014-06-21 02:01:18', 0, '0000-00-00 00:00:00'),
(172, 97, 6, 4, '', 'Plastic Chair - Blue', 1, 12, 12, 1, 1, 0.12, 12.12, 0, 0, '2014-06-19 04:40:37', 0, '0000-00-00 00:00:00'),
(173, 98, 1, 1, '', 'Teak wooden chair with natural finish', 8, 99, 792, 0, 6, 47.52, 839.52, 0, 0, '2014-06-20 09:36:39', 0, '0000-00-00 00:00:00'),
(174, 99, 1, 1, '', 'Teak wooden chair with natural finish', 0, 0, 0, 0, 6, 0, 0, 0, 0, '2014-06-23 03:21:52', 0, '0000-00-00 00:00:00'),
(175, 100, 1, 1, '', 'Teak wooden chair with natural finish', 34, 0, 0, 0, 6, 0, 0, 0, 16, '2014-06-24 08:19:17', 0, '0000-00-00 00:00:00'),
(176, 100, 2, 7, '', 'Plastic Chair - Red', 44, 2345, 103180, 0, 0, 0, 103180, 0, 16, '2014-06-24 08:20:47', 0, '0000-00-00 00:00:00'),
(177, 101, 1, 1, '', 'Teak wooden chair with natural finish', 3, 3, 9, 0, 6, 0.54, 9.54, 0, 16, '2014-06-26 06:44:47', 0, '0000-00-00 00:00:00'),
(178, 101, 2, 7, '', 'Plastic Chair - Red', 12, 2345, 28140, 0, 0, 0, 28140, 0, 16, '2014-06-26 06:45:09', 0, '0000-00-00 00:00:00'),
(179, 102, 1, 11, '', 'saiz 10. warna gold', 3, 2222, 6666, 15, 10, 666.6, 7332.6, 0, 16, '2014-07-01 05:04:07', 0, '0000-00-00 00:00:00'),
(180, 103, 1, 1, '', 'Teak wooden chair with natural finish', 1, 1, 1, 0, 6, 0.06, 1.06, 0, 16, '2014-07-04 00:14:51', 0, '0000-00-00 00:00:00'),
(181, 103, 2, 7, '', 'Plastic Chair - Red', 1, 2345, 2345, 0, 0, 0, 2345, 0, 16, '2014-07-04 02:24:44', 0, '0000-00-00 00:00:00'),
(182, 103, 3, 4, '', 'Plastic Chair - Blue', 2, 2, 4, 1, 0, 0, 4, 0, 16, '2014-07-04 02:28:41', 0, '0000-00-00 00:00:00'),
(183, 103, 4, 1, '', 'Teak wooden chair with natural finish', 2, 12, 24, 0, 6, 1.44, 25.44, 0, 16, '2014-07-04 02:29:28', 0, '0000-00-00 00:00:00'),
(184, 103, 5, 1, '', 'Teak wooden chair with natural finish', 1, 1, 1, 0, 6, 0.06, 1.06, 0, 16, '2014-07-04 02:31:40', 0, '0000-00-00 00:00:00'),
(185, 103, 6, 4, '', 'Plastic Chair - Blue', 1, 1, 1, 1, 0, 0, 1, 0, 16, '2014-07-04 02:38:23', 0, '0000-00-00 00:00:00'),
(186, 113, 1, 2, '', '', 11, 1, 11, 1, 0, 0.66, 11.66, 0, 16, '2014-07-07 05:01:40', 0, '0000-00-00 00:00:00'),
(187, 114, 1, 2, '', '', 11, 1, 11, 1, 0, 0.66, 11.66, 0, 16, '2014-07-07 05:03:40', 0, '0000-00-00 00:00:00'),
(188, 123, 1, 2, 'B13 Steel Chair', 'Steel chair for outdoor', 11, 1, 11, 1, 0, 0.66, 11.66, 0, 16, '2014-07-07 05:15:55', 0, '0000-00-00 00:00:00'),
(189, 124, 1, 2, 'B13 Steel Chair', 'Steel chair for outdoor', 11, 1, 11, 1, 0, 0.66, 11.66, 0, 16, '2014-07-07 05:21:03', 0, '0000-00-00 00:00:00'),
(190, 125, 1, 2, 'B13 Steel Chair', 'Steel chair for outdoor', 11, 1, 11, 1, 0, 0.66, 11.66, 0, 16, '2014-07-07 05:23:41', 0, '0000-00-00 00:00:00'),
(191, 126, 1, 2, 'B13 Steel Chair', 'Steel chair for outdoor', 11, 1, 11, 1, 0, 0.66, 11.66, 0, 16, '2014-07-07 05:24:45', 0, '0000-00-00 00:00:00'),
(192, 127, 1, 2, 'B13 Steel Chair', 'Steel chair for outdoor', 11, 1, 11, 1, 0, 0.66, 11.66, 0, 16, '2014-07-07 05:39:00', 0, '0000-00-00 00:00:00'),
(193, 131, 1, 8, 'A25 Plastic Chair', 'Plastic Chair - White', 1, 1, 144, 10, 0, 8.64, 152.64, 0, 16, '2014-07-07 05:46:41', 0, '0000-00-00 00:00:00'),
(194, 131, 2, 1, 'A12 Wooden Chair', 'Teak wooden chair with natural finish', 1, 1, 1, 1, 0, 0.06, 1.06, 0, 16, '2014-07-07 05:46:41', 0, '0000-00-00 00:00:00'),
(195, 131, 3, 1, 'A12 Wooden Chair', 'Teak wooden chair with natural finish', 1, 10, 10, 1, 0, 0.6, 10.6, 0, 16, '2014-07-07 05:46:42', 0, '0000-00-00 00:00:00'),
(196, 131, 4, 1, 'A12 Wooden Chair', 'Teak wooden chair with natural finish', 1, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-07 05:46:42', 0, '0000-00-00 00:00:00'),
(197, 134, 1, 1, '', 'Teak wooden chair with natural finish', 45, 0, 0, 1, 6, 0, 0, 0, 16, '2014-07-07 05:52:17', 0, '0000-00-00 00:00:00'),
(198, 135, 1, 1, 'A12 Wooden Chair', 'Teak wooden chair with natural finish', 12, 12, 144, 1, 0, 8.64, 152.64, 0, 16, '2014-07-07 05:57:08', 0, '0000-00-00 00:00:00'),
(199, 138, 1, 2, 'B13 Steel Chair', 'Steel chair for outdoor', 22, 1, 0, 29, 0, 0, 0, 0, 16, '2014-07-07 06:00:01', 0, '0000-00-00 00:00:00'),
(200, 139, 1, 2, 'B13 Steel Chair', 'Steel chair for outdoor', 2, 111, 0, 1, 0, 0, 0, 0, 16, '2014-07-07 06:17:13', 0, '0000-00-00 00:00:00'),
(201, 139, 2, 1, 'A12 Wooden Chair', 'Teak wooden chair with natural finish', 12, 1, 12, 1, 0, 0.72, 12.72, 0, 16, '2014-07-07 06:17:13', 0, '0000-00-00 00:00:00'),
(202, 140, 1, 2, 'B13 Steel Chair', 'Steel chair for outdoor', 2, 111, 0, 1, 0, 0, 0, 0, 16, '2014-07-07 06:17:37', 0, '0000-00-00 00:00:00'),
(203, 140, 2, 1, 'A12 Wooden Chair', 'Teak wooden chair with natural finish', 12, 1, 12, 1, 0, 0.72, 12.72, 0, 16, '2014-07-07 06:17:37', 0, '0000-00-00 00:00:00'),
(204, 141, 1, 2, 'B13 Steel Chair', 'Steel chair for outdoor', 2, 111, 0, 1, 0, 0, 0, 0, 16, '2014-07-07 06:17:43', 0, '0000-00-00 00:00:00'),
(205, 141, 2, 1, 'A12 Wooden Chair', 'Teak wooden chair with natural finish', 12, 1, 12, 1, 0, 0.72, 12.72, 0, 16, '2014-07-07 06:17:43', 0, '0000-00-00 00:00:00'),
(206, 142, 1, 1, 'A12 Wooden Chair', 'Teak wooden chair with natural finish', 12, 1, 12, 1, 0, 0.72, 12.72, 0, 16, '2014-07-07 06:20:29', 0, '0000-00-00 00:00:00'),
(207, 143, 1, 1, 'A12 Wooden Chair', 'Teak wooden chair with natural finish', 12, 1, 12, 1, 0, 0.72, 12.72, 0, 16, '2014-07-07 06:20:40', 0, '0000-00-00 00:00:00'),
(208, 144, 1, 1, 'A12 Wooden Chair', 'Teak wooden chair with natural finish', 12, 1, 12, 1, 0, 0.72, 12.72, 0, 16, '2014-07-07 06:21:37', 0, '0000-00-00 00:00:00'),
(209, 145, 1, 1, 'A12 Wooden Chair', 'Teak wooden chair with natural finish', 12, 1, 12, 1, 0, 0.72, 12.72, 0, 16, '2014-07-07 06:22:38', 0, '0000-00-00 00:00:00');

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

--
-- 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 `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,
  `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 NOT NULL,
  `gstSubmissionBuffer` int(16) NOT NULL,
  `dateFormat` int(16) 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,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=56 ;

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

INSERT INTO `company` (`ID`, `companyName`, `companyNo`, `incorporateDate`, `line1`, `line2`, `line3`, `city`, `companyPostCode`, `companyStateID`, `phoneNo`, `faxNo`, `email`, `website`, `uploadLogo`, `currencyID`, `languageID`, `countryID`, `muslimShareholder`, `gstRegisteredNo`, `gstRegisteredDate`, `gstSubmissionBuffer`, `dateFormat`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(1, 'Salihin IT Solution Sdn Bhd', '929958-P', '2014-06-26', 'no 1 jalan 1/1,', 'off jalan line 2,', 'main road jalan 3,', 'bangsar,', '55000,', 0, '603-61859970', '603-61857788', '0', '0', '0', 1, 0, 458, 100, '0', '1983-01-05', 6, 1, 0, '2014-04-24 04:32:22', 0, '2014-06-30 08:46:57', 0),
(2, 'Salihin GST Services Sdn Bhd', '939934-P', '0000-00-00', '', '', '', '', '0', 0, '0', '0', '0', '0', '0', 1, 0, 458, 0, '', '0000-00-00', 0, 1, 0, '2014-04-24 04:54:31', 0, '2014-06-27 01:54:27', 0),
(3, 'Salihin Consulting Sdn Bhd', '934278-P', '0000-00-00', '', '', '', '', '0', 0, '0', '0', '0', '0', '0', 1, 0, 458, 0, '', '0000-00-00', 0, 1, 0, '2014-04-24 06:51:10', 0, '2014-06-27 01:54:27', 0),
(4, 'fad', 'fad', '2014-06-26', '', '', '', '', '0', 0, 'fad', 'fad', 'fad', 'fad', '0', 1, 0, 458, 123, '0', '0000-00-00', 0, 1, 0, '2014-04-24 07:38:03', 0, '2014-06-27 01:54:28', 0),
(5, 'fadvvcvcxvxcv', 'faddsds', '0000-00-00', '', '', '', '', '0', 0, 'fad', 'fad', 'fad', 'fad', '0', 1, 0, 458, 0, '', '0000-00-00', 0, 1, 0, '2014-04-24 09:36:32', 0, '2014-06-27 01:54:28', 0),
(6, 'fad', 'fad', '0000-00-00', '', '', '', '', '0', 0, 'fad', 'fad', 'fad', 'fad', 'fad.jpg', 1, 0, 458, 0, '', '0000-00-00', 0, 1, 0, '2014-04-24 09:50:40', 0, '2014-06-27 01:54:29', 0),
(7, 'Fadhirul Hilmi Bin Muhamad Kamil', '', '0000-00-00', '', '', '', '', '0', 0, '', '', '', '', '0', 1, 0, 458, 0, '', '0000-00-00', 0, 1, 0, '2014-04-30 07:25:35', 0, '2014-06-27 01:54:29', 0),
(8, 'weqwe', 'weqwe', '0000-00-00', '', '', '', '', '0', 0, 'wqeqwe', 'wqeqweqw', 'wqeqwe', 'wqeqweqw', '0', 1, 0, 458, 0, '', '0000-00-00', 0, 1, 0, '2014-05-06 04:21:43', 0, '2014-06-27 01:54:29', 1),
(9, 'fafefer', '', '0000-00-00', '', '', '', '', '0', 0, '', '', '', '', '0', 1, 0, 458, 0, '', '0000-00-00', 0, 1, 0, '2014-05-06 04:34:42', 0, '2014-06-27 01:54:30', 1),
(10, '', '', '0000-00-00', '', '', '', '', '0', 0, '', '', '', '', '', 1, 0, 458, 0, '', '0000-00-00', 0, 1, 0, '2014-05-06 08:29:44', 0, '2014-06-27 01:54:32', 1),
(11, 'faf', 'fasf', '0000-00-00', '', '', '', '', '0', 0, 'safa', '', '', '', '0', 1, 0, 458, 0, '', '0000-00-00', 0, 1, 0, '2014-05-07 10:22:41', 0, '2014-06-27 01:54:33', 1),
(12, 'dfdf', 'dfdfdfd', '0000-00-00', '', '', '', '', '0', 0, 'dfdf', '', '', '', '0', 1, 0, 458, 0, '', '0000-00-00', 0, 1, 0, '2014-05-08 09:09:18', 0, '2014-06-27 01:54:33', 0),
(13, 'ewrwerwerewr', 'sasdsads', '0000-00-00', '', '', '', '', '0', 0, 'ewrwer', '', '', '', '0', 1, 0, 458, 0, '', '0000-00-00', 0, 1, 0, '2014-05-08 09:40:42', 0, '2014-06-27 01:54:34', 0),
(14, 'wewewe', 'wqewqed', '2014-05-14', '', '', '', '', '0', 0, '', '', '', '', '0', 1, 0, 458, 0, '', '0000-00-00', 0, 1, 0, '2014-05-08 09:45:12', 0, '2014-06-27 01:54:34', 1),
(15, 'Fadhirul Hilmi test sdn bhd', '34567', '2014-05-29', 'no 6 jalan hilman', 'desa hilmon', 'kg hiliran damai', '', '', 0, '0129552013', '23456', 'phoe_nix29@yahoo.com', 'www.salihin.com.my', '0', 1, 0, 458, 100, '0', '1970-01-01', 0, 1, 0, '2014-05-28 20:27:33', 0, '2014-07-01 05:06:55', 0),
(16, 'biskut cap ping pong sdn bhd', 'test je', '2014-06-05', '', '', '', '', '', 0, '03-32136284', '', '', '', '0', 1, 0, 0, 0, '', '0000-00-00', 0, 1, 0, '2014-06-05 01:14:02', 0, '2014-06-27 01:54:35', 0),
(17, 'Roti cap ping pong sdn bhd', 'test je', '2014-06-05', '', '', '', '', '', 0, '03-32136284', '', '', '', '0', 1, 0, 0, 0, '', '0000-00-00', 0, 1, 0, '2014-06-05 01:15:58', 0, '2014-06-27 01:54:36', 0),
(18, 'basikal cap ping pong sdn bhd', 'test je', '2014-06-05', '', '', '', '', '', 0, '03-32136284', '', '', '', '0', 1, 0, 0, 0, '', '0000-00-00', 0, 1, 0, '2014-06-05 01:16:36', 0, '2014-06-27 01:54:36', 0),
(19, 'to test default company chart of acct', '12345678-9', '2014-06-05', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 0, '', '0000-00-00', 0, 1, 0, '2014-06-05 01:46:17', 0, '2014-06-27 01:54:37', 0),
(20, 'to test default company chart of acct', '12345678-9', '2014-06-05', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 0, '', '0000-00-00', 0, 1, 0, '2014-06-05 01:49:00', 0, '2014-06-27 01:54:37', 0),
(21, 'to test default company chart of acct', '12345678-9', '2014-06-05', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 0, '', '0000-00-00', 0, 1, 0, '2014-06-05 01:51:12', 0, '2014-06-27 01:54:38', 0),
(22, 'to test default company chart of acct', '12345678-9', '2014-06-05', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 0, '', '0000-00-00', 0, 1, 0, '2014-06-05 01:52:18', 0, '2014-06-27 01:54:38', 0),
(23, 'to test default company chart of acct', '12345678-9', '2014-06-05', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 0, '', '0000-00-00', 0, 1, 0, '2014-06-05 01:52:27', 0, '2014-06-27 01:54:39', 0),
(24, 'biskut cap ping pong sdn bhd', 'test je', '2014-06-05', '', '', '', '', '', 0, '03-32136284', '', '', '', '0', 1, 0, 0, 0, '', '0000-00-00', 0, 1, 0, '2014-06-05 01:53:13', 0, '2014-06-27 01:54:39', 0),
(25, 'biskut cap ping pong sdn bhd', 'test je', '2014-06-05', '', '', '', '', '', 0, '03-32136284', '', '', '', '0', 1, 0, 0, 0, '', '0000-00-00', 0, 1, 0, '2014-06-05 01:54:02', 0, '2014-06-27 01:54:40', 0),
(26, 'biskut cap ping pong sdn bhd', 'test je', '2014-06-05', '', '', '', '', '', 0, '03-32136284', '', '', '', '0', 1, 0, 0, 0, '', '0000-00-00', 0, 1, 0, '2014-06-05 01:57:05', 0, '2014-06-27 01:54:40', 0),
(27, 'Bee World', 'A2014', '2014-06-06', '', '', '', '', '', 0, '603 61851515', '603 61851414', 'bee@gmail.com', 'www.bee.com.my', '0', 1, 0, 0, 0, '', '0000-00-00', 0, 1, 0, '2014-06-05 18:50:13', 0, '2014-06-27 01:54:41', 1),
(28, 'testign company', 'A2606', '2014-06-26', '', '', '', '', '', 0, '603 61851515', '603 61851414', 'account@salihin.com.my', '', '0', 1, 0, 0, 100, '0', '0000-00-00', 6, 1, 0, '2014-06-25 20:55:23', 0, '2014-06-27 01:54:42', 1),
(29, 'testing satu', 'A2606', '2014-06-26', '', '', '', '', '', 0, '603 61851515', '603 61851414', 'account@salihin.com.my', '', '0', 1, 0, 0, 100, '0', '0000-00-00', 0, 1, 0, '2014-06-25 20:55:23', 0, '2014-06-27 01:54:43', 1),
(30, 'testing satu', 'A-26066', '2014-06-26', '', '', '', '', '', 0, '603 61851515', '603 61851414', 'account@salihin.com.my', '', '0', 1, 0, 0, 100, '0', '0000-00-00', 6, 1, 0, '2014-06-25 20:55:23', 0, '2014-06-27 01:54:43', 1),
(31, 'generasi sdn bhd', 'A-26066', '2014-06-26', '', '', '', '', '', 0, '603 61851515', '603 61851414', 'account@salihin.com.my', 'www.bee.com.my', '0', 1, 0, 0, 1000, '0', '0000-00-00', 0, 1, 0, '2014-06-25 20:55:23', 0, '2014-06-27 01:54:44', 1),
(32, 'Bee World 123', 'qwa123', '2014-06-26', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 1001, '0', '0000-00-00', 6, 1, 0, '2014-06-25 22:11:04', 0, '2014-06-27 01:54:44', 1),
(33, 'Bee World 1231', 'qwa123', '2014-06-26', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 1001, '0', '0000-00-00', 6, 1, 0, '2014-06-25 22:11:04', 0, '2014-06-27 01:54:45', 1),
(34, 'Bee World 1231', 'qwa123', '2014-06-26', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 1001, '0', '0000-00-00', 6, 1, 0, '2014-06-25 22:11:04', 0, '2014-06-27 01:54:45', 1),
(35, 'Beeboo', 'A20145', '2014-06-26', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 10001, '0', '0000-00-00', 0, 1, 0, '2014-06-25 22:45:15', 0, '2014-06-27 01:54:46', 1),
(36, 'Beeboo', 'A201456', '2014-06-26', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 10001, '0', '0000-00-00', 0, 1, 0, '2014-06-25 22:45:15', 0, '2014-06-27 01:54:46', 1),
(37, 'Beeboo', 'A201456', '2014-06-26', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 10001, '0', '0000-00-00', 0, 1, 0, '2014-06-25 22:45:15', 0, '2014-06-27 01:54:47', 1),
(38, 'yingyang', 'B0012', '2014-06-26', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 10001, '0', '0000-00-00', 0, 1, 0, '2014-06-25 22:47:00', 0, '2014-06-27 01:54:48', 1),
(39, 'yingyang', 'B0012', '2014-06-26', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 10001, '0', '0000-00-00', 0, 1, 0, '2014-06-25 22:47:00', 0, '2014-06-27 01:54:48', 1),
(40, 'yingyang', 'B00121', '2014-06-26', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 10001, '0', '0000-00-00', 0, 1, 0, '2014-06-25 22:47:00', 0, '2014-06-27 01:54:49', 1),
(41, 'FZ ENTERPRISE', 'FZ006', '2014-06-26', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 1001111111, '0', '0000-00-00', 6, 1, 0, '2014-06-26 00:27:40', 0, '2014-06-27 01:54:50', 1),
(42, 'rise sdn bhd', 'FZ112', '2014-06-26', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 1001, '0', '0000-00-00', 0, 1, 0, '2014-06-26 00:46:01', 0, '2014-06-27 01:54:51', 1),
(43, 'rise sdn bhd', 'FZ112', '2014-06-26', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 1001, '0', '0000-00-00', 0, 1, 0, '2014-06-26 00:51:59', 0, '2014-06-27 01:54:51', 1),
(44, 'test jerlah', '123456', '2014-06-26', '', '', '', '', '', 0, '', '', '', '', '0', 0, 0, 0, 1001, '0', '0000-00-00', 0, 1, 0, '2014-06-26 01:03:42', 0, '2014-06-27 01:54:52', 1),
(45, 'Bee World Best', '12345', '2014-06-26', '555, JALAN SAMUDRA UTARA 1', 'TAMAN SAMUDRA', '68100 BATU CAVES SELANGOR', '', '', 0, '0321314545', '0321313434', 'bee@gmail.com', 'www.bee.com.my', '0', 1, 0, 0, 100, '0', '1970-01-01', 0, 1, 0, '2014-06-26 01:34:17', 0, '2014-07-03 01:36:30', 1),
(46, 'fad', '123456', '2014-07-01', 'fad', 'fad', 'fad', '', '', 0, '314234', '2312321', 'phoe_nix30@yahoo.com', 'dasdasdasd', '0', 5, 0, 0, 12, '0', '1970-01-01', 34234, 0, 0, '2014-06-30 22:12:42', 0, '0000-00-00 00:00:00', 0),
(47, 'Fadhirul Hilmi test sdn bhd', '123456', '2014-07-01', 'fad', 'fad', 'fad', '', '', 0, '314234', '2312321', 'phoe_nix30@yahoo.com', 'dasdasdasd', '0', 5, 0, 0, 12, '0', '1970-01-01', 34234, 0, 0, '2014-06-30 22:12:42', 0, '0000-00-00 00:00:00', 0),
(48, 'Fadhirul Hilmi test sdn bhd', '123456', '2014-07-01', 'fad', 'fad', 'fad', '', '', 0, '314234', '2312321', 'phoe_nix30@yahoo.com', 'dasdasdasd', '0', 5, 0, 0, 12, '0', '1970-01-01', 34234, 0, 0, '2014-06-30 22:12:42', 0, '0000-00-00 00:00:00', 0),
(49, 'Fadhirul Hilmi test sdn bhd', '123456', '2014-07-01', 'fad', 'fad', 'fad', '', '', 0, '314234', '2312321', 'phoe_nix30@yahoo.com', 'dasdasdasd', '0', 5, 0, 0, 12, '0', '1970-01-01', 34234, 0, 0, '2014-06-30 22:12:42', 0, '0000-00-00 00:00:00', 0),
(50, 'Fadhirul Hilmi test sdn bhd', '123456', '2014-07-01', 'fad', 'fad', 'fad', '', '', 0, '314234', '2312321', 'phoe_nix30@yahoo.com', 'dasdasdasd', '0', 5, 0, 0, 12, '0', '1970-01-01', 34234, 0, 0, '2014-06-30 22:12:42', 0, '0000-00-00 00:00:00', 0),
(51, 'Fadhirul Hilmi test sdn bhd', '123456', '2014-07-01', 'fad', 'fad', 'fad', '', '', 0, '314234', '2312321', 'phoe_nix30@yahoo.com', 'dasdasdasd', '0', 5, 0, 0, 12, '0', '1970-01-01', 34234, 0, 0, '2014-06-30 22:26:31', 0, '0000-00-00 00:00:00', 0),
(52, 'Salihin IT Solution Sdn Bhd', '123456', '2014-07-01', 'fad', 'fad', 'fad', '', '', 0, '314234', '2312321', 'phoe_nix30@yahoo.com', 'dasdasdasd', '0', 5, 0, 0, 12, '0', '1970-01-01', 34234, 0, 0, '2014-06-30 22:26:31', 0, '0000-00-00 00:00:00', 0),
(53, 'husin sdn bhd', '123456', '2014-07-01', 'fad', 'fad', 'fad', '', '', 0, '314234', '2312321', 'phoe_nix30@yahoo.com', 'dasdasdasd', '0', 5, 0, 0, 12, '0', '1970-01-01', 34234, 0, 0, '2014-06-30 22:26:31', 0, '0000-00-00 00:00:00', 0),
(54, 'husin sdn bhd', '123456', '2014-07-01', 'fad', 'fad', 'fad', '', '', 0, '314234', '2312321', 'phoe_nix30@yahoo.com', 'dasdasdasd', '0', 5, 0, 0, 12, '0', '1970-01-01', 34234, 0, 0, '2014-06-30 22:26:31', 0, '2014-07-01 04:36:19', 1),
(55, 'Bee World', 'B0061', '2014-07-03', '555, JALAN SAMUDRA UTARA 1', 'TAMAN SAMUDRA', '68100 Batu Caves, Selangor', '', '', 0, '603 61851515', '603 61851414', 'bee@gmail.com', '', '0', 1, 0, 0, 100, '0', '1970-01-01', 0, 0, 0, '2014-07-02 19:36:44', 0, '2014-07-03 08:02:39', 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=30 ;

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

INSERT INTO `customer` (`ID`, `companyID`, `customerName`, `accountCode`, `customerCompanyNo`, `line1`, `line2`, `line3`, `city`, `customerPostCode`, `customerStateID`, `customerCountryID`, `attention`, `website`, `phoneNumber1`, `phoneNumber2`, `fax`, `generalNote`, `gstRegNo`, `termsID`, `creditLimit`, `creditLimitAlert`, `linkedAPAccountID`, `createdDate`, `currencyID`, `email`, `termstatus`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `position`) VALUES
(12, 1, 'Telekom Malaysia', '20', '', '555, JALAN SAMUDRA UTARA 1', 'TAMAN SAMUDRA', '', 'GOMBAK', '68100', 1933, 458, '0', '0', '603 61881213', '', '603 61881214', '', '', 0, 0, 0, '20', '0000-00-00', 1, 'account@salihin.com.my', 0, 0, '2014-05-21 04:52:14', 0, '2014-06-23 02:45:13', 0, '0'),
(15, 1, 'Celcom', '20', '', 'no.23, jalan rampai,', 'taman seri rampai', '', 'wilayah persekutuan', '68100', 1933, 458, '0', '0', '603 61881213', '', '603 61881213', '', '', 0, 0, 0, '20', '0000-00-00', 2, 'qaqa@yahoo.com.my', 0, 0, '2014-05-21 10:57:46', 0, '2014-06-23 02:45:38', 0, 'reseller'),
(16, 1, 'Maxis', '20', '', '23,jalan jalan', 'cari makan', '', 'gombak', '68100', 1933, 458, '0', '0', '603 61881213', '', '603 61881213', '', '', 0, 0, 0, '20', '0000-00-00', 1, 'qaqa@yahoo.com', 0, 0, '2014-05-22 11:18:09', 0, '2014-06-23 02:45:55', 0, 'HELPER'),
(17, 15, 'AXBN', '243', '', 'customer 1, jalan 1, taman 1/1', '', '', 'batu 1', '11111', 1933, 458, '0', '0', '111', '', '111', '', '', 0, 0, 0, '0', '0000-00-00', 1, 'accounts1@salihi', 0, 0, '2014-05-29 02:56:48', 0, '2014-06-21 04:25:26', 0, 'Manager 1'),
(18, 15, 'Malakoff Utilities', '228', '', 'No 2, jalan 2, taman 2/2', '', '', 'Batu 2', '22222', 1922, 458, '0', '0', '603-88371234', '', '603-88891999', '', '', 0, 0, 0, '0', '0000-00-00', 2, 'accounts2@salihin.com.my', 0, 0, '2014-05-29 03:03:13', 0, '2014-06-21 04:43:35', 0, 'Manager 2'),
(19, 15, 'Permata Hijrah', '3333', '', 'No 3, Jalan 3, Taman 3/3', '', '', 'Batu 3', '33333', 1921, 458, 'Ali Abi Talib', '0', '333', '333', '333', '', '', 0, 0, 0, '0', '0000-00-00', 1, 'accounts3@salihi', 0, 0, '2014-05-29 03:06:10', 0, '2014-06-18 02:25:18', 0, 'Manager 3'),
(20, 1, 'ABC Enterprise', '20', '', '', '', '', '', '', 1933, 458, '0', '0', '', '', '', '', '', 0, 0, 0, '20', '0000-00-00', 1, '', 0, 0, '2014-05-29 09:55:13', 0, '2014-06-23 02:46:09', 0, ''),
(21, 27, 'qa', 'qa12', '', '555, JALAN SAMUDRA UTARA 1', 'TAMAN SAMUDRA', '', 'GOMBAK', '68100', 1933, 458, '0', '0', '603 61854646', '', '603 61856767', '', '', 0, 0, 0, '0', '0000-00-00', 0, 'bee@gmail.com', 0, 0, '2014-06-06 09:25:49', 0, '2014-06-06 09:26:01', 0, 'test1'),
(26, 1, 'qa', '0', '', '', '', '', '', '', 0, 458, '0', '0', '', '', '', '', '', 0, 0, 0, '20', '0000-00-00', 0, '', 0, 0, '2014-06-23 02:40:13', 0, '0000-00-00 00:00:00', 0, ''),
(27, 1, 'FARHANA', '20', '', '555, JALAN SAMUDRA UTARA 1', 'TAMAN SAMUDRA', '', 'GOMBAK', '68100', 1921, 458, '0', '0', '603 6178987', '012 3121312', '603 6176756', '', '', 0, 0, 0, '20', '0000-00-00', 0, 'ateeq@webfulcreations.com', 0, 0, '2014-06-23 02:41:34', 0, '2014-06-24 04:23:06', 0, 'tester'),
(28, 45, 'Borong Sdn Bhd', '0', '', 'A12, Jalan Perindustrian 1', 'Taman Perindustrian 2,', '', 'Shah Alam', '40100', 1931, 458, '0', '0', '603 5415 5560', '', '603 5415 6789', '', '', 0, 0, 0, '0', '0000-00-00', 0, 'borong@gmail.com', 0, 0, '2014-07-03 01:09:26', 0, '2014-07-03 01:10:12', 0, 'Account Executiv'),
(29, 55, 'Fabrica Fashion Sdn Bhd', '0', '', 'Lot A1, Wisma PKNS,', 'Kompleks PKNS Jalan 1', '', 'Shah Alam', '40100', 1931, 458, '0', '0', '603 5409090', '', '603 5409898', '', '', 0, 0, 0, '0', '0000-00-00', 0, 'fabrca@gmail.com', 0, 0, '2014-07-03 01:55:09', 0, '0000-00-00 00:00:00', 0, 'Account Executiv');

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

--
-- 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=9 ;

--
-- Dumping data for table `customer_address`
--

INSERT INTO `customer_address` (`ID`, `companyID`, `customerID`, `addressCode`, `addressName`, `line1`, `line2`, `line3`, `city`, `postCode`, `stateID`, `countryID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(1, 1, 1, '', '', '', '', '', '', '', 0, 0, 0, '2014-05-14 08:45:58', 0, '2014-06-03 10:05:20', 0),
(2, 1, 2, '', '', '', '', '', '', '', 0, 0, 0, '2014-05-14 09:00:46', 0, '2014-06-03 10:05:21', 0),
(3, 1, 5, '', '', '', '', '', '', '', 0, 0, 0, '2014-05-14 09:06:45', 0, '2014-05-19 07:16:29', 0),
(4, 0, 1, '3234', '', 'fad', 'fad', 'fad', '2323', '32222', 1929, 458, 0, '2014-05-19 22:46:16', 0, '2014-05-20 05:06:51', 0),
(5, 0, 17, '1', 'Apartment 1', 'Apartment 1', '', '', 'Batu 1.1', '11111', 1923, 458, 0, '2014-05-28 21:13:50', 0, '2014-06-03 10:18:39', 0),
(6, 0, 17, '12344', 'Condo 1', 'Condo 1', '', '', 'Batu 1.1.1', '11111', 1932, 458, 0, '2014-05-28 21:29:09', 0, '2014-06-03 10:18:46', 0),
(7, 0, 12, '31888', 'Apartment 1', 'Apartment 1', '', '', 'Batu 1.1', '11111', 1923, 458, 0, '2014-05-28 21:13:50', 0, '2014-06-03 10:18:44', 0),
(8, 0, 12, '12312', 'Condo 1', 'Condo 1', '', '', 'Batu 1.1.1', '11111', 1932, 458, 0, '2014-05-28 21:29:09', 0, '2014-06-03 10:18:50', 0);

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

--
-- 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(16) 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` int(11) NOT NULL,
  `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=13 ;

--
-- Dumping data for table `item`
--

INSERT INTO `item` (`ID`, `companyID`, `itemCode`, `name`, `description`, `itemCategoryID`, `itemTypeID`, `quantity`, `unitOfMeasureID`, `editDescription`, `imageFile`, `itemStatusID`, `reorderLevel`, `incomeID`, `cogsID`, `inventoriesID`, `inputTaxID`, `outputTaxID`, `supplierID`, `memo`, `locationID`, `is_delete`, `updateable`, `totalAmount`, `totalPayable`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `supplierPrice`, `salesPrice`, `currencyID`) VALUES
(1, 1, '321000100', 'A12 Wooden Chair', 'Teak wooden chair with natural finish', 30, 22, 10, 2, 0, '', 1, 0, 0, 0, 79, 0, 1, 0, '', 1, 0, 0, 0, 0, 0, '2014-06-09 09:14:28', 0, '2014-07-07 05:43:21', 0, 321, 1),
(2, 1, '100300100', 'B13 Steel Chair', 'Steel chair for outdoor', 30, 22, 31, 2, 0, '', 1, 23, 1, 2, 79, 1, 1, 23, '', 1, 0, 0, 0, 0, 0, '2014-06-09 09:14:28', 0, '2014-07-07 06:01:32', 3244, 231, 2),
(4, 1, '331000100', 'A23 Plastic Chair', 'Plastic Chair - Blue', 30, 22, 10, 2, 0, '', 1, 0, 2, 0, 79, 1, 0, 0, '', 1, 0, 0, 0, 0, 0, '2014-06-09 09:14:28', 0, '2014-06-19 08:25:15', 0, 0, 0),
(7, 1, '331000200', 'A24 Plastic Chair', 'Plastic Chair - Red', 30, 22, 10, 2, 0, '', 1, 0, 0, 0, 79, 0, 0, 20, '', 1, 0, 0, 0, 0, 0, '2014-06-09 09:14:28', 0, '2014-06-19 08:25:16', 2345, 0, 0),
(8, 1, '331000300', 'A25 Plastic Chair', 'Plastic Chair - White', 21, 23, 10, 2, 0, '', 1, 12, 18, 15, 79, 28, 10, 0, '', 2, 0, 0, 0, 0, 0, '2014-06-09 09:14:28', 0, '2014-06-19 08:25:16', 0, 0, 0),
(9, 1, '501012000', 'Nasi Goreng', 'Nasi Goreng Ayam', 21, 23, 10, 2, 0, '', 1, 0, 15, 17, 79, 26, 5, 0, '', 2, 0, 0, 0, 0, 0, '2014-06-09 09:14:28', 0, '2014-06-19 08:25:17', 0, 652, 2),
(10, 1, '801010001', 'Bola', 'Bola Tampar Buaya', 30, 22, 10, 2, 0, '', 1, 0, 0, 0, 79, 0, 0, 0, '', 2, 0, 0, 0, 0, 0, '2014-06-09 09:14:28', 0, '2014-06-19 08:25:17', 111, 0, 0),
(11, 15, 'M001', 'Meja makan bulat', 'saiz 10. warna gold', 30, 22, 0, 2, 0, '', 2, 5, 0, 280, 79, 15, 1, 0, '', 0, 0, 0, 0, 0, 0, '2014-06-11 00:41:50', 0, '2014-06-19 08:25:18', 2222, 0, 0),
(12, 15, 'M002', 'Meja makan lonjong', 'saiz 10. warna hitam', 30, 22, 0, 2, 0, '', 1, 2, 276, 280, 79, 15, 1, 0, '', 0, 0, 0, 0, 0, 0, '2014-06-11 02:09:30', 0, '2014-06-19 08:25:18', 3333, 0, 0);

--
-- 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=20 ;

--
-- Dumping data for table `item_adjustment`
--

INSERT INTO `item_adjustment` (`ID`, `companyID`, `locationID`, `formNo`, `updateAble`, `adjustmentDate`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(18, 1, 1, 'IA', 0, '2014-06-20', '', '2014-06-20 04:29:17', 0, '2014-06-23 01:53:41'),
(19, 1, 2, 'IA', 1, '2014-06-24', '16', '2014-06-24 02:20:36', 0, '0000-00-00 00:00:00');

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

--
-- 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,
  `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=22 ;

--
-- Dumping data for table `item_adjustment_detail`
--

INSERT INTO `item_adjustment_detail` (`ID`, `adjustmentID`, `itemID`, `lineNo`, `unitOfMeasureID`, `qtyOnHand`, `counted`, `onDatePrice`, `updateAble`, `adjustmentDate`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(18, 18, 1, 1, 2, 0, 6, 0, 1, '2014-06-20', '', '2014-06-20 04:29:17', 0, '2014-06-20 08:53:06'),
(19, 18, 4, 2, 2, 0, 3, 0, 1, '2014-06-20', '', '2014-06-20 04:29:17', 0, '2014-06-20 08:53:11'),
(20, 18, 7, 3, 2, 0, 6, 0, 1, '2014-06-20', '', '2014-06-20 04:29:17', 0, '0000-00-00 00:00:00'),
(21, 19, 1, 1, 2, 10, 5, 0, 1, '2014-06-24', '', '2014-06-24 02:20:36', 0, '0000-00-00 00:00:00');

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

--
-- 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=19 ;

--
-- Dumping data for table `item_details`
--

INSERT INTO `item_details` (`ID`, `companyID`, `itemID`, `locationID`, `onHandQty`, `umID`, `acctID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(1, 1, 1, 1, 7, 2, 79, NULL, '2014-06-19 01:13:12', NULL, '2014-06-19 01:13:12', NULL),
(2, 1, 1, 2, 9, 2, 79, NULL, '2014-06-19 04:39:31', NULL, '2014-06-19 04:39:31', NULL),
(3, 1, 4, 1, 1, 2, 79, 1, '2014-06-19 06:56:42', NULL, '2014-06-19 06:56:42', NULL),
(4, 1, 7, 1, 6, 2, 79, 1, '2014-06-19 06:56:42', NULL, '2014-06-19 06:56:42', NULL),
(5, 1, 8, 2, 8, 2, 79, 1, '2014-06-19 06:56:42', NULL, '2014-06-19 06:56:42', NULL),
(7, 1, 10, 2, 10, 2, 79, 1, '2014-06-19 06:56:42', NULL, '2014-06-19 06:56:42', NULL),
(8, 15, 11, 5, 1, 2, 79, 1, '2014-06-19 06:56:42', NULL, '2014-06-19 06:56:42', NULL),
(9, 15, 12, 5, 1, 2, 79, 1, '2014-06-19 06:56:42', NULL, '2014-06-19 06:56:42', NULL),
(10, 1, 4, 2, 9, NULL, NULL, NULL, '2014-06-19 10:44:52', NULL, '2014-06-19 10:44:52', NULL),
(12, 1, 7, 2, 162, NULL, NULL, NULL, '2014-06-20 02:19:41', NULL, '2014-06-20 02:19:41', NULL),
(13, 1, 9, 2, 678, NULL, NULL, NULL, '2014-06-20 02:19:50', NULL, '2014-06-20 02:19:50', NULL),
(14, 1, 8, 1, 2, NULL, NULL, NULL, '2014-06-24 02:21:50', NULL, '2014-06-24 02:21:50', NULL),
(15, 15, 11, 4, 5, 2, 79, NULL, '2014-07-03 00:38:18', NULL, '2014-07-03 00:38:18', NULL),
(16, 15, 12, 4, 1, 2, 79, NULL, '2014-07-03 00:38:18', NULL, '2014-07-03 00:38:18', NULL),
(18, 15, 11, 3, 6, 2, 79, NULL, '2014-07-03 00:40:23', NULL, '2014-07-03 00:40:23', NULL);

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

--
-- 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,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ;

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

INSERT INTO `master` (`ID`, `name`, `description`, `updatedby`, `updatedTS`) VALUES
(1, 'Status', 'status active or inactive', 0, '0000-00-00 00:00:00'),
(2, 'Shipping Method', '', 0, '2014-04-24 05:01:05'),
(3, 'State', 'State', 0, '2014-04-21 09:34:26'),
(4, 'Module', 'Application module', 0, '2014-04-22 02:23:56'),
(5, 'Gender', 'Gender Male or Female', 0, '2014-04-22 02:23:56'),
(6, 'Bank', 'List of bank', 0, '2014-04-22 02:24:46'),
(7, 'Payment Method', 'List of payment method', 0, '2014-04-22 02:24:46'),
(8, 'Item Category', 'List of item category', 0, '2014-04-22 02:25:36'),
(9, 'Item Type', 'List of item type - product or service', 0, '2014-04-22 02:57:33'),
(10, 'Language', 'Language selection English or Bahasa Malasyia', 0, '2014-04-22 02:28:04'),
(11, 'Accounting Method', 'Accounting Closing/Opening method monthly or yearly', 0, '2014-04-22 02:28:04'),
(12, 'Unit of Measure', 'Unit of measurement such as kg, feet, meter, cubic', 0, '2014-04-22 02:30:31'),
(13, 'Account Type', 'Account type for chart of accounts', 0, '2014-04-22 03:05:08'),
(14, 'Business Type', 'Business type based on industry selected', 0, '2014-04-22 02:58:05'),
(15, 'Industry', 'List of industry classification - retail, manufacturing, service, others', 0, '2014-04-22 03:02:12'),
(16, 'Invoice Purchase Code', '', 1, '2014-05-07 01:56:18'),
(17, 'Invoice Sales Code', '', 1, '2014-05-07 02:16:56'),
(18, 'System Form', '', 1, '2014-05-07 03:12:14'),
(19, 'Address', 'List of address type', 0, '2014-05-16 10:47:17'),
(20, 'Movement Type', 'List of inventory movement type', 1, '2014-05-28 01:40:05'),
(21, 'General Setup', 'General Setup Parameters', 1, '2014-06-03 03:20:03');

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

--
-- 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=108 ;

--
-- Dumping data for table `master_code`
--

INSERT INTO `master_code` (`ID`, `masterID`, `parentFilterID`, `code`, `name`, `shortName`, `description`, `orderNo`, `createdBy`, `createdTS`, `updateBy`, `updateTS`, `is_delete`) VALUES
(1, 1, NULL, '0', 'Active', 'Active', '', 1, 0, '2014-05-07 10:01:04', 0, '2014-05-15 10:17:57', 1),
(2, 1, NULL, '1', 'Inactive', 'Inactive', '', 2, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(3, 2, NULL, 'FR', 'Freight', 'Freight', '', 1, 0, '2014-05-07 10:01:04', 0, '2014-04-24 05:05:19', 0),
(4, 2, 4, 'FE', 'FedEx', 'FE', 'farhana', 2, 0, '2014-05-07 10:01:04', 0, '2014-05-15 03:25:38', 0),
(5, 2, NULL, 'UPS', 'UPS', 'UPS', '', 3, 0, '2014-05-07 10:01:04', 0, '2014-04-24 05:05:19', 0),
(6, 2, NULL, 'CLNK', 'CityLink', 'CLNK', '', 2, 0, '2014-05-07 10:01:04', 0, '2014-04-24 05:05:19', 0),
(7, 2, NULL, 'PL', 'Pos Laju', 'PL', '', 5, 0, '2014-05-07 10:01:04', 0, '2014-04-24 05:05:19', 0),
(8, 2, NULL, 'DHL', 'DHL', 'DHL', '', 4, 0, '2014-05-07 10:01:04', 0, '2014-04-24 05:05:19', 0),
(9, 5, NULL, 'M', 'Male', 'Male', '', 1, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(10, 5, NULL, 'F', 'Female', '', '', 2, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(11, 15, NULL, 'MFC', 'Manufacturing', 'MFC', '', 1, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(12, 15, NULL, 'RT', 'Retail', 'RT', '', 2, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(13, 15, NULL, 'SERV', 'Service', 'SERV', '', 3, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(14, 15, NULL, 'OTH', 'Others', 'OTH', '', 4, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(15, 10, NULL, 'ENG', 'English', 'ENG', '', 1, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(16, 10, NULL, 'BM', 'Bahasa Malaysia', 'BM', '', 2, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(17, 11, NULL, 'MTH', 'Monthly', 'MTH', '', 0, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(18, 11, NULL, 'YR', 'Yearly', 'YR', '', 0, 0, '2014-05-07 10:01:04', 0, '2014-04-22 03:18:53', 0),
(19, 8, NULL, 'E', 'Electrical Appliance', 'EA', '', 5, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(20, 8, NULL, 'S', 'Stationary', 'ST', '', 10, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(21, 8, NULL, 'I', 'IT', 'IT', '', 15, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(22, 9, NULL, 'P', 'Product', 'Product', 'Physical product range', 1, 0, '2014-05-07 10:01:04', 0, '2014-05-26 00:33:45', 0),
(23, 9, NULL, 'S', 'Services', 'Services', 'Services product range', 5, 0, '2014-05-07 10:01:04', 0, '2014-05-26 00:34:04', 0),
(30, 8, NULL, 'F', 'Furniture', 'FR', '', 1, 0, '2014-05-07 10:01:04', 0, '0000-00-00 00:00:00', 0),
(31, 16, NULL, '1', 'Purchase Invoice', '', '', 10, 0, '2014-05-07 10:01:04', 1, '0000-00-00 00:00:00', 0),
(32, 16, NULL, '2', 'Direct Purchase Invcoice', '', '', 20, 0, '2014-05-07 10:01:04', 1, '0000-00-00 00:00:00', 0),
(33, 16, NULL, '3', 'Debit Note', '', 'Purchase Invoice Debit Note (Adjustment)', 30, 0, '2014-05-07 10:01:04', 1, '0000-00-00 00:00:00', 0),
(34, 16, NULL, '4', 'Credit Note', '', 'Purchase Invoice Credit Note (Adjustment)', 40, 0, '2014-05-07 10:01:04', 1, '0000-00-00 00:00:00', 0),
(35, 17, NULL, '1', 'Sales Invoice', '', '', 10, 0, '2014-05-07 10:01:04', 0, '2014-05-07 02:23:53', 0),
(36, 17, NULL, '2', 'Direct Sales Invcoice', '', '', 20, 0, '2014-05-07 10:01:04', 0, '2014-05-07 02:23:58', 0),
(37, 17, NULL, '3', 'Debit Note', '', 'Sales Invoice Debit Note (Adjustment)', 30, 0, '2014-05-07 10:01:04', 0, '2014-05-07 02:24:02', 0),
(38, 17, NULL, '4', 'Credit Note', '', 'Sales Invoice Credit Note (Adjustment)', 40, 0, '2014-05-07 10:01:04', 0, '2014-05-07 02:24:07', 0),
(39, 18, NULL, 'PR', 'Purchase Request', 'PR', 'Purchase Request Form', 90, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(40, 18, NULL, 'PO', 'Purchase Order', 'PO', 'Purchase Order Form', 100, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(41, 18, NULL, 'PI', 'Purchase Invoice', 'PURINV', 'Form Purchase Invoice', 110, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(42, 18, NULL, 'PDN', 'Purchase Debit Note', 'PDN', 'Purchase Debit Note Form', 120, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(43, 18, NULL, 'PCN', 'Purchase Credit Note', 'PCN', 'Purchase Credit Note Form', 140, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(44, 18, NULL, 'PP', 'Purchase Payment', 'PP', 'Purchase Payment Form', 150, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(45, 18, NULL, 'GRN', 'Good Received Note', 'PP', 'Godd Received Note Form', 160, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(46, 18, NULL, 'LT', 'Inventory Movement', 'LT', 'Inventory Movement Form', 170, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(47, 18, NULL, 'SQN', 'Sales Quotation', 'SQN', 'Sales Quotation Form', 180, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(48, 18, NULL, 'SON', 'Sales Order', 'SON', 'Sales Order Form', 190, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(49, 18, NULL, 'SDN', 'Delivery Order', 'SDN', 'Delivery Order Form', 200, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(50, 18, NULL, 'INV', 'Invoice', 'INV', 'Invoice Form', 210, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(51, 18, NULL, 'SDN', 'Sales Debit Note', 'PDN', 'Sales Debit Note Form', 230, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(52, 18, NULL, 'SCN', 'Sales Credit Note', 'PCN', 'Sales Credit Note Form', 240, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(53, 18, NULL, 'RP', 'Receive Payment', 'RP', 'Receive Payment Form', 250, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(54, 18, NULL, 'GRN', 'General Transaction', 'PP', 'General Transaction Form', 260, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(55, 18, NULL, 'OPN', 'Others Payment', 'OPN', 'Others Payment Form', 270, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(56, 18, NULL, 'ORI', 'Others Receive', 'ORI', 'Others Receive Form', 280, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(57, 18, NULL, 'SLR', 'Sales Return', 'SLR', 'Sales Return Form', 290, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(58, 18, NULL, 'IA', 'Item Adjustment', 'IA', 'Item Adjustment Form', 300, 1, '2014-05-07 10:01:25', 0, '0000-00-00 00:00:00', 0),
(59, 12, NULL, 'KG', 'Kilogram', '', '', 10, 1, '2014-05-09 11:30:04', 0, '0000-00-00 00:00:00', 0),
(60, 12, NULL, 'G', 'gram', '', '', 20, 1, '2014-05-09 11:30:04', 0, '0000-00-00 00:00:00', 0),
(61, 12, NULL, 'l', 'liter', '', '', 30, 1, '2014-05-09 11:30:04', 0, '0000-00-00 00:00:00', 0),
(62, 12, NULL, 'Tonn', 'tonne', '', '', 40, 1, '2014-05-09 11:30:04', 0, '0000-00-00 00:00:00', 0),
(63, 12, NULL, 'Unit', 'unit', '', '', 50, 1, '2014-05-09 11:30:04', 0, '0000-00-00 00:00:00', 0),
(64, 12, NULL, 'ml', 'mili liter', '', '', 60, 1, '2014-05-09 11:30:04', 0, '0000-00-00 00:00:00', 0),
(65, 12, NULL, 'm', 'meter', '', '', 70, 1, '2014-05-09 11:30:04', 0, '0000-00-00 00:00:00', 0),
(66, 12, NULL, 'cm', 'centimeter', '', '', 80, 1, '2014-05-09 11:30:04', 0, '0000-00-00 00:00:00', 0),
(67, 12, NULL, 'cc', 'cubic cm', '', '', 90, 1, '2014-05-09 11:30:04', 0, '0000-00-00 00:00:00', 0),
(68, 7, NULL, '', 'Cash', '', '', 0, 0, '2014-05-14 08:59:32', 0, '2014-05-16 02:52:25', 0),
(69, 7, NULL, '', 'Cheque', '', '', 0, 0, '2014-05-14 08:59:32', 0, '0000-00-00 00:00:00', 0),
(70, 0, NULL, '3333', 'fad', 'fad', 'fad', 0, 0, '2014-05-14 09:12:00', 0, '0000-00-00 00:00:00', 0),
(71, 10, NULL, 'ARB', 'Arabic', 'AR', 'Bahasa Ar', 3, 0, '2014-05-15 01:46:45', 0, '2014-05-16 02:52:26', 0),
(72, 18, 0, 'ZK', 'ZAKAT', 'sy', 'desc', 7, 0, '2014-05-15 01:59:07', 0, '2014-06-05 03:51:49', 0),
(73, 2, 4, 'FE', 'FedEx', 'FE', 'fad', 2, 0, '2014-05-15 03:03:42', 0, '0000-00-00 00:00:00', 0),
(74, 2, 0, 'FE', 'FedEx', 'FE', 'akmal', 2, 0, '2014-05-15 03:17:14', 0, '2014-05-26 01:27:52', 0),
(75, 19, 0, '1', 'Billing Address', '', '', 10, 0, '2014-05-16 04:48:35', 0, '2014-05-16 10:51:41', 0),
(76, 19, 0, '2', 'HQ', '', 'Main Addr', 10, 0, '2014-05-16 04:52:07', 0, '0000-00-00 00:00:00', 0),
(77, 19, 0, '3', 'Ship to', '', 'Ship to', 30, 0, '2014-05-16 04:53:25', 0, '0000-00-00 00:00:00', 0),
(78, 20, NULL, 'B', 'Bulk', 'Bulk', '', 10, 0, '2014-05-28 01:32:05', 0, '0000-00-00 00:00:00', 0),
(79, 20, NULL, 'S', 'Small', 'Small', '', 20, 0, '2014-05-28 01:32:05', 0, '0000-00-00 00:00:00', 0),
(80, 21, NULL, '', 'retainedEarnings', '', 'Retained Earnings', 1, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:50', 0),
(81, 21, NULL, '', 'profitlostYear', '', 'Profit/Loss Year', 10, 1, '2014-06-03 09:33:20', 0, '0000-00-00 00:00:00', 0),
(82, 21, NULL, '', 'exchangeVariances', '', 'Exchange Variances Account', 20, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(83, 21, NULL, '', 'bankchargesAccount', '', 'Bank Charges Account', 30, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(84, 21, NULL, '', 'rcvacct', '', 'Receivable Account', 40, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(85, 21, NULL, '', 'saleacct', '', 'Sales Account', 50, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(86, 21, NULL, '', 'saledisacct', '', 'Sales Discount Account', 60, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(87, 21, NULL, '', 'promptpaydisacct', '', 'Prompt Payment Discount Account', 70, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(88, 21, NULL, '', 'commissionexp', '', 'Commission Expense', 80, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(89, 21, NULL, '', 'commisionpay', '', 'Commission Payable', 90, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(90, 21, NULL, '', 'freightcharges', '', 'Freight Charges', 100, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(91, 21, NULL, '', 'exchangediff', '', 'Exchange Difference', 110, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(92, 21, NULL, '', 'payAcct', '', 'Payable Account', 120, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(93, 21, NULL, '', 'payDisc', '', 'Payable Discount', 130, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(94, 21, NULL, '', 'invAcct', '', 'Inventory Account', 140, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(95, 21, NULL, '', 'cogs', '', 'C.O.G.S Account', 150, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(96, 21, NULL, '', 'invAdjAcct', '', 'Inventory Adjustment Account', 160, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(97, 21, NULL, '', 'gstInputTax', '', 'GST-Input Tax', 170, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(98, 21, NULL, '', 'gstOutTax', '', 'GST-Output Tax', 180, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(99, 21, NULL, '', 'susgstInTax', '', 'Suspense-GST Input Tax', 190, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(100, 21, NULL, '', 'susgstOuTax', '', 'Suspense-GST Output Tax', 200, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(101, 21, NULL, '', 'gstnoclaim', '', 'GST Not Claimable', 210, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(102, 21, NULL, '', 'imdutypay', '', 'Import Duty Payable', 220, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(103, 21, NULL, '', 'saletaxpay', '', 'Sale Tax Payable', 230, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(104, 21, NULL, '', 'servtaxpay', '', 'Service Tax Payable', 240, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(105, 21, NULL, '', 'zakat', '', 'Zakat Expenses', 250, 1, '2014-06-03 09:33:20', 0, '2014-06-25 04:33:21', 0),
(106, 21, NULL, '', 'uninvoiceAP', '', 'Un-invoice AP', 165, 1, '2014-06-06 03:28:56', 0, '2014-07-03 03:48:46', 0),
(107, 21, NULL, '', 'bank', '', 'Banking Account', 35, 0, '2014-06-25 03:25:00', 0, '2014-06-25 04:34:55', 0);

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

--
-- 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=11 ;

--
-- Dumping data for table `module`
--

INSERT INTO `module` (`ID`, `parentModuleID`, `moduleName`, `description`, `orderNo`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 0, 'GL', 'General Ledger', 0, 0, '2014-05-02 00:36:58', 0, '0000-00-00 00:00:00'),
(2, 0, 'AR', 'Account Receivables', 0, 0, '2014-05-02 00:36:58', 0, '0000-00-00 00:00:00'),
(3, 0, 'AP', 'Account Payables', 0, 0, '2014-05-02 00:36:58', 0, '0000-00-00 00:00:00'),
(4, 0, 'IC', 'Inventory Control', 0, 0, '2014-05-02 00:36:58', 0, '0000-00-00 00:00:00'),
(5, 0, 'SO', 'Sales Order', 0, 0, '2014-05-02 00:36:58', 0, '0000-00-00 00:00:00'),
(6, 0, 'GST', 'Goods & Services Tax', 0, 0, '2014-05-02 00:36:58', 0, '0000-00-00 00:00:00'),
(7, 0, 'ZKT', 'Zakat', 0, 0, '2014-05-02 00:36:58', 0, '0000-00-00 00:00:00'),
(8, 0, 'PUR', 'Purchasing', 0, 0, '2014-05-02 00:36:58', 0, '0000-00-00 00:00:00'),
(9, 0, 'ADM', 'Admin', 0, 0, '2014-05-02 00:36:58', 0, '0000-00-00 00:00:00'),
(10, 0, 'STP', 'Setup', 0, 0, '2014-05-02 00:36:58', 0, '0000-00-00 00:00:00');

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

--
-- 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 `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` int(8) 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=30 ;

--
-- Dumping data for table `supplier`
--

INSERT INTO `supplier` (`ID`, `companyID`, `supplierName`, `supplierCode`, `supplierCompanyNo`, `line1`, `line2`, `line3`, `city`, `supplierPostCode`, `supplierStateID`, `supplierCountryID`, `attention`, `website`, `phoneNumber1`, `phoneNumber2`, `fax`, `generalNote`, `gstRegNo`, `termsID`, `creditLimit`, `creditLimitAlert`, `linkedAPAccountID`, `createdDate`, `currencyID`, `email`, `termstatus`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(1, 1, 'ahmad albab sdn bhd', '0', '12345-D', 'no 6 jalan melor,', 'taman melor antarabangsa,', 'simpang pulai,', 'gombak,', '68100,', 1931, 458, 'Ms Christina Lim', '0', '603-88891999', '', '603-88891999', '0', '0', 0, 0, 0, 13, '1970-01-01', 1, 'fana@yahoo.com', 0, 0, '2014-06-05 02:12:30', 0, '2014-06-17 11:05:24', 0),
(20, 1, 'Syarikat Kontena Nasional', '23100', '1234568-A', 'alamat 1', 'alamat 2', 'alamat 3', '', '', 1931, 458, 'Puan Aminah', 'website', '1244444', '', '3243242', 'general note', 'gst', 0, 0, 0, 0, '1970-01-01', 1, 'sss.aaa@hhh.my', 0, 0, '2014-06-05 02:12:30', 0, '2014-06-17 11:05:35', 0),
(23, 1, 'Microsoft', '12388', '67382-D', 'add1', 'add2', 'add3', '', '', 1925, 458, 'Datuk Asri Jamaludin', 'eee.ee.ee', '453534', '', '34534', 'general note', '45345', 0, 0, 0, 0, '2014-05-14', 2, 'sss.aaa@hhh.my', 0, 0, '2014-06-05 02:12:30', 0, '2014-06-17 11:05:46', 0),
(24, 1, 'huhu', '00', '00', '', '', '', '', '', 0, 458, '', '', '', '', '', '', '', 0, 0, 0, 0, '2014-05-14', 0, '', 0, 0, '2014-06-05 02:12:30', 0, '2014-06-24 09:56:02', 1),
(25, 27, 'Farhana ', 'A123', 'A20141', '555, JALAN SAMUDRA UTARA 1', 'TAMAN SAMUDRA', '', '', '68100', 1933, 458, '', 'www.bee.com.my', '603 61778989', '', '603 61778787', 'tet', '', 0, 0, 0, 0, '0000-00-00', 1, 'bee@gmail.com', 0, 0, '2014-06-06 10:13:09', 0, '0000-00-00 00:00:00', 0),
(26, 15, 'awan biru sdn bhd', 'SUPP1', '1234-v-0088', 'jalan awan 1', 'taman biru 2', 'kg awan biru', '', '43000', 0, 458, '', '', '', '', '', '', '', 0, 0, 0, 0, '0000-00-00', 2, '', 0, 0, '2014-06-10 09:36:09', 0, '2014-06-21 03:19:58', 0),
(27, 15, 'awan hitam sdn bhd', 'SUPP2', '12345-oo-00o--99', 'jalan awan 2', 'taman hitam 1', 'kg awan biru', '', '43000', 0, 458, '', '', '', '', '', '', '', 0, 0, 0, 258, '0000-00-00', 1, '', 0, 0, '2014-06-10 09:38:50', 0, '2014-06-21 03:20:48', 0),
(28, 15, 'asas', 'SA', 'a', 'sasas', 'asas', '', '', '', 0, 458, '', '', '', '', '', '', '', 0, 0, 0, 243, '0000-00-00', 0, '', 0, 0, '2014-06-23 02:30:58', 0, '0000-00-00 00:00:00', 0),
(29, 45, 'Borong Semua Sdn Bhd', 'AB001', 'C82134P', '12A, Jalan Wawasan 2,', 'Taman Wawasan Jaya', '', '', '40100', 1931, 458, 'Mr Borhan', '', '603 5412312', '', '603 5412323', 'Membekal pelbagai pakaian, fabrik', '', 0, 0, 0, 0, '0000-00-00', 1, 'borhan@semuaborong.com', 0, 0, '2014-07-03 01:15:25', 0, '2014-07-03 01:15:53', 0);

--
-- 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=26 ;

--
-- Dumping data for table `supplier_address`
--

INSERT INTO `supplier_address` (`ID`, `companyID`, `supplierID`, `addressCode`, `addressName`, `line1`, `line2`, `line3`, `city`, `postCode`, `stateID`, `countryID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(17, 1, 24, NULL, 'billing address', 'TAMAN SAMUDERA,', '0', '', 'gombak', '68100', 0, 0, 0, '2014-05-06 02:44:24', 0, '2014-05-09 10:27:27', 0),
(18, 1, 1, NULL, 'alamt kilang', 'TAMAN SAMUDERA,', '0', '', 'gombak', '68100', 0, 0, 0, '2014-05-06 02:48:04', 0, '2014-05-08 07:11:43', 0),
(19, 1, 1, NULL, 'cawangan', 'no jalan', '0', '', 'gombak', '68100', 0, 0, 0, '2014-05-06 02:51:00', 0, '2014-05-08 07:11:57', 0),
(20, 1, 1, NULL, 'hq', 'TAMAN SAMUDERA,', '0', '', 'GOMBAK', '68100', 0, 0, 0, '2014-05-06 02:54:04', 0, '2014-05-08 07:12:01', 0),
(21, 1, 1, NULL, 'gudang', 'TAMAN SAMUDERA,', '', '', 'gombak', '68100', 0, 0, 0, '2014-05-06 03:13:15', 0, '2014-05-08 07:12:11', 0),
(22, 1, 23, NULL, '0', 'TAMAN SAMUDERA,', '0', '0', 'gombak', '68100', 0, 0, 0, '2014-05-14 02:45:26', 0, '2014-05-14 02:45:26', 0),
(23, 1, 20, '553777', NULL, 'line1', 'line2', 'line2', 'pj', '77889', 1923, 458, 0, '2014-05-14 02:28:24', 0, '2014-05-14 08:28:27', 0),
(24, 1, 1, NULL, '0', 'FAD', 'FSDGJD', 'FSDGJD', 'SSDAS', 'SDSD', 0, 0, 0, '2014-05-19 03:33:46', 0, '2014-05-19 03:33:46', 0),
(25, 0, 1, '13221', NULL, 'fad', '', '', 'fad', '21212', 1926, 458, 0, '2014-06-01 20:21:58', NULL, '2014-06-02 02:22:14', 0);

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

--
-- 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;

--
-- Dumping data for table `supplier_contact`
--

INSERT INTO `supplier_contact` (`ID`, `supplierID`, `personID`, `position`, `is_delete`) VALUES
(0, 0, 0, 'SECRETARY', 1),
(0, 0, 0, 'SECRETARY', 1),
(0, 0, 0, 'SECRETARY', 1),
(0, 0, 0, 'HELPER', 0),
(0, 0, 0, 'SECRETARY', 0);

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

--
-- 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=3 ;

--
-- Dumping data for table `tax_class`
--

INSERT INTO `tax_class` (`ID`, `code`, `shortName`, `description`, `taxAccount`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 'GST', 'GST', 'Goods And Services Tax', NULL, NULL, '2014-05-09 11:04:42', NULL, '2014-05-11 01:24:32'),
(2, 'OTH', 'OTHER TAX', 'Other Tax', NULL, NULL, '2014-05-09 11:05:22', NULL, '2014-05-09 11:05:55');

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

--
-- 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=3 ;

--
-- Dumping data for table `tax_group`
--

INSERT INTO `tax_group` (`ID`, `code`, `description`, `taxAccount`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 'PI', 'PURCHASE/INPUT', NULL, NULL, '2014-05-09 11:06:33', NULL, '2014-05-21 08:38:43'),
(2, 'SO', 'SALES/OUTPUT', NULL, NULL, '2014-05-09 11:06:50', NULL, '2014-05-09 11:06:50');

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

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

CREATE TABLE IF NOT EXISTS `tax_master` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `companyID` int(11) DEFAULT NULL,
  `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`),
  KEY `FK_tax_master_tax_class` (`taxClass`),
  KEY `FK_tax_master_tax_group` (`taxGroup`),
  KEY `FK_tax_master_tax_type` (`taxType`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=35 ;

--
-- Dumping data for table `tax_master`
--

INSERT INTO `tax_master` (`ID`, `companyID`, `code`, `name`, `taxType`, `taxPercentage`, `taxClass`, `taxGroup`, `description`, `taxAccount`, `status`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 'SR', 'STANDARD RATED SUPPLIES WITH GST CHARGED', 1, 6, 1, 2, 'STANDARD RATED SUPPLIES WITH GST CHARGED', 38, 0, 0, '2014-05-10 23:56:37', NULL, '2014-05-21 08:39:47'),
(2, 1, 'DS', 'DEEMED SUPPLIES', 1, 0, 1, 2, 'DEEMED SUPPLIES', 38, 0, 0, '2014-05-10 23:56:37', NULL, '2014-05-21 08:39:48'),
(3, 1, 'ZRL', 'ZERO RATED SUPPLIES-LOCAL', 2, 0, 1, 2, 'ZERO RATED SUPPLIES-LOCAL', 224, 0, 0, '2014-05-10 23:56:37', NULL, '2014-05-21 08:39:48'),
(4, 1, 'ZRE', 'EXPORTED GOOD SUPPLIES', 3, 0, 1, 2, 'EXPORTED GOOD SUPPLIES', 38, 0, 0, '2014-05-10 19:02:03', NULL, '2014-05-21 08:39:48'),
(5, 1, 'ES43', 'INCIDENTAL EXEMPT SUPPLIES', 4, 0, 1, 2, 'INCIDENTAL EXEMPT SUPPLIES', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:39:49'),
(6, 1, 'ES', 'EXEMPT SUPPLIES UNDER GST', 4, 0, 1, 2, 'EXEMPT SUPPLIES UNDER GST', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:39:50'),
(7, 1, 'OS', 'OUT-OF-SCOPE SUPPLIES', 5, 0, 1, 2, 'OUT-OF-SCOPE SUPPLIES', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:39:50'),
(8, 1, 'RS', 'RELIEF SUPPLIES UNDER GST', 6, 0, 1, 2, 'RELIEF SUPPLIES UNDER GST', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:39:50'),
(9, 1, 'GS', 'DISREGARDED SUPPLIES', 7, 0, 1, 2, 'DISREGARDED SUPPLIES', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:39:51'),
(10, 1, 'AJS', 'ANY ADJUSTMENT MADE TO OUTPUT TAX', 8, 6, 1, 2, 'ANY ADJUSTMENT MADE TO OUTPUT TAX', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:39:51'),
(11, 1, 'ST-MF', 'SALES TAX FOR GOODS MANUFACTURING ', 9, 10, 2, 2, 'SALES TAX FOR GOODS MANUFACTURING ', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:39:52'),
(12, 1, 'ST', 'SALES TAX FOR GENERAL', 9, 5, 2, 2, 'SALES TAX FOR GENERAL', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:39:52'),
(13, 1, 'SERT', 'SERVICE TAX FOR GENERAL', 10, 6, 2, 2, 'SERVICE TAX FOR GENERAL', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:39:53'),
(14, 1, 'TX', 'PURCHASE WITH GST INCURRED AT 6% AND DIRECTLY ATTRIBUTABLE TO TAXABLE SUPPLIES', 11, 6, 1, 2, 'PURCHASE WITH GST INCURRED AT 6% AND DIRECTLY ATTRIBUTABLE TO TAXABLE SUPPLIES', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:39:53'),
(15, 1, 'IM', 'GST INCURRED FOR IMPORT OF GOODS', 11, 6, 1, 1, 'GST INCURRED FOR IMPORT OF GOODS', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:39:57'),
(16, 1, 'IMS', 'GST INCURRED FOR IMPORT OF SERVICES (REVERSED MECHANISM)', 11, 6, 1, 1, 'GST INCURRED FOR IMPORT OF SERVICES (REVERSED MECHANISM)', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:39:59'),
(17, 1, 'IS', 'IMPORTED UNDER SPECIAL SCHEME WITH NO GST INCURRED', 12, 0, 1, 1, 'IMPORTED UNDER SPECIAL SCHEME WITH NO GST INCURRED', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:00'),
(18, 1, 'BL', 'PURCHASE WITH GST INCURRED BUT NOT CLAIMBLE', 13, 6, 1, 1, 'PURCHASE WITH GST INCURRED BUT NOT CLAIMBLE', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:00'),
(19, 1, 'NR', 'PURCHASE FROM NON GST-REGISTERED SUPPLIER WITH NO GST INCURRED', 14, 0, 1, 1, 'PURCHASE FROM NON GST-REGISTERED SUPPLIER WITH NO GST INCURRED', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:01'),
(20, 1, 'ZP', 'PURCHASE FROM GST-REGISTERED SUPPLIER WITH NO GST INCURRED', 15, 0, 1, 1, 'PURCHASE FROM GST-REGISTERED SUPPLIER WITH NO GST INCURRED', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:01'),
(21, 1, 'EP', 'PURCHASE EXEMPTED FROM GST', 16, 0, 1, 1, 'PURCHASE EXEMPTED FROM GST', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:02'),
(22, 1, 'OP', 'PURCHASE TRANSACTIONS WHICH IS OUT OF THE SCOPE OF GST LEGISLATION', 5, 0, 1, 1, 'PURCHASE TRANSACTIONS WHICH IS OUT OF THE SCOPE', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:02'),
(23, 1, 'TX-E43', 'GST INCURRED DIRECTLY ATTRIBUTABLE TO INCIDENTAL EXEMPT SUPPLIES', 11, 6, 1, 1, 'GST INCURRED DIRECTLY ATTRIBUTABLE TO INCIDENTAL EXEMPT SUPPLIES', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:02'),
(24, 1, 'TX-N43', 'GST  INCURRED DIRECTLY ATTRIBUTABLE TO NON-INCIDENTAL EXEMPT SUPPLIES', 11, 6, 1, 1, 'GST  INCURRED DIRECTLY ATTRIBUTABLE TO NON-INCIDENTAL EXEMPT SUPPLIES', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:03'),
(25, 1, 'TX-RE', 'GST INCURRED THAT IS NOT DIRECTLY ATTRIBUTABLE TO TAXABLE OR EXEMPT SUPPLIES', 11, 6, 1, 1, 'GST INCURRED THAT IS NOT DIRECTLY ATTRIBUTABLE TO TAXABLE OR EXEMPT SUPPLIES', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:04'),
(26, 1, 'GP', 'PURCHASE TRANSACTION WHICH LEGISLATION', 12, 0, 1, 1, 'PURCHASE TRANSACTION WHICH LEGISLATION', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:05'),
(27, 1, 'AJP', 'ANY ADJUSTMENT MADE TO INPUT TAX', 19, 6, 1, 1, 'ANY ADJUSTMENT MADE TO INPUT TAX', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:06'),
(28, 1, 'ST-1', 'SALES TAX FOR GOODS MANUFACTURING ', 9, 10, 2, 1, 'SALES TAX FOR GOODS MANUFACTURING ', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:07'),
(29, 1, 'ST-2', 'SALES TAX FOR GENERAL', 9, 10, 2, 1, 'SALES TAX FOR GENERAL', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:08'),
(30, 1, 'SERT-1', 'SERVICE TAX FOR GENERAL', 10, 6, 2, 1, 'SERVICE TAX FOR GENERAL', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:08'),
(31, 1, 'IMPD-1', 'IMPORT DUTY FOR CUSTOMS IMPORTED GOODS', 17, 0, 2, 1, 'IMPORT DUTY FOR CUSTOMS IMPORTED GOODS', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:09'),
(32, 1, 'IMPD-2', 'IMPORT DUTY FOR CUSTOMS OPEN AP', 17, 0, 2, 1, 'IMPORT DUTY FOR CUSTOMS OPEN AP', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:10'),
(33, 1, 'IMPD-3', 'IMPORT DUTY FOR CUTOMS FRANCHAISE AP', 17, 0, 2, 1, 'IMPORT DUTY FOR CUTOMS FRANCHAISE AP', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:10'),
(34, 1, 'EXD', 'EXCISE DUTY CUSTOMS', 18, 0, 2, 1, 'EXCISE DUTY CUSTOMS', 38, 0, 0, '2014-05-12 01:36:01', NULL, '2014-05-21 08:40:11');

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

--
-- 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,
  `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=19 ;

--
-- Dumping data for table `tax_type`
--

INSERT INTO `tax_type` (`ID`, `code`, `taxGroupID`, `description`, `taxAccount`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 'STD', 2, 'STANDARD RATED', NULL, NULL, '2014-05-09 11:04:42', NULL, '2014-05-21 10:58:02'),
(2, 'ZRS', 2, 'ZERO RATED SUPPLIES', NULL, NULL, '2014-05-09 11:05:22', NULL, '2014-05-21 10:58:06'),
(3, 'EGS', 2, 'EXPORTED GOOD SUPPLIES', NULL, NULL, '2014-05-09 11:10:04', NULL, '2014-05-21 10:58:07'),
(4, 'ESS', 2, 'EXEMPT SUPPLIES', NULL, NULL, '2014-05-09 11:10:18', NULL, '2014-05-21 10:58:09'),
(5, 'OOS', 2, 'OUT OF SCOPE', NULL, NULL, '2014-05-09 11:10:52', NULL, '2014-05-21 10:58:10'),
(6, 'RES', 2, 'RELIEF SUPPLIES', NULL, NULL, '2014-05-09 11:11:12', NULL, '2014-05-21 10:58:11'),
(7, 'DRS', 2, 'DISREGARDED SUPPLIES', NULL, NULL, '2014-05-09 11:11:47', NULL, '2014-05-21 10:58:12'),
(8, 'OTD', 2, 'OUTPUT TAX ADJUSTMENT', NULL, NULL, '2014-05-09 11:11:58', NULL, '2014-05-21 10:58:13'),
(9, 'SLT', 2, 'SALES TAX', NULL, NULL, '2014-05-09 11:12:53', NULL, '2014-05-21 10:58:15'),
(10, 'SVT', 2, 'SERVICE TAX', NULL, NULL, '2014-05-09 11:13:11', NULL, '2014-05-21 10:58:16'),
(11, 'SRA', 1, 'STANDARD RATED ACQUISITION', NULL, NULL, '2014-05-09 11:13:33', NULL, '2014-05-21 10:57:49'),
(12, 'SPS', 1, 'SPECIAL SCHEME', NULL, NULL, '2014-05-09 11:13:51', NULL, '2014-05-21 10:57:50'),
(13, 'BIT', 1, 'BLOCK INPUT TAX', NULL, NULL, '2014-05-09 11:14:09', NULL, '2014-05-21 10:57:51'),
(14, 'NGR', 1, 'NON GST REGISTERED', NULL, NULL, '2014-05-09 11:14:24', NULL, '2014-05-21 10:57:53'),
(15, 'ZRA', 1, 'ZERO RATED ACQUISITION', NULL, NULL, '2014-05-09 11:14:49', NULL, '2014-05-21 10:57:54'),
(16, 'EXA', 1, 'EXEMPT ACQUISITION', NULL, NULL, '2014-05-09 11:15:06', NULL, '2014-05-21 10:57:55'),
(17, 'IMD', 1, 'IMPORT DUTY', NULL, NULL, '2014-05-09 11:15:42', NULL, '2014-05-21 10:57:59'),
(18, 'EXD', 1, 'EXCISE DUTY', NULL, NULL, '2014-05-09 11:15:58', NULL, '2014-05-21 10:58:00');

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

--
-- 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` (
  `fldid` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(18) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `dept_head` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`fldid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT AUTO_INCREMENT=6 ;

--
-- Dumping data for table `tbl_department`
--

INSERT INTO `tbl_department` (`fldid`, `code`, `description`, `dept_head`) VALUES
(1, 'IS', 'Information System', 'yahaya'),
(2, 'FIN', 'Finance', NULL),
(3, 'HR', 'Human Resources', NULL),
(5, 'PUR', 'Purchasing Department', 'yahaya');

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

--
-- 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,
  `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=8 ;

--
-- Dumping data for table `tbl_location`
--

INSERT INTO `tbl_location` (`fldid`, `companyID`, `code`, `desc`, `address`, `postcode`, `city`, `state`, `country`, `phone_no`, `fax_no`, `create_by`, `create_date`) VALUES
(1, 1, 'MAIN OFFICE', 'MAIN OFFICE 1', 'Lot 10, Jalan Terang', '42610', 'JENJAROM', 1931, 458, '+6013555777', '+6034462889', 'yahaya', '2014-05-19'),
(2, 1, 'MAIN OFFICE 2', 'MAIN OFFICE 2', 'jalan kg air manis\r\nkg air manis\r\n', '42610', 'JENJAROM', 1931, 458, '+6013555777', '+6034462889', 'akmal', '2014-06-12'),
(3, 15, 'HQ', 'HQ MAIN OFFICE', 'no 1 persiaran utama\r\njalan merbau sempak\r\nsg buluh', '', 'PAYA JARAS', 1931, 458, '03-32136284', '', 'akmal', '2014-06-13'),
(4, 15, 'SH1', 'SHOW ROOM 1', 'no 1 jalan 1\r\noff persiaran 5\r\nkg baru', '56000', 'KUALA LUMP[UR', 1931, 458, '03-55662489', '', 'akmal', '2014-06-13'),
(5, 15, 'W1', 'WAREHOUSE 1', 'jalan setia maju 1\r\nkg maju bersama', '43000', 'SG BULUH', 0, 458, '03-998857788', '', 'akmal', '2014-06-13'),
(6, 55, 'PKNS SHAH ALAM', 'KAWASAN SHAH ALAM', 'Lot 3A-1, Bangunan PKNS,\r\nKompleks PKNS Shah Alam 1', '40100', 'SHAH ALAM', 1931, 458, '603 4567872', '603 4567893', 'yahaya', '2014-07-03'),
(7, 55, '2', 'LOCATION SHAH ALAM', 'Lot A1,Kompleks Alam Setia\r\nWisma PKNS', '40100', 'SHAH ALAM', 1931, 458, '603 5423454', '603 5432343', 'yahaya', '2014-07-03');

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

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

CREATE TABLE IF NOT EXISTS `tbl_section` (
  `fldid` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(18) DEFAULT NULL,
  `department` varchar(18) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `section_head` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`fldid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT AUTO_INCREMENT=4 ;

--
-- Dumping data for table `tbl_section`
--

INSERT INTO `tbl_section` (`fldid`, `code`, `department`, `description`, `section_head`) VALUES
(3, 'DC', 'IS', 'Data Center', 'yahaya');

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

--
-- 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(10) 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,
  `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=18 ;

--
-- 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`, `create_dt`, `create_user`, `modified_dt`, `modified_user`, `is_delete`, `language`) VALUES
(1, 'yahaya', '1', 'Yahaya Bin Abdollah', 'IS Manager', 'yahaya_abdullah@yahoo.com', NULL, '23 (143) 423-5345 x33333', NULL, '0174426998', 'IS', 'DC', 'ADMIN', NULL, NULL, '2014-01-24 15:55:05', 'yahaya', '2014-01-26', 'yahaya', 0, 'en'),
(3, 'saya', '12345', 'saya bin dia', 'manager', 'yahaya_abdullah@yahoo.com', NULL, '', NULL, '01111', 'HR', 'DC', NULL, NULL, NULL, '2014-01-20 20:19:03', 'yahaya', '2014-01-26', 'yahaya', 0, ''),
(4, 'husna', '0', 'Nur Aina Husna Binti Yahaya', '', 'yahaya_abdullah@yahoo.com', NULL, '', NULL, '0', '0', '0', NULL, NULL, NULL, '2014-01-24 03:47:34', 'yahaya', NULL, NULL, 1, ''),
(5, 'husna1', '1', 'Nur Aina Husna Binti Yahaya', 'manager', 'yahaya_abdullah@yahoo.com', NULL, '', NULL, '0111111', 'PUR', '0', 'CR01', NULL, NULL, '2014-01-24 07:02:45', 'yahaya', '2014-01-26', 'yahaya', 0, ''),
(6, 'Liyana', '12345', 'Liyana', 'IS Manager', 'yahaya_abdullah@yahoo.com', NULL, '', NULL, '0111111', '0', 'DC', NULL, NULL, NULL, '2014-01-20 21:03:37', 'yahaya', '2014-01-26', 'yahaya', 0, ''),
(7, 'Liyana2', '12345', 'Nur Aina Husna Binti Yahaya', '', 'yahaya_abdullah@yahoo.com', NULL, '', NULL, '0', '0', '0', NULL, NULL, NULL, '2014-01-20 21:22:24', 'yahaya', NULL, NULL, 1, ''),
(8, 'liza', '0', 'Norliza Ishak', '', 'yahaya_abdullah@yahoo.com', NULL, '', NULL, '0', 'HR', '0', NULL, NULL, NULL, '2014-01-24 03:50:40', 'yahaya', NULL, NULL, 0, ''),
(9, 'liza2', '12345', 'Norliza Ishak', '', 'yahaya_abdullah@yahoo.com', NULL, '', NULL, '0', '0', '0', NULL, NULL, NULL, '2014-01-20 21:35:42', 'yahaya', NULL, NULL, 0, ''),
(10, 'liza3', '12345', 'Norliza Ishak', '', 'yahaya_abdullah@yahoo.com', NULL, '', NULL, '0', '0', '0', NULL, NULL, NULL, '2014-01-20 21:35:42', 'yahaya', NULL, NULL, 1, ''),
(11, 'liza4', '12345', 'Norliza Ishak', '', 'yahaya_abdullah@yahoo.com', NULL, '', NULL, '0', '0', '0', NULL, NULL, NULL, '2014-01-20 21:35:42', 'yahaya', NULL, NULL, 1, ''),
(12, 'koriss', '12345', 'koriss isa', '', 'korisscww@yahoo.com', NULL, '', NULL, '0', '0', '0', NULL, NULL, NULL, '2014-01-20 21:35:42', 'yahaya', NULL, NULL, 1, ''),
(13, 'farhana', '12345', 'Farhana', '', 'farhana@yahoo.com', NULL, '', NULL, '', '', '', NULL, NULL, NULL, '2014-01-26 16:08:08', 'yahaya', NULL, NULL, 1, ''),
(14, 'siapa', '12345', 'Norliza Ishak', '', 'yahaya_abdullah@yahoo.com', NULL, '', NULL, '', '', '', NULL, NULL, NULL, '2014-01-26 18:15:18', 'yahaya', NULL, NULL, 0, ''),
(15, 'yahaya1', '12345', 'Norliza Ishak', '', 'yahaya_abdullah@yahoo.com', NULL, '', NULL, '', '', '', NULL, NULL, NULL, '2014-01-26 18:27:21', 'yahaya', NULL, NULL, 0, ''),
(16, 'akmal', '12345', 'wak akmal', '', 'akmalmustajid@yahoo.com', NULL, '', NULL, '', '0', '0', NULL, NULL, NULL, '2014-04-24 21:25:32', 'yahaya', '2014-04-25', 'akmal', 0, 'en'),
(17, 'hilmi', '12345', 'hilmi', 'IS Manager', 'phoe_nix@yahoo.com', NULL, NULL, NULL, NULL, NULL, NULL, 'Admin', NULL, NULL, '2014-05-12 04:15:08', NULL, NULL, NULL, 0, 'en');

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

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

CREATE TABLE IF NOT EXISTS `terms` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `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=17 ;

--
-- Dumping data for table `terms`
--

INSERT INTO `terms` (`ID`, `termName`, `termDescription`, `dueDays`, `termStatusID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(5, '30 Days', 'Payment has to be made within 30 days or late payment charge may apply', 30, 1, 1, '2014-05-09 03:02:51', 0, '2014-05-16 09:50:36', 0),
(6, '60 Days', 'Payment due in 60', 60, 0, 1, '2014-05-09 03:02:51', 0, '2014-05-09 03:25:38', 0),
(7, 'FAD', 'SDDD', 0, 1, 0, '2014-05-16 07:58:20', 0, '2014-05-16 09:51:01', 0),
(8, 'FADDDDD', 'SDDD', 0, 1, 0, '2014-05-16 10:12:44', 0, '2014-06-06 09:30:30', 0),
(9, 'FAD', 'SDDD', 0, 1, 0, '2014-05-16 10:13:09', 0, '2014-05-16 11:35:55', 1),
(10, 'FADD', 'SDDD', 0, 1, 0, '2014-05-16 10:22:02', 0, '2014-05-16 11:35:49', 1),
(11, 'FADDD', 'SDDD', 0, 1, 0, '2014-05-16 10:24:10', 0, '2014-05-16 11:33:30', 1),
(12, 'HEHEHE', 'SDDD', 0, 1, 0, '2014-05-16 10:29:48', 0, '2014-05-16 10:49:01', 1),
(13, 'SSA', 'SDDD', 0, 1, 0, '2014-05-16 10:30:59', 0, '2014-05-16 10:47:32', 1),
(14, 'SSAF', 'SDDD', 0, 1, 0, '2014-05-16 10:31:12', 0, '2014-05-16 10:47:28', 1),
(15, 'FSFAS', 'SDDD', 0, 1, 0, '2014-05-16 10:35:54', 0, '2014-05-16 11:33:23', 1),
(16, 'DDSFSAF', 'SDDD', 0, 1, 0, '2014-05-16 10:37:05', 0, '2014-05-16 11:13:37', 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,
  `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 '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ;

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

INSERT INTO `user_module_access` (`ID`, `userID`, `moduleID`, `transaction`, `reports`, `setup`, `accessRight`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 1, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-02 01:33:50'),
(2, 1, 2, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-22 09:30:44'),
(3, 1, 3, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-04-30 06:56:13'),
(4, 1, 4, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-02 03:41:53'),
(5, 1, 5, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-01 02:09:24'),
(6, 1, 6, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-09 11:38:29'),
(7, 1, 7, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-06-24 04:22:30'),
(8, 1, 8, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-16 04:18:06'),
(9, 1, 9, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-02 09:49:12'),
(10, 1, 10, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-02 04:57:50'),
(11, 16, 1, 1, 1, 1, 0, 0, '2014-05-02 03:02:45', 0, '0000-00-00 00:00:00'),
(12, 16, 2, 1, 1, 1, 0, 0, '2014-05-02 03:02:59', 0, '0000-00-00 00:00:00'),
(13, 16, 3, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-04-30 06:56:13'),
(14, 16, 4, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-06 10:04:47'),
(15, 16, 5, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-01 02:09:24'),
(16, 16, 6, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-06 09:48:10'),
(17, 16, 7, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-06 10:05:03'),
(18, 16, 8, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-08 07:55:27'),
(19, 16, 9, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-06 10:07:12'),
(20, 16, 10, 1, 1, 1, 0, 0, '2014-05-02 01:30:17', 0, '2014-05-02 04:56:38');

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

--
-- 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_customer_aging`
--
CREATE TABLE IF NOT EXISTS `view_customer_aging` (
`customerID` 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_customer_statement`
--
CREATE TABLE IF NOT EXISTS `view_customer_statement` (
`ID` int(11)
,`parent` int(11)
,`companyID` int(11)
,`customerID` int(11)
,`transType` varchar(10)
,`transDate` date
,`refNo` varchar(32)
,`formNo` varchar(42)
,`dr` double
,`cr` double
,`seq` bigint(20)
);
-- --------------------------------------------------------

--
-- 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_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_inventorylist_subtotal`
--
CREATE TABLE IF NOT EXISTS `view_inventorylist_subtotal` (
`companyid` int(11)
,`locationid` int(11)
,`itemID` int(11)
,`itemName` varchar(146)
,`category` varchar(64)
,`description` text
,`stockValue` double
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_item_details`
--
CREATE TABLE IF NOT EXISTS `view_item_details` (
`companyid` int(11)
,`itemid` int(11)
,`itemName` varchar(82)
,`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_supplier_aging`
--
CREATE TABLE IF NOT EXISTS `view_supplier_aging` (
`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)
,`transDate` date
,`refNo` varchar(32)
,`formNo` varchar(42)
,`dr` double
,`cr` double
,`seq` bigint(20)
);
-- --------------------------------------------------------

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

--
-- Stand-in structure for view `view_unpost_ap_creditnote`
--
CREATE TABLE IF NOT EXISTS `view_unpost_ap_creditnote` (
`supplier` varchar(128)
,`creditnoteID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`supplierID` int(11)
,`supplierInvoiceNo` varchar(32)
,`itemID` int(11)
,`itemName` varchar(82)
,`amountExcludedtax` double
,`taxid` int(11)
,`taxamount` double
,`drAccountID` bigint(11)
,`crAccountID` bigint(11)
,`drTaxAccountID` bigint(11)
,`crTaxAccountID` bigint(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)
,`formNo` varchar(42)
,`companyID` int(11)
,`supplierID` int(11)
,`supplierInvoiceNo` varchar(32)
,`itemID` int(11)
,`itemName` varchar(82)
,`amountExcludedtax` double
,`taxid` int(11)
,`taxamount` double
,`drAccountID` bigint(11)
,`crAccountID` bigint(11)
,`drTaxAccountID` bigint(11)
,`crTaxAccountID` bigint(11)
);
-- --------------------------------------------------------

--
-- 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` varchar(82)
,`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` (
`salesinvoiceID` int(11)
,`creditnoteID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`customerID` int(11)
,`salesInvoiceNo` varchar(42)
,`lineNo` int(11)
,`itemID` int(11)
,`itemName` varchar(82)
,`amountExcludedtax` double
,`taxid` int(11)
,`taxamount` double
,`drAccountID` varchar(11)
,`crAccountID` bigint(11)
,`drTaxAccountID` varchar(11)
,`crTaxAccountID` bigint(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)
,`formNo` varchar(42)
,`companyID` int(11)
,`customerID` int(11)
,`salesInvoiceNo` varchar(42)
,`lineNo` int(11)
,`itemID` int(11)
,`itemName` text
,`amountExcludedtax` double
,`taxid` int(11)
,`taxamount` double
,`drAccountID` varchar(11)
,`crAccountID` int(11)
,`drTaxAccountID` varchar(11)
,`crTaxAccountID` int(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_ar_invoice`
--
CREATE TABLE IF NOT EXISTS `view_unpost_ar_invoice` (
`customer` varchar(128)
,`invoiceID` int(11)
,`formNo` varchar(42)
,`companyID` int(11)
,`customerID` int(11)
,`itemID` int(11)
,`itemName` mediumtext
,`amountExcludedtax` double
,`taxid` int(11)
,`taxamount` double
,`drAccountID` int(11)
,`crAccountID` varchar(11)
,`drTaxAccountID` int(11)
,`crTaxAccountID` varchar(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)
,`referenceNo` int(11)
,`paymentDetailID` int(11)
,`salesInvoiceNo` varchar(42)
,`amtPaid_amtAppl` double
,`discount_bankCharges` double
,`drAccountID` varchar(11)
,`crAccountID` binary(0)
,`drDiscountAccountID` varchar(11)
,`crDiscountAccountID` bigint(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_do`
--
CREATE TABLE IF NOT EXISTS `view_unpost_do` (
`deliveryOrderID` int(11)
,`formNo` varchar(32)
,`companyID` int(11)
,`customerID` int(11)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `view_unpost_other_payment`
--
CREATE TABLE IF NOT EXISTS `view_unpost_other_payment` (
`paymentID` 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
,`amtPaid_amtAppl` double
,`discount_bankCharges` binary(0)
,`drAccountID` int(11)
,`crAccountID` int(11)
,`drDiscountAccountID` int(11)
,`crDiscountAccountID` int(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)
,`paymentDetailID` int(11)
,`supplierInvoiceNo` varchar(32)
,`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(82)
,`exchangeRate` float
,`unitPrice` double
,`quantityReceived` double
,`umID` int(11)
,`amount` double
,`drAccountID` bigint(11)
,`crAccountID` bigint(11)
);
-- --------------------------------------------------------

--
-- 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,
  `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=3 ;

--
-- Dumping data for table `zakat_center`
--

INSERT INTO `zakat_center` (`ID`, `shortName`, `name`, `line1`, `line2`, `line3`, `city`, `postCode`, `stateID`, `countryID`, `noTel`, `noFax`, `email`, `website`, `createdTS`, `createdBy`, `updatedBy`, `updatedTS`) VALUES
(1, 'LZS', 'Lembaga Zakat Selangor', '3-01-1, Presint ALAMi,', 'Pusat Perniagaan Worldwide 2, ', 'Persiaran Akuatik, Seksyen 13, ', 'Shah Alam', '40100', 1931, 458, '03-5522 7700', '03-5522 7722', '', 'http://www.e-zakat.com.my', '2014-06-25 01:40:07', 1, 0, '2014-06-25 01:40:07'),
(2, 'PPZ', 'Pusat Pungutan Zakat, Majlis Agama Islam Wilayah Persekutuan', 'xx', '', '', 'Kuala Lumpur', '12345678', 1933, 458, '+603.9289.5757', '+603.9289.5758', 'info@zakat.com.my', 'http://www.zakat.com.my/', '2014-06-25 01:43:12', 1, 0, '2014-06-25 01:43:12');

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

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

CREATE TABLE IF NOT EXISTS `zakat_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,
  `year` varchar(4) DEFAULT NULL,
  `totalAmount` 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=9 ;

--
-- Dumping data for table `zakat_group`
--

INSERT INTO `zakat_group` (`ID`, `companyID`, `name`, `description`, `parentID`, `sequence`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 'Current Assets', 'Current Assets', 0, 1, 1, '2014-06-24 04:47:41', NULL, '2014-06-24 04:53:16'),
(2, 1, 'Current Liability', 'Current Liability', 0, 2, 1, '2014-06-24 04:48:46', NULL, '2014-06-24 04:53:17'),
(3, 1, 'Cash', 'Cash in hand & cash in bank', 1, 1, 1, '2014-06-24 04:49:39', NULL, '2014-06-24 04:50:54'),
(4, 1, 'Receivables', 'Account Receivables', 1, 2, 1, '2014-06-24 04:50:31', NULL, '2014-06-24 04:51:52'),
(5, 1, 'Inventory', 'Inventory', 1, 3, 1, '2014-06-24 04:51:09', NULL, '2014-06-24 04:51:30'),
(6, 1, 'Payables', 'Account Payables', 2, 1, 1, '2014-06-24 04:51:48', NULL, '2014-06-24 04:52:05'),
(7, 1, 'Accruals', 'Accruals', 2, 2, 1, '2014-06-24 04:52:26', NULL, '2014-06-24 04:52:37'),
(8, 1, 'IncomeTax', 'Income Tax Not Paid', 2, 3, 1, '2014-06-24 08:26:47', NULL, '2014-06-24 08:26:47');

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

--
-- 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=12 ;

--
-- Dumping data for table `zakat_group_details`
--

INSERT INTO `zakat_group_details` (`ID`, `companyID`, `groupID`, `acctID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(2, 1, 3, 23, 1, '2014-06-24 11:10:20', NULL, '2014-06-24 11:10:20'),
(3, 1, 3, 24, 1, '2014-06-24 11:11:08', NULL, '2014-06-24 11:11:08'),
(4, 1, 4, 20, 1, '2014-06-24 11:23:55', NULL, '2014-06-24 11:23:55'),
(5, 1, 4, 27, 1, '2014-06-24 11:24:03', NULL, '2014-06-24 11:24:03'),
(6, 1, 5, 25, 1, '2014-06-24 11:24:19', NULL, '2014-06-24 11:24:19'),
(7, 1, 6, 35, 1, '2014-06-24 11:24:31', NULL, '2014-06-24 11:24:31'),
(8, 1, 6, 36, 1, '2014-06-24 11:24:40', NULL, '2014-06-24 11:24:40'),
(9, 1, 7, 44, 1, '2014-06-24 11:25:00', NULL, '2014-06-24 11:25:00'),
(10, 1, 7, 43, 1, '2014-06-24 11:25:08', NULL, '2014-06-24 11:25:08'),
(11, 1, 3, 22, 1, '2014-06-25 07:43:10', NULL, '2014-06-25 07:43:10');

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

--
-- 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=3 ;

--
-- Dumping data for table `zakat_nisab`
--

INSERT INTO `zakat_nisab` (`ID`, `companyID`, `centerID`, `year`, `nisab`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 1, 2014, 12223, 1, '2014-06-25 03:05:21', NULL, '2014-06-25 03:24:00'),
(2, 1, 1, 2013, 16548, 1, '2014-06-25 03:05:54', NULL, '2014-06-25 03:23:48');

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

--
-- 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,
  `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,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT AUTO_INCREMENT=2 ;

--
-- Dumping data for table `zakat_summary`
--

INSERT INTO `zakat_summary` (`ID`, `companyID`, `centerID`, `year`, `totalAmount`, `totalZakatPaid`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 1, '2014', 1042950, 26073.75, 1, '2014-06-25 09:45:44', 1, '2014-06-25 09:45:59');

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

--
-- Structure for view `view_account_balance`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_account_balance` AS select `a`.`companyID` AS `companyID`,`a`.`acctID` AS `acctID`,concat(left(`b`.`acctCode`,4),'-',substr(`b`.`acctCode`,4,3),'-',right(`b`.`acctCode`,2),' ',`b`.`acctName`) AS `acctName`,`a`.`year` AS `year`,`a`.`period` AS `period`,sum(`a`.`total`) AS `closing` from (`comp_acc_det` `a` join `comp_chart_of_acct` `b`) where (`b`.`ID` = `a`.`acctID`) group by `a`.`companyID`,`a`.`acctID`,`b`.`acctName`,`a`.`year`,`a`.`period`;

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

--
-- Structure for view `view_ar_inventory`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_ar_inventory` AS select `comp_sales_invoice`.`companyID` AS `companyID`,`comp_sales_invoice`.`customerID` AS `customerID`,concat(`comp_sales_invoice`.`formNo`,'[',convert(lpad(`comp_sales_invoice`.`ID`,8,'0') using latin1),']') AS `formNo`,`comp_sales_invoice`.`salesInvoiceDate` AS `salesinvoiceDate`,`comp_sales_invoice`.`totalReceivable` AS `totalReceivable` from `comp_sales_invoice` where (`comp_sales_invoice`.`totalReceivable` > 0);

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

--
-- Structure for view `view_customer_aging`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_customer_aging` AS select `a`.`ID` AS `customerID`,(select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 0))) AS `current`,(select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 1))) AS `month1`,(select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 2))) AS `month2`,(select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 3))) AS `month3`,(select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 4))) AS `month4`,(select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 5))) AS `month5`,(select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 6))) AS `month6`,(select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 7))) AS `month7`,(select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 8))) AS `month8`,(select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 9))) AS `month9`,(select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) = 10))) AS `month10`,(select sum(`comp_sales_invoice`.`totalReceivable`) from `comp_sales_invoice` where ((`comp_sales_invoice`.`companyID` = `a`.`companyID`) and (`comp_sales_invoice`.`customerID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_sales_invoice`.`salesInvoiceDate`,now()) > 10))) AS `month11` from `customer` `a`;

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

--
-- Structure for view `view_customer_statement`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_customer_statement` AS select `comp_sales_invoice`.`ID` AS `ID`,`comp_sales_invoice`.`ID` AS `parent`,`comp_sales_invoice`.`companyID` AS `companyID`,`comp_sales_invoice`.`customerID` AS `customerID`,'Invoice' AS `transType`,`comp_sales_invoice`.`salesInvoiceDate` AS `transDate`,`comp_sales_invoice`.`customerPoNo` AS `refNo`,concat(concat(concat(`comp_sales_invoice`.`formNo`,'['),convert(lpad(`comp_sales_invoice`.`ID`,8,'0') using latin1)),']') AS `formNo`,`comp_sales_invoice`.`totalamount` AS `dr`,NULL AS `cr`,1 AS `seq` from `comp_sales_invoice` union select `comp_sales_debitnote`.`ID` AS `ID`,`comp_sales_debitnote`.`salesInvoiceID` AS `parent`,`comp_sales_debitnote`.`companyID` AS `companyID`,`comp_sales_debitnote`.`customerID` AS `customerID`,'DebitNote' AS `transType`,`comp_sales_debitnote`.`debitNoteDate` AS `transDate`,NULL AS `refno`,concat(concat(concat(`comp_sales_debitnote`.`formNo`,'['),convert(lpad(`comp_sales_debitnote`.`ID`,8,'0') using latin1)),']') AS `formNo`,NULL AS `dr`,`comp_sales_debitnote`.`totalAmount` AS `cr`,2 AS `seq` from `comp_sales_debitnote` union select `comp_sales_creditnote`.`ID` AS `ID`,`comp_sales_creditnote`.`salesInvoiceID` AS `parent`,`comp_sales_creditnote`.`companyID` AS `companyID`,`comp_sales_creditnote`.`customerID` AS `customerID`,'CreditNote' AS `transType`,`comp_sales_creditnote`.`creditNoteDate` AS `transDate`,NULL AS `refno`,concat(concat(concat(`comp_sales_creditnote`.`formNo`,'['),convert(lpad(`comp_sales_creditnote`.`ID`,8,'0') using latin1)),']') AS `formNo`,`comp_sales_creditnote`.`totalAmount` AS `dr`,NULL AS `cr`,3 AS `seq` from `comp_sales_creditnote` union select `a`.`ID` AS `ID`,`a`.`receivePaymentID` AS `parent`,`b`.`companyID` AS `companyID`,`b`.`customerID` AS `customerID`,'Payment' AS `transType`,`b`.`receivePaymentDate` AS `transDate`,`b`.`referenceNo` AS `refNo`,concat(concat(concat(`b`.`formNo`,'['),convert(lpad(`b`.`ID`,8,'0') using latin1)),']') AS `formNo`,NULL AS `dr`,`a`.`amountApplied` AS `cr`,4 AS `seq` from (`comp_receive_payment_detail` `a` join `comp_receive_payment` `b`) where (`a`.`receivePaymentID` = `b`.`ID`);

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

--
-- Structure for view `view_gaf`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_gaf` AS select `a`.`companyID` AS `companyID`,'P' AS `col1`,`a`.`supplierName` AS `col2`,`a`.`supplierCompanyNo` AS `col3`,`b`.`invoiceDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`ID`,8,'0') using latin1),']') AS `col5`,'import declaration number' AS `col6`,`c`.`lineNo` AS `col7`,`c`.`itemdescription` AS `col8`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col9`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col10`,`e`.`code` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from ((((`supplier` `a` join `comp_supplier_invoice` `b`) join `comp_supplier_invoice_detail` `c`) join `_ref_currency` `d`) join `tax_master` `e`) where ((`a`.`ID` = `b`.`supplierID`) and (`b`.`ID` = `c`.`invoiceID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`)) union select `a`.`companyID` AS `companyID`,'P' AS `col1`,`a`.`supplierName` AS `col2`,`a`.`supplierCompanyNo` AS `col3`,`b`.`invoiceDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`ID`,8,'0') using latin1),']') AS `col5`,'import declaration number' AS `col6`,`c`.`lineNo` AS `col7`,`c`.`itemdescription` AS `col8`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col9`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col10`,`e`.`code` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from ((((`supplier` `a` join `comp_supplier_invoice` `b`) join `comp_supplier_invoice_charges` `c`) join `_ref_currency` `d`) join `tax_master` `e`) where ((`a`.`ID` = `b`.`supplierID`) and (`b`.`ID` = `c`.`invoiceID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`)) union select `a`.`companyID` AS `companyID`,'P' AS `col1`,`a`.`supplierName` AS `col2`,`a`.`supplierCompanyNo` AS `col3`,`b`.`debitNoteDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`ID`,8,'0') using latin1),']') AS `col5`,'import declaration number' AS `col6`,`c`.`lineNo` AS `col7`,`c`.`itemdescription` AS `col8`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col9`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col10`,`e`.`code` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from ((((`supplier` `a` join `comp_supplier_debitnote` `b`) join `comp_supplier_debitnote_detail` `c`) join `_ref_currency` `d`) join `tax_master` `e`) where ((`a`.`ID` = `b`.`supplierID`) and (`b`.`ID` = `c`.`debitnoteID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`)) union select `a`.`companyID` AS `companyID`,'P' AS `col1`,`a`.`supplierName` AS `col2`,`a`.`supplierCompanyNo` AS `col3`,`b`.`creditNoteDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`ID`,8,'0') using latin1),']') AS `col5`,'import declaration number' AS `col6`,`c`.`lineNo` AS `col7`,`c`.`itemdescription` AS `col8`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col9`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col10`,`e`.`code` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from ((((`supplier` `a` join `comp_supplier_creditnote` `b`) join `comp_supplier_creditnote_detail` `c`) join `_ref_currency` `d`) join `tax_master` `e`) where ((`a`.`ID` = `b`.`supplierID`) and (`b`.`ID` = `c`.`creditnoteID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`)) union select `a`.`companyID` AS `companyID`,'S' AS `col1`,`a`.`customerName` AS `col2`,`a`.`customerCompanyNo` AS `col3`,`b`.`salesInvoiceDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`ID`,8,'0') using latin1),']') AS `col5`,`c`.`lineNo` AS `col6`,`g`.`description` AS `col7`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col8`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col9`,`e`.`code` AS `col10`,`f`.`fldcountry` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from ((((((`customer` `a` join `comp_sales_invoice` `b`) join `comp_sales_invoice_detail` `c`) join `_ref_currency` `d`) join `tax_master` `e`) join `_ref_country` `f`) join `item` `g`) where ((`a`.`ID` = `b`.`customerID`) and (`b`.`ID` = `c`.`invoiceID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`) and (`f`.`fldid` = `a`.`customerCountryID`) and (`g`.`ID` = `c`.`itemID`)) union select `a`.`companyID` AS `companyID`,'S' AS `col1`,`a`.`customerName` AS `col2`,`a`.`customerCompanyNo` AS `col3`,`b`.`salesInvoiceDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`ID`,8,'0') using latin1),']') AS `col5`,`c`.`lineNo` AS `col6`,`c`.`chargeDescription` AS `col7`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col8`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col9`,`e`.`code` AS `col10`,`f`.`fldcountry` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from (((((`customer` `a` join `comp_sales_invoice` `b`) join `comp_sales_invoice_charges` `c`) join `_ref_currency` `d`) join `tax_master` `e`) join `_ref_country` `f`) where ((`a`.`ID` = `b`.`customerID`) and (`b`.`ID` = `c`.`invoiceID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`) and (`f`.`fldid` = `a`.`customerCountryID`)) union select `a`.`companyID` AS `companyID`,'S' AS `col1`,`a`.`customerName` AS `col2`,`a`.`customerCompanyNo` AS `col3`,`b`.`debitNoteDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`ID`,8,'0') using latin1),']') AS `col5`,`c`.`lineNo` AS `col6`,`c`.`itemdescription` AS `col7`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col8`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col9`,`e`.`code` AS `col10`,`f`.`fldcountry` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from (((((`customer` `a` join `comp_sales_debitnote` `b`) join `comp_sales_debitnote_detail` `c`) join `_ref_currency` `d`) join `tax_master` `e`) join `_ref_country` `f`) where ((`a`.`ID` = `b`.`customerID`) and (`b`.`ID` = `c`.`debitnoteID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`) and (`f`.`fldid` = `a`.`customerCountryID`)) union select `a`.`companyID` AS `companyID`,'S' AS `col1`,`a`.`customerName` AS `col2`,`a`.`customerCompanyNo` AS `col3`,`b`.`creditNoteDate` AS `col4`,concat(`b`.`formNo`,'[',convert(lpad(`b`.`ID`,8,'0') using latin1),']') AS `col5`,`c`.`lineNo` AS `col6`,`c`.`itemdescription` AS `col7`,(`c`.`amountExcludedTax` * `b`.`exchangeRate`) AS `col8`,(`c`.`taxAmount` * `b`.`exchangeRate`) AS `col9`,`e`.`code` AS `col10`,`f`.`fldcountry` AS `col11`,`d`.`fldcurr_code` AS `col12`,`c`.`amountExcludedTax` AS `col13`,`c`.`taxAmount` AS `col14` from (((((`customer` `a` join `comp_sales_creditnote` `b`) join `comp_sales_creditnote_detail` `c`) join `_ref_currency` `d`) join `tax_master` `e`) join `_ref_country` `f`) where ((`a`.`ID` = `b`.`customerID`) and (`b`.`ID` = `c`.`creditnoteID`) and (`d`.`fldid` = `a`.`currencyID`) and (`e`.`ID` = `c`.`taxID`) and (`f`.`fldid` = `a`.`customerCountryID`));

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

--
-- Structure for view `view_inventory_statement`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_inventory_statement` AS select `a`.`companyID` AS `companyID`,`a`.`deliveryDate` AS `transactionDate`,`b`.`itemID` AS `itemID`,`c`.`name` AS `name`,`g`.`supplierName` AS `supplierCustomer`,1 AS `transactionCode`,'Purchase' AS `transactionType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`ID`,8,'0') using latin1),']') AS `formNo`,`a`.`locationID` AS `locationID`,`d`.`desc` AS `location`,`e`.`desc` AS `unitOfMeasure`,`b`.`quantityReceived` AS `quantityIn`,NULL AS `quantityOut`,`a`.`updateAble` AS `updateable` from ((((((`comp_receive_item` `a` left join `comp_receive_item_detail` `b` on((`a`.`ID` = `b`.`receiveID`))) left join `item` `c` on((`b`.`itemID` = `c`.`ID`))) left join `item_details` `f` on((`c`.`ID` = `f`.`itemID`))) join `tbl_location` `d`) join `_sys_um` `e`) join `supplier` `g`) where ((`f`.`locationID` = `d`.`fldid`) and (`e`.`fldid` = `c`.`unitOfMeasureID`) and (`a`.`supplierID` = `f`.`ID`)) union select `a`.`companyID` AS `companyID`,`a`.`adjustmentDate` AS `transactionDate`,`b`.`itemID` AS `itemID`,`c`.`name` AS `name`,`d`.`desc` AS `supplierCustomer`,2 AS `transactionCode`,'stockAdjustment' AS `transactionType`,`a`.`formNo` AS `formNo`,`a`.`locationID` AS `locationID`,`d`.`desc` AS `location`,`e`.`desc` AS `unitOfMeasure`,if(((`b`.`counted` - `b`.`qtyOnHand`) > 0),(`b`.`counted` - `b`.`qtyOnHand`),NULL) AS `quantityIn`,if(((`b`.`counted` - `b`.`qtyOnHand`) < 0),(`b`.`counted` - `b`.`qtyOnHand`),NULL) AS `quantityOut`,`a`.`updateAble` AS `updateable` from (((((`item_adjustment` `a` left join `item_adjustment_detail` `b` on((`a`.`ID` = `b`.`adjustmentID`))) left join `item` `c` on((`b`.`itemID` = `c`.`ID`))) left join `item_details` `f` on((`c`.`ID` = `f`.`itemID`))) left join `tbl_location` `d` on((`d`.`fldid` = `a`.`locationID`))) left join `_sys_um` `e` on((`e`.`fldid` = `b`.`unitOfMeasureID`))) union select `a`.`companyID` AS `companyID`,`a`.`deliveryOrderDate` AS `transactionDate`,`b`.`itemID` AS `itemID`,`c`.`name` AS `name`,`g`.`customerName` AS `supplierCustomer`,3 AS `transactionCode`,'Sale' AS `transactionType`,`a`.`formNo` AS `formNo`,`a`.`locationID` AS `locationID`,`d`.`desc` AS `location`,`e`.`desc` AS `unitOfMeasure`,NULL AS `quantityIn`,(`b`.`quantitySent` * -(1)) AS `quantityOut`,`a`.`updateAble` AS `updateable` from ((((((`comp_delivery_order` `a` left join `comp_delivery_detail` `b` on((`a`.`ID` = `b`.`deliveryID`))) left join `item` `c` on((`b`.`itemID` = `c`.`ID`))) left join `item_details` `f` on((`c`.`ID` = `f`.`itemID`))) join `tbl_location` `d`) join `_sys_um` `e`) join `customer` `g`) where ((`a`.`locationID` = `d`.`fldid`) and (`e`.`fldid` = `c`.`unitOfMeasureID`) and (`a`.`customerID` = `f`.`ID`)) union select `a`.`companyID` AS `companyID`,`a`.`dateTransfer` AS `transactionDate`,`b`.`itemID` AS `itemID`,`c`.`name` AS `name`,`d`.`desc` AS `supplierCustomer`,4 AS `transactionCode`,'TransferOut' AS `transactionType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`ID`,8,'0') using latin1),']') AS `formNo`,`a`.`fromLocationID` AS `locationID`,`d`.`desc` AS `location`,`e`.`desc` AS `unitOfMeasure`,NULL AS `quantityIn`,(`b`.`quantity` * -(1)) AS `quantityOut`,`a`.`updateable` AS `updateable` from ((((`comp_location_transfer` `a` left join `comp_location_transfer_detail` `b` on((`a`.`ID` = `b`.`locationTransferID`))) left join `item` `c` on((`b`.`itemID` = `c`.`ID`))) join `tbl_location` `d`) join `_sys_um` `e`) where ((`a`.`fromLocationID` = `d`.`fldid`) and (`e`.`fldid` = `c`.`unitOfMeasureID`)) union select `a`.`companyID` AS `companyID`,`a`.`dateTransfer` AS `transactionDate`,`b`.`itemID` AS `itemID`,`c`.`name` AS `name`,`d`.`desc` AS `supplierCustomer`,5 AS `transactionCode`,'TransferIn' AS `transactionType`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`ID`,8,'0') using latin1),']') AS `formNo`,`a`.`toLocationID` AS `locationID`,`d`.`desc` AS `location`,`e`.`desc` AS `unitOfMeasure`,`b`.`quantity` AS `quantityIn`,NULL AS `quantityOut`,`a`.`updateable` AS `updateable` from ((((`comp_location_transfer` `a` left join `comp_location_transfer_detail` `b` on((`a`.`ID` = `b`.`locationTransferID`))) left join `item` `c` on((`b`.`itemID` = `c`.`ID`))) join `tbl_location` `d`) join `_sys_um` `e`) where ((`a`.`fromLocationID` = `d`.`fldid`) and (`e`.`fldid` = `c`.`unitOfMeasureID`));

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

--
-- Structure for view `view_inventorylist_subtotal`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_inventorylist_subtotal` AS select `a`.`companyID` AS `companyid`,`a`.`locationID` AS `locationid`,`b`.`itemID` AS `itemID`,concat('[',`b`.`itemCode`,']',`b`.`itemName`) AS `itemName`,`d`.`name` AS `category`,`b`.`description` AS `description`,sum((`b`.`balanceItem` * `b`.`unitPrice`)) AS `stockValue` from (((`comp_receive_item` `a` join `comp_receive_item_detail` `b`) join `item` `c`) join `master_code` `d`) where ((`a`.`ID` = `b`.`receiveID`) and (`b`.`balanceItem` > 0) and (`c`.`ID` = `b`.`itemID`) and (`c`.`itemCategoryID` = `d`.`ID`)) group by `a`.`companyID`,`a`.`locationID`,`b`.`itemID`,`b`.`itemName`,`category`,`b`.`description`;

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

--
-- Structure for view `view_item_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_item_details` AS select `b`.`companyID` AS `companyid`,`a`.`itemID` AS `itemid`,concat('[',`c`.`itemCode`,']',`c`.`name`) AS `itemName`,`c`.`description` AS `description`,`b`.`locationID` AS `locationid`,sum(`a`.`balanceItem`) AS `onHandQty`,`a`.`umID` AS `umID`,`c`.`inventoriesID` AS `acctID`,`d`.`code` AS `location`,`e`.`code` AS `unitOfMeasure` from ((((`comp_receive_item_detail` `a` join `comp_receive_item` `b`) join `item` `c`) join `tbl_location` `d`) join `_sys_um` `e`) where ((`a`.`receiveID` = `b`.`ID`) and (`a`.`itemID` = `c`.`ID`) and (`d`.`fldid` = `b`.`locationID`) and (`e`.`fldid` = `a`.`umID`) and (`a`.`balanceItem` > 0)) group by `b`.`companyID`,`a`.`itemID`,`a`.`itemName`,`c`.`description`,`b`.`locationID`,`a`.`umID`,`acctID`,`location`,`unitOfMeasure`;

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

--
-- Structure for view `view_supplier_aging`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_supplier_aging` AS select `a`.`ID` AS `supplierID`,(select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 0))) AS `current`,(select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 1))) AS `month1`,(select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 2))) AS `month2`,(select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 3))) AS `month3`,(select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 4))) AS `month4`,(select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 5))) AS `month5`,(select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 6))) AS `month6`,(select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 7))) AS `month7`,(select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 8))) AS `month8`,(select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 9))) AS `month9`,(select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) = 10))) AS `month10`,(select sum(`comp_supplier_invoice`.`totalPayable`) from `comp_supplier_invoice` where ((`comp_supplier_invoice`.`companyID` = `a`.`companyID`) and (`comp_supplier_invoice`.`supplierID` = `a`.`ID`) and (timestampdiff(MONTH,`comp_supplier_invoice`.`invoiceDate`,now()) > 10))) AS `month11` from `supplier` `a`;

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

--
-- Structure for view `view_supplier_statement`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_supplier_statement` AS select `comp_supplier_invoice`.`ID` AS `ID`,`comp_supplier_invoice`.`ID` AS `parent`,`comp_supplier_invoice`.`companyID` AS `companyID`,`comp_supplier_invoice`.`supplierID` AS `supplierID`,`comp_supplier_invoice`.`invoiceDate` AS `transDate`,`comp_supplier_invoice`.`supplierInvoiceNo` AS `refNo`,concat(concat(concat(`comp_supplier_invoice`.`formNo`,'['),convert(lpad(`comp_supplier_invoice`.`ID`,8,'0') using latin1)),']') AS `formNo`,`comp_supplier_invoice`.`totalAmount` AS `dr`,NULL AS `cr`,1 AS `seq` from `comp_supplier_invoice` union select `comp_supplier_debitnote`.`ID` AS `ID`,`comp_supplier_debitnote`.`supplierInvoiceID` AS `parent`,`comp_supplier_debitnote`.`companyID` AS `companyID`,`comp_supplier_debitnote`.`supplierID` AS `supplierID`,`comp_supplier_debitnote`.`debitNoteDate` AS `transDate`,NULL AS `refno`,concat(concat(concat(`comp_supplier_debitnote`.`formNo`,'['),convert(lpad(`comp_supplier_debitnote`.`ID`,8,'0') using latin1)),']') AS `formNo`,NULL AS `dr`,`comp_supplier_debitnote`.`totalAmount` AS `cr`,2 AS `seq` from `comp_supplier_debitnote` union select `comp_supplier_creditnote`.`ID` AS `ID`,`comp_supplier_creditnote`.`supplierInvoiceID` AS `parent`,`comp_supplier_creditnote`.`companyID` AS `companyID`,`comp_supplier_creditnote`.`supplierID` AS `supplierID`,`comp_supplier_creditnote`.`creditNoteDate` AS `transDate`,NULL AS `refno`,concat(concat(concat(`comp_supplier_creditnote`.`formNo`,'['),convert(lpad(`comp_supplier_creditnote`.`ID`,8,'0') using latin1)),']') AS `formNo`,`comp_supplier_creditnote`.`totalAmount` AS `dr`,NULL AS `cr`,3 AS `seq` from `comp_supplier_creditnote` union select `a`.`ID` AS `ID`,`a`.`purchaseInvoiceID` AS `parent`,`b`.`companyID` AS `companyID`,`b`.`supplierID` AS `supplierID`,`b`.`paymentDate` AS `transDate`,`b`.`referenceNo` AS `refNo`,concat(concat(concat(`b`.`formNo`,'['),convert(lpad(`b`.`ID`,8,'0') using latin1)),']') AS `formNo`,NULL AS `dr`,`a`.`amountApplied` AS `cr`,4 AS `seq` from (`comp_payment_detail` `a` join `comp_payment` `b`) where (`a`.`paymentID` = `b`.`ID`) union select `a`.`ID` AS `ID`,`a`.`purchaseInvoiceID` AS `parent`,`b`.`companyID` AS `companyID`,`b`.`supplierID` AS `supplierID`,`b`.`paymentDate` AS `transDate`,'Discount' AS `refNo`,concat(concat(concat(`b`.`formNo`,'['),convert(lpad(`b`.`ID`,8,'0') using latin1)),']') AS `formNo`,NULL AS `dr`,`a`.`discount` AS `cr`,5 AS `seq` from (`comp_payment_detail` `a` join `comp_payment` `b`) where (`a`.`paymentID` = `b`.`ID`);

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

--
-- Structure for view `view_total_debit_note`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_total_debit_note` AS select `comp_sales_debitnote_detail`.`debitnoteID` AS `debitnoteID`,sum(`comp_sales_debitnote_detail`.`taxAmount`) AS `totalTaxAmount` from `comp_sales_debitnote_detail` group by `comp_sales_debitnote_detail`.`debitnoteID`;

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

--
-- Structure for view `view_unpost_ap_creditnote`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_unpost_ap_creditnote` AS select `e`.`supplierName` AS `supplier`,`a`.`ID` AS `creditnoteID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`ID`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,`c`.`supplierInvoiceNo` AS `supplierInvoiceNo`,`b`.`itemID` AS `itemID`,concat('[',`d`.`itemCode`,']',`b`.`itemname`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,(select `item`.`inventoriesID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `drAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `drTaxAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crTaxAccountID` from (((`comp_supplier_creditnote` `a` join (`comp_supplier_creditnote_detail` `b` left join `item` `d` on((`b`.`itemID` = `d`.`ID`)))) join `comp_supplier_invoice` `c`) join `supplier` `e`) where ((`a`.`ID` = `b`.`creditnoteID`) and (`a`.`supplierInvoiceID` = `c`.`ID`) and (`e`.`ID` = `a`.`supplierID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0));

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

--
-- Structure for view `view_unpost_ap_debitnote`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_unpost_ap_debitnote` AS select `e`.`supplierName` AS `supplier`,`a`.`ID` AS `debitnoteID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`ID`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,`c`.`supplierInvoiceNo` AS `supplierInvoiceNo`,`b`.`itemID` AS `itemID`,concat('[',`d`.`itemCode`,']',`b`.`itemname`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drAccountID`,(select `item`.`inventoriesID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `crAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drTaxAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `crTaxAccountID` from (((`comp_supplier_debitnote` `a` join (`comp_supplier_debitnote_detail` `b` left join `item` `d` on((`b`.`itemID` = `d`.`ID`)))) join `comp_supplier_invoice` `c`) join `supplier` `e`) where ((`a`.`ID` = `b`.`debitnoteID`) and (`a`.`supplierID` = `e`.`ID`) and (`a`.`supplierInvoiceID` = `c`.`ID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0));

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

--
-- Structure for view `view_unpost_ap_invoice`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_unpost_ap_invoice` AS select `d`.`supplierName` AS `supplier`,`a`.`ID` AS `invoiceID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`ID`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,`b`.`lineNo` AS `lineNo`,`b`.`itemID` AS `itemID`,concat('[',`c`.`itemCode`,']',`b`.`itemname`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'unInvoiceAP'))) AS `drAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `drTaxAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crTaxAccountID` from ((`comp_supplier_invoice` `a` join (`comp_supplier_invoice_detail` `b` left join `item` `c` on((`b`.`itemID` = `c`.`ID`)))) join `supplier` `d`) where ((`a`.`ID` = `b`.`invoiceID`) and (`d`.`ID` = `a`.`supplierID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `d`.`supplierName` AS `supplier`,`a`.`ID` AS `invoiceID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`ID`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,(`b`.`lineNo` + (select max(`comp_supplier_invoice_detail`.`lineNo`) from `comp_supplier_invoice_detail` where (`comp_supplier_invoice_detail`.`invoiceID` = `a`.`ID`))) AS `b.lineNo + (select max(lineNo) from comp_supplier_invoice_detail where invoiceid = a.id)`,NULL AS `NULL`,`b`.`itemname` AS `itemname`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,`b`.`accountNoID` AS `drAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `drTaxAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `crTaxAccountID` from ((`comp_supplier_invoice` `a` join `comp_supplier_invoice_charges` `b`) join `supplier` `d`) where ((`a`.`ID` = `b`.`invoiceID`) and (`d`.`ID` = `a`.`supplierID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0));

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

--
-- Structure for view `view_unpost_ar_creditnote`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_unpost_ar_creditnote` AS select `a`.`salesInvoiceID` AS `salesinvoiceID`,`a`.`ID` AS `creditnoteID`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`ID`,8,'0') using latin1),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,concat(`c`.`formNo`,'[',convert(lpad(`c`.`ID`,8,'0') using latin1),']') AS `salesInvoiceNo`,`b`.`lineNo` AS `lineNo`,`b`.`itemID` AS `itemID`,concat('[',`d`.`itemCode`,']',`b`.`itemname`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `drAccountID`,(select `item`.`inventoriesID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `crAccountID`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `drTaxAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `crTaxAccountID` from (((((`comp_sales_creditnote` `a` left join `comp_sales_creditnote_detail` `b` on((`a`.`ID` = `b`.`creditnoteID`))) left join `item` `d` on((`b`.`itemID` = `d`.`ID`))) left join `comp_sales_invoice` `c` on((`c`.`ID` = `a`.`salesInvoiceID`))) join `customer` `f`) join `comp_control_acct_setup` `e`) where ((`a`.`ID` = `b`.`creditnoteID`) and (`a`.`customerID` = `f`.`ID`) and (`e`.`companyID` = `a`.`companyID`) and (`e`.`accountCode` = 'rcvacct') and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0));

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

--
-- Structure for view `view_unpost_ar_debitnote`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_unpost_ar_debitnote` AS select `f`.`customerName` AS `customer`,`a`.`salesInvoiceID` AS `salesinvoiceID`,`a`.`ID` AS `debitnoteID`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`ID`,8,'0') using latin1),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,concat(`c`.`formNo`,'[',convert(lpad(`c`.`ID`,8,'0') using latin1),']') AS `salesInvoiceNo`,`b`.`lineNo` AS `lineNo`,`b`.`itemID` AS `itemID`,concat('[',`d`.`itemCode`,']',`b`.`itemname`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `drAccountID`,(select `item`.`inventoriesID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `crAccountID`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `drTaxAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `crTaxAccountID` from (((((`comp_sales_debitnote` `a` join `comp_sales_debitnote_detail` `b` on((`a`.`ID` = `b`.`debitnoteID`))) left join `item` `d` on((`b`.`itemID` = `d`.`ID`))) left join `comp_sales_invoice` `c` on((`c`.`ID` = `a`.`salesInvoiceID`))) join `customer` `f`) join `comp_control_acct_setup` `e`) where ((`a`.`ID` = `b`.`debitnoteID`) and (`a`.`customerID` = `f`.`ID`) and (`e`.`companyID` = `a`.`companyID`) and (`e`.`accountCode` = 'rcvacct') and (`a`.`ID` = `b`.`debitnoteID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `f`.`customerName` AS `customer`,`a`.`salesInvoiceID` AS `salesinvoiceID`,`a`.`ID` AS `debitnoteID`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`ID`,8,'0') using latin1),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,concat(`c`.`formNo`,'[',convert(lpad(`c`.`ID`,8,'0') using latin1),']') AS `salesInvoiceNo`,`b`.`lineNo` AS `lineNo`,NULL AS `itemID`,`b`.`chargeDescription` AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `drAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'freightcharges'))) AS `crAccountID`,ifnull(`f`.`linkedAPAccountID`,`e`.`accountID`) AS `drTaxAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `crTaxAccountID` from ((((`comp_sales_debitnote` `a` left join `comp_sales_invoice` `c` on((`c`.`ID` = `a`.`salesInvoiceID`))) join `customer` `f`) join `comp_control_acct_setup` `e`) join `comp_sales_debitnote_charges` `b`) where ((`a`.`ID` = `b`.`debitNoteID`) and (`a`.`customerID` = `f`.`ID`) and (`e`.`companyID` = `a`.`companyID`) and (`e`.`accountCode` = 'rcvacct') and (`a`.`ID` = `b`.`debitNoteID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0));

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

--
-- Structure for view `view_unpost_ar_invoice`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_unpost_ar_invoice` AS select `e`.`customerName` AS `customer`,`a`.`ID` AS `invoiceID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`ID`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,`b`.`itemID` AS `itemID`,concat('[',`c`.`itemCode`,']',`c`.`description`) AS `itemName`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,(select `item`.`inventoriesID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `drAccountID`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `crAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `drTaxAccountID`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `crTaxAccountID` from ((`comp_sales_invoice` `a` join (`comp_sales_invoice_detail` `b` left join `item` `c` on((`b`.`itemID` = `c`.`ID`)))) join `customer` `e`) where ((`a`.`ID` = `b`.`invoiceID`) and (`a`.`customerID` = `e`.`ID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `e`.`customerName` AS `customer`,`a`.`ID` AS `invoiceID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`ID`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,NULL AS `NULL`,`b`.`chargeDescription` AS `chargedescription`,`b`.`amountExcludedTax` AS `amountExcludedtax`,`b`.`taxID` AS `taxid`,`b`.`taxAmount` AS `taxamount`,`b`.`accountNoID` AS `drAccountID`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `crAccountID`,(select `tax_master`.`taxAccount` from `tax_master` where (`tax_master`.`ID` = `b`.`taxID`)) AS `drTaxAccountID`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `crTaxAccountID` from ((`comp_sales_invoice` `a` join `comp_sales_invoice_charges` `b`) join `customer` `e`) where ((`a`.`ID` = `b`.`invoiceID`) and (`e`.`ID` = `a`.`customerID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0));

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

--
-- Structure for view `view_unpost_ar_payment`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_unpost_ar_payment` AS select `a`.`ID` AS `paymentID`,concat(`a`.`formNo`,'[',convert(lpad(`a`.`ID`,8,'0') using latin1),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID`,`a`.`referenceNo` AS `referenceNo`,`b`.`ID` AS `paymentDetailID`,concat(`c`.`formNo`,'[',convert(lpad(`c`.`ID`,8,'0') using latin1),']') AS `salesInvoiceNo`,(`b`.`amountApplied` - `b`.`discount`) AS `amtPaid_amtAppl`,`b`.`discount` AS `discount_bankCharges`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `drAccountID`,NULL AS `crAccountID`,(select `customer`.`linkedAPAccountID` from `customer` where (`customer`.`ID` = `a`.`customerID`)) AS `drDiscountAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'saledisacct'))) AS `crDiscountAccountID` from ((`comp_receive_payment` `a` join `comp_receive_payment_detail` `b`) join `comp_sales_invoice` `c`) where ((`a`.`ID` = `b`.`receivePaymentID`) and (`c`.`ID` = `b`.`invoiceID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0));

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

--
-- Structure for view `view_unpost_do`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`192.168.1.174` SQL SECURITY DEFINER VIEW `view_unpost_do` AS select `a`.`ID` AS `deliveryOrderID`,`a`.`formNo` AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`customerID` AS `customerID` from `comp_delivery_order` `a` where (`a`.`updateAble` = 1);

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

--
-- Structure for view `view_unpost_other_payment`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_unpost_other_payment` AS select `a`.`ID` AS `paymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`ID`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,NULL AS `supplierID`,NULL AS `purchaseInvoiceID`,`b`.`ID` AS `paymentDetailID`,NULL AS `supplierInvoiceNo`,`b`.`lineNo` AS `lineNo`,`b`.`itemdescription` AS `itemdescription`,`b`.`amountIncludedTax` AS `amtPaid_amtAppl`,NULL AS `discount_bankCharges`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'payAcct'))) AS `drAccountID`,`a`.`accountID` AS `crAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'payAcct'))) AS `drDiscountAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'payDisc'))) AS `crDiscountAccountID` from (`comp_payment_others` `a` join `comp_payment_others_with_item` `b`) where ((`a`.`ID` = `b`.`otherPaymentID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `a`.`ID` AS `paymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`ID`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,NULL AS `supplierID`,NULL AS `purchaseInvoiceID`,`b`.`ID` AS `paymentDetailID`,NULL AS `supplierInvoiceNo`,`b`.`lineNo` AS `lineNo`,`b`.`itemdescription` AS `itemdescription`,`b`.`amountIncludedTax` AS `amtPaid_amtAppl`,NULL AS `discount_bankCharges`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'payAcct'))) AS `drAccountID`,`a`.`accountID` AS `crAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'payAcct'))) AS `drDiscountAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'payDisc'))) AS `crDiscountAccountID` from (`comp_payment_others` `a` join `comp_payment_others_without_item` `b`) where ((`a`.`ID` = `b`.`otherPaymentID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0));

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

--
-- Structure for view `view_unpost_payment`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_unpost_payment` AS select `a`.`ID` AS `paymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`ID`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,NULL AS `purchaseInvoiceID`,NULL AS `paymentDetailID`,NULL AS `supplierInvoiceNo`,`a`.`amountPaid` AS `amtPaid_amtAppl`,`a`.`bankCharges` AS `discount_bankCharges`,NULL AS `drAccountID`,`a`.`accountID` AS `crAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'bankchargesAccount'))) AS `drDiscountAccountID`,NULL AS `crDiscountAccountID` from `comp_payment` `a` where ((`a`.`updateAble` = 1) and (`a`.`is_delete` = 0)) union select `a`.`ID` AS `paymentID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`ID`,8,'0') using latin1)),']') AS `formNo`,`a`.`companyID` AS `companyID`,`a`.`supplierID` AS `supplierID`,`b`.`purchaseInvoiceID` AS `purchaseInvoiceID`,`b`.`ID` AS `paymentDetailID`,`c`.`supplierInvoiceNo` AS `supplierInvoiceNo`,(`b`.`amountApplied` - `b`.`discount`) AS `amtPaid_amtAppl`,`b`.`discount` AS `discount_bankCharges`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drAccountID`,NULL AS `crAccountID`,(select `supplier`.`linkedAPAccountID` from `supplier` where (`supplier`.`ID` = `a`.`supplierID`)) AS `drDiscountAccountID`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'payDisc'))) AS `crDiscountAccountID` from ((`comp_payment` `a` join `comp_payment_detail` `b`) join `comp_supplier_invoice` `c`) where ((`a`.`ID` = `b`.`paymentID`) and (`c`.`ID` = `b`.`purchaseInvoiceID`) and (`a`.`updateAble` = 1) and (`a`.`is_delete` = 0));

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

--
-- Structure for view `view_unpost_receive_item`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_unpost_receive_item` AS select `a`.`ID` AS `receiveID`,`a`.`companyID` AS `companyID`,`a`.`locationID` AS `locationID`,`a`.`deliveryDate` AS `transactionDate`,`a`.`supplierID` AS `supplierID`,concat(concat(concat(`a`.`formNo`,'['),convert(lpad(`a`.`ID`,8,'0') using latin1)),']') AS `formNo`,`b`.`lineNo` AS `lineNo`,`b`.`itemID` AS `itemID`,concat('[',`c`.`itemCode`,']',`c`.`name`) AS `itemName`,`a`.`exchangeRate` AS `exchangeRate`,`b`.`unitPrice` AS `unitPrice`,`b`.`quantityReceived` AS `quantityReceived`,`b`.`umID` AS `umID`,`b`.`amount` AS `amount`,(select `comp_control_acct_setup`.`accountID` from `comp_control_acct_setup` where ((`comp_control_acct_setup`.`companyID` = `a`.`companyID`) and (`comp_control_acct_setup`.`accountCode` = 'unInvoiceAP'))) AS `drAccountID`,(select `item`.`inventoriesID` from `item` where (`item`.`ID` = `b`.`itemID`)) AS `crAccountID` from ((`comp_receive_item` `a` join `comp_receive_item_detail` `b`) join `item` `c`) where ((`a`.`updateAble` = 1) and (`a`.`ID` = `b`.`receiveID`) and (`b`.`itemID` = `c`.`ID`));

DELIMITER $$
--
-- Events
--
CREATE DEFINER=`root`@`localhost` EVENT `countSupplierBalance` ON SCHEDULE EVERY 1 MONTH STARTS '2014-06-25 16:43:47' ON COMPLETION PRESERVE ENABLE DO insert into comp_supplier_closing (companyID, supplierID, yearMonth,openBalance,totalDr,totalCr,balance)
	select c.companyID, c.ID as supplierID, date_format(now(),"%Y%m") as yearMonth, 
	coalesce(b.openBalance,0) as openBalance, coalesce(sum(a.dr),0) as totalDr, 
	coalesce(sum(a.cr),0) as totalCr, 
	coalesce(b.openBalance,0) - coalesce(sum(a.dr),0) - coalesce(sum(a.cr),0) as balance
	from (supplier c left outer join view_supplier_statement a on c.ID = a.supplierID 
	and date_format(a.transDate,"%Y%m") = date_format(now(),"%Y%m")) 
	left outer join comp_supplier_closing b on a.supplierID = b.supplierID
	and a.companyID = b.companyID 
	and b.yearMonth = date_format(a.transDate - interval 1 month,"%Y%m")
	
	group by c.id, a.companyID$$

CREATE DEFINER=`root`@`localhost` EVENT `countSupplierBalanceDaily` ON SCHEDULE EVERY 1 DAY STARTS '2014-06-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert into comp_supplier_closing_daily (companyID, supplierID, transDate,openBalance,totalDr,totalCr,balance)
	select c.companyID, c.ID as supplierID,  date_format(now(),"%Y%m%d") as transDate, 
	coalesce(b.openBalance,0) as openBanlance, coalesce(sum(a.dr),0) as totalDr, 
	coalesce(sum(a.cr),0) as totalCr, 
	coalesce(b.openBalance,0) - coalesce(sum(a.dr),0) - coalesce(sum(a.cr),0) as balance 
	from (supplier c left outer join view_supplier_statement a on c.ID = a.supplierID 
		and date_format(a.transDate,"%Y%m%d") = date_format(now(),"%Y%m%d")) 
		left outer join comp_supplier_closing_daily b on a.supplierID = b.supplierID and a.companyID = b.companyID 
		and b.transDate = a.transDate - interval 1 day 
	group by c.id, a.companyID$$

DELIMITER ;
--
-- Database: `phpmyadmin`
--

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

--
-- Table structure for table `pma_bookmark`
--

CREATE TABLE IF NOT EXISTS `pma_bookmark` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dbase` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `user` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `label` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `query` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Bookmarks' AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `pma_column_info`
--

CREATE TABLE IF NOT EXISTS `pma_column_info` (
  `id` int(5) unsigned NOT NULL AUTO_INCREMENT,
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `column_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `comment` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `mimetype` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `transformation` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `transformation_options` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column information for phpMyAdmin' AUTO_INCREMENT=78 ;

--
-- Dumping data for table `pma_column_info`
--

INSERT INTO `pma_column_info` (`id`, `db_name`, `table_name`, `column_name`, `comment`, `mimetype`, `transformation`, `transformation_options`) VALUES
(1, 'iaccountdb', 'comp_sales_invoice', 'totalamount', '', '', '_', ''),
(2, 'iaccountdb', 'comp_payment', 'exchangeRate', '', '', '_', ''),
(3, 'iaccountdb', 'comp_receive_payment', 'exchangeRate', '', '', '_', ''),
(4, 'iaccountdb', 'comp_sales_invoice_charges', 'lineNo', '', '', '_', ''),
(5, 'iaccountdb', 'comp_supplier_invoice_charges', 'lineNo', '', '', '_', ''),
(6, 'iaccountdb', 'comp_location_transfer_detail', 'LineNo', '', '', '_', ''),
(7, 'iaccountdb', 'item_adjustment', 'locationID', '', '', '_', ''),
(8, 'iaccountdb', 'item_adjustment', 'companyID', '', '', '_', ''),
(9, 'iaccountdb', 'item_adjustment', 'adjustmentDate', '', '', '_', ''),
(10, 'iaccountdb', 'item_adjustmnet_detail', 'adjustmentID', '', '', '_', ''),
(11, 'iaccountdb', 'item_adjustment', 'ID', '', '', '_', ''),
(12, 'iaccountdb', 'item_adjustmnet_detail', 'unitOfMeasureID', '', '', '_', ''),
(13, 'iaccountdb', 'item_adjustment', 'formNo', '', '', '_', ''),
(14, 'iaccountdb', 'comp_delivery_order', 'updateAble', '', '', '_', ''),
(15, 'iaccountdb', 'comp_location_transfer', 'updateable', '', '', '_', ''),
(16, 'iaccountdb', 'item_adjustment_detail', 'lineNo', '', '', '_', ''),
(17, 'iaccountdb', 'supplier', 'email', '', '', '_', ''),
(18, 'iaccountdb', 'customer', 'email', '', '', '_', ''),
(19, 'iaccountdb', 'comp_supplier_debitnote_charges', 'ID', '', '', '_', ''),
(20, 'iaccountdb', 'comp_supplier_debitnote_charges', 'debitNoteID', '', '', '_', ''),
(21, 'iaccountdb', 'comp_supplier_creditnote_charges', 'ID', '', '', '_', ''),
(22, 'iaccountdb', 'comp_supplier_creditnote_charges', 'creditNoteID', '', '', '_', ''),
(23, 'iaccountdb', 'comp_sales_debitnote_charges', 'ID', '', '', '_', ''),
(24, 'iaccountdb', 'comp_sales_debitnote_charges', 'debitNoteID', '', '', '_', ''),
(25, 'iaccountdb', 'comp_sales_creditnote_charges', 'ID', '', '', '_', ''),
(26, 'iaccountdb', 'comp_sales_creditnote_charges', 'creditNoteID', '', '', '_', ''),
(27, 'iaccountdb', 'customer', 'linkedAPAccountID', '', '', '_', ''),
(28, 'iaccountdb', 'comp_bank', 'bankName', '', '', '_', ''),
(29, 'iaccountdb', 'comp_bank', 'bankShortName', '', '', '_', ''),
(30, 'iaccountdb', 'comp_bank', 'branch', '', '', '_', ''),
(31, 'iaccountdb', 'comp_bank', 'PostCode', '', '', '_', ''),
(32, 'iaccountdb', 'comp_bank', 'bankStateID', '', '', '_', ''),
(33, 'iaccountdb', 'comp_bank', 'bankCountryID', '', '', '_', ''),
(34, 'iaccountdb', 'comp_bank', 'linkAccountID', '', '', '_', ''),
(35, 'iaccountdb', 'comp_bank', 'bankAccountNo', '', '', '_', ''),
(36, 'iaccountdb', 'comp_bank', 'currentBalance', '', '', '_', ''),
(37, 'iaccountdb', 'comp_bank', 'line1', '', '', '_', ''),
(38, 'iaccountdb', 'comp_bank', 'line2', '', '', '_', ''),
(39, 'iaccountdb', 'comp_bank', 'line3', '', '', '_', ''),
(40, 'iaccountdb', 'comp_bank', 'city', '', '', '_', ''),
(41, 'iaccountdb', 'comp_bank', 'attention', '', '', '_', ''),
(42, 'iaccountdb', 'comp_bank', 'phoneNumber1', '', '', '_', ''),
(43, 'iaccountdb', 'comp_bank', 'phoneNumber2', '', '', '_', ''),
(44, 'iaccountdb', 'comp_bank', 'fax', '', '', '_', ''),
(45, 'iaccountdb', 'comp_bank', 'ID', '', '', '_', ''),
(46, 'iaccountdb', 'comp_receive_item', 'exchangeRate', '', '', '_', ''),
(47, 'iaccountdb', 'company', 'muslimShareholder', '', '', '_', ''),
(48, 'iaccountdb', 'comp_payment_others', 'bankId', '', '', '_', ''),
(49, 'iaccountdb', 'comp_receive_payment', 'bankID', '', '', '_', ''),
(50, 'iaccountdb', 'comp_payment', 'bankID', '', '', '_', ''),
(51, 'iaccountdb', 'comp_payment', 'reconcile', '', '', '_', ''),
(52, 'iaccountdb', 'comp_payment_others', 'reconcile', '', '', '_', ''),
(54, 'iaccountdb', 'comp_payment', 'accountDescription', '', '', '_', ''),
(69, 'iaccountdb', 'comp_bank_reconcile', 'ID', '', '', '_', ''),
(56, 'iaccountdb', 'comp_bank_reconcile', 'bankID', '', '', '_', ''),
(57, 'iaccountdb', 'comp_bank_reconcile', 'reconcileDate', '', '', '_', ''),
(58, 'iaccountdb', 'comp_bank_reconcile', 'bankStatementDate', '', '', '_', ''),
(59, 'iaccountdb', 'comp_bank_reconcile', 'totalDebit', '', '', '_', ''),
(60, 'iaccountdb', 'comp_bank_reconcile', 'totalCredit', '', '', '_', ''),
(61, 'iaccountdb', 'comp_bank_reconcile', 'bankStatementBalance', '', '', '_', ''),
(62, 'iaccountdb', 'comp_bank_reconcile', 'reconcileBalance', '', '', '_', ''),
(63, 'iaccountdb', 'comp_bank_reconcile', 'createdBy', '', '', '_', ''),
(64, 'iaccountdb', 'comp_bank_reconcile', 'createdTS', '', '', '_', ''),
(65, 'iaccountdb', 'comp_bank_reconcile', 'updatedBy', '', '', '_', ''),
(66, 'iaccountdb', 'comp_bank_reconcile', 'updatedTS', '', '', '_', ''),
(67, 'iaccountdb', 'comp_supplier_closing_daily', 'createdTS', '', '', '_', ''),
(68, 'iaccountdb', 'comp_bank_reconcile', 'IDs', '', '', '_', ''),
(70, 'iaccountdb', 'comp_sales_invoice', 'invoiceCodeID', '', '', '_', ''),
(71, 'iaccountdb', 'comp_sales_order', 'is_delete', '', '', '_', ''),
(76, 'iaccountdb', 'comp_purchase_order', 'invoiceID', '', '', '_', ''),
(73, 'iaccountdb', 'comp_sales_invoice', 'salesOrderID', '', '', '_', ''),
(74, 'iaccountdb', 'comp_control_acct_setup', 'orderNo', '', '', '_', ''),
(75, 'iaccountdb', 'comp_sales_order', 'invoiceID', '', '', '_', ''),
(77, 'iaccountdb', 'comp_supplier_invoice_charges', 'chargeDescription', '', '', '_', '');

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

--
-- Table structure for table `pma_designer_coords`
--

CREATE TABLE IF NOT EXISTS `pma_designer_coords` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `x` int(11) DEFAULT NULL,
  `y` int(11) DEFAULT NULL,
  `v` tinyint(4) DEFAULT NULL,
  `h` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`db_name`,`table_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table coordinates for Designer';

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

--
-- Table structure for table `pma_history`
--

CREATE TABLE IF NOT EXISTS `pma_history` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `timevalue` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `sqlquery` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`),
  KEY `username` (`username`,`db`,`table`,`timevalue`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='SQL history for phpMyAdmin' AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `pma_pdf_pages`
--

CREATE TABLE IF NOT EXISTS `pma_pdf_pages` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `page_nr` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `page_descr` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
  PRIMARY KEY (`page_nr`),
  KEY `db_name` (`db_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='PDF relation pages for phpMyAdmin' AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `pma_recent`
--

CREATE TABLE IF NOT EXISTS `pma_recent` (
  `username` varchar(64) COLLATE utf8_bin NOT NULL,
  `tables` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Recently accessed tables';

--
-- Dumping data for table `pma_recent`
--

INSERT INTO `pma_recent` (`username`, `tables`) VALUES
('root', '[{"db":"iaccountdb","table":"comp_sales_debitnote"},{"db":"iaccountdb","table":"comp_sales_debitnote_charges"},{"db":"iaccountdb","table":"comp_sales_debitnote_detail"},{"db":"iaccountdb","table":"terms"},{"db":"iaccountdb","table":"comp_sales_invoice_charges"},{"db":"iaccountdb","table":"comp_sales_invoice_detail"},{"db":"iaccountdb","table":"comp_chart_of_acct"},{"db":"iaccountdb","table":"comp_sales_invoice"},{"db":"iaccountdb","table":"comp_budget"},{"db":"iaccountdb","table":"item"}]');

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

--
-- Table structure for table `pma_relation`
--

CREATE TABLE IF NOT EXISTS `pma_relation` (
  `master_db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `master_table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `master_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `foreign_db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `foreign_table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `foreign_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  PRIMARY KEY (`master_db`,`master_table`,`master_field`),
  KEY `foreign_field` (`foreign_db`,`foreign_table`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Relation table';

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

--
-- Table structure for table `pma_table_coords`
--

CREATE TABLE IF NOT EXISTS `pma_table_coords` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `pdf_page_number` int(11) NOT NULL DEFAULT '0',
  `x` float unsigned NOT NULL DEFAULT '0',
  `y` float unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`db_name`,`table_name`,`pdf_page_number`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table coordinates for phpMyAdmin PDF output';

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

--
-- Table structure for table `pma_table_info`
--

CREATE TABLE IF NOT EXISTS `pma_table_info` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `display_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  PRIMARY KEY (`db_name`,`table_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table information for phpMyAdmin';

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

--
-- Table structure for table `pma_table_uiprefs`
--

CREATE TABLE IF NOT EXISTS `pma_table_uiprefs` (
  `username` varchar(64) COLLATE utf8_bin NOT NULL,
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `prefs` text COLLATE utf8_bin NOT NULL,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`username`,`db_name`,`table_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Tables'' UI preferences';

--
-- Dumping data for table `pma_table_uiprefs`
--

INSERT INTO `pma_table_uiprefs` (`username`, `db_name`, `table_name`, `prefs`, `last_update`) VALUES
('root', 'iaccountdb', 'comp_supplier_creditnote', '{"sorted_col":"`comp_supplier_creditnote`.`ID` ASC"}', '2014-06-23 10:57:36'),
('root', 'iaccountdb', 'customer', '{"sorted_col":"`customerCountryID` ASC"}', '2014-06-23 02:40:40'),
('root', 'iaccountdb', 'comp_form_control', '{"sorted_col":"`comp_form_control`.`formID` ASC"}', '2014-06-19 11:51:28'),
('root', 'iaccountdb', 'item', '{"sorted_col":"`inputTaxID` ASC"}', '2014-07-07 01:38:54'),
('root', 'iaccountdb', 'item_details', '{"sorted_col":"`item_details`.`itemID` ASC"}', '2014-07-03 04:01:03'),
('root', 'iaccountdb', 'comp_sales_detail', '{"sorted_col":"`comp_sales_detail`.`salesID` ASC"}', '2014-06-24 03:43:36'),
('root', 'iaccountdb', 'comp_receive_item', '{"sorted_col":"`ID` ASC"}', '2014-07-03 09:16:42'),
('root', 'iaccountdb', 'view_supplier_statement', '{"sorted_col":"`transDate` ASC"}', '2014-06-30 04:58:17'),
('root', 'iaccountdb', 'comp_bank', '{"CREATE_TIME":"2014-06-24 10:38:23","col_order":["0","1","2","3","4","5","6","7","8","9","10","11","12","16","13","14","15","17","18","19","20","21","22","23","24","25","26","27","28","29"],"col_visib":["1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1"]}', '2014-06-26 03:55:03'),
('root', 'iaccountdb', 'comp_payment', '{"sorted_col":"`bankID` DESC"}', '2014-06-30 05:44:39'),
('root', 'iaccountdb', 'comp_chart_of_acct', '{"sorted_col":"`comp_chart_of_acct`.`ID` DESC"}', '2014-07-01 04:07:37'),
('root', 'iaccountdb', 'comp_sales_invoice_detail', '{"sorted_col":"`ID` DESC"}', '2014-07-07 01:39:18'),
('root', 'iaccountdb', 'comp_receive_item_detail', '{"sorted_col":"`itemID` ASC"}', '2014-07-07 00:47:14'),
('root', 'iaccountdb', 'view_inventorylist_subtotal', '{"sorted_col":"`view_inventorylist_subtotal`.`itemID` ASC"}', '2014-07-03 04:01:26'),
('root', 'iaccountdb', 'comp_sales_invoice', '{"sorted_col":"`comp_sales_invoice`.`ID` DESC"}', '2014-07-04 03:46:20'),
('root', 'iaccountdb', 'comp_sales_invoice_charges', '{"sorted_col":"`comp_sales_invoice_charges`.`ID` DESC"}', '2014-07-04 03:47:34'),
('root', 'iaccountdb', 'comp_acc_det', '{"sorted_col":"`comp_acc_det`.`companyID` ASC"}', '2014-07-07 02:56:28'),
('root', 'iaccountdb', 'comp_supplier_invoice', '{"sorted_col":"`ID` DESC"}', '2014-07-07 05:21:25'),
('root', 'iaccountdb', 'comp_supplier_invoice_detail', '{"sorted_col":"`invoiceID` DESC"}', '2014-07-07 05:07:21'),
('root', 'iaccountdb', 'comp_purchase_order', '{"sorted_col":"`comp_purchase_order`.`ID` ASC"}', '2014-07-07 05:21:11');

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

--
-- Table structure for table `pma_tracking`
--

CREATE TABLE IF NOT EXISTS `pma_tracking` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `version` int(10) unsigned NOT NULL,
  `date_created` datetime NOT NULL,
  `date_updated` datetime NOT NULL,
  `schema_snapshot` text COLLATE utf8_bin NOT NULL,
  `schema_sql` text COLLATE utf8_bin,
  `data_sql` longtext COLLATE utf8_bin,
  `tracking` set('UPDATE','REPLACE','INSERT','DELETE','TRUNCATE','CREATE DATABASE','ALTER DATABASE','DROP DATABASE','CREATE TABLE','ALTER TABLE','RENAME TABLE','DROP TABLE','CREATE INDEX','DROP INDEX','CREATE VIEW','ALTER VIEW','DROP VIEW') COLLATE utf8_bin DEFAULT NULL,
  `tracking_active` int(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`db_name`,`table_name`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=COMPACT COMMENT='Database changes tracking for phpMyAdmin';

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

--
-- Table structure for table `pma_userconfig`
--

CREATE TABLE IF NOT EXISTS `pma_userconfig` (
  `username` varchar(64) COLLATE utf8_bin NOT NULL,
  `timevalue` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `config_data` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User preferences storage for phpMyAdmin';

--
-- Dumping data for table `pma_userconfig`
--

INSERT INTO `pma_userconfig` (`username`, `timevalue`, `config_data`) VALUES
('root', '2014-06-16 06:09:48', '{"collation_connection":"utf8mb4_general_ci"}');
--
-- Database: `test`
--
--
-- Database: `webauth`
--

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

--
-- Table structure for table `user_pwd`
--

CREATE TABLE IF NOT EXISTS `user_pwd` (
  `name` char(30) COLLATE latin1_general_ci NOT NULL DEFAULT '',
  `pass` char(32) COLLATE latin1_general_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `user_pwd`
--

INSERT INTO `user_pwd` (`name`, `pass`) VALUES
('xampp', 'wampp');

