-- 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,
  `startDate` datetime NOT NULL,
  `endDate` datetime NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` varchar(50) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=65 ;

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

INSERT INTO `comp_purchase_price` (`ID`, `companyID`, `itemID`, `supplierID`, `price`, `startDate`, `endDate`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(52, 1, 1, 20, 34344, '2014-08-25 00:00:00', '2014-08-25 00:00:00', 33, '2014-08-25 06:51:32', '', '2014-08-25 06:51:32'),
(54, 1, 7, 20, 45453, '2014-08-25 00:00:00', '2014-08-25 00:00:00', 33, '2014-08-25 06:51:50', '', '2014-08-25 06:52:09'),
(55, 1, 13, 23, 234123, '2014-08-25 00:00:00', '2014-08-25 00:00:00', 33, '2014-08-25 06:51:59', '', '2014-08-25 06:52:20'),
(56, 86, 23, 42, 1000, '2013-01-01 00:00:00', '2013-12-31 00:00:00', 19, '2014-08-27 07:37:36', '', '2014-08-27 07:37:36'),
(57, 86, 24, 42, 2000, '2013-01-01 00:00:00', '2013-12-31 00:00:00', 19, '2014-08-27 07:46:05', '', '2014-08-27 07:46:05'),
(58, 15, 11, 26, 350, '2014-09-02 00:00:00', '2014-09-30 00:00:00', 16, '2014-09-02 01:25:48', '', '2014-09-02 01:26:54'),
(59, 15, 11, 27, 1020, '2014-09-02 00:00:00', '2014-09-30 00:00:00', 16, '2014-09-02 01:26:29', '', '2014-09-02 01:26:29'),
(60, 1, 10, 1, 10, '2004-09-09 00:00:00', '2016-09-29 00:00:00', 1, '2014-09-02 09:00:15', '', '2014-09-02 09:00:15'),
(61, 1, 10, -1, 90, '2005-09-09 00:00:00', '2016-09-22 00:00:00', 1, '2014-09-02 11:01:14', '', '2014-09-02 11:01:14'),
(62, 93, 25, 46, 500, '2014-01-01 00:00:00', '2014-10-31 00:00:00', 16, '2014-09-03 02:48:10', '', '2014-09-16 03:09:06'),
(63, 93, 26, 46, 200, '2014-01-01 00:00:00', '2014-01-31 00:00:00', 19, '2014-09-03 02:48:32', '', '2014-09-03 02:48:32'),
(64, 93, 25, 50, 500, '2014-09-01 00:00:00', '2014-09-30 00:00:00', 19, '2014-09-12 08:36:00', '', '2014-09-12 08:36:00');

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

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

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

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

INSERT INTO `comp_quotation` (`ID`, `serialNo`, `companyID`, `customerID`, `quotationCode`, `salesAgentID`, `employeeID`, `formNo`, `quotationDate`, `deliverToID`, `currencyID`, `supplierID`, `memo`, `totalTaxAmount`, `exchangeRate`, `totalReceivable`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-06-06', 7, 1, '', 'test memo', 28980, 1, 0, 1, '2014-06-06 02:21:02', 0, '2014-07-17 07:26:31'),
(3, 1, 1, 12, '', 0, 7, 'SQN2014', '2014-06-06', 7, 1, '', 'testttt', 5040, 1, 0, 1, '2014-06-06 02:26:19', 0, '2014-07-17 07:26:36'),
(4, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-06-06', 8, 1, '', 'dasd', 3780, 1, 0, 1, '2014-06-06 02:28:04', 0, '2014-07-17 07:26:13'),
(5, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-06-06', 7, 1, '', 'dfsd', 1260, 1, 0, 1, '2014-06-06 04:12:32', 0, '2014-07-17 07:26:04'),
(6, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-06-06', 7, 1, '', 'afs', 44100, 1, 0, 1, '2014-06-06 04:22:54', 1, '2014-07-17 07:25:59'),
(7, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-06-06', 7, 1, '', 'dsfs', 15120, 1, 0, 1, '2014-06-06 07:09:39', 1, '2014-07-17 07:25:54'),
(8, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-06-06', 7, 1, '', 'dsfs', 15498, 1, 0, 1, '2014-06-06 07:10:06', 0, '2014-07-17 07:25:50'),
(9, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-06-06', 7, 1, '', 'dsfds', 1764, 1, 0, 1, '2014-06-06 07:14:44', 1, '2014-07-17 07:25:44'),
(10, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-06-06', 7, 1, '', 'dsfds', 4662, 1, 0, 1, '2014-06-06 07:15:02', 0, '2014-07-17 07:25:38'),
(11, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-06-06', 8, 1, '', 'hgh', 14616, 1, 0, 1, '2014-06-06 07:17:50', 1, '2014-07-17 07:25:31'),
(12, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-06-06', 8, 1, '', 'hgh', 15246, 1, 0, 1, '2014-06-06 07:18:08', 0, '2014-07-17 07:25:26'),
(13, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-06-06', 8, 1, '', 'fgdfg', 4914, 1, 0, 1, '2014-06-06 07:19:07', 1, '2014-07-17 07:25:17'),
(14, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-06-06', 8, 1, '', 'fgdfg', 20286, 1, 0, 1, '2014-06-06 07:19:27', 0, '2014-07-17 07:25:11'),
(15, 1, 15, 17, '', 0, 9, 'SQN2014', '2014-07-17', 5, 1, '', '', 212, 1, 0, 16, '2014-07-17 02:35:53', 0, '2014-07-17 07:24:58'),
(16, 1, 15, 17, '', 0, 8, 'SQN2014', '2014-07-17', 5, 1, '', '', 371, 1, 0, 16, '2014-07-17 03:10:55', 0, '2014-07-17 07:24:52'),
(17, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-07-17', 7, 1, '', 'Hello world', 19451, 1, 0, 16, '2014-07-17 07:42:19', 16, '2014-07-17 08:04:13'),
(18, 1, 1, 20, '', 0, 6, 'SQN2014', '2014-07-17', 8, 1, '', 'Lorem ipsum dolor sit emet ', 6360, 1, 0, 16, '2014-07-17 07:56:18', 0, '2014-07-17 08:04:22'),
(19, 1, 1, 12, '', 0, 6, 'SQN2014', '2014-07-17', 8, 1, '', 'afdasdfasdf', 73.14, 1, 0, 16, '2014-07-17 08:04:48', 0, '0000-00-00 00:00:00'),
(20, 1, 81, 34, '', 0, 27, 'SQN', '2014-08-05', 0, 1, '', 'test', 0, 1, 0, 29, '2014-08-05 01:28:27', 29, '2014-08-05 01:28:53'),
(21, 1, 93, 41, '', 0, 37, 'SQN', '2014-09-05', 21, 1, '', '', 4240, 1, 0, 43, '2014-09-05 08:38:11', 0, '0000-00-00 00:00:00'),
(22, 2, 93, 41, '', 0, 36, 'SQN', '2014-09-09', 21, 1, '', '', 1.06, 1, 0, 16, '2014-09-09 01:44:56', 0, '0000-00-00 00:00:00'),
(23, 3, 93, 40, '', 0, 37, 'SQN', '2014-09-09', 0, 1, '', '', 3816, 1, 0, 16, '2014-09-09 02:01:27', 0, '0000-00-00 00:00:00'),
(24, 4, 93, 40, '', 0, 0, 'SQN', '1970-01-01', 0, 1, '', '', 1.06, 1, 0, 16, '2014-09-10 07:42:07', 0, '0000-00-00 00:00:00'),
(25, 5, 93, 41, '', 0, 0, 'SQN', '2014-09-10', 21, 1, '', '', 10.6, 1, 0, 16, '2014-09-10 07:42:57', 0, '0000-00-00 00:00:00'),
(26, 1, 103, 44, '', 0, 0, '', '2014-09-16', 0, 1, '', '', 636, 1, 0, 50, '2014-09-16 02:11:13', 0, '0000-00-00 00:00:00');

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

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

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

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

--
-- 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'),
(21, 15, 0, 12, 'saiz 10. warna hitam', 200, 1, 200, 1, 2, 6, 12, 212, 16, '2014-07-17 02:35:54', 0, '0000-00-00 00:00:00'),
(22, 16, 0, 11, 'saiz 10. warna gold', 350, 1, 350, 1, 2, 6, 21, 371, 16, '2014-07-17 03:10:55', 0, '0000-00-00 00:00:00'),
(23, 17, 0, 1, 'Teak wooden chair with natural finish', 120, 100, 12000, 1, 2, 6, 720, 12720, 16, '2014-07-17 07:42:19', 0, '0000-00-00 00:00:00'),
(24, 17, 0, 8, 'Plastic Chair - White', 127, 50, 6350, 10, 2, 6, 381, 6731, 16, '2014-07-17 07:43:48', 0, '0000-00-00 00:00:00'),
(25, 18, 0, 2, 'Steel chair for outdoor', 120, 50, 6000, 1, 2, 6, 360, 6360, 16, '2014-07-17 07:56:18', 0, '0000-00-00 00:00:00'),
(26, 19, 0, 8, 'Plastic Chair - White', 23, 3, 69, 1, 2, 6, 4.14, 73.14, 16, '2014-07-17 08:04:48', 0, '0000-00-00 00:00:00'),
(27, 20, 0, 17, 'laptop', 170, 2, 340, 1, 3, 0, 0, 0, 29, '2014-08-05 01:28:28', 0, '0000-00-00 00:00:00'),
(28, 20, 0, 16, 'micro', 100, 1, 100, 1, 3, 0, 0, 0, 29, '2014-08-05 01:28:53', 0, '0000-00-00 00:00:00'),
(29, 21, 0, 29, 'Laptop Dell', 2000, 2, 4000, 769, 3, 6, 240, 4240, 43, '2014-09-05 08:38:11', 0, '0000-00-00 00:00:00'),
(30, 22, 0, 27, 'STAT', 1, 1, 1, 769, 3, 6, 0.06, 1.06, 16, '2014-09-09 01:44:56', 0, '0000-00-00 00:00:00'),
(31, 23, 0, 27, 'STAT', 60, 60, 3600, 769, 3, 6, 216, 3816, 16, '2014-09-09 02:01:27', 0, '0000-00-00 00:00:00'),
(32, 24, 0, 27, 'STAT', 1, 1, 1, 769, 3, 6, 0.06, 1.06, 16, '2014-09-10 07:42:07', 0, '0000-00-00 00:00:00'),
(33, 25, 0, 25, 'Table with Glass', 1, 10, 10, 769, 3, 6, 0.6, 10.6, 16, '2014-09-10 07:42:57', 0, '0000-00-00 00:00:00'),
(34, 26, 0, 32, 'cake', 3, 200, 600, 1182, 9, 6, 36, 636, 50, '2014-09-16 02:11:13', 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,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `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',
  `isDelete` tinyint(1) NOT NULL DEFAULT '0',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=171 ;

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

INSERT INTO `comp_receive_item` (`ID`, `serialNo`, `companyID`, `supplierDoNo`, `purchaseOrderID`, `supplierID`, `formNo`, `deliveryDate`, `locationID`, `deliverToID`, `currencyID`, `exchangeRate`, `employeeID`, `memo`, `shippingMethodID`, `totalAmount`, `totalPayable`, `journalNo`, `updateAble`, `isDelete`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(8, 1, 1, 'fds', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 04:51:53', 0, '2014-06-13 10:47:37'),
(9, 1, 1, 'd', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 04:58:34', 0, '2014-05-29 10:54:31'),
(10, 1, 1, 's', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 05:00:14', 0, '2014-05-29 10:54:31'),
(11, 1, 1, 'ada', 2, 1, 'GRN', '2014-05-14', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 05:03:29', 0, '2014-07-14 02:41:28'),
(12, 1, 1, 's', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 05:04:35', 0, '2014-05-29 10:54:31'),
(13, 1, 1, 'GU', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 06:09:27', 0, '2014-05-29 10:54:31'),
(14, 1, 1, 'sd', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '                                  \n                             ', 0, 0, 0, '', 1, 0, 0, '2014-05-28 07:33:16', 0, '2014-05-29 10:54:31'),
(15, 1, 1, 'as', 2, 1, 'GRN', '2014-05-12', 1, 0, 0, 0, 6, '                                  \n                             ', 0, 0, 0, '', 1, 0, 0, '2014-05-28 07:35:37', 0, '2014-07-14 02:41:35'),
(16, 1, 1, 'as', 2, 1, 'GRN', '2014-05-28', 1, 0, 1, 1, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 07:52:13', 0, '2014-07-01 01:43:29'),
(17, 1, 1, 'bnvb', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 08:05:33', 0, '2014-05-29 10:54:31'),
(18, 1, 1, 'sds', 2, 1, 'GRN', '2014-05-13', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 08:19:27', 0, '2014-05-29 10:54:31'),
(19, 1, 1, 'ds', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 08:21:06', 0, '2014-05-29 10:54:31'),
(20, 1, 1, 'dfd', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 08:21:40', 0, '2014-05-29 10:54:31'),
(21, 1, 1, 'sd', 2, 1, 'GRN', '2014-04-09', 1, 0, 1, 1, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 08:24:02', 0, '2014-07-14 02:41:41'),
(22, 1, 1, 'd', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 08:31:14', 0, '2014-05-29 10:54:31'),
(23, 1, 1, 'dfd', 2, 1, 'GRN', '2014-05-28', 1, 0, 0, 0, 6, 'xasa', 0, 0, 0, '', 1, 0, 0, '2014-05-28 08:32:30', 0, '2014-05-29 10:54:31'),
(24, 1, 1, '', 2, 1, 'GRN', '2014-05-28', 2, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-28 08:33:14', 0, '2014-06-19 07:00:06'),
(25, 1, 1, 'ds', 2, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 6, 'sdsd', 0, 0, 0, '', 1, 0, 0, '2014-05-29 07:14:24', 0, '2014-05-29 10:54:31'),
(26, 1, 1, 'bvgmj', 2, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 6, '', 0, 0, 0, '', 1, 0, 0, '2014-05-29 07:23:51', 0, '2014-05-29 10:54:31'),
(27, 1, 1, 'as', 2, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 6, 'dsd', 0, 0, 0, '', 1, 0, 0, '2014-05-29 08:04:01', 0, '2014-05-29 10:54:31'),
(28, 1, 1, 'as', 2, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 6, 'sds', 0, 0, 0, '', 1, 0, 0, '2014-05-29 08:06:57', 0, '2014-05-29 10:54:31'),
(29, 1, 1, 'sds', 2, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 0, 'ada', 0, 0, 0, '', 1, 0, 0, '2014-05-29 10:57:01', 0, '0000-00-00 00:00:00'),
(30, 1, 1, 'asa', 2, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 7, 'ad', 0, 0, 0, '', 1, 0, 0, '2014-05-29 11:06:33', 0, '0000-00-00 00:00:00'),
(31, 1, 1, 'sd', 3, 1, 'GRN', '2014-05-29', 1, 0, 0, 0, 7, 'dsd', 3, 0, 0, '', 1, 0, 0, '2014-05-29 11:12:57', 0, '0000-00-00 00:00:00'),
(32, 1, 15, 'supplier do no', 11, 26, 'GRN2014', '2014-06-11', 3, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-11 05:10:38', 0, '2014-07-03 00:28:35'),
(33, 1, 15, 'hk', 12, 27, 'GRN2014', '2014-06-12', 4, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-12 09:43:40', 0, '2014-07-03 00:28:40'),
(34, 1, 1, '0', 0, 0, '0', '1970-01-01', 0, 0, 0, 0, 0, '0', 0, 0, 0, '', 1, 0, 0, '2014-06-16 07:20:43', 0, '0000-00-00 00:00:00'),
(35, 1, 1, '0', 0, 0, '0', '1970-01-01', 0, 0, 0, 0, 0, '0', 0, 0, 0, '', 1, 0, 0, '2014-06-16 07:20:58', 0, '0000-00-00 00:00:00'),
(36, 1, 1, '0', 0, 0, '0', '1970-01-01', 0, 0, 0, 0, 0, '0', 0, 0, 0, '', 1, 0, 0, '2014-06-16 07:22:21', 0, '0000-00-00 00:00:00'),
(37, 1, 1, 'wew', 18, 1, 'GRN', '2014-06-24', 1, 0, 0, 0, 7, 'ew', 0, 0, 0, '', 1, 0, 0, '2014-06-24 06:45:36', 0, '0000-00-00 00:00:00'),
(38, 1, 1, 'as', 2, 1, 'GRN', '2014-06-24', 1, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-24 08:25:19', 0, '0000-00-00 00:00:00'),
(39, 1, 1, 'sds', 2, 1, 'GRN', '2014-06-24', 0, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-24 09:23:56', 0, '0000-00-00 00:00:00'),
(40, 1, 1, 'qwq', 2, 1, 'GRN', '2014-06-24', 2, 0, 0, 0, 6, 'assasas', 74, 0, 0, '', 1, 0, 0, '2014-06-24 09:31:20', 0, '0000-00-00 00:00:00'),
(41, 1, 1, 'asa', 8, 20, 'GRN', '2014-06-24', 1, 0, 0, 0, 0, 'qwq', 0, 0, 0, '', 1, 0, 0, '2014-06-24 09:41:19', 0, '0000-00-00 00:00:00'),
(42, 1, 1, 'wqw', 8, 20, 'GRN', '2014-06-24', 1, 0, 0, 0, 7, 'qw', 74, 0, 0, '', 1, 0, 0, '2014-06-24 10:01:02', 0, '0000-00-00 00:00:00'),
(43, 1, 1, 'asa', 7, 23, 'GRN', '2014-06-24', 2, 0, 0, 0, 7, 'asa', 5, 0, 0, '', 1, 0, 0, '2014-06-24 11:47:22', 0, '0000-00-00 00:00:00'),
(44, 1, 1, 'qwq', 14, 1, 'GRN', '2014-06-25', 2, 0, 0, 0, 6, 'wq wqewx weq wdqe', 74, 0, 0, 'PO20140600000002', 1, 0, 0, '2014-06-25 00:43:14', 0, '2014-07-01 08:01:02'),
(45, 1, 1, 'sdw', 10, 20, 'GRN', '2014-06-25', 1, 0, 0, 0, 0, '', 0, 0, 0, 'PO20140600000011', 1, 0, 0, '2014-06-25 00:48:52', 0, '2014-07-02 08:34:52'),
(46, 1, 1, 'SDSAD', 7, 23, 'GRN', '2014-06-25', 1, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-25 02:03:10', 0, '0000-00-00 00:00:00'),
(47, 1, 1, 'WE', 19, 1, 'GRN', '2014-06-25', 1, 0, 0, 0, 7, 'SD SDS', 73, 0, 0, '', 1, 0, 0, '2014-06-25 02:04:01', 0, '0000-00-00 00:00:00'),
(48, 1, 1, 'SDW', 2, 1, 'GRN', '2014-06-25', 1, 0, 0, 0, 7, 'SDW', 73, 0, 0, '', 1, 0, 0, '2014-06-25 02:15:12', 0, '0000-00-00 00:00:00'),
(49, 1, 1, 'EWE', 14, 1, 'GRN', '2014-06-25', 2, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-25 02:26:18', 0, '0000-00-00 00:00:00'),
(50, 1, 1, 'SDA', 19, 1, 'GRN', '2014-06-25', 1, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-25 05:09:57', 0, '0000-00-00 00:00:00'),
(51, 1, 1, 'qwq', 19, 1, 'GRN', '2014-06-25', 2, 0, 0, 0, 7, 'wqwq', 8, 0, 0, '', 1, 0, 0, '2014-06-25 05:16:08', 0, '0000-00-00 00:00:00'),
(52, 1, 1, '12', 17, 1, 'GRN', '2014-06-25', 2, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-25 05:21:54', 0, '0000-00-00 00:00:00'),
(53, 1, 1, 'ewe', 15, 1, 'GRN', '2014-06-25', 1, 0, 0, 0, 7, 'wewewe', 8, 0, 0, '', 1, 0, 0, '2014-06-25 05:24:09', 0, '0000-00-00 00:00:00'),
(54, 1, 1, 'DWQ', 7, 23, 'GRN', '2014-06-25', 1, 0, 2, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-25 06:03:09', 0, '0000-00-00 00:00:00'),
(55, 1, 1, '23', -1, 1, 'GRN', '2014-06-25', 2, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-25 06:04:49', 0, '0000-00-00 00:00:00'),
(56, 1, 1, 'WE', 19, 1, 'GRN', '2014-06-25', 1, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-25 06:06:09', 0, '0000-00-00 00:00:00'),
(57, 1, 1, '', 19, 1, 'GRN', '2014-06-25', 0, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-25 06:10:38', 0, '0000-00-00 00:00:00'),
(58, 1, 1, 'QWQ', 19, 1, 'GRN', '2014-06-25', 2, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-25 06:14:02', 0, '0000-00-00 00:00:00'),
(59, 1, 1, 'sd', 19, 1, 'GRN', '2014-06-25', 1, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-06-25 06:38:17', 0, '0000-00-00 00:00:00'),
(60, 1, 1, 'sd', 19, 1, 'GRN', '2014-06-25', 16, 0, 1, 0, 0, 'sqaa', 8, 0, 0, '', 1, 0, 0, '2014-06-25 06:42:52', 0, '2014-09-15 03:24:24'),
(61, 1, 1, 'sda', 19, 1, 'GRN', '2014-06-26', 1, 0, 1, 0, 0, '', 0, 0, 0, '', 0, 0, 0, '2014-06-26 01:56:34', 0, '2014-07-01 07:47:58'),
(62, 1, 15, 'sup do', 20, 26, 'GRN2014', '2014-07-02', 5, 0, 2, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-07-02 08:10:27', 0, '0000-00-00 00:00:00'),
(63, 1, 1, 'gfgdt', 6, 1, 'GRN', '2014-07-03', 1, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-07-03 09:06:26', 0, '0000-00-00 00:00:00'),
(64, 1, 1, 'asa', 6, 1, 'GRN', '2014-07-03', 1, 0, 1, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-07-03 09:10:37', 0, '0000-00-00 00:00:00'),
(65, 1, 1, 'frgf', 14, 1, 'GRN', '2014-07-03', 2, 0, 1, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-07-03 09:13:03', 0, '0000-00-00 00:00:00'),
(66, 1, 1, '', 0, 0, 'GRN', '2014-07-03', 0, 0, 0, 0, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-07-03 09:15:13', 0, '0000-00-00 00:00:00'),
(67, 1, 1, 'df', 15, 1, 'GRN', '2014-07-03', 1, 0, 1, 23, 0, 'sdsdfs', 0, 0, 0, '', 1, 0, 0, '2014-07-03 09:16:18', 0, '0000-00-00 00:00:00'),
(68, 1, 1, '123456', 24, 31, 'GRN', '2014-07-09', 1, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140700000001', 0, 0, 0, '2014-07-09 02:52:02', 0, '2014-07-09 02:52:41'),
(69, 1, 1, '1122', 24, 31, 'GRN', '2014-07-09', 1, 0, 1, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-07-09 03:10:25', 0, '0000-00-00 00:00:00'),
(70, 1, 15, 'awan hitam do no', 21, 27, 'GRN2014', '2014-07-09', 5, 0, 1, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-07-09 04:58:31', 0, '0000-00-00 00:00:00'),
(71, 1, 15, 'sfsd23454', 25, 26, 'GRN2014', '2014-07-10', 5, 0, 2, 1, 0, '', 0, 0, 0, 'PO20140200000001', 0, 0, 0, '2014-07-10 03:39:35', 0, '2014-07-10 03:49:04'),
(72, 1, 81, '001', 26, 32, 'GRN', '2014-07-21', 9, 0, 1, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-07-21 07:00:58', 0, '0000-00-00 00:00:00'),
(73, 2, 1, 'asa', 1, 1, 'GRN', '2014-07-31', 1, 0, 1, 1, 6, 'sdsd', 73, 0, 0, '', 1, 0, 0, '2014-07-31 02:21:14', 0, '0000-00-00 00:00:00'),
(74, 3, 1, 'asa', 1, 1, 'GRN', '2014-07-31', 1, 0, 1, 1, 6, 'sdsd', 73, 0, 0, '', 1, 0, 0, '2014-07-31 02:21:18', 0, '0000-00-00 00:00:00'),
(75, 4, 1, 'asa', 1, 1, 'GRN', '2014-07-31', 1, 0, 1, 1, 6, 'sdsd', 73, 0, 0, '', 1, 0, 0, '2014-07-31 02:21:23', 0, '0000-00-00 00:00:00'),
(76, 2, 81, '0006', 3, 33, 'GRN', '2014-08-04', 9, 0, 1, 1, 0, '', 0, 0, 0, '', 0, 0, 0, '2014-08-04 03:14:32', 0, '2014-08-04 03:15:14'),
(77, 3, 81, 'ffjk565', 5, 33, 'GRN', '2014-08-04', 9, 0, 1, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-08-04 10:11:56', 0, '0000-00-00 00:00:00'),
(78, 4, 81, 'asdfas34535', 6, 33, 'GRN', '2014-08-05', 9, 0, 1, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-08-05 04:24:42', 0, '0000-00-00 00:00:00'),
(79, 1, 84, 'dfasdf3425', 7, 34, 'GRN', '2014-08-05', 10, 0, 1, 3.2, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-08-05 09:31:07', 0, '0000-00-00 00:00:00'),
(80, 2, 84, 'afasdf3455', 7, 34, 'GRN', '2014-08-05', 10, 0, 1, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-08-05 09:31:57', 0, '0000-00-00 00:00:00'),
(81, 3, 84, 'sfgsfg56356345', 8, 34, 'GRN', '2014-08-06', 10, 0, 1, 1, 29, '', 73, 0, 0, '', 1, 0, 0, '2014-08-06 03:10:31', 0, '0000-00-00 00:00:00'),
(82, 1, 87, '344', 9, 39, 'GRN', '2014-08-21', 12, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140800000001', 0, 0, 0, '2014-08-21 04:30:07', 0, '2014-08-21 04:51:27'),
(83, 2, 87, '222', 9, 39, 'GRN', '2014-08-21', 12, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140800000002', 0, 0, 0, '2014-08-21 04:31:57', 0, '2014-08-21 04:51:27'),
(84, 2, 15, 'awan biru supplier do no 1', 10, 26, 'GRN2014', '2014-08-25', 3, 0, 2, 3.5, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-08-25 02:30:03', 0, '0000-00-00 00:00:00'),
(85, 5, 1, '009 098', 2, 1, 'GRN', '2014-08-25', 1, 0, 2, 1, 0, 'dfd', 0, 0, 0, '', 1, 0, 0, '2014-08-25 03:01:38', 0, '0000-00-00 00:00:00'),
(86, 6, 1, 'afasdfa234', 17, 1, 'GRN', '2013-08-15', 1, 0, 2, 3.23, 6, '', 74, 0, 0, '', 1, 0, 0, '2014-08-26 07:32:54', 0, '0000-00-00 00:00:00'),
(87, 7, 1, 'ada', 16, 1, 'GRN', '2013-08-26', 1, 0, 2, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-08-26 07:34:25', 0, '0000-00-00 00:00:00'),
(88, 8, 1, 'sa', 16, 1, 'GRN', '2013-08-29', 2, 0, 2, 1, 6, 'zxz', 74, 0, 0, '', 1, 0, 0, '2014-08-26 07:38:50', 0, '0000-00-00 00:00:00'),
(89, 9, 1, 'sds', 16, 1, 'GRN', '2013-08-29', 2, 0, 2, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-08-26 07:43:17', 0, '0000-00-00 00:00:00'),
(90, 10, 1, 'sd', 16, 1, 'GRN', '2013-08-29', 1, 0, 2, 1, 33, 'sd', 5, 0, 0, '', 1, 0, 0, '2014-08-26 08:03:39', 0, '0000-00-00 00:00:00'),
(91, 1, 86, '56256', 21, 42, 'GRN', '2013-01-02', 14, 0, 1, 1, 0, '', 0, 0, 0, 'PO20130100000001', 0, 0, 0, '2014-08-27 08:03:03', 0, '2014-08-27 08:48:17'),
(92, 2, 86, '122333', 22, 42, 'GRN', '2013-08-08', 14, 0, 1, 1, 32, '', 73, 0, 0, 'PO20130800000001', 0, 0, 0, '2014-08-27 09:44:49', 0, '2014-08-28 03:40:40'),
(93, 11, 1, 'aas', 13, 1, 'GRN', '2013-08-22', 1, 0, 2, 1, 30, 'a', 74, 0, 0, '', 1, 0, 0, '2014-08-27 09:48:37', 0, '0000-00-00 00:00:00'),
(94, 12, 1, 'asa', 14, 1, 'GRN', '2013-08-08', 1, 0, 2, 1, 33, '', 5, 0, 0, '', 1, 0, 0, '2014-08-27 09:59:09', 0, '0000-00-00 00:00:00'),
(95, 13, 1, 'as', 13, 1, 'GRN', '2013-08-16', 13, 0, 2, 0, 30, '', 5, 0, 0, '', 1, 0, 0, '2014-08-27 10:01:48', 0, '0000-00-00 00:00:00'),
(96, 14, 1, 'sds', 19, 1, 'GRN', '2013-08-23', 2, 0, 2, 1, 30, '', 73, 0, 0, '', 1, 0, 0, '2014-08-27 10:05:17', 0, '0000-00-00 00:00:00'),
(97, 15, 1, 'sd', 16, 1, 'GRN', '2013-08-20', 1, 0, 2, 1, 33, '', 74, 0, 0, '', 1, 0, 0, '2014-08-27 10:09:58', 0, '0000-00-00 00:00:00'),
(98, 16, 1, 'sda', 19, 1, 'GRN', '2013-08-21', 13, 0, 2, 1, 30, '', 74, 0, 0, '', 1, 0, 0, '2014-08-27 10:11:56', 0, '0000-00-00 00:00:00'),
(99, 17, 1, 'sd', 19, 1, 'GRN', '2013-08-14', 1, 0, 2, 0, 30, '', 74, 0, 0, '', 1, 0, 0, '2014-08-27 10:13:08', 0, '0000-00-00 00:00:00'),
(100, 18, 1, 'sds', 18, 1, 'GRN', '2013-08-15', 1, 0, 2, 1, 30, 'sd', 73, 0, 0, '', 1, 0, 0, '2014-08-27 10:14:34', 0, '0000-00-00 00:00:00'),
(101, 19, 1, 'sd', 18, 1, 'GRN', '2013-08-15', 1, 0, 2, 1, 6, 'sds', 74, 0, 0, '', 1, 0, 0, '2014-08-27 10:26:32', 0, '0000-00-00 00:00:00'),
(102, 20, 1, 'asa', 16, 1, 'GRN', '2013-08-08', 13, 0, 2, 1, 6, 's', 74, 0, 0, '', 1, 0, 0, '2014-08-27 11:33:05', 0, '0000-00-00 00:00:00'),
(103, 21, 1, 'as', 18, 1, 'GRN', '2013-08-15', 2, 0, 2, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-08-27 11:39:21', 0, '0000-00-00 00:00:00'),
(104, 22, 1, 'as', 23, 20, 'GRN', '2013-08-17', 13, 0, 1, 1, 33, 'as', 5, 0, 0, '', 1, 0, 0, '2014-08-27 12:24:00', 0, '0000-00-00 00:00:00'),
(105, 23, 1, 'fs', 24, 20, 'GRN', '2013-08-18', 1, 0, 1, 1, 0, '', 0, 0, 0, 'PO20130800000001', 0, 0, 0, '2014-08-27 13:21:17', 0, '2014-08-27 13:25:15'),
(106, 3, 86, '123456', 26, 43, 'GRN', '2013-08-14', 14, 0, 1, 1, 0, '', 0, 0, 0, 'PO20130800000002', 0, 0, 0, '2014-08-28 03:52:53', 0, '2014-08-28 03:54:26'),
(107, 24, 1, '', 4, 1, 'GRN', '2013-09-11', 1, 0, 2, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-09-02 03:45:58', 0, '0000-00-00 00:00:00'),
(108, 4, 86, '', 0, 43, 'GRN', '2014-09-03', 14, 0, 1, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-09-03 03:05:30', 0, '2014-09-03 03:59:25'),
(109, 1, 93, '4353', 29, 46, 'GRN', '2014-01-02', 15, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140100000001', 0, 0, 0, '2014-09-03 03:41:54', 0, '2014-09-03 03:57:19'),
(114, 6, 93, 'invoice123', 29, 46, 'GRN', '1970-01-01', 16, 0, 1, 1, 36, 'This is a memo111', 5, 0, 0, '', 1, 0, 0, '2014-09-03 04:52:53', 0, '2014-09-03 09:36:49'),
(115, 7, 93, 'asdfasdf3245234', 29, 46, 'GRN', '2014-03-09', 15, 0, 1, 1, 37, '', 3, 0, 0, '', 1, 1, 0, '2014-09-03 05:29:59', 0, '2014-09-15 04:41:50'),
(119, 8, 93, 'AAA-0001', 31, 48, 'GRN 0001', '2014-04-09', 17, 0, 1, 1, 37, 'aaa', 4, 0, 0, '', 1, 0, 0, '2014-09-04 02:31:08', 0, '2014-09-04 03:01:38'),
(120, 9, 93, 'AAA-0001', 31, 48, 'GRN 0001', '2014-04-09', 17, 0, 1, 1, 38, 'www', 6, 0, 0, '', 1, 0, 0, '2014-09-04 02:51:57', 0, '2014-09-04 03:02:21'),
(121, 10, 93, 'AAA-0002', 32, 48, 'GRN 0002', '2014-09-04', 17, 0, 1, 1, 37, 'EEE', 6, 0, 0, 'PO20140900000001', 0, 0, 0, '2014-09-04 03:55:01', 0, '2014-09-04 03:58:18'),
(125, 25, 1, 'asdf24523', 4, 1, 'GRN', '2014-09-04', 1, 0, 2, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-09-04 05:29:41', 0, '0000-00-00 00:00:00'),
(130, 11, 93, 'AAA-0003', 33, 48, 'GRN 0003', '2014-09-03', 17, 0, 1, 1, 37, 'Kamarul', 4, 0, 0, 'PO20140900000002', 0, 0, 0, '2014-09-04 10:25:03', 0, '2014-09-04 10:25:29'),
(131, 12, 93, 'as', 29, 46, 'GRN', '2014-05-09', 16, 0, 1, 1, 36, 'sffdsv', 5, 0, 0, '', 1, 0, 0, '2014-09-05 04:02:12', 0, '2014-09-05 04:12:11'),
(132, 13, 93, 'sd', 30, 47, 'GRN', '2014-09-05', 15, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000010', 0, 0, 0, '2014-09-05 04:22:39', 0, '2014-09-08 03:27:14'),
(133, 14, 93, 'sd', 29, 46, 'GRN', '2014-09-05', 15, 0, 1, 1, 0, 'sd', 0, 0, 0, 'PO20140900000012', 0, 0, 0, '2014-09-05 04:23:44', 0, '2014-09-08 04:32:03'),
(134, 15, 93, '', 29, 46, 'GRN', '2014-09-05', 15, 0, 1, 1, 0, 'sdsd', 0, 0, 0, 'PO20140900000013', 0, 0, 0, '2014-09-05 04:26:32', 0, '2014-09-08 04:32:15'),
(135, 16, 93, '', 29, 46, 'GRN', '2014-05-23', 15, 0, 1, 1, 0, 'SS', 0, 0, 0, '', 1, 0, 0, '2014-09-05 04:41:11', 0, '2014-09-05 07:08:59'),
(136, 17, 93, 'sds', 29, 46, 'GRN', '2014-09-12', 16, 0, 1, 1, 39, 'axa  weqd', 74, 0, 0, 'PO20140900000007', 0, 0, 0, '2014-09-05 07:12:51', 0, '2014-09-08 03:04:50'),
(137, 1, 95, 'DO-0003', 35, 49, 'PR-0003', '2014-09-04', 20, 0, 1, 1, 40, 'Barang Jualan', 0, 0, 0, 'PO20140900000001', 0, 0, 0, '2014-09-05 07:17:00', 0, '2014-09-05 07:17:46'),
(138, 18, 93, 'dododod', 36, 47, 'GRN', '2014-09-05', 15, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000003', 0, 0, 0, '2014-09-05 07:33:11', 0, '2014-09-05 07:33:38'),
(140, 1, 93, 'asdf345', 29, 46, 'GRN', '2014-09-08', 15, 0, 1, 1, 36, 'asfasdf', 4, 0, 0, 'PO20140900000009', 0, 0, 0, '2014-09-08 02:15:34', 0, '2014-09-08 03:26:45'),
(142, 1, 93, '', 29, 46, 'GRN', '2014-09-08', 15, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000011', 0, 0, 0, '2014-09-08 04:31:11', 0, '2014-09-08 04:31:25'),
(146, 1, 93, '', 37, 46, 'GRN', '2014-09-08', 15, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000014', 0, 0, 0, '2014-09-08 04:45:55', 0, '2014-09-08 04:49:28'),
(147, 1, 93, '', 37, 46, 'GRN', '2014-09-08', 15, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000015', 0, 0, 0, '2014-09-08 04:48:51', 0, '2014-09-08 04:49:39'),
(148, 1, 93, '', 37, 46, 'GRN', '2014-09-08', 15, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000016', 0, 0, 0, '2014-09-08 04:49:10', 0, '2014-09-08 04:49:50'),
(149, 1, 93, 'sde345', 30, 47, 'GRN', '2014-09-08', 15, 0, 1, 1, 39, '', 74, 0, 0, 'PO20140900000017', 0, 0, 0, '2014-09-08 07:12:34', 0, '2014-09-08 07:12:40'),
(150, 1, 93, 'sde43', 36, 47, 'GRN', '2014-09-08', 15, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000018', 0, 0, 0, '2014-09-08 07:13:53', 0, '2014-09-08 07:13:57'),
(151, 1, 93, '', 37, 46, 'GRN', '2014-09-08', 15, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000019', 0, 0, 0, '2014-09-08 09:03:33', 0, '2014-09-10 09:51:58'),
(152, 1, 93, '', 0, 48, 'GRN', '2014-09-08', 0, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000020', 0, 0, 0, '2014-09-08 09:05:54', 0, '2014-09-10 09:51:59'),
(153, 1, 93, '', 36, 47, 'GRN', '2014-09-08', 15, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000021', 0, 0, 0, '2014-09-08 09:13:13', 0, '2014-09-10 09:51:59'),
(154, 19, 93, '', 36, 47, 'GRN', '2014-09-10', 15, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000022', 0, 0, 0, '2014-09-10 09:50:36', 0, '2014-09-10 09:52:00'),
(155, 20, 93, '', 0, 47, 'GRN', '2014-09-10', 0, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000023', 0, 0, 0, '2014-09-10 09:57:15', 0, '2014-09-10 09:57:32'),
(156, 21, 93, '', 45, 48, 'GRN', '2014-09-12', 15, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000024', 0, 0, 0, '2014-09-12 03:46:30', 0, '2014-09-12 03:46:38'),
(157, 1, 102, '121212 ', 0, 51, 'A 00001', '2014-09-12', 0, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000001', 0, 0, 0, '2014-09-12 08:23:41', 0, '2014-09-12 08:24:03'),
(158, 2, 102, 'AZ 01', 47, 51, 'A01', '2014-09-12', 22, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000002', 0, 0, 0, '2014-09-12 08:35:06', 0, '2014-09-12 08:35:56'),
(160, 22, 93, '126456', 37, 46, 'GRN', '2014-09-15', 15, 0, 1, 1, 0, '', 0, 0, 0, '', 1, 1, 0, '2014-09-15 03:08:49', 0, '2014-09-15 03:43:59'),
(161, 23, 93, '546546', 48, 50, 'GRN', '2014-09-15', 19, 0, 1, 1, 39, '', 5, 0, 0, 'PO20140900000025', 0, 0, 0, '2014-09-15 04:52:12', 0, '2014-09-15 04:52:57'),
(162, 24, 93, '', 29, 46, 'GRN', '2014-09-15', 16, 0, 1, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-09-15 05:13:34', 0, '0000-00-00 00:00:00'),
(163, 1, 103, '', 52, 52, '12', '2014-09-15', 23, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000001', 0, 0, 0, '2014-09-15 09:15:15', 0, '2014-09-15 09:15:24'),
(164, 1, 105, '', 54, 55, 'GRN', '2014-09-16', 25, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000001', 0, 0, 0, '2014-09-16 05:24:45', 0, '2014-09-16 05:24:55'),
(165, 25, 93, '', 55, 48, 'GRN', '2014-09-17', 15, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000026', 0, 0, 0, '2014-09-17 01:52:39', 0, '2014-09-17 01:53:27'),
(166, 26, 93, '', 37, 46, 'GRN', '2014-09-22', 15, 0, 1, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-09-22 02:48:00', 0, '0000-00-00 00:00:00'),
(167, 27, 93, '545', 59, 50, 'GRN', '2014-09-22', 15, 0, 1, 1, 41, '', 0, 0, 0, '', 1, 0, 0, '2014-09-22 02:50:02', 0, '2014-09-22 02:50:56'),
(168, 2, 95, 'DO0001', 60, 57, 'GRN0001', '2014-09-22', 20, 0, 1, 1, 0, '', 0, 0, 0, 'PO20140900000002', 0, 0, 0, '2014-09-22 03:03:03', 0, '2014-09-22 03:03:55'),
(169, 1, 107, '65655', 61, 58, 'GRN', '2014-09-22', 26, 0, 1, 1, 47, 'MEMO Item Receive', 6, 0, 0, 'PO20140900000001', 0, 0, 0, '2014-09-22 03:11:52', 0, '2014-09-22 03:16:21'),
(170, 28, 93, '', 29, 46, 'GRN', '2014-09-22', 15, 0, 1, 1, 0, '', 0, 0, 0, '', 1, 0, 0, '2014-09-22 03:17:37', 0, '0000-00-00 00:00:00');

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

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

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

CREATE TABLE IF NOT EXISTS `comp_receive_item_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `receiveID` int(11) NOT NULL,
  `invoiceID` int(11) NOT NULL DEFAULT '0',
  `lineNo` int(11) NOT NULL,
  `poDetailID` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `itemCode` varchar(16) NOT NULL,
  `itemName` varchar(128) NOT NULL,
  `description` text,
  `unitPrice` double NOT NULL,
  `quantityOrder` double NOT NULL,
  `quantityReceived` double NOT NULL DEFAULT '0',
  `umID` int(11) NOT NULL DEFAULT '0',
  `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=324 ;

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

INSERT INTO `comp_receive_item_detail` (`ID`, `receiveID`, `invoiceID`, `lineNo`, `poDetailID`, `itemID`, `itemCode`, `itemName`, `description`, `unitPrice`, `quantityOrder`, `quantityReceived`, `umID`, `amount`, `balanceItem`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(7, 8, 181, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 0, 16, '2014-05-28 04:51:53', 0, '2014-07-14 05:58:24'),
(8, 8, 181, 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-14 05:58:24'),
(9, 9, 181, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 0, 16, '2014-05-28 04:58:34', 0, '2014-07-14 05:58:24'),
(10, 9, 179, 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-14 05:31:07'),
(11, 10, 178, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 4, 16, '2014-05-28 05:00:14', 0, '2014-07-14 05:27:13'),
(12, 10, 178, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 05:00:19', 0, '2014-07-14 05:27:13'),
(13, 11, 177, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 05:03:29', 0, '2014-07-14 05:21:47'),
(14, 11, 177, 0, 3, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 1, 2, 12, 1, 16, '2014-05-28 05:03:33', 0, '2014-08-19 01:29:28'),
(15, 12, 179, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 05:04:35', 0, '2014-07-14 05:31:07'),
(16, 13, 184, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 06:09:27', 0, '2014-07-16 01:04:15'),
(17, 14, 184, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 07:33:16', 0, '2014-07-16 01:04:15'),
(18, 15, 174, 0, 3, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 1, 2, 12, 1, 16, '2014-05-28 07:35:37', 0, '2014-08-19 01:29:28'),
(19, 16, 186, 0, -1, 1, '321000100', 'SDSFSF', 'AAA', 12.5, 0, 1, 2, 1, 0, 16, '2014-05-28 07:52:13', 0, '2014-08-19 01:29:43'),
(20, 16, 186, 0, 3, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 10, 2, 10, 5, 16, '2014-05-28 07:52:55', 1, '2014-08-26 07:51:07'),
(21, 17, 187, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 08:05:33', 0, '2014-07-16 01:23:41'),
(22, 18, 176, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 08:19:27', 0, '2014-07-14 05:15:49'),
(24, 20, 188, 0, 3, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 1, 12, 1, 2, 12, 1, 16, '2014-05-28 08:21:40', 0, '2014-08-19 01:29:28'),
(25, 21, 174, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 08:24:02', 0, '2014-07-14 05:06:55'),
(26, 21, 175, 0, -1, 1, '321000100', 'SDSFSF', 'AAA', 10, 13, 12, 2, 12, 3, 16, '2014-05-28 08:24:16', 0, '2014-08-19 01:29:43'),
(27, 22, 188, 0, -1, 1, '321000100', 'SDSFSF', 'AAA', 9, 22, 11, 2, 11, 11, 16, '2014-05-28 08:31:14', 0, '2014-07-16 01:24:56'),
(28, 23, 189, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 5, 16, '2014-05-28 08:32:30', 0, '2014-07-16 01:29:14'),
(30, 24, 190, 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-16 01:43:57'),
(31, 25, 190, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 5, 2, 11, 5, 16, '2014-05-29 07:14:24', 0, '2014-07-16 01:43:57'),
(32, 25, 192, 0, -1, 9, '501012000', 'sadd', 'NGA', 12, 0, 122, 2, 1464, 0, 16, '2014-05-29 07:15:04', 16, '2014-08-18 11:05:37'),
(33, 26, 192, 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-16 02:11:05'),
(34, 26, 194, 0, -1, 1, '321000100', 'SDSFSF', 'AAA', 13, 2, 1, 2, 1, 1, 16, '2014-05-29 07:24:19', 0, '2014-07-17 00:33:33'),
(35, 27, 194, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 1, 2, 11, 1, 16, '2014-05-29 08:04:01', 0, '2014-07-17 00:33:33'),
(36, 28, 194, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 1, 2, 11, 1, 16, '2014-05-29 08:06:57', 0, '2014-07-17 00:33:33'),
(37, 28, 195, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 1, 2, 11, 1, 16, '2014-05-29 08:07:09', 0, '2014-07-17 00:35:51'),
(39, 29, 195, 0, 4, 7, '331000200', 'jackfruit', 'Buah', 1, 11, 1, 2, 11, 1, 16, '2014-05-29 10:57:01', 0, '2014-07-17 00:35:51'),
(40, 29, 196, 0, -1, 1, '321000100', 'SDSFSF', 'AAA', 12, 23, 21, 2, 252, 21, 16, '2014-05-29 10:57:27', 0, '2014-07-17 05:40:09'),
(41, 30, 217, 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-08-26 21:16:57'),
(44, 32, 182, 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-16 00:27:26'),
(45, 32, 182, 0, 15, 11, 'M001', 'saiz 10. warna gold', 'Meja makan bulat', 100, 1, 1, 2, 100, 1, 16, '2014-06-11 05:10:47', 0, '2014-07-16 00:27:26'),
(46, 0, 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, 0, 17, 11, 'M001', 'saiz 10. warna gold', 'Meja makan bulat', 100, 5, 5, 2, 500, 5, 16, '2014-06-12 09:43:40', 0, '2014-07-09 04:34:17'),
(48, 33, 0, 0, 18, 12, 'M002', 'saiz 10. warna hitam', 'Meja makan lonjong', 125, 1, 1, 2, 125, 1, 16, '2014-06-12 09:43:50', 0, '2014-07-09 04:34:17'),
(52, 37, 196, 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-17 05:40:09'),
(53, 38, 217, 0, 2, 2, '100300100', 'kelapa muda hijau', 'kelapa', 1, 11, 1, 2, 11, 0, 16, '2014-06-24 08:25:19', 0, '2014-08-26 21:16:57'),
(54, 39, 0, 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, 180, 1, -1, 4, '331000100', '0', 'Plastic Chair - Blue', 12, 0, 2, 2, 24, 2, 16, '2014-06-24 09:41:19', 0, '2014-08-19 01:29:27'),
(60, 0, 0, 0, 12, 4, '331000100', 'labu sayong dibuat daripada tanah liat', 'loo kok ilang', 22, 22, 1, 2, 484, 1, 16, '2014-06-24 09:48:04', 0, '2014-08-19 01:22:21'),
(64, 45, 209, 1, 13, 1, '321000100', '0', 'fad', 12, 1, 1, 2, 12, 1, 16, '2014-06-25 00:48:52', 0, '2014-08-20 02:27:21'),
(65, 45, 209, 0, -1, 1, '321000100', '0', 'Nasi Goreng Ayam', 12, 0, 12, 2, 144, 12, 16, '2014-06-25 00:49:14', 0, '2014-08-20 02:27:21'),
(66, 46, 0, 1, 9, 1, '321000100', '0', 'kelapa', 1, 12, 1, 2, 12, 1, 16, '2014-06-25 02:03:10', 0, '2014-08-18 11:05:47'),
(73, 49, 0, 1, -1, 4, '331000100', '0', 'Plastic Chair - Blue', 12, 0, 2, 2, 24, 2, 16, '2014-06-25 02:26:19', 0, '2014-08-19 01:22:21'),
(78, 52, 0, 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, 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, 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, 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, 0, 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, 0, -1, 8, '331000300', '', 'Plastic Chair - White', 12, 0, 20, 2, 24, 14, 16, '2014-06-25 05:27:03', 0, '2014-08-19 01:22:21'),
(85, 54, 0, 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, 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, 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, 0, -1, 4, '331000100', '', 'Plastic Chair - Blue', 12, 0, 2, 2, 24, 2, 16, '2014-06-25 06:04:15', 0, '2014-08-19 01:22:21'),
(89, 55, 0, 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, 0, 1, 29, 4, '331000100', '0', 'Plastic Chair - Blue', 1212, 12, 1, 2, 14544, 1, 16, '2014-06-25 06:06:09', 0, '2014-08-19 01:22:21'),
(91, 56, 0, 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, 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, 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, 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, 0, 1, -1, 4, '331000100', '0', 'Plastic Chair - Blue', 1, 0, 9, 2, 9, 9, 16, '2014-06-25 06:10:38', 16, '2014-08-19 01:22:21'),
(98, 0, 0, 0, -1, 4, '331000100', '', 'Plastic Chair - Blue', 1, 0, 1, 2, 1, 1, 16, '2014-06-25 06:12:32', 0, '2014-08-19 01:22:12'),
(103, 59, 0, 1, 29, 4, '331000100', '0', 'Plastic Chair - Blue', 1212, 12, 1, 2, 14544, 1, 16, '2014-06-25 06:38:17', 0, '2014-08-19 01:22:12'),
(104, 59, 0, 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'),
(109, 61, 0, 1, 29, 4, '331000100', '', 'Plastic Chair - Blue', 1212, 12, 1, 2, 14544, 1, 16, '2014-06-26 01:56:34', 0, '2014-08-19 01:22:12'),
(110, 61, 0, 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, 183, 1, 31, 11, 'M001', '', 'saiz 10. warna gold', 2, 10, 1, 2, 20, 10, 16, '2014-07-02 08:10:27', 0, '2014-07-16 00:35:38'),
(112, 62, 185, 2, 32, 12, 'M002', '', 'saiz 10. warna merah', 3, 5, 1, 2, 15, 5, 16, '2014-07-02 08:10:32', 0, '2014-07-16 01:14:00'),
(113, 63, 0, 1, 8, 2, '100300100', '', 'kelapa', 1, 22, 1, 2, 22, 0, 16, '2014-07-03 09:06:26', 0, '2014-07-09 04:50:48'),
(114, 64, 0, 1, 8, 2, '100300100', '', 'kelapa', 1, 22, 1, 2, 22, 0, 16, '2014-07-03 09:10:37', 0, '2014-07-09 04:50:48'),
(115, 65, 0, 1, 22, 1, '321000100', '', 'Teak wooden chair with natural finish', 1, 12, 1, 2, 12, 1, 16, '2014-07-03 09:13:03', 0, '2014-08-18 11:05:47'),
(116, 66, 0, 1, -1, 7, '331000200', '', 'Plastic Chair - Red', 2345, 0, 1, 2, 2345, 1, 16, '2014-07-03 09:15:13', 0, '2014-08-18 11:28:50'),
(117, 67, 0, 1, -1, 1, '321000100', '', 'Teak wooden chair with natural finish', 1, 0, 12, 2, 12, 12, 16, '2014-07-03 09:16:18', 0, '2014-08-18 11:05:47'),
(148, 68, 0, 1, 44, 1, '', '', 'Teak wooden chair with natural finish', 0, 10, 10, 2, 0, 10, 1, '2014-07-09 02:52:02', 0, '2014-08-18 11:05:36'),
(149, 68, 201, 2, 46, 13, '', '', 'ALATAN TULIS DAN MELUKIS', 2, 15, 10, 2, 30, 0, 1, '2014-07-09 02:52:08', 0, '2014-07-24 03:55:07'),
(150, 69, 201, 1, 46, 13, '', '', 'ALATAN TULIS DAN MELUKIS', 2, 15, 5, 2, 30, 0, 1, '2014-07-09 03:10:25', 0, '2014-07-24 03:55:07'),
(151, 69, 201, 2, 45, 13, '', '', 'ALATAN TULIS DAN MELUKIS', 0, 10, 5, 2, 0, 0, 1, '2014-07-09 03:10:27', 0, '2014-07-24 03:55:07'),
(152, 70, 0, 1, 33, 11, '', '', 'saiz 10. warna gold', 2, 2, 2, 0, 4, 0, 16, '2014-07-09 04:58:31', 0, '0000-00-00 00:00:00'),
(153, 71, 191, 1, 47, 11, '', '', 'saiz 10. warna gold', 2222, 1, 1, 0, 2222, 0, 16, '2014-07-10 03:39:35', 0, '2014-07-16 02:10:14'),
(154, 71, 193, 2, 48, 12, '', '', 'saiz 10. warna hitam', 3333, 12, 4, 0, 39996, 0, 16, '2014-07-10 03:45:52', 0, '2014-07-16 02:11:51'),
(155, 71, 191, 1, -1, 11, '', '', 'saiz 10. warna gold', 0, 0, 1, 0, 0, 0, 16, '2014-07-10 03:46:59', 0, '2014-07-16 02:10:14'),
(156, 72, 0, 1, 49, 16, '', '', 'Wireless', 110, 10, 5, 0, 1100, 0, 29, '2014-07-21 07:00:59', 0, '0000-00-00 00:00:00'),
(157, 73, 0, 1, 54, 8, '', '', 'Plastic Chair - White', 12, 1, 1, 0, 12, 1, 1, '2014-07-31 02:21:14', 0, '2014-08-19 01:22:12'),
(158, 74, 0, 1, 54, 8, '', '', 'Plastic Chair - White', 12, 1, 1, 0, 12, 1, 1, '2014-07-31 02:21:18', 0, '2014-08-19 01:22:12'),
(159, 75, 0, 1, 54, 8, '', '', 'Plastic Chair - White', 12, 1, 1, 0, 12, 1, 1, '2014-07-31 02:21:23', 0, '2014-08-18 11:30:33'),
(160, 73, 0, 1, -1, 1, '', '', 'Teak wooden chair with natural finish', 12, 0, 2, 0, 24, 2, 1, '2014-07-31 02:22:03', 0, '2014-08-18 10:50:19'),
(161, 76, 207, 1, 56, 18, '', '', 'Dell High Specification', 100, 5, 5, 0, 500, 0, 29, '2014-08-04 03:14:32', 0, '2014-08-05 01:23:47'),
(162, 76, 0, 1, -1, 16, '', '', 'Wireless', 100, 0, 5, 0, 500, 0, 29, '2014-08-04 03:15:03', 0, '0000-00-00 00:00:00'),
(163, 77, 207, 1, 58, 17, '', '', 'Projector 1 set with remote', 34, 5, 3, 0, 170, 0, 16, '2014-08-04 10:11:56', 0, '2014-08-05 01:23:47'),
(169, 79, 0, 1, 60, 0, '', '', 'description', 34, 8, 5, 0, 272, 0, 33, '2014-08-05 09:31:07', 0, '0000-00-00 00:00:00'),
(170, 80, 0, 1, 60, 0, '', '', 'description', 34, 8, 1, 0, 34, 0, 33, '2014-08-05 09:31:57', 1, '2014-08-27 02:33:50'),
(171, 79, 0, 2, 60, 0, '', '', 'description', 34, 8, 1, 0, 272, 0, 33, '2014-08-05 09:32:45', 0, '0000-00-00 00:00:00'),
(173, 82, 0, 1, 62, 21, '', '', 'speaker', 500, 5, 1, 0, 500, 0, 35, '2014-08-21 04:30:07', 1, '2014-08-26 10:25:35'),
(174, 83, 0, 1, 62, 21, '', '', 'speaker', 500, 5, 2, 0, 2500, 0, 35, '2014-08-21 04:31:57', 0, '0000-00-00 00:00:00'),
(175, 84, 0, 1, 63, 11, '', '', 'saiz 10. warna gold', 2222, 1, 1, 0, 2222, 0, 16, '2014-08-25 02:30:03', 0, '0000-00-00 00:00:00'),
(176, 85, 0, 1, -1, 4, '', '', 'Plastic Chair - Blue', 12, 0, 15, 0, 180, 0, 1, '2014-08-25 03:01:38', 1, '2014-08-27 12:51:24'),
(178, 87, 0, 1, 73, 7, '', '', 'Plastic Chair - Red', 2345, 111, 1, 0, 260295, 0, 1, '2014-08-26 07:34:25', 0, '0000-00-00 00:00:00'),
(180, 88, 0, 1, 73, 7, '', '', 'Plastic Chair - Red', 2345, 111, 1, 0, 260295, 0, 1, '2014-08-26 07:38:50', 0, '0000-00-00 00:00:00'),
(181, 88, 0, 2, 73, 7, '', '', 'Plastic Chair - Red', 2345, 111, 1, 0, 260295, 0, 1, '2014-08-26 07:38:58', 0, '0000-00-00 00:00:00'),
(182, 88, 0, 2, 73, 7, '', '', 'Plastic Chair - Red', 2345, 111, 1, 0, 260295, 0, 1, '2014-08-26 07:39:08', 0, '0000-00-00 00:00:00'),
(183, 89, 0, 1, 73, 7, '', '', 'Plastic Chair - Red', 2345, 111, 1, 0, 260295, 0, 1, '2014-08-26 07:43:17', 0, '0000-00-00 00:00:00'),
(184, 89, 0, 1, -1, 4, '', '', 'Plastic Chair - Blue', 212212, 0, 212, 0, 44988944, 0, 1, '2014-08-26 07:43:45', 0, '0000-00-00 00:00:00'),
(185, 90, 0, 1, 73, 7, '', '', 'Plastic Chair - Red', 2345, 111, 3, 0, 260295, 0, 1, '2014-08-26 08:03:39', 0, '0000-00-00 00:00:00'),
(186, 90, 0, 2, 72, 7, '', '', 'Plastic Chair - Red', 2345, 11, 1, 0, 25795, 0, 1, '2014-08-26 08:19:11', 0, '0000-00-00 00:00:00'),
(191, 78, 0, 4, 59, 18, '', '', 'Dell High Specification', 34, 5, 1, 0, 34, 0, 1, '2014-08-26 09:13:42', 1, '2014-08-26 09:16:30'),
(192, 78, 0, 5, 59, 18, '', '', 'Dell High Specification', 34, 5, 2, 0, 68, 0, 1, '2014-08-26 09:16:39', 0, '0000-00-00 00:00:00'),
(193, 78, 0, 1, -1, 1, '', '', 'Teak wooden chair with natural finish', 10, 0, 1, 0, 10, 0, 1, '2014-08-26 09:17:27', 0, '0000-00-00 00:00:00'),
(194, 78, 0, 2, -1, 7, '', '', 'Plastic Chair - Red', 9, 0, 2, 0, 18, 0, 1, '2014-08-26 09:18:54', 0, '0000-00-00 00:00:00'),
(201, 81, 0, 0, 61, 19, '', '', 'New Item description', 34, 20, 1, 0, 34, 0, 1, '2014-08-27 02:07:09', 1, '2014-08-27 11:30:30'),
(202, 91, 234, 1, 92, 23, '', '', 'Chair with gift', 1000, 5, 2, 0, 2000, 0, 19, '2014-08-27 08:03:03', 19, '2014-08-27 12:07:54'),
(203, 91, 234, 2, 93, 24, '', '', 'Table with gift', 2000, 5, 2, 0, 4000, 0, 19, '2014-08-27 08:04:08', 19, '2014-08-27 12:07:54'),
(205, 91, 234, 2, -1, 23, '', '', 'Chair with gift', 1000, 0, 2, 0, 2000, 0, 19, '2014-08-27 08:13:22', 19, '2014-08-27 12:07:54'),
(206, 92, 234, 1, 94, 23, '', '', 'Chair with gift', 10, 4, 4, 0, 40, 0, 19, '2014-08-27 09:44:49', 19, '2014-08-27 12:07:54'),
(207, 92, 234, 1, -1, 23, '', '', 'Chair with gift', 10, 0, 2, 0, 20, 0, 19, '2014-08-27 09:47:39', 0, '2014-08-27 12:07:54'),
(208, 93, 0, 1, 67, 4, '', '', 'Plastic Chair - Blue', 1, 2, 1, 0, 2, 0, 1, '2014-08-27 09:48:37', 0, '0000-00-00 00:00:00'),
(209, 94, 0, 1, 68, 7, '', '', 'Plastic Chair - Red', 2345, 1, 1, 0, 2345, 1, 1, '2014-08-27 09:59:09', 0, '2014-08-27 10:34:11'),
(210, 95, 0, 1, 67, 4, '', '', 'Plastic Chair - Blue', 1, 2, 1, 0, 2, 0, 1, '2014-08-27 10:01:48', 0, '0000-00-00 00:00:00'),
(211, 95, 0, 2, 69, 7, '', '', 'Plastic Chair - Red', 2345, 1, 1, 0, 2345, 0, 1, '2014-08-27 10:02:19', 0, '0000-00-00 00:00:00'),
(212, 96, 0, 1, 80, 1, '', '', 'Teak wooden chair with natural finish', 123, 5, 1, 0, 615, 0, 1, '2014-08-27 10:05:17', 0, '0000-00-00 00:00:00'),
(213, 97, 0, 1, 73, 7, '', '', 'Plastic Chair - Red', 2345, 111, 2, 0, 260295, 0, 1, '2014-08-27 10:09:58', 0, '0000-00-00 00:00:00'),
(214, 98, 0, 1, 80, 1, '', '', 'Teak wooden chair with natural finish', 123, 5, 1, 0, 615, 0, 1, '2014-08-27 10:11:56', 0, '0000-00-00 00:00:00'),
(215, 99, 0, 1, 80, 1, '', '', 'Teak wooden chair with natural finish', 123, 5, 2, 0, 615, 0, 1, '2014-08-27 10:13:08', 0, '0000-00-00 00:00:00'),
(216, 100, 0, 1, 79, 8, '', '', 'Plastic Chair - White', 34, 5, 2, 0, 170, 0, 1, '2014-08-27 10:14:34', 0, '0000-00-00 00:00:00'),
(217, 100, 0, 2, 78, 8, '', '', 'Plastic Chair - White', 22, 5, 1, 0, 110, 0, 1, '2014-08-27 10:14:52', 0, '0000-00-00 00:00:00'),
(218, 100, 0, 1, -1, 7, '', '', 'Plastic Chair - Red', 1, 0, 1, 0, 1, 0, 1, '2014-08-27 10:15:49', 0, '0000-00-00 00:00:00'),
(219, 100, 0, 2, -1, 7, '', '', 'Plastic Chair - Red', 1, 0, 1, 0, 1, 0, 1, '2014-08-27 10:15:59', 0, '0000-00-00 00:00:00'),
(220, 101, 0, 1, 75, 1, '', '', 'Teak wooden chair with natural finish', 12.3, 10, 2, 0, 123, 0, 1, '2014-08-27 10:26:33', 0, '0000-00-00 00:00:00'),
(221, 101, 0, 1, -1, 7, '', '', 'Plastic Chair - Red', 1, 0, 1, 0, 1, 0, 1, '2014-08-27 10:26:52', 0, '0000-00-00 00:00:00'),
(222, 102, 0, 1, 72, 7, '', '', 'Plastic Chair - Red', 2345, 11, 3, 0, 7035, 0, 1, '2014-08-27 11:33:05', 1, '2014-08-27 11:35:29'),
(223, 102, 0, 2, 70, 4, '', '', 'Plastic Chair - Blue', 10, 1, 1, 0, 10, 0, 1, '2014-08-27 11:36:33', 0, '0000-00-00 00:00:00'),
(224, 103, 0, 1, 76, 4, '', '', 'Plastic Chair - Blue', 21.4, 5, 1, 0, 21.4, 0, 1, '2014-08-27 11:39:21', 1, '2014-08-27 11:42:57'),
(225, 103, 0, 2, 75, 1, '', '', 'Teak wooden chair with natural finish', 12.3, 10, 1, 0, 12.3, 0, 1, '2014-08-27 11:44:05', 0, '0000-00-00 00:00:00'),
(228, 103, 0, 4, 75, 1, '', '', 'Teak wooden chair with natural finish', 12.3, 10, 1, 0, 12.3, 0, 1, '2014-08-27 11:46:48', 0, '0000-00-00 00:00:00'),
(230, 103, 0, 2, -1, 1, '', '', 'Teak wooden chair with natural finish', 1, 0, 1, 0, 1, 0, 1, '2014-08-27 11:47:37', 0, '0000-00-00 00:00:00'),
(231, 104, 242, 1, 95, 7, '', '', 'Plastic Chair - Red', 10, 10, 1, 0, 10, 0, 1, '2014-08-27 12:24:01', 1, '2014-09-03 02:30:27'),
(236, 104, 242, 3, 96, 8, '', '', 'Plastic Chair - White', 20, 10, 1, 0, 20, 0, 1, '2014-08-27 13:06:26', 0, '2014-09-03 02:30:27'),
(237, 104, 242, 4, 96, 8, '', '', 'Plastic Chair - White', 20, 10, 1, 0, 20, 0, 1, '2014-08-27 13:07:10', 1, '2014-09-03 02:30:27'),
(238, 105, 0, 1, 97, 10, '', '', 'Bola Tampar Buaya', 100, 10, 4, 0, 1000, 0, 1, '2014-08-27 13:21:17', 0, '0000-00-00 00:00:00'),
(239, 60, 0, 0, 80, 1, '', '', 'Teak wooden chair with natural finish', 123, 5, 1, 0, 123, 0, 1, '2014-08-28 01:08:34', 1, '2014-08-28 01:09:01'),
(240, 104, 0, 1, -1, 1, '', '', 'Teak wooden chair with natural finish', 1, 0, 1, 0, 1, 0, 1, '2014-08-28 01:11:02', 0, '0000-00-00 00:00:00'),
(242, 106, 0, 1, 99, 23, '', '', 'Chair with gift', 10, 10, 5, 0, 100, 0, 19, '2014-08-28 03:52:53', 0, '0000-00-00 00:00:00'),
(243, 107, 0, 1, 57, 1, '', '', 'Teak wooden chair with natural finish', 34, 5, 2, 0, 170, 0, 1, '2014-09-02 03:45:59', 0, '0000-00-00 00:00:00'),
(244, 107, 0, 2, 88, 1, '', '', 'Teak wooden chair with natural finish', 5, 5, 1, 0, 25, 0, 1, '2014-09-02 03:47:13', 0, '0000-00-00 00:00:00'),
(245, 108, 0, 1, -1, 23, '', '', 'Chair with gift', 12.3, 0, 9, 0, 110.7, 0, 33, '2014-09-03 03:05:31', 33, '2014-09-03 04:42:41'),
(246, 108, 0, 2, -1, 24, '', '', 'Table with gift', 32, 0, 3, 0, 96, 0, 33, '2014-09-03 03:06:24', 0, '0000-00-00 00:00:00'),
(247, 109, 248, 1, 102, 26, '', '', 'Chair with Cover', 200, 10, 3, 0, 2000, 0, 19, '2014-09-03 03:41:54', 0, '2014-09-08 08:14:42'),
(248, 109, 248, 1, -1, 26, '', '', 'Chair with Cover', 200, 0, 4, 0, 800, 0, 19, '2014-09-03 03:42:16', 0, '2014-09-08 08:14:42'),
(253, 114, 249, 1, 102, 26, '', '', 'Chair with Cover', 200, 10, 2, 0, 400, 0, 16, '2014-09-03 04:52:53', 16, '2014-09-08 08:15:29'),
(254, 115, 249, 1, 102, 26, '', '', 'Chair with Cover', 200, 10, 1, 0, 200, 0, 16, '2014-09-03 05:29:59', 19, '2014-09-15 04:41:05'),
(258, 119, 243, 1, 104, 29, '', '', 'Laptop Dell', 1000, 15, 10, 0, 10000, 0, 42, '2014-09-04 02:31:09', 0, '2014-09-04 07:01:51'),
(259, 119, 243, 2, 105, 29, '', '', 'Laptop Dell', 1000, 5, 5, 0, 5000, 0, 42, '2014-09-04 02:32:10', 0, '2014-09-04 07:01:51'),
(260, 120, 253, 1, 104, 29, '', '', 'Laptop Dell', 1000, 15, 5, 0, 5000, 0, 42, '2014-09-04 02:51:57', 0, '2014-09-10 07:35:51'),
(261, 120, 253, 1, -1, 29, '', '', 'Laptop Dell', 1000, 0, 2, 0, 2000, 0, 42, '2014-09-04 02:52:45', 0, '2014-09-10 07:35:51'),
(262, 121, 252, 1, 106, 29, '', '', 'Laptop Dell', 1000, 10, 10, 0, 10000, 0, 42, '2014-09-04 03:55:02', 0, '2014-09-10 06:50:17'),
(267, 125, 0, 1, 57, 1, '', '', 'Teak wooden chair with natural finish', 34, 5, 6, 0, 204, 0, 16, '2014-09-04 05:29:41', 0, '0000-00-00 00:00:00'),
(268, 125, 0, 2, 88, 1, '', '', 'Teak wooden chair with natural finish', 5, 5, 6, 0, 25, 0, 16, '2014-09-04 05:29:46', 0, '0000-00-00 00:00:00'),
(273, 130, 245, 1, 107, 29, '', '', 'Laptop Dell', 1000, 10, 10, 0, 30000, 0, 42, '2014-09-04 10:25:03', 0, '2014-09-12 03:54:41'),
(274, 131, 258, 1, 102, 26, '', '', 'Chair with Cover', 200, 10, 1, 0, 200, 0, 16, '2014-09-05 04:02:12', 0, '2014-09-11 04:51:18'),
(275, 132, 250, 1, -1, 27, '', '', 'STAT', 1, 0, 2, 0, 2, 0, 16, '2014-09-05 04:22:39', 0, '2014-09-10 06:27:45'),
(276, 133, 256, 1, -1, 29, '', '', 'Laptop Dell', 1000, 0, 1, 0, 10, 0, 16, '2014-09-05 04:23:44', 0, '2014-09-12 03:54:41'),
(277, 134, 269, 1, -1, 27, '', '', 'STAT', 10, 0, 1, 0, 10, 0, 16, '2014-09-05 04:26:32', 0, '2014-09-15 07:10:28'),
(278, 135, 258, 1, -1, 26, '', '', 'Chair with Cover', 10, 0, 1, 0, 10, 0, 16, '2014-09-05 04:41:11', 0, '2014-09-16 02:36:12'),
(279, 136, 0, 1, -1, 29, '', '', 'Laptop Dell', 1000, 5, 1, 0, 1, 0, 16, '2014-09-05 07:12:52', 0, '2014-09-15 04:58:32'),
(280, 137, 246, 1, 109, 30, '', '', 'Roti Keras', 1000, 10, 10, 0, 10000, 0, 42, '2014-09-05 07:17:00', 0, '2014-09-05 07:32:41'),
(281, 138, 247, 1, 110, 29, '', '', 'Laptop Dell', 1000, 20, 15, 0, 14850, 0, 16, '2014-09-05 07:33:11', 0, '2014-09-17 04:16:14'),
(282, 140, 260, 1, 102, 26, '', '', 'Chair with Cover', 200, 10, 2, 0, 400, 0, 16, '2014-09-08 02:15:34', 0, '2014-09-17 09:54:28'),
(284, 142, 260, 1, 102, 26, '', '', 'Chair with Cover', 200, 10, 1, 0, 200, 0, 16, '2014-09-08 04:31:11', 0, '2014-09-17 09:54:28'),
(288, 146, 0, 1, 111, 29, '', '', 'Laptop Dell', 1000, 10, 1, 0, 34000, 0, 16, '2014-09-08 04:45:55', 0, '2014-09-17 04:16:14'),
(289, 147, 0, 1, 111, 29, '', '', 'Laptop Dell', 1000, 10, 1, 0, 34000, 0, 16, '2014-09-08 04:48:51', 0, '2014-09-17 04:20:59'),
(290, 148, 291, 1, 111, 29, '', '', 'Laptop Dell', 1000, 10, 2, 0, 68000, 0, 16, '2014-09-08 04:49:10', 0, '2014-09-17 04:20:59'),
(291, 149, 251, 1, 103, 26, '', '', 'Chair with Cover', 50, 25, 2, 0, 100, 0, 16, '2014-09-08 07:12:34', 0, '2014-09-17 09:54:28'),
(292, 150, 251, 1, 110, 29, '', '', 'Laptop Dell', 1000, 20, 2, 0, 1980, 2, 16, '2014-09-08 07:13:53', 0, '2014-09-12 03:54:41'),
(293, 151, 291, 1, 111, 29, '', '', 'Laptop Dell', 1000, 10, 4, 0, 136000, 4, 19, '2014-09-08 09:03:33', 0, '2014-09-17 03:06:55'),
(294, 152, 293, 1, -1, 29, '', '', 'Laptop Dell', 1000, 0, 0, 0, 0, 0, 19, '2014-09-08 09:05:55', 0, '2014-09-18 02:12:58'),
(295, 153, 251, 1, 110, 29, '', '', 'Laptop Dell', 1000, 20, 1, 0, 990, 1, 16, '2014-09-08 09:13:13', 0, '2014-09-12 03:54:41'),
(296, 153, 251, 1, -1, 26, '', '', 'Chair with Cover', 100, 0, 2, 0, 200, 0, 16, '2014-09-08 09:25:52', 0, '2014-09-10 06:32:37'),
(297, 154, 255, 1, 110, 29, '', '', 'Laptop Dell', 1000, 20, 2, 0, 1980, 2, 19, '2014-09-10 09:50:36', 19, '2014-09-12 03:54:41'),
(298, 155, 257, 1, -1, 26, '', '', 'Chair with Cover', 1000, 0, 10, 0, 10000, 5, 19, '2014-09-10 09:57:15', 0, '2014-09-17 09:54:28'),
(299, 156, 273, 1, 121, 27, '', '', 'STAT', 234, 5, 5, 0, 1170, 5, 16, '2014-09-12 03:46:30', 0, '2014-09-16 05:00:35'),
(300, 157, 0, 1, -1, 31, '', '', 'wooden', 550, 0, 2, 0, 1100, 2, 49, '2014-09-12 08:23:41', 0, '0000-00-00 00:00:00'),
(301, 158, 0, 1, 123, 31, '', '', 'wooden', 330, 3, 3, 0, 990, 3, 49, '2014-09-12 08:35:06', 0, '0000-00-00 00:00:00'),
(302, 158, 0, 2, 122, 31, '', '', 'wooden', 550, 2, 2, 0, 1100, 0, 49, '2014-09-12 08:35:23', 0, '0000-00-00 00:00:00'),
(305, 160, 0, 1, 111, 29, '', '', 'Laptop Dell', 34000, 10, 2, 0, 68000, 2, 19, '2014-09-15 03:08:49', 0, '0000-00-00 00:00:00'),
(306, 161, 266, 1, 124, 25, '', '', 'Table with Glass', 500, 100, 100, 0, 50000, 97, 19, '2014-09-15 04:52:12', 19, '2014-09-17 09:54:28'),
(307, 161, 266, 2, 125, 26, '', '', 'Chair with Cover', 100, 100, 100, 0, 10000, 0, 19, '2014-09-15 04:52:13', 0, '2014-09-15 05:54:35'),
(309, 163, 270, 1, 129, 32, '', '', 'cake', 1, 50, 50, 0, 50, 0, 50, '2014-09-15 09:15:15', 0, '2014-09-16 02:13:41'),
(310, 164, 277, 1, 131, 39, '', '', 'Toyota Wish 2.0 Recon', 80000, 2, 2, 0, 160000, 2, 19, '2014-09-16 05:24:46', 0, '2014-09-16 05:37:23'),
(311, 165, 281, 1, 132, 26, '', '', 'Chair with Cover', 11, 80, 10, 0, 110, 10, 16, '2014-09-17 01:52:39', 0, '2014-09-17 01:57:31'),
(312, 165, 281, 2, 133, 29, '', '', 'Laptop Dell', 998, 2, 2, 0, 1996, 0, 16, '2014-09-17 01:52:42', 0, '2014-09-17 01:57:31'),
(313, 165, 281, 2, 134, 27, '', '', 'STAT', 0.8, 120, 20, 0, 96, 0, 16, '2014-09-17 01:52:43', 0, '2014-09-17 01:57:31'),
(314, 165, 281, 2, 135, 25, '', '', 'Table with Glass', 45, 3, 3, 0, 135, 0, 16, '2014-09-17 01:52:45', 0, '2014-09-17 01:57:31'),
(315, 162, 0, 1, -1, 26, '', '', 'Chair with Cover', 10, 0, 1, 0, 10, 0, 16, '2014-09-17 06:32:24', 0, '0000-00-00 00:00:00'),
(316, 166, 0, 1, 111, 29, '', '', 'Laptop Dell', 34000, 10, 1, 0, 34000, 1, 16, '2014-09-22 02:48:00', 0, '0000-00-00 00:00:00'),
(317, 167, 0, 1, 140, 26, '', '', 'Chair with Cover', 10000, 5, 5, 0, 50000, 5, 19, '2014-09-22 02:50:02', 0, '0000-00-00 00:00:00'),
(318, 168, 0, 1, 141, 40, '', '', 'LAPTOP DELL', 2000, 3, 3, 0, 6000, 3, 43, '2014-09-22 03:03:03', 0, '0000-00-00 00:00:00'),
(319, 169, 0, 1, 142, 43, '', '', 'Monitor with Cabel', 2000, 10, 10, 0, 20000, 10, 19, '2014-09-22 03:11:52', 19, '2014-09-22 03:14:25'),
(320, 169, 0, 2, 143, 42, '', '', 'Speaker with cover cabel', 1000, 10, 10, 0, 10000, 0, 19, '2014-09-22 03:11:55', 19, '2014-09-22 03:14:20'),
(321, 170, 0, 1, 102, 26, '', '', 'Chair with Cover', 200, 10, 1, 0, 200, 1, 16, '2014-09-22 03:17:37', 0, '0000-00-00 00:00:00'),
(322, 170, 0, 1, -1, 25, '', '', 'Table with Glass', 10, 0, 1, 0, 10, 0, 16, '2014-09-22 03:18:06', 0, '0000-00-00 00:00:00'),
(323, 170, 0, 2, -1, 27, '', '', 'pen murah', 0.4, 0, 50, 0, 20, 0, 16, '2014-09-22 03:19:29', 0, '0000-00-00 00:00:00');

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

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

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

CREATE TABLE IF NOT EXISTS `comp_receive_payment` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `customerID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `paymentMethodID` int(11) NOT NULL,
  `referenceNo` 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 DEFAULT '1',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(6) NOT NULL DEFAULT '0',
  `journalNo` varchar(32) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=53 ;

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

INSERT INTO `comp_receive_payment` (`ID`, `serialNo`, `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, 1, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, ''),
(31, 2, 1, 12, 1, 119, 0, 12, 0, 'RP', '2013-08-15', 0, 3.8, 0, '', 0, 0, 0, 123, 6293.5, -6182.5, 0, 33, '2014-08-29 08:36:35', 0, '0000-00-00 00:00:00', 0, ''),
(32, 1, 103, 44, 0, 69, 123, 39, 0, '123', '2014-09-16', 0, 1, 0, '', 0, 0, 0, 636, 636, 0, 0, 50, '2014-09-16 02:40:19', 0, '0000-00-00 00:00:00', 0, ''),
(33, 2, 103, 44, 0, 69, 123, 39, 0, '123', '2014-09-16', 0, 1, 0, '', 0, 0, 0, 636, 636, 0, 0, 50, '2014-09-16 02:40:19', 0, '0000-00-00 00:00:00', 0, ''),
(34, 1, 105, 45, 0, 69, 0, 40, 0, 'RP', '2014-09-16', 0, 1, 0, '', 0, 0, 0, 254400, 254400, 0, 0, 19, '2014-09-16 06:22:07', 0, '2014-09-17 03:22:45', 0, ''),
(35, 1, 93, 40, 30, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, 'sds', 0, 0, 0, 6246, 6246, 0, 1, 16, '2014-09-17 02:40:43', 0, '2014-09-17 03:22:55', 0, 'AR20140900000004'),
(36, 2, 93, 40, 0, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 0, 0, 3, 3, 0, 1, 16, '2014-09-17 03:37:38', 0, '0000-00-00 00:00:00', 0, ''),
(37, 3, 93, 40, 0, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 0, 0, 3, 3, 0, 1, 16, '2014-09-17 03:52:24', 0, '0000-00-00 00:00:00', 0, ''),
(38, 4, 93, 40, 0, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 0, 0, 3, 3, 0, 1, 16, '2014-09-17 03:52:28', 0, '0000-00-00 00:00:00', 0, ''),
(39, 5, 93, 40, 0, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 0, 0, 4, 4, 0, 1, 16, '2014-09-17 03:53:49', 0, '0000-00-00 00:00:00', 0, ''),
(40, 6, 93, 40, 0, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 0, 0, 4, 4, 0, 1, 16, '2014-09-17 03:53:54', 0, '0000-00-00 00:00:00', 0, ''),
(41, 7, 93, 40, 0, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 0, 0, 4, 4, 0, 1, 16, '2014-09-17 03:54:02', 0, '0000-00-00 00:00:00', 0, ''),
(42, 8, 93, 40, 0, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 0, 0, 4, 4, 0, 1, 16, '2014-09-17 03:54:03', 0, '0000-00-00 00:00:00', 0, ''),
(43, 9, 93, 40, 0, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 0, 0, 4, 4, 0, 1, 16, '2014-09-17 03:54:03', 0, '0000-00-00 00:00:00', 0, ''),
(44, 10, 93, 40, 0, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 0, 0, 362, 100, 0, 1, 16, '2014-09-17 04:44:05', 0, '2014-09-17 05:32:20', 0, ''),
(45, 11, 93, 40, 0, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 0, 0, 362, 362, 0, 1, 16, '2014-09-17 04:44:28', 0, '0000-00-00 00:00:00', 0, ''),
(46, 12, 93, 40, 0, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 0, 0, 362, 362, 0, 1, 16, '2014-09-17 04:44:38', 0, '0000-00-00 00:00:00', 0, ''),
(47, 13, 93, 40, 0, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 0, 0, 369, 369, 0, 1, 16, '2014-09-17 04:46:11', 0, '0000-00-00 00:00:00', 0, ''),
(48, 14, 93, 40, 0, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 0, 0, 5, 5, 0, 1, 16, '2014-09-17 04:46:53', 0, '0000-00-00 00:00:00', 0, ''),
(49, 15, 93, 40, 30, 68, 0, 37, 0, 'RP', '2014-09-17', 0, 1, 0, '', 0, 10, 10, 1000, 831.06, 158.94, 0, 16, '2014-09-17 08:10:13', 0, '2014-09-17 08:10:43', 0, 'AR20140900000008'),
(50, 16, 93, 46, 31, 69, 666666, 37, 0, 'RP 222', '2014-09-18', 0, 1, 0, 'asdasdasfasfasfasdfasd', 0, 2, 2, 1000, 0, 998, 1, 42, '2014-09-18 09:16:49', 0, '0000-00-00 00:00:00', 0, ''),
(51, 17, 93, 46, 31, 69, 666666, 37, 0, 'RP 222', '2014-09-18', 0, 1, 0, 'asdasdasfasfasfasdfasd', 0, 2, 2, 1000, 0, 998, 1, 42, '2014-09-18 09:17:00', 0, '0000-00-00 00:00:00', 0, ''),
(52, 18, 93, 41, 31, 69, 666666, 37, 0, 'RPsdf', '2014-09-18', 0, 1, 0, 'sdfsdfsdfsdf', 10, 2, -8, 886, 886, 8, 0, 42, '2014-09-18 09:20:55', 0, '2014-09-22 01:11:08', 0, 'AR20140900000012');

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

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

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

CREATE TABLE IF NOT EXISTS `comp_receive_payment_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `receivePaymentID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `invoiceID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `ARBalance` double NOT NULL,
  `discount` double NOT NULL,
  `amountApplied` double NOT NULL,
  `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=68 ;

--
-- 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'),
(41, 31, 1, 19, 0, 0, 0, 6293.5, 0, '2014-08-29 08:36:35', 0, '0000-00-00 00:00:00'),
(42, 32, 1, 171, 0, 0, 0, 636, 0, '2014-09-16 02:40:19', 0, '0000-00-00 00:00:00'),
(43, 33, 1, 171, 0, 0, 0, 636, 0, '2014-09-16 02:40:19', 0, '0000-00-00 00:00:00'),
(44, 34, 1, 174, 0, 0, 0, 254400, 0, '2014-09-16 06:22:07', 0, '0000-00-00 00:00:00'),
(45, 35, 1, 161, 0, 0, 0, 246, 0, '2014-09-17 02:40:43', 0, '0000-00-00 00:00:00'),
(46, 35, 2, 162, 0, 0, 0, 6000, 0, '2014-09-17 02:40:43', 0, '0000-00-00 00:00:00'),
(47, 36, 1, 163, 0, 0, 0, 3, 0, '2014-09-17 03:37:38', 0, '0000-00-00 00:00:00'),
(48, 37, 1, 163, 0, 0, 0, 3, 0, '2014-09-17 03:52:24', 0, '0000-00-00 00:00:00'),
(49, 38, 1, 163, 0, 0, 0, 3, 0, '2014-09-17 03:52:28', 0, '0000-00-00 00:00:00'),
(50, 39, 1, 163, 0, 0, 0, 4, 0, '2014-09-17 03:53:49', 0, '0000-00-00 00:00:00'),
(51, 40, 1, 163, 0, 0, 0, 4, 0, '2014-09-17 03:53:54', 0, '0000-00-00 00:00:00'),
(52, 41, 1, 163, 0, 0, 0, 4, 0, '2014-09-17 03:54:02', 0, '0000-00-00 00:00:00'),
(53, 42, 1, 163, 0, 0, 0, 4, 0, '2014-09-17 03:54:03', 0, '0000-00-00 00:00:00'),
(54, 43, 1, 163, 0, 0, 0, 4, 0, '2014-09-17 03:54:03', 0, '0000-00-00 00:00:00'),
(56, 45, 1, 163, 0, 0, 0, 362, 0, '2014-09-17 04:44:29', 0, '0000-00-00 00:00:00'),
(57, 46, 1, 163, 0, 0, 0, 362, 0, '2014-09-17 04:44:38', 0, '0000-00-00 00:00:00'),
(58, 47, 1, 164, 0, 0, 0, 369, 0, '2014-09-17 04:46:11', 0, '0000-00-00 00:00:00'),
(59, 48, 1, 165, 0, 0, 0, 5, 0, '2014-09-17 04:46:53', 0, '0000-00-00 00:00:00'),
(61, 44, 1, 163, 0, 0, 0, 100, 0, '2014-09-17 05:32:20', 0, '0000-00-00 00:00:00'),
(62, 49, 1, 163, 0, 0, 0, 262, 0, '2014-09-17 08:10:13', 0, '0000-00-00 00:00:00'),
(63, 49, 2, 165, 0, 0, 0, 339, 0, '2014-09-17 08:10:14', 0, '0000-00-00 00:00:00'),
(64, 49, 3, 178, 0, 0, 0, 123, 0, '2014-09-17 08:10:14', 0, '0000-00-00 00:00:00'),
(65, 49, 4, 184, 0, 0, 0, 1.06, 0, '2014-09-17 08:10:14', 0, '0000-00-00 00:00:00'),
(66, 49, 5, 185, 0, 0, 0, 106, 0, '2014-09-17 08:10:14', 0, '0000-00-00 00:00:00'),
(67, 52, 1, 167, 0, 0, 10, 886, 0, '2014-09-18 09:20:55', 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,
  `agentCode` varchar(32) NOT NULL,
  `agentName` varchar(128) NOT NULL,
  `position` varchar(32) NOT NULL,
  `telOffice` varchar(32) NOT NULL,
  `telHp` varchar(32) NOT NULL,
  `email` varchar(64) NOT NULL,
  `commisionRate` double NOT NULL,
  `remarks` text NOT NULL,
  `createdID` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ;

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

INSERT INTO `comp_sales_agent` (`ID`, `companyID`, `agentCode`, `agentName`, `position`, `telOffice`, `telHp`, `email`, `commisionRate`, `remarks`, `createdID`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, '', 'sdsd', 'sdsd', '', '', '', 10, '', 0, '2014-06-09 07:15:56', 0, '2014-07-24 05:57:28'),
(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'),
(7, 57, '', 'george', 'sales ', '012 5678767', '012 5678767', 'george@gmail.com', 10, '10% ', 0, '2014-07-09 02:16:34', 0, '0000-00-00 00:00:00'),
(8, 75, '', 'james bond', 'sales marketing', '0123234343', '0123234343', 'asdsd@salihin.com.my', 10, '', 0, '2014-07-17 04:17:25', 0, '0000-00-00 00:00:00'),
(9, 76, '', 'jimmy', 'marketing', '0125678767', '0125678767', 'jimmy@borong.com', 10, '', 0, '2014-07-17 04:17:39', 0, '0000-00-00 00:00:00'),
(10, 81, '', 'Munira Yasin', 'Marketing Manager', '0126767567', '0126767567', 'moon@gmail.com', 10, 'komisen 10% based on project basis', 0, '2014-07-21 02:06:51', 0, '2014-07-21 02:08:27'),
(11, 81, '', 'Miza Ahmad', 'Sales Consultant', '019 3456545', '019 3456545', 'miza@gmail.com', 10, 'komisen 10% on project basis', 0, '2014-07-21 02:08:09', 0, '0000-00-00 00:00:00'),
(12, 81, '', 'Farhana Zahari', 'Marketing', '603 61451245', '012 6666610', 'farhana@salihin.com.my', 10, 'project basis', 0, '2014-07-25 00:56:30', 0, '2014-07-25 01:00:42'),
(13, 84, '', 'Agent 1', 'Senior Executive', ' 603 61851515', '012 61851515', 'accounts@salihin.com.my', 5, 'Good', 0, '2014-08-05 01:40:52', 0, '0000-00-00 00:00:00'),
(14, 15, 'B-007', 'en fadhirul bond', 'manager', '', '', '', 10, '', 0, '2014-08-11 07:56:12', 0, '2014-08-14 08:44:35'),
(15, 1, 'A001', 'robert', 'marketing ', '603 61887878', '012 5456546', 'robert@yahoo.com', 10, 'agent baru', 0, '2014-08-12 07:35:07', 0, '2014-09-15 07:23:32'),
(16, 86, '', 'Salman Khan', 'sales marketing', '', '012 8226466', 'salman@gmail.com', 10, 'Agent', 0, '2014-08-13 05:35:21', 0, '0000-00-00 00:00:00'),
(17, 86, '', 'Amir Khan', 'msrketing', '', '', '', 10, '', 0, '2014-08-13 07:38:08', 0, '0000-00-00 00:00:00'),
(18, 87, '001', 'Rahman', '', '7987978', '87978978', '', 5, '', 0, '2014-08-21 02:53:13', 0, '0000-00-00 00:00:00'),
(19, 93, '002', 'Fairuz', '', '', '', '', 10, '', 0, '2014-09-02 07:36:20', 0, '2014-09-02 07:36:57'),
(20, 102, '778899', 'ASHRAF', '', '603 45678991', '012 88888888', 'ashraf@agent.com', 2, '', 0, '2014-09-12 04:17:48', 0, '0000-00-00 00:00:00'),
(21, 105, 'S 02', 'Suraidah', 'agent', '603 12344321', '012 2345432', 'surey@salihin.com.my', 5, '', 0, '2014-09-16 03:26:49', 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,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `customerID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `creditNoteDate` date NOT NULL,
  `salesInvoiceID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `termsID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `agentID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `employeeID` int(11) NOT NULL,
  `shippingMethodID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `amountPaid` decimal(10,0) NOT NULL,
  `totalTaxAmount` double NOT NULL,
  `totalPayable` double NOT NULL,
  `total` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  `updateAble` tinyint(1) NOT NULL DEFAULT '1',
  `journalNo` varchar(32) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=26 ;

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

INSERT INTO `comp_sales_creditnote` (`ID`, `serialNo`, `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, 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, 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, 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, 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, '2014-07-17 08:44:37', 0, 0, ''),
(5, 1, 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, 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, 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, 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, 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, ''),
(10, 1, 1, 12, 'SCN', '2014-07-14', 18, 1, 0, 0, 3.1305, 0, 'asasda', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-14 02:09:30', 0, '0000-00-00 00:00:00', 0, 1, ''),
(11, 1, 1, 12, 'SCN', '2014-07-14', 18, 15, 5, 1, 3.1305, 0, 'fg dgst', 0, 0, 682.52, '0', 19.26, 0, 0, 16, '2014-07-14 02:15:35', 0, '2014-08-14 05:14:35', 0, 1, ''),
(12, 1, 1, 12, 'SCN', '2014-07-14', 18, 15, 0, 0, 3.1305, 0, 'sds', 0, 0, 356.44, '0', 19.44, 0, 0, 16, '2014-07-14 02:26:20', 0, '2014-07-14 03:08:55', 0, 1, ''),
(13, 2, 1, 12, 'SCN', '2014-08-14', 18, 1, 0, 0, 3.23, 0, '', 0, 0, 7825.98, '0', 442.98, 0, 0, 33, '2014-08-14 03:10:09', 0, '2014-08-14 03:10:09', 0, 1, ''),
(14, 1, 93, 41, 'SCN', '2014-09-09', 160, 0, 0, 0, 1, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-09-09 09:04:44', 0, '2014-09-17 04:34:15', 0, 1, ''),
(15, 2, 93, 40, 'SCN', '2014-09-09', 163, 0, 0, 0, 1, 0, '', 0, 0, 434, '0', 0, 0, 0, 16, '2014-09-09 09:06:36', 0, '2014-09-09 09:06:36', 0, 1, ''),
(16, 3, 93, 40, 'SCN', '2014-09-09', 164, 0, 0, 0, 1, 0, '', 0, 0, 24214, '0', 0, 0, 0, 16, '2014-09-09 09:09:06', 0, '2014-09-09 09:09:16', 0, 1, ''),
(17, 4, 93, 41, 'SCN', '2014-09-09', 160, 0, 0, 0, 1, 0, '', 0, 0, 250090, '0', 0, 0, 0, 16, '2014-09-09 09:10:28', 0, '2014-09-09 09:19:44', 0, 1, ''),
(18, 5, 93, 40, 'SCN', '2014-09-09', 163, 0, 0, 0, 1, 0, '', 0, 0, 43702, '0', 0, 0, 0, 16, '2014-09-09 09:24:21', 0, '2014-09-09 09:24:48', 0, 1, ''),
(19, 1, 105, 45, 'SCN 123', '2014-09-18', 174, 0, 0, 0, 1, 0, '', 0, 0, 0, '0', 0, 0, 0, 51, '2014-09-18 01:45:54', 0, '0000-00-00 00:00:00', 0, 1, ''),
(20, 6, 93, 40, 'SCN', '2014-09-18', 162, 30, 0, 0, 1, 0, '', 0, 0, 9001.52, '0', 509.52, 0, 0, 16, '2014-09-18 07:25:24', 0, '2014-09-18 07:25:24', 0, 1, ''),
(21, 7, 93, 40, 'SCN', '2014-09-18', 162, 30, 0, 0, 1, 0, '', 0, 0, 6787.18, '0', 384.18, 0, 0, 16, '2014-09-18 07:50:15', 0, '2014-09-18 08:33:48', 0, 1, ''),
(22, 8, 93, 40, 'SCN', '2014-09-18', 162, 30, 0, 0, 1, 0, '', 0, 0, 5171.74, '0', 292.74, 0, 0, 16, '2014-09-18 07:53:07', 0, '2014-09-18 07:54:35', 0, 1, ''),
(23, 9, 93, 40, 'SCN', '2014-09-19', 161, 30, 0, 0, 1, 0, '', 0, 0, 8200.46, '0', 534.8399999999999, 0, 0, 16, '2014-09-19 07:20:06', 0, '2014-09-19 09:42:47', 0, 1, ''),
(24, 10, 93, 40, 'SCN', '2014-09-19', 161, 30, 0, 0, 1, 0, '', 0, 0, 3434, '0', 0, 0, 0, 16, '2014-09-19 09:40:00', 0, '2014-09-19 09:40:01', 0, 1, ''),
(25, 11, 93, 40, 'SCN', '2014-09-19', 161, 31, 0, 0, 1, 0, '', 0, 0, 2323, '0', 0, 0, 0, 16, '2014-09-19 09:40:58', 0, '2014-09-19 09:40:58', 0, 1, '');

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

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

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

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

--
-- 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'),
(47, 0, 1, 100, 'asdas', 0, 4, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-14 02:20:44', 0, '0000-00-00 00:00:00'),
(48, 11, 1, 100, 'asdas', 0, 4, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-14 02:23:51', 0, '0000-00-00 00:00:00'),
(49, 11, 2, 100, 'sdas', 0, 4, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-14 02:24:58', 0, '0000-00-00 00:00:00'),
(50, 12, 1, 100, 'asa', 0, 4, 0, 0, 1, 0, 0, 0, 0, 16, '2014-07-14 02:26:21', 0, '0000-00-00 00:00:00'),
(51, 12, 2, 100, 'dfsf', 0, 2, 0, 0, 2, 0, 0, 0, 0, 16, '2014-07-14 02:35:56', 0, '0000-00-00 00:00:00'),
(52, 15, 1, 28369, 'asfasdf245345', 0, 775, 0, 0, 434, 0, 0, 0, 0, 16, '2014-09-09 09:06:36', 0, '0000-00-00 00:00:00'),
(53, 16, 1, 28370, 'sdwe', 0, 775, 0, 0, 23432, 0, 0, 0, 0, 16, '2014-09-09 09:09:16', 0, '0000-00-00 00:00:00'),
(54, 17, 1, 28369, 'adsfasdf', 0, 775, 0, 0, 3434, 0, 0, 0, 0, 16, '2014-09-09 09:10:28', 0, '0000-00-00 00:00:00'),
(55, 17, 2, 28371, 'sdfasdf', 0, 775, 0, 0, 243234, 0, 0, 0, 0, 16, '2014-09-09 09:10:37', 0, '0000-00-00 00:00:00'),
(56, 17, 3, 28369, 'adfsdf', 0, 775, 0, 0, 3422, 0, 0, 0, 0, 16, '2014-09-09 09:19:44', 0, '0000-00-00 00:00:00'),
(57, 18, 1, 28370, 'asdfsdfas', 0, 775, 0, 0, 3444, 0, 0, 0, 0, 16, '2014-09-09 09:24:21', 0, '0000-00-00 00:00:00'),
(58, 18, 2, 28370, 'safsfg', 0, 775, 0, 0, 34344, 0, 0, 0, 0, 16, '2014-09-09 09:24:28', 0, '0000-00-00 00:00:00'),
(64, 21, 2, 28370, 'sfs34234', 34, 769, 6, 2.04, 36.04, 0, 0, 0, 0, 16, '2014-09-18 07:50:28', 16, '2014-09-18 08:31:09'),
(65, 22, 1, 28370, 'asfdasdf234534', 4534, 770, 6, 272.04, 4806.04, 0, 0, 0, 0, 16, '2014-09-18 07:53:07', 0, '0000-00-00 00:00:00'),
(66, 22, 2, 28371, 'asdf34545', 345, 769, 6, 20.7, 365.7, 0, 0, 0, 0, 16, '2014-09-18 07:54:12', 16, '2014-09-18 07:54:35'),
(67, 23, 1, 28371, 'asdfasdf', 2345, 770, 6, 140.7, 2485.7, 0, 0, 0, 0, 16, '2014-09-19 07:20:06', 0, '0000-00-00 00:00:00'),
(72, 23, 2, 28370, 'asdfasfd223', 2, 775, 0, 139.38, 2, 0, 0, 0, 0, 16, '2014-09-19 07:26:52', 16, '2014-09-19 09:42:35'),
(73, 24, 1, 28370, 'asdfasfd', 3434, 775, 0, 0, 3434, 0, 0, 0, 0, 16, '2014-09-19 09:40:01', 0, '0000-00-00 00:00:00'),
(74, 25, 1, 28371, 'asdf', 2323, 775, 0, 0, 2323, 0, 0, 0, 0, 16, '2014-09-19 09:40:58', 0, '0000-00-00 00:00:00'),
(75, 23, 3, 28370, 'adfasdf', 1212, 775, 0, 0, 1212, 0, 0, 0, 0, 16, '2014-09-19 09:42:47', 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=32 ;

--
-- 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'),
(13, 10, 1, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 1, 6, 19.26, 340.26, 0, 16, '2014-07-14 02:09:30', 0, '0000-00-00 00:00:00'),
(14, 11, 1, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 1, 6, 19.26, 340.26, 0, 16, '2014-07-14 02:15:35', 0, '0000-00-00 00:00:00'),
(15, 11, 2, 4, '', 'Plastic Chair - Blue', 1, 1, 1, 0, 0, 0, 1, 0, 16, '2014-07-14 02:19:24', 0, '0000-00-00 00:00:00'),
(16, 12, 1, 4, '', 'Plastic Chair - Blue', 1, 12, 12, 0, 1, 0.12, 12.12, 0, 16, '2014-07-14 02:36:28', 0, '0000-00-00 00:00:00'),
(17, 12, 2, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 1, 6, 19.26, 340.26, 0, 16, '2014-07-14 02:52:54', 0, '0000-00-00 00:00:00'),
(18, 12, 3, 1, '', 'Teak wooden chair with natural finish', 1, 1, 1, 1, 6, 0.06, 1.06, 0, 16, '2014-07-14 03:08:55', 16, '0000-00-00 00:00:00'),
(19, 13, 1, 1, '', 'Teak wooden chair with natural finish', 23, 321, 7383, 1, 6, 442.98, 7825.98, 0, 33, '2014-08-14 03:10:09', 0, '0000-00-00 00:00:00'),
(21, 16, 1, 27, '', 'STAT', 34, 23, 782, 0, 0, 0, 782, 0, 16, '2014-09-09 09:09:07', 0, '0000-00-00 00:00:00'),
(22, 18, 1, 29, '', 'Laptop Dell', 2, 2000, 4, 0, 0, 0, 4000, 0, 16, '2014-09-09 09:24:39', 0, '0000-00-00 00:00:00'),
(23, 18, 2, 25, '', 'Table with Glass', 3, 234, 702, 0, 0, 0, 702, 0, 16, '2014-09-09 09:24:48', 0, '0000-00-00 00:00:00'),
(28, 19, 1, 36, '', 'Proton Iswara full spec', 1, 0, 0, 1308, 6, 0, 0, 0, 51, '2014-09-18 01:45:54', 0, '0000-00-00 00:00:00'),
(29, 20, 1, 26, '', 'Chair with Cover', 4, 2123, 8492, 769, 6, 509.52, 9001.52, 0, 16, '2014-09-18 07:25:24', 0, '0000-00-00 00:00:00'),
(30, 21, 1, 26, '', 'Chair with Cover', 3, 2123, 6, 769, 6, 382.14, 6751.14, 0, 16, '2014-09-18 07:50:41', 0, '0000-00-00 00:00:00'),
(31, 23, 1, 26, '', 'Chair with Cover', 2, 2123, 4, 0, 0, 254.76, 4500.76, 0, 16, '2014-09-19 09:42:31', 16, '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,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `customerID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `debitNoteDate` date NOT NULL,
  `salesInvoiceID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `termsID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `agentID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `employeeID` int(11) NOT NULL,
  `shippingMethodID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `amountPaid` decimal(10,0) NOT NULL,
  `totalTaxAmount` double NOT NULL,
  `totalPayable` double NOT NULL,
  `total` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  `updateAble` tinyint(1) NOT NULL DEFAULT '1',
  `journalNo` varchar(32) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=53 ;

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

INSERT INTO `comp_sales_debitnote` (`ID`, `serialNo`, `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, 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, 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, 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, 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, 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, '2014-07-17 08:06:33', 0, 0, ''),
(10, 1, 1, 12, 'SDN', '2014-07-03', 18, 1, 0, 0, 3.1305, 0, 'GDF GH', 0, 0, 797.55, '0', 38.67, 797.55, 0, 16, '2014-07-03 00:07:54', 0, '2014-09-19 04:38:20', 0, 1, ''),
(11, 1, 1, 12, 'SDN', '2014-07-03', 18, 15, 0, 0, 3.1305, 0, 'sds', 0, 0, 14.01, '0', 0.01, 14.01, 0, 16, '2014-07-03 05:00:15', 0, '2014-09-19 04:38:20', 0, 1, ''),
(12, 1, 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, ''),
(13, 1, 1, 12, 'SDN', '2014-07-14', 18, 1, 0, 0, 3.1305, 0, 'sds sds', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-14 00:27:09', 0, '0000-00-00 00:00:00', 0, 1, ''),
(14, 1, 1, 12, 'SDN', '2014-07-14', 18, 1, 0, 0, 3.1305, 0, 'sds sds', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-14 00:27:29', 0, '0000-00-00 00:00:00', 0, 1, ''),
(15, 1, 1, 12, 'SDN', '2014-07-14', 18, 1, 0, 0, 3.1305, 0, 'sds sds', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-14 00:32:59', 0, '0000-00-00 00:00:00', 0, 1, ''),
(16, 1, 1, 12, 'SDN', '2014-07-14', 18, 1, 0, 0, 3.1305, 0, 'sds sds', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-14 00:44:23', 0, '0000-00-00 00:00:00', 0, 1, ''),
(17, 1, 1, 12, 'SDN', '2014-07-14', 18, 1, 0, 0, 3.1305, 0, 'sds sds', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-14 00:48:49', 0, '0000-00-00 00:00:00', 0, 1, ''),
(18, 1, 1, 12, 'SDN', '2014-07-14', 18, 1, 0, 0, 3.1305, 0, 'sds sds', 0, 0, 0, '0', 0, 0, 0, 16, '2014-07-14 00:49:12', 0, '0000-00-00 00:00:00', 0, 1, ''),
(19, 1, 1, 12, 'SDN', '2014-07-14', 18, 1, 0, 0, 3.1305, 0, 'sds sds', 0, 0, 12, '0', 0, 12, 0, 16, '2014-07-14 00:55:51', 0, '2014-09-19 04:38:20', 0, 1, ''),
(20, 1, 81, 33, 'SDN', '2014-07-21', 97, 22, 0, 0, 3.4, 0, '', 0, 0, 11660, '0', 660, 11660, 0, 29, '2014-07-21 06:48:38', 0, '2014-09-19 04:38:20', 0, 1, ''),
(21, 2, 1, 12, 'SDN', '2014-08-20', 23, 1, 0, 0, 2, 0, '', 0, 0, 1701.3, '0', 96.3, 1701.3, 0, 1, '2014-08-20 02:50:57', 0, '2014-09-19 04:38:20', 0, 1, ''),
(22, 3, 1, 12, 'SDN', '2014-08-20', 18, 10, 0, 0, 2, 0, '', 0, 0, 340.26, '0', 19.26, 340.26, 0, 1, '2014-08-20 03:01:06', 0, '2014-09-19 04:38:20', 0, 1, ''),
(23, 1, 15, 17, 'SDN', '2014-08-21', 146, 19, 0, 0, 1, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-08-21 01:34:02', 0, '0000-00-00 00:00:00', 0, 1, ''),
(24, 1, 93, 40, 'SDN', '2014-09-09', 161, 0, 0, 0, 1, 0, '', 0, 0, 6490.38, '0', 367.38, 6490.38, 0, 16, '2014-09-09 07:05:44', 0, '2014-09-19 04:38:20', 0, 1, ''),
(25, 2, 93, 40, 'SDN', '2014-09-09', 163, 0, 0, 0, 1, 0, '', 0, 0, 7002, '0', 0, 7002, 0, 16, '2014-09-09 07:14:18', 0, '2014-09-19 04:38:20', 0, 1, ''),
(26, 3, 93, 40, 'SDN', '2014-09-09', 162, 0, 0, 0, 1, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-09-09 07:43:29', 0, '0000-00-00 00:00:00', 0, 1, ''),
(27, 4, 93, 40, 'SDN', '2014-09-09', 162, 0, 0, 0, 1, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-09-09 07:43:49', 0, '0000-00-00 00:00:00', 0, 1, ''),
(28, 5, 93, 40, 'SDN', '2014-09-09', 162, 0, 0, 0, 1, 0, '', 0, 0, 2829, '0', 0, 2829, 0, 16, '2014-09-09 07:55:04', 0, '2014-09-19 04:38:20', 0, 1, ''),
(29, 6, 93, 40, 'SDN', '2014-09-09', 162, 0, 0, 0, 1, 0, '', 0, 0, 5382, '0', 0, 5382, 0, 16, '2014-09-09 07:56:50', 0, '2014-09-19 04:38:20', 0, 1, ''),
(30, 7, 93, 40, 'SDN', '2014-09-09', 161, 0, 0, 0, 1, 0, '', 0, 0, 3434, '0', 0, 3434, 0, 16, '2014-09-09 08:04:09', 0, '2014-09-19 04:38:20', 0, 1, ''),
(31, 8, 93, 40, 'SDN', '2014-09-09', 161, 0, 0, 0, 1, 0, '', 0, 0, 234, '0', 0, 234, 0, 16, '2014-09-09 08:08:40', 0, '2014-09-19 04:38:20', 0, 1, ''),
(32, 9, 93, 40, 'SDN', '2014-09-09', 162, 0, 0, 0, 1, 0, '', 0, 0, 8480, '0', 480, 8480, 0, 16, '2014-09-09 08:18:02', 0, '2014-09-19 04:38:20', 0, 1, ''),
(33, 10, 93, 40, 'SDN', '2014-09-09', 162, 0, 0, 0, 1, 0, '', 0, 0, 4059, '0', 0, 4059, 0, 16, '2014-09-09 08:20:49', 0, '2014-09-19 04:38:20', 0, 1, ''),
(34, 11, 93, 40, 'SDN', '2014-09-09', 161, 0, 0, 0, 1, 0, '', 0, 0, 3434, '0', 0, 3434, 0, 16, '2014-09-09 08:22:19', 0, '2014-09-19 04:38:20', 0, 1, ''),
(35, 12, 93, 40, 'SDN', '2014-09-09', 163, 0, 0, 0, 1, 0, '', 0, 0, 8000, '0', 0, 8000, 0, 16, '2014-09-09 08:25:14', 0, '2014-09-19 04:38:20', 0, 1, ''),
(36, 13, 93, 40, 'SDN', '2014-09-09', 163, 0, 0, 0, 1, 0, '', 0, 0, 6000, '0', 0, 6000, 0, 16, '2014-09-09 08:33:43', 0, '2014-09-19 04:38:20', 0, 1, ''),
(37, 14, 93, 41, 'SDN', '2014-09-09', 159, 0, 0, 0, 1, 0, '', 0, 0, 232323, '0', 0, 232323, 0, 16, '2014-09-09 08:35:29', 0, '2014-09-19 04:38:20', 0, 1, ''),
(38, 15, 93, 40, 'SDN', '2014-09-09', 164, 0, 0, 0, 1, 0, '', 0, 0, 34234, '0', 0, 34234, 0, 16, '2014-09-09 08:36:29', 0, '2014-09-19 04:38:20', 0, 1, ''),
(39, 16, 93, 40, 'SDN', '2014-09-17', 161, 30, 0, 0, 1, 0, '', 0, 0, 4605.7, '0', 260.7, 4605.7, 0, 16, '2014-09-17 04:06:29', 0, '2014-09-19 04:38:20', 0, 1, ''),
(40, 17, 93, 40, 'SDN', '2014-09-17', 161, 30, 0, 0, 1, 0, '', 0, 0, 10600, '0', 600, 10600, 0, 16, '2014-09-17 08:07:56', 0, '2014-09-19 04:38:20', 0, 0, 'AR20140900000006'),
(41, 18, 93, 41, 'SDN', '2014-09-18', 160, 30, 0, 0, 1, 0, '', 0, 0, 1234, '0', 74.04, 1234, 0, 16, '2014-09-18 01:50:11', 0, '2014-09-19 04:38:20', 0, 1, ''),
(42, 19, 93, 40, 'SDN', '2014-09-18', 162, 30, 0, 0, 1, 0, '', 0, 0, 16319.7, '0', 740.7, 16319.7, 0, 16, '2014-09-18 01:52:57', 0, '2014-09-19 04:38:20', 0, 1, ''),
(43, 1, 105, 45, 'SDN 234', '2014-09-18', 175, 0, 0, 0, 1, 0, '', 0, 0, 0, '0', 0, 0, 0, 51, '2014-09-18 02:04:40', 0, '2014-09-18 02:04:46', 0, 0, 'AR20140900000003'),
(44, 20, 93, 40, 'SDN', '2014-09-18', 161, 30, 0, 0, 1, 0, '', 0, 0, 2343, '0', 140.58, 2343, 0, 16, '2014-09-18 06:19:24', 0, '2014-09-19 04:38:20', 0, 1, ''),
(45, 21, 93, 41, 'SDN', '2014-09-18', 167, 30, 0, 0, 1, 0, '', 0, 0, 12345, '0', 740.7, 12345, 0, 16, '2014-09-18 06:24:43', 0, '2014-09-19 04:38:20', 0, 1, ''),
(46, 22, 93, 40, 'SDN', '2014-09-18', 161, 30, 0, 0, 1, 0, '', 0, 0, 19327.34, '0', 95313.01, 4500.76, 0, 16, '2014-09-18 06:29:28', 0, '2014-09-19 04:52:42', 0, 1, ''),
(47, 23, 93, 41, 'SDN', '2014-09-18', 160, 30, 0, 0, 1, 0, '', 0, 0, 3434, '0', 26407.46, 3434, 0, 16, '2014-09-18 06:35:29', 0, '2014-09-19 04:38:20', 0, 1, ''),
(48, 24, 93, 40, 'SDN', '2014-09-18', 161, 30, 0, 0, 1, 0, '', 0, 0, 8059.18, '0', 456.18, 8059.18, 0, 16, '2014-09-18 06:57:42', 0, '2014-09-19 04:38:20', 0, 1, ''),
(49, 25, 93, 40, 'SDN', '2014-09-18', 161, 30, 0, 0, 1, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-09-18 07:05:43', 0, '0000-00-00 00:00:00', 0, 1, ''),
(50, 26, 93, 40, 'SDN', '2014-09-19', 161, 30, 0, 0, 1, 0, '', 0, 0, 4555, '0', 1799.46, 0, 0, 16, '2014-09-19 07:07:29', 0, '2014-09-19 08:20:44', 0, 0, 'AR20140900000010'),
(51, 27, 93, 41, 'SDN', '2014-09-19', 160, 30, 0, 0, 1, 0, '', 0, 0, 2323, '0', 0, 0, 0, 16, '2014-09-19 09:34:45', 0, '2014-09-19 09:38:24', 0, 1, ''),
(52, 28, 93, 41, 'SDN', '2014-09-19', 160, 31, 0, 0, 1, 0, '', 0, 0, 0, '0', 0, 0, 0, 16, '2014-09-19 09:35:57', 0, '0000-00-00 00:00:00', 0, 1, '');

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

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

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

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

--
-- 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', 111111, 2, 0, 0, 111, 0, 0, 0, 0, 16, '2014-07-07 08:46:44', 16, '2014-07-14 06:31:45'),
(48, 19, 1, 100, 'xcsxd', 0, 4, 0, 0, 12, 0, 0, 0, 0, 16, '2014-07-14 00:57:19', 0, '0000-00-00 00:00:00'),
(49, 23, 1, 292, 'yuran khas', 0, 44, 6, 0.6, 10, 0, 0, 0, 0, 16, '2014-08-21 01:34:02', 0, '0000-00-00 00:00:00'),
(50, 25, 1, 28370, 'adfsfafd', 0, 0, 0, 0, 2334, 0, 0, 0, 0, 16, '2014-09-09 07:14:20', 0, '0000-00-00 00:00:00'),
(51, 25, 1, 28370, 'adfsfafd', 0, 0, 0, 0, 2334, 0, 0, 0, 0, 16, '2014-09-09 07:14:32', 0, '0000-00-00 00:00:00'),
(52, 25, 1, 28370, 'adfsfafd', 0, 0, 0, 0, 2334, 0, 0, 0, 0, 16, '2014-09-09 07:19:44', 0, '0000-00-00 00:00:00'),
(54, 26, 1, 28370, 'asdfasf343', 0, 775, 0, 0, 234, 0, 0, 0, 0, 16, '2014-09-09 07:43:29', 0, '0000-00-00 00:00:00'),
(55, 27, 1, 28370, 'asdfasf343', 0, 775, 0, 0, 234, 0, 0, 0, 0, 16, '2014-09-09 07:43:50', 0, '0000-00-00 00:00:00'),
(56, 28, 1, 28371, 'zsdfsfsafd', 0, 775, 0, 0, 3423, 0, 0, 0, 0, 16, '2014-09-09 07:55:12', 0, '0000-00-00 00:00:00'),
(57, 28, 1, 28371, 'zsdfsfsafd', 0, 775, 0, 0, 3423, 0, 0, 0, 0, 16, '2014-09-09 07:55:24', 0, '0000-00-00 00:00:00'),
(58, 0, 1, 28370, 'asdfad', 0, 775, 0, 0, 345, 0, 0, 0, 0, 16, '2014-09-09 07:57:32', 0, '0000-00-00 00:00:00'),
(59, 0, 2, 28369, 'adasda34', 0, 775, 0, 0, 453, 0, 0, 0, 0, 16, '2014-09-09 07:57:42', 0, '0000-00-00 00:00:00'),
(60, 30, 1, 28371, 'fdgsd3434', 0, 775, 0, 0, 3434, 0, 0, 0, 0, 16, '2014-09-09 08:04:09', 0, '0000-00-00 00:00:00'),
(61, 0, 2, 28369, 'dfasdfsafd', 0, 775, 0, 0, 232, 0, 0, 0, 0, 16, '2014-09-09 08:04:15', 0, '0000-00-00 00:00:00'),
(62, 31, 1, 28370, 'adfsadf', 0, 775, 0, 0, 234, 0, 0, 0, 0, 16, '2014-09-09 08:08:40', 0, '0000-00-00 00:00:00'),
(63, 0, 2, 28371, 'sadfasd343', 0, 775, 0, 0, 345, 0, 0, 0, 0, 16, '2014-09-09 08:08:50', 0, '0000-00-00 00:00:00'),
(64, 0, 3, 28369, 'adfas245', 0, 775, 0, 0, 100, 0, 0, 0, 0, 16, '2014-09-09 08:09:06', 0, '0000-00-00 00:00:00'),
(65, 34, 1, 28370, 'asdfsadf', 0, 775, 0, 0, 3434, 0, 0, 0, 0, 16, '2014-09-09 08:22:19', 0, '0000-00-00 00:00:00'),
(66, 0, 2, 28369, '343434', 0, 775, 0, 0, 3434, 0, 0, 0, 0, 16, '2014-09-09 08:22:39', 0, '0000-00-00 00:00:00'),
(67, 0, 1, 28371, 'eew3', 0, 775, 0, 0, 342, 0, 0, 0, 0, 16, '2014-09-09 08:25:25', 0, '0000-00-00 00:00:00'),
(68, 0, 2, 28371, 'sadfasd', 0, 775, 0, 0, 34, 0, 0, 0, 0, 16, '2014-09-09 08:25:33', 0, '0000-00-00 00:00:00'),
(69, 0, 3, 28371, 'sgffsdf345', 0, 775, 0, 0, 1111, 0, 0, 0, 0, 16, '2014-09-09 08:25:44', 0, '0000-00-00 00:00:00'),
(70, 0, 4, 28369, 'zfxgsdfg', 0, 775, 0, 0, 345, 0, 0, 0, 0, 16, '2014-09-09 08:25:56', 0, '0000-00-00 00:00:00'),
(71, 0, 1, 28370, 'sdfsdf', 0, 775, 0, 0, 234, 0, 0, 0, 0, 16, '2014-09-09 08:34:07', 0, '0000-00-00 00:00:00'),
(72, 0, 2, 28370, 'sdfsdf', 0, 775, 0, 0, 3434, 0, 0, 0, 0, 16, '2014-09-09 08:34:16', 0, '0000-00-00 00:00:00'),
(73, 37, 1, 28370, 'dfsfsf', 0, 775, 0, 0, 232323, 0, 0, 0, 0, 16, '2014-09-09 08:35:29', 0, '0000-00-00 00:00:00'),
(74, 0, 2, 28370, 'sdfsdf425', 0, 775, 0, 0, 454545, 0, 0, 0, 0, 16, '2014-09-09 08:35:52', 0, '0000-00-00 00:00:00'),
(75, 38, 1, 28380, 'sdfgdfg3435', 0, 775, 0, 0, 34234, 0, 0, 0, 0, 16, '2014-09-09 08:36:29', 0, '0000-00-00 00:00:00'),
(76, 0, 2, 28369, 'fsf3434', 0, 775, 0, 0, 3453434, 0, 0, 0, 0, 16, '2014-09-09 08:36:39', 0, '0000-00-00 00:00:00'),
(77, 41, 1, 28370, 'zscvzxcv', 0, 769, 6, 74.04, 1234, 0, 0, 0, 0, 16, '2014-09-18 01:50:11', 0, '0000-00-00 00:00:00'),
(78, 0, 2, 28371, 'asfda42554', 0, 0, 0, 0, 4323, 0, 0, 0, 0, 16, '2014-09-18 01:50:32', 0, '0000-00-00 00:00:00'),
(80, 0, 2, 28371, 'asfafd', 0, 6, 0, 2059.38, 34323, 0, 0, 0, 0, 16, '2014-09-18 01:53:11', 0, '0000-00-00 00:00:00'),
(81, 42, 2, 28370, 'asdfas432345', 12345, 769, 0, 740.7, 13085.7, 0, 0, 0, 0, 16, '2014-09-18 02:02:24', 16, '2014-09-18 04:34:53'),
(82, 42, 2, 28370, 'asdfas432345', 3234, 774, 0, 0, 3234, 0, 0, 0, 0, 16, '2014-09-18 02:02:32', 16, '2014-09-18 04:37:44'),
(84, 44, 1, 28371, 'ghjgh46546', 7332842, 769, 6, 140.58, 2343, 0, 0, 0, 0, 16, '2014-09-18 06:19:24', 0, '0000-00-00 00:00:00'),
(85, 45, 1, 28370, 'sss', 0, 769, 6, 740.7, 12345, 0, 0, 0, 0, 16, '2014-09-18 06:24:44', 0, '0000-00-00 00:00:00'),
(86, 0, 1, 28370, 'asda12342234', 0, 6, 0, 74.04, 1234, 0, 0, 0, 0, 16, '2014-09-18 06:29:41', 0, '0000-00-00 00:00:00'),
(88, 47, 1, 28370, 'cdfafasdf2345345', 0, 769, 6, 26407.46, 3434, 0, 0, 0, 0, 16, '2014-09-18 06:49:57', 0, '0000-00-00 00:00:00'),
(89, 48, 1, 28370, 'asdfasfd', 1234, 770, 0, 74.04, 1308.04, 0, 0, 0, 0, 16, '2014-09-18 06:57:42', 16, '2014-09-18 07:02:21'),
(90, 49, 1, 28371, 'as', 0, 778, 6, 0.72, 12, 0, 0, 0, 0, 16, '2014-09-18 07:05:43', 0, '0000-00-00 00:00:00'),
(91, 0, 1, 28370, 'jhgjg', 0, 769, 6, 9481.77, 1233, 0, 0, 0, 0, 16, '2014-09-19 04:19:56', 0, '0000-00-00 00:00:00'),
(92, 0, 1, 28370, 'asdf323', 0, 769, 6, 1784.08, 232, 0, 0, 0, 0, 16, '2014-09-19 04:20:21', 0, '0000-00-00 00:00:00'),
(93, 0, 2, 28370, 'zdsf234', 0, 769, 6, 1791.77, 233, 0, 0, 0, 0, 16, '2014-09-19 04:36:01', 0, '0000-00-00 00:00:00'),
(101, 46, 5, 28370, 'asdfasdf', 12343, 769, 6, 94917.67, 12343, 0, 0, 0, 0, 16, '2014-09-19 04:50:53', 0, '0000-00-00 00:00:00'),
(102, 46, 6, 28370, 'sadfasfsdf', 2343, 770, 6, 140.58, 2483.58, 0, 0, 0, 0, 16, '2014-09-19 04:52:08', 16, '2014-09-19 04:52:42'),
(104, 50, 1, 28370, 'zvxzfg23', 234, 769, 6, 1799.46, 234, 0, 0, 0, 0, 16, '2014-09-19 07:10:01', 0, '0000-00-00 00:00:00'),
(108, 50, 2, 28370, 'sadf', 4321, 774, 0, 0, 4321, 0, 0, 0, 0, 16, '2014-09-19 07:17:54', 16, '2014-09-19 07:18:32'),
(109, 51, 1, 28370, 'sadfa', 2323, 775, 0, 0, 2323, 0, 0, 0, 0, 16, '2014-09-19 09:34:45', 16, '2014-09-19 09:37:05'),
(110, 52, 1, 28370, 'asdf', 2323, 775, 0, 0, 2323, 0, 0, 0, 0, 16, '2014-09-19 09:35:57', 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=72 ;

--
-- 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'),
(23, 13, 1, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 1, 6, 19.26, 340.26, 0, 16, '2014-07-14 00:27:09', 0, '0000-00-00 00:00:00'),
(24, 14, 1, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 1, 6, 19.26, 340.26, 0, 16, '2014-07-14 00:27:29', 0, '0000-00-00 00:00:00'),
(25, 15, 1, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 1, 6, 19.26, 340.26, 0, 16, '2014-07-14 00:32:59', 0, '0000-00-00 00:00:00'),
(26, 16, 1, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 1, 6, 19.26, 340.26, 0, 16, '2014-07-14 00:44:23', 0, '0000-00-00 00:00:00'),
(27, 17, 1, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 1, 6, 19.26, 340.26, 0, 16, '2014-07-14 00:48:49', 0, '0000-00-00 00:00:00'),
(28, 18, 1, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 1, 6, 19.26, 340.26, 0, 16, '2014-07-14 00:49:12', 0, '0000-00-00 00:00:00'),
(30, 20, 1, 16, '', 'Wireless', 10, 1100, 11000, 0, 6, 660, 11660, 0, 29, '2014-07-21 06:48:39', 0, '0000-00-00 00:00:00'),
(31, 21, 1, 1, '', 'Teak wooden chair with natural finish', 5, 321, 1605, 1, 6, 96.3, 1701.3, 0, 1, '2014-08-20 02:50:57', 0, '0000-00-00 00:00:00'),
(32, 22, 1, 1, '', 'Teak wooden chair with natural finish', 1, 321, 321, 1, 6, 19.26, 340.26, 0, 1, '2014-08-20 03:01:06', 0, '0000-00-00 00:00:00'),
(35, 27, 1, 26, '', 'Chair with Cover', 2, 12, 24, 0, 0, 0, 24, 0, 16, '2014-09-09 07:44:12', 0, '0000-00-00 00:00:00'),
(36, 27, 1, 26, '', 'Chair with Cover', 2, 12, 24, 0, 0, 0, 24, 0, 16, '2014-09-09 07:44:24', 0, '0000-00-00 00:00:00'),
(37, 27, 1, 26, '', 'Chair with Cover', 2, 12, 24, 0, 0, 0, 24, 0, 16, '2014-09-09 07:44:29', 0, '0000-00-00 00:00:00'),
(38, 27, 1, 26, '', 'Chair with Cover', 2, 12, 24, 0, 0, 0, 24, 0, 16, '2014-09-09 07:49:57', 0, '0000-00-00 00:00:00'),
(39, 27, 1, 26, '', 'Chair with Cover', 2, 12, 24, 0, 0, 0, 24, 0, 16, '2014-09-09 07:52:08', 0, '0000-00-00 00:00:00'),
(40, 28, 1, 26, '', 'Chair with Cover', 23, 123, 2829, 0, 0, 0, 2829, 0, 16, '2014-09-09 07:55:04', 0, '0000-00-00 00:00:00'),
(41, 29, 1, 26, '', 'Chair with Cover', 23, 234, 5382, 0, 0, 0, 5382, 0, 16, '2014-09-09 07:56:50', 0, '0000-00-00 00:00:00'),
(42, 0, 2, 29, '', 'Laptop Dell', 3, 2000, 6000, 0, 0, 0, 6000, 0, 16, '2014-09-09 07:57:04', 0, '0000-00-00 00:00:00'),
(43, 0, 1, 26, '', 'Chair with Cover', 3, 123, 369, 0, 0, 0, 369, 0, 16, '2014-09-09 08:09:17', 0, '0000-00-00 00:00:00'),
(44, 32, 1, 29, '', 'Laptop Dell', 4, 2000, 8000, 769, 6, 480, 8480, 0, 16, '2014-09-09 08:18:02', 0, '0000-00-00 00:00:00'),
(45, 33, 1, 26, '', 'Chair with Cover', 33, 123, 4059, 0, 0, 0, 4059, 0, 16, '2014-09-09 08:20:50', 0, '0000-00-00 00:00:00'),
(46, 0, 2, 29, '', 'Laptop Dell', 3, 2000, 6000, 0, 0, 0, 6000, 0, 16, '2014-09-09 08:20:58', 0, '0000-00-00 00:00:00'),
(47, 0, 1, 29, '', 'Laptop Dell', 3, 2000, 6000, 0, 0, 0, 6000, 0, 16, '2014-09-09 08:22:26', 0, '0000-00-00 00:00:00'),
(48, 0, 2, 29, '', 'Laptop Dell', 3, 2000, 6000, 0, 0, 0, 6000, 0, 16, '2014-09-09 08:22:32', 0, '0000-00-00 00:00:00'),
(49, 0, 3, 27, '', 'STAT', 3, 23, 69, 0, 0, 0, 69, 0, 16, '2014-09-09 08:22:51', 0, '0000-00-00 00:00:00'),
(50, 35, 1, 29, '', 'Laptop Dell', 4, 2000, 8000, 0, 0, 0, 8000, 0, 16, '2014-09-09 08:25:14', 0, '0000-00-00 00:00:00'),
(51, 0, 2, 29, '', 'Laptop Dell', 3, 2000, 6000, 0, 0, 0, 6000, 0, 16, '2014-09-09 08:31:17', 0, '0000-00-00 00:00:00'),
(52, 36, 1, 29, '', 'Laptop Dell', 3, 2000, 6000, 0, 0, 0, 6000, 0, 16, '2014-09-09 08:33:44', 0, '0000-00-00 00:00:00'),
(53, 0, 1, 26, '', 'Chair with Cover', 343434, 23, 7898982, 0, 0, 0, 7898982, 0, 16, '2014-09-09 08:37:01', 0, '0000-00-00 00:00:00'),
(54, 24, 1, 26, '', 'Chair with Cover', 1, 2123, 2123, 769, 6, 127.38, 2250.38, 0, 16, '2014-09-17 03:56:57', 16, '0000-00-00 00:00:00'),
(58, 24, 2, 29, '', 'Laptop Dell', 2, 2000, 4000, 769, 6, 240, 4240, 0, 16, '2014-09-17 04:04:55', 16, '0000-00-00 00:00:00'),
(59, 39, 1, 27, '', 'STAT', 1, 4345, 4345, 769, 6, 260.7, 4605.7, 0, 16, '2014-09-17 04:06:29', 0, '0000-00-00 00:00:00'),
(60, 40, 1, 29, '', 'Laptop Dell', 5, 2000, 10000, 769, 6, 600, 10600, 0, 16, '2014-09-17 08:07:57', 0, '0000-00-00 00:00:00'),
(61, 43, 1, 37, '', 'Proton Saga full spec', 1, 0, 0, 1308, 6, 0, 0, 0, 51, '2014-09-18 02:04:41', 0, '0000-00-00 00:00:00'),
(62, 0, 1, 26, '', 'Chair with Cover', 3, 2123, 6369, 769, 6, 382.14, 6751.14, 0, 16, '2014-09-18 06:19:37', 0, '0000-00-00 00:00:00'),
(63, 0, 1, 26, '', 'Chair with Cover', 3, 2123, 6369, 769, 6, 382.14, 6751.14, 0, 16, '2014-09-18 06:19:46', 0, '0000-00-00 00:00:00'),
(64, 0, 1, 26, '', 'Chair with Cover', 3, 2123, 6369, 769, 6, 382.14, 6751.14, 0, 16, '2014-09-18 06:22:26', 0, '0000-00-00 00:00:00'),
(65, 0, 1, 26, '', 'Chair with Cover', 23, 34, 782, 769, 6, 46.92, 828.92, 0, 16, '2014-09-18 06:24:56', 0, '0000-00-00 00:00:00'),
(66, 0, 2, 29, '', 'Laptop Dell', 4, 435, 1740, 769, 6, 104.4, 1844.4, 0, 16, '2014-09-18 06:25:23', 0, '0000-00-00 00:00:00'),
(67, 46, 1, 26, '', 'Chair with Cover', 2, 2123, 4246, 769, 6, 254.76, 4500.76, 0, 16, '2014-09-18 06:29:28', 0, '0000-00-00 00:00:00'),
(69, 48, 1, 26, '', 'Chair with Cover', 3, 2123, 6369, 769, 6, 382.14, 6751.14, 0, 16, '2014-09-18 06:57:47', 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,
  `invoiceID` int(11) NOT NULL DEFAULT '0',
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `description` varchar(200) DEFAULT NULL,
  `unitPrice` double DEFAULT NULL,
  `unitmeasure` int(11) DEFAULT NULL,
  `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=29 ;

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

INSERT INTO `comp_sales_detail` (`ID`, `salesID`, `invoiceID`, `lineNo`, `itemID`, `description`, `unitPrice`, `unitmeasure`, `quantityOrder`, `quantityShip`, `amount`, `requiredDate`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 1, 89, 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, 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, 89, 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, 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, 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, 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, 90, 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, 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, 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, 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, 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'),
(12, 6, 0, 0, 11, 'saiz 10. warna gold', 250, 2, 1, 1, 250, '2014-07-17', 16, '2014-07-17 03:09:34', 16, '2014-07-17 03:09:34'),
(13, 7, 0, 0, 4, 'Plastic Chair - Blue', 23, 2, 3, 0, 69, '2014-07-18', 16, '2014-07-18 06:57:43', NULL, '2014-07-18 06:57:43'),
(14, 8, 0, 0, 7, 'Plastic Chair - Red', 34, 2, 4, 0, 136, '2014-07-18', 16, '2014-07-18 07:02:35', NULL, '2014-07-18 07:02:35'),
(15, 8, 0, 0, 2, 'Steel chair for outdoor', 56, 2, 8, 0, 448, '2014-07-18', 16, '2014-07-18 07:02:55', NULL, '2014-07-18 07:02:55'),
(16, 10, 0, 0, 29, 'Laptop Dell', 2000, 3, 2, 2, 4000, '2014-09-08', 43, '2014-09-08 02:02:33', 16, '2014-09-08 02:02:33'),
(17, 11, 0, 0, 8, 'Plastic Chair - White', 10, 2, 10, 0, 100, '2014-09-08', 16, '2014-09-08 07:20:09', NULL, '2014-09-08 07:20:09'),
(18, 11, 0, 0, 2, 'Steel chair for outdoor', 10, 2, 10, 1, 100, '2014-09-08', 16, '2014-09-08 07:20:31', 16, '2014-09-08 07:20:31'),
(19, 12, 0, 0, 2, 'Steel chair for outdoor', 1, 2, 1, 1, 1, '2014-09-08', 16, '2014-09-08 07:21:56', 16, '2014-09-08 07:21:56'),
(20, 13, 0, 0, 20, 'asdfasdf asdf asfd', 23, 12, 5, 5, 115, '2014-09-08', 33, '2014-09-08 10:17:02', 33, '2014-09-08 10:17:02'),
(21, 13, 0, 0, 19, 'New Item description', 342, 3, 5, 5, 1710, '2014-09-08', 33, '2014-09-08 10:17:19', 33, '2014-09-08 10:17:19'),
(22, 14, 0, 0, 27, 'STATsd sddddddddddddw', 1, 3, 10, 5, 10, '2014-09-09', 16, '2014-09-09 01:27:41', 16, '2014-09-09 01:27:41'),
(23, 14, 0, 0, 25, 'Table with Glass', 1, 3, 12, 9, 12, '2014-09-09', 16, '2014-09-09 01:28:01', 16, '2014-09-09 01:28:01'),
(25, 16, 0, 0, 29, 'Laptop Dell', 100, 3, 10, 3, 1000, '2014-09-10', 16, '2014-09-10 07:47:31', 16, '2014-09-10 07:47:31'),
(26, 17, 0, 0, 27, 'STAT', 10, 3, 10, 0, 100, '2014-09-10', 16, '2014-09-10 09:40:28', NULL, '2014-09-10 09:40:28'),
(27, 18, 0, 0, 32, 'cake', 3, 9, 200, 200, 600, '2014-09-16', 50, '2014-09-16 02:12:20', 50, '2014-09-16 02:12:20'),
(28, 19, 0, 0, 39, 'Toyota Wish 2.0 Recon', 120000, 3, 2, 2, 240000, '2014-09-16', 19, '2014-09-16 05:48:00', 19, '2014-09-16 05:48:00');

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

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

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

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

INSERT INTO `comp_sales_invoice` (`ID`, `serialNo`, `companyID`, `invoiceCodeID`, `salesID`, `customerID`, `formNo`, `salesInvoiceDate`, `customerPoNo`, `locationID`, `projectID`, `termsID`, `shipToID`, `currencyID`, `exchangeRate`, `agentID`, `printInInvoice`, `memo`, `employeeID`, `showSaleAgent`, `shippingMethodID`, `totalTaxAmount`, `totalReceivable`, `totalamount`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`, `updateAble`, `journalNo`, `salesOrderID`) VALUES
(18, 1, 1, 0, 0, 12, 'SON20140618', '2014-06-18', 'aaw', 1, 1, 5, 1, 1, 1, 1, 0, 'sdadc', 7, 0, 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, 1, 0, 0, 12, 'SON20140626', '2014-06-26', 'ghj', 1, 1, 5, 1, 1, 0, 1, 0, '1ygul', 7, 0, 4, 39.24, 0, 6293.5, 16, '2014-06-26 06:49:57', 0, '2014-08-29 08:36:35', 0, 1, '', NULL),
(20, 1, 1, 0, 0, 15, 'SON20140627', '2014-06-17', '12', 1, 1, 6, 1, 0, 3.1305, 1, 0, 'sds', 7, 0, 4, 0, -12, 36.72, 16, '2014-06-27 07:11:02', 0, '2014-06-27 07:18:03', 0, 1, '', NULL),
(21, 1, 1, 0, 0, 12, 'SON20140627', '2014-06-25', 'w3', 1, 2, 5, 1, 0, 3.1305, 1, 0, 'de', 7, 0, 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, 1, 0, 0, 12, 'SON20140627', '2014-06-24', 'sd', 1, 2, 5, 1, 0, 3.1305, 1, 0, 'wew', 7, 0, 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, 1, 0, 0, 12, 'SON20140627', '2014-06-10', 'sds', 1, 2, 7, 1, 0, 3.1305, 1, 0, 'sds', 6, 0, 5, 0, -1, 12, 16, '2014-06-27 07:34:10', 0, '2014-06-27 07:38:01', 0, 1, '', NULL),
(24, 1, 1, 0, 0, 12, 'SON20140627', '2014-06-04', 'w', 1, 1, 7, 2, 0, 3.1305, 1, 0, 'sds', 6, 0, 5, 0, -1, 1, 16, '2014-06-27 07:34:59', 0, '2014-06-27 07:38:01', 0, 1, '', NULL),
(25, 1, 1, 0, 0, 12, 'SON20140627', '2014-06-06', 'q1', 2, 1, 5, 1, 0, 3.1305, 1, 0, 'ada', 7, 0, 5, 0, 1, 1, 16, '2014-06-27 07:46:47', 0, '2014-07-01 03:04:08', 0, 1, '', NULL),
(26, 1, 1, 0, 0, 15, 'SON20140627', '2014-06-06', 'we', 2, 1, 5, 2, 0, 3.1305, 1, 0, 'wew', 7, 0, 8, 0, -1, 1, 16, '2014-06-27 07:47:23', 0, '2014-06-27 07:49:42', 0, 1, '', NULL),
(27, 1, 1, 0, 0, 15, 'SON20140627', '2014-06-03', 'as', 2, 1, 5, 2, 0, 3.1305, 1, 0, 'as', 6, 0, 8, 0, -1, 1, 16, '2014-06-27 07:48:33', 0, '2014-06-27 07:49:42', 0, 1, '', NULL),
(28, 1, 1, 0, 0, 12, 'SON20140627', '2014-06-25', '12', 2, 1, 8, 1, 0, 3.1305, 1, 0, 'sd', 6, 0, 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, 1, 0, 0, 12, 'SON20140711', '2014-07-07', 'we', 2, 15, 7, 4, 0, 3.1305, 1, 0, 'sdw', 7, 0, 6, 27.36, 7535.36, 7535.36, 16, '2014-06-30 00:42:25', 0, '2014-07-11 02:34:42', 0, 1, '', NULL),
(30, 1, 1, 0, 0, 12, 'SON20140630', '2014-06-24', 'sew', 2, 17, 7, 1, 0, 3.1305, 1, 0, 'sdw', 6, 0, 5, 0, 0, 12, 16, '2014-06-30 00:44:08', 0, '2014-07-01 08:15:41', 0, 1, '', NULL),
(31, 1, 1, 0, 0, 12, 'SON20140709', '2014-07-07', 'sew', 2, 17, 7, 1, 0, 3.1305, 1, 0, 'ewe', 7, 0, 73, 0.72, 13, 13, 16, '2014-06-30 01:01:13', 0, '2014-09-02 04:48:20', 0, 1, '', NULL),
(32, 1, 1, 0, 0, 16, 'SON20140630', '2014-07-07', 'as', 2, 1, 5, 1, 0, 3.1305, 1, 0, 'wewd', 7, 0, 8, 0, -1, 654.06, 16, '2014-06-30 03:42:50', 0, '2014-07-09 02:15:59', 0, 1, '', NULL),
(33, 1, 1, 0, 0, 12, 'SON20140702', '2014-07-02', 'asdfasdf245345345', 1, 1, 5, 1, 0, 3.1305, 1, 0, '', 6, 0, 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, 1, 0, 0, 12, 'SON20140702', '2014-07-02', 'wafasdfasdf', 1, 1, 5, 1, 0, 3.1305, 1, 0, '', 7, 0, 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, 1, 2, 0, 12, 'SON20140704', '2014-06-11', 'safsfg234', 1, 2, 5, 8, 0, 1, 1, 0, 'test memo', 6, 0, 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, 1, 2, 0, 12, 'SON20140704', '2014-06-11', 'dsfas2452345', 1, 2, 8, 1, 0, 1, 1, 0, 'test memo', 6, 0, 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, 1, 0, 12, 'SON20140704', '2014-06-11', 'ADASR353254', 1, 1, 6, 8, 0, 1, 1, 0, 'test memo', 6, 0, 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, 1, 2, 0, 12, 'SON20140707', '2014-07-07', 'd', 1, 1, 5, 2, 0, 3.1305, 1, 0, 'vcv s', 7, 0, 5, 2.7, 60.7, 60.7, 16, '2014-07-07 06:04:17', 0, '2014-07-08 08:07:10', 0, 1, '', NULL),
(39, 1, 1, 2, 0, 12, 'SON20140707', '2014-07-07', 'er', 2, 1, 7, 1, 0, 3.1305, 1, 0, 'er', 7, 0, 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, 1, 0, 12, 'SON20140707', '2014-06-18', 'asdfas45345', 2, 2, 6, 7, 0, 1, 1, 0, '', 7, 0, 73, 31, 0, 0, 16, '2014-07-07 06:42:29', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(41, 1, 1, 1, 0, 15, 'SON20140707', '2014-06-18', 'asdfasdf23452345', 1, 1, 5, 7, 0, 1, 1, 0, 'sfdgsdfgsdg', 7, 0, 74, 272.7, 58223.4, 58223.4, 16, '2014-07-07 06:45:19', 0, '2014-07-07 06:45:33', 0, 1, '', NULL),
(75, 1, 1, 2, 0, 15, 'SON20140709', '2014-07-01', 'Clone invoice', 2, 17, 5, 1, 0, 0, 1, 0, 'vcv s', 6, 0, 5, 27.36, 483.36, 483.36, 16, '2014-07-07 06:04:17', 0, '2014-07-09 03:14:22', 0, 1, '', NULL),
(76, 1, 1, 2, 0, 12, 'SON20140707', '2014-07-07', 'd', 1, 1, 5, 2, 0, 3.1305, 1, 0, 'vcv s', 7, 0, 5, 2.7, -122, 60.7, 16, '2014-07-07 06:04:17', 0, '2014-07-10 04:02:58', 0, 1, '', NULL),
(77, 1, 1, 0, 0, 12, 'SON20140711', '2014-07-07', 'we', 2, 15, 7, 4, 0, 3.1305, 1, 0, 'sdw', 7, 0, 6, 27.36, 7535.36, 7535.36, 16, '2014-06-30 00:42:25', 0, '2014-07-11 02:34:42', 0, 1, '', NULL),
(80, 1, 1, 1, 0, 12, 'SON20140711', '2014-07-11', 'asfa45', 1, 10, 7, 2, 0, 3.23, 1, 0, 'fdasdfafd', 7, 0, 73, 864, 493.96, 493.96, 16, '2014-07-11 08:51:41', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(81, 1, 1, 1, 0, 12, 'SON20140711', '2014-07-11', 'asdf2345', 1, 2, 6, 1, 0, 2.34, 1, 0, '', 6, 0, 73, 33145.02, 491.84, 1889.6799999999998, 16, '2014-07-11 08:59:06', 0, '2014-07-11 08:59:34', 0, 1, '', NULL),
(82, 1, 1, 1, 0, 12, 'SON20140711', '2014-07-11', 'asdf2345', 1, 1, 5, 1, 0, 3.44, 1, 0, '', 6, 0, 74, 33, 0, 0, 16, '2014-07-11 09:00:31', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(83, 1, 1, 1, 0, 12, 'SON20140711', '2014-07-11', 'asdf2345', 1, 1, 5, 1, 0, 0, 1, 0, '', 6, 0, 74, 72, 0, 0, 16, '2014-07-11 09:01:29', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(84, 1, 1, 1, 0, 12, 'SON20140711', '2014-07-11', 'adfa2345', 1, 10, 5, 1, 0, 0, 1, 0, '', 7, 0, 5, 72, 0, 0, 16, '2014-07-11 09:02:05', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(85, 1, 1, 1, 0, 12, 'SON20140711', '2014-07-11', 'asfasgf324543', 1, 10, 5, 1, 0, 4.33, 1, 0, '', 6, 0, 73, 1, 0, 0, 16, '2014-07-11 09:03:17', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(86, 1, 1, 1, 0, 12, 'SON20140711', '2014-07-11', 'sadfas2345', 1, 2, 6, 1, 0, 0, 1, 0, '', 6, 0, 73, 31, 0, 0, 16, '2014-07-11 09:08:40', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(87, 1, 1, 1, 0, 12, 'SON20140711', '2014-07-11', 'adfas2345', 1, 2, 6, 1, 0, 3.33, 1, 0, '', 6, 0, 74, 31, 0, 0, 16, '2014-07-11 09:29:31', 0, '2014-07-17 06:56:38', 0, 0, '', NULL),
(88, 1, 1, 1, 0, 12, 'SON20140711', '2014-07-11', 'asdf324523', 1, 1, 6, 1, 0, 3.44, 1, 0, '', 6, 0, 73, 2, 0, 0, 16, '2014-07-11 09:30:18', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(89, 1, 1, 1, 0, 12, 'SON20140714', '2014-07-14', 'asdf234523', 1, 10, 6, 1, 0, 3.1305, 1, 0, 'sd adadf afd', 6, 0, 74, 2, 480.18, 480.18, 16, '2014-07-14 00:47:46', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(90, 1, 1, 1, 0, 12, 'SON20140714', '2014-07-14', 'fsfsaf453', 2, 15, 6, 1, 0, 3.24, 1, 0, 'sdfggfs', 6, 0, 73, 72, 0, 0, 16, '2014-07-14 00:50:58', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(91, 1, 1, 2, 0, 12, 'SON20140714', '2014-07-14', 'asa', 1, 10, 5, 1, 0, 3.1305, 1, 0, 'eqwwe', 7, 0, 5, 0.06, 2.06, 0, 16, '2014-07-14 06:42:06', 0, '2014-07-14 06:48:09', 0, 1, '', NULL),
(92, 1, 1, 2, 0, 15, 'SON20140714', '2014-07-14', 'asa', 1, 17, 5, 1, 0, 3.1305, 1, 0, 'asa sdas', 6, 0, 8, 6.666666666666668e18, 341.26, 1.1777777777777779e20, 16, '2014-07-14 06:55:31', 0, '2014-07-14 06:58:13', 0, 1, '', NULL),
(93, 1, 1, 2, 0, 12, 'SON20140714', '2014-07-14', 'sa', 1, 2, 7, 1, 0, 3.1305, 1, 0, 'sas', 6, 0, 5, 7.319999999999999, 1.06, 129.32, 16, '2014-07-14 07:08:01', 0, '2014-07-14 07:08:35', 0, 1, '', NULL),
(94, 1, 1, 2, 0, 12, 'SON20140714', '2014-07-14', 'asa', 1, 10, 5, 1, 0, 3.1305, 1, 0, 'eqwwe', 7, 0, 5, 0.06, 2.06, 0, 16, '2014-07-14 06:42:06', 0, '2014-07-14 06:48:09', 0, 1, '', NULL),
(95, 1, 1, 1, 0, 12, 'SON20140716', '2014-06-12', 'asdfrtrt', 1, 1, 5, 1, 0, 2.34, 1, 0, '', 6, 0, 73, 434.7, 7679.7, 7679.7, 16, '2014-07-16 04:29:50', 0, '2014-07-16 04:30:49', 0, 1, '', NULL),
(96, 1, 1, 2, 0, 15, 'SON20140714', '2014-07-14', 'asa', 1, 17, 5, 1, 1, 3.1305, 1, 0, 'asa sdas', 6, 0, 8, 6.666666666666668e18, 341.26, 1.1777777777777779e20, 16, '2014-07-14 06:55:31', 0, '2014-08-11 07:18:20', 0, 1, '', NULL),
(97, 1, 81, 1, 0, 33, 'SON', '2014-07-21', '001', 9, 22, 17, 1, 1, 0, 11, 0, '', 21, 0, 6, 0, 0, 0, 29, '2014-07-21 04:01:52', 0, '2014-08-11 07:18:16', 0, 1, '', NULL),
(98, 2, 1, 2, 0, 12, 'SON20140801', '2014-08-01', 'das', 1, 1, 17, 1, 1, 3.1305, 1, 0, 'sada', 6, 0, 6, 19.26, 340.26, 340.26, 1, '2014-08-01 03:46:15', 0, '2014-08-11 07:18:12', 0, 0, 'AR20140800000005', NULL),
(99, 3, 1, 2, 0, 12, 'SON20140801', '2014-08-01', 'das', 1, 1, 17, 1, 1, 3.1305, 1, 0, 'sada', 6, 0, 6, 19.26, 340.26, 340.26, 1, '2014-08-01 03:46:15', 0, '2014-08-11 07:18:09', 0, 0, 'AR20140800000002', NULL),
(100, 4, 1, 2, 0, 12, 'SON20140801', '2014-08-01', 'das', 1, 1, 17, 1, 1, 3.1305, 1, 0, 'sada', 6, 0, 6, 77.04, 1361.04, 1361.04, 1, '2014-08-01 03:46:15', 0, '2014-08-11 07:18:06', 0, 0, 'AR20140800000001', NULL),
(101, 5, 1, 1, 0, 12, 'SON20140805', '2014-08-05', 'lkjnlk', 1, 1, 17, 3, 1, 0, 1, 0, 'sdsd', 26, 0, 5, 72, 8772, 8772, 1, '2014-08-05 02:00:09', 0, '2014-08-11 07:18:00', 0, 1, '', NULL),
(102, 6, 1, 1, 0, 12, 'SON20140805', '2014-08-05', 'lkjnlk', 1, 1, 17, 3, 1, 0, 1, 0, 'sdsd', 26, 0, 5, 72, 118.72, 118.72, 1, '2014-08-05 02:00:22', 0, '2014-08-11 07:17:55', 0, 1, '', NULL),
(103, 7, 1, 1, 0, 12, 'SON20140805', '2014-08-05', 'lkjnlk', 1, 1, 17, 3, 1, 0, 1, 0, 'sdsd', 26, 0, 5, 72, 118.72, 118.72, 1, '2014-08-05 02:00:25', 0, '2014-08-11 07:17:51', 0, 1, '', NULL),
(104, 8, 1, 1, 0, 12, 'SON20140805', '2014-08-05', 'lkjnlk', 1, 1, 17, 3, 1, 0, 1, 0, 'sdsd', 26, 0, 5, 72, 118.72, 118.72, 1, '2014-08-05 02:00:35', 0, '2014-08-11 07:17:45', 0, 1, '', NULL),
(105, 9, 1, 1, 0, 12, 'SON20140805', '2014-08-05', 'lkjnlk', 1, 1, 17, 3, 1, 0, 1, 0, 'sdsd', 26, 0, 5, 72, 118.72, 118.72, 1, '2014-08-05 02:00:38', 0, '2014-08-11 07:17:40', 0, 1, '', NULL),
(106, 10, 1, 1, 0, 12, 'SON20140805', '2014-08-05', 'lkjnlk', 1, 1, 17, 3, 1, 0, 1, 0, 'sdsd', 26, 0, 5, 72, 8772, 8772, 1, '2014-08-05 02:00:41', 0, '2014-08-11 07:17:35', 0, 1, '', NULL),
(107, 11, 1, 1, 0, 12, 'SON20140805', '2014-08-05', 'lkjnlk', 1, 1, 17, 3, 1, 0, 1, 0, 'sdsd', 26, 0, 5, 72, 8772, 8772, 1, '2014-08-05 02:00:46', 0, '2014-08-11 07:17:23', 0, 1, '', NULL),
(108, 12, 1, 1, 0, 12, 'SON20140805', '2014-08-05', 'lkjnlk', 1, 1, 17, 3, 1, 0, 1, 0, 'sdsd', 26, 0, 5, 72, 8772, 8772, 1, '2014-08-05 02:00:49', 0, '2014-08-11 07:17:17', 0, 1, '', NULL),
(109, 13, 1, 1, 0, 12, 'SON20140805', '2014-08-05', 'lkjnlk', 1, 1, 17, 3, 1, 0, 1, 0, 'sdsd', 26, 0, 5, 72, 8772, 8772, 1, '2014-08-05 02:00:58', 0, '2014-08-11 07:17:11', 0, 1, '', NULL),
(110, 14, 1, 1, 0, 12, 'SON20140805', '2014-08-05', 'asdfa3435', 1, 1, 5, 1, 1, 3.2, 1, 0, '', 6, 0, 74, 165.6, 2925.6, 2925.6, 16, '2014-08-05 02:14:55', 0, '2014-08-11 07:17:06', 0, 1, '', NULL),
(111, 15, 1, 1, 0, 12, 'SON20140805', '2014-08-05', 'asdfa3435', 1, 1, 5, 1, 1, 3.2, 1, 0, '', 6, 0, 74, 165.6, 2925.6, 2925.6, 16, '2014-08-05 02:15:07', 0, '2014-08-11 07:15:45', 0, 1, '', NULL),
(112, 16, 1, 1, 0, 12, 'SON20140805', '2014-08-05', 'asdfa3435', 1, 1, 5, 1, 1, 3.2, 1, 0, '', 6, 0, 74, 165.6, 2925.6, 2925.6, 16, '2014-08-05 02:23:53', 0, '2014-08-11 07:15:37', 0, 1, '', NULL),
(113, 17, 1, 1, 0, 12, 'SON20140805', '2014-08-05', 'sd', 1, 1, 17, 1, 1, 2, 1, 0, 'sdfs', 26, 0, 8, 0, 20, 20, 1, '2014-08-05 02:30:00', 0, '2014-08-11 07:15:34', 0, 0, 'AR20140800000003', NULL),
(114, 18, 1, 2, 0, 12, 'SON20140805', '2014-08-05', 'sds', 1, 1, 17, 1, 1, 3.1305, 1, 0, 'sds', 6, 0, 5, 19.26, 340.26, 340.26, 1, '2014-08-05 07:16:18', 0, '2014-08-11 07:15:28', 0, 0, 'AR20140800000004', NULL),
(115, 19, 1, 2, 0, 12, 'SON20140811', '2014-08-11', 'po-009099546', 1, 1, 5, 2, 1, 3.1305, 1, 0, '', 6, 0, 73, 3, 53, 53, 16, '2014-08-11 06:59:13', 0, '2014-08-11 07:15:22', 0, 0, 'AR20140800000006', NULL),
(116, 20, 1, 2, 0, 12, 'SON20140811', '2014-08-11', 'PO-0987667', 1, 17, 17, 2, 0, 3.1305, 1, 0, '', 30, 0, 74, 19.26, 340.26, 341.26, 16, '2014-08-11 07:19:48', 0, '2014-08-11 08:48:31', 0, 1, '', NULL),
(117, 21, 1, 2, 0, 12, 'SON20140811', '2014-08-11', 'SDS', 1, 17, 17, 1, 0, 3.1305, 1, 0, 'SDS', 7, 0, 74, 19.26, 340.26, 340.26, 1, '2014-08-11 07:22:32', 0, '2014-08-11 07:22:32', 0, 1, '', NULL),
(118, 22, 1, 2, 0, 12, 'SON20140811', '2014-08-11', 'asa', 1, 2, 17, 1, 0, 3.1305, 1, 0, 'sds', 30, 0, 5, 19.26, 340.26, 340.26, 1, '2014-08-11 07:29:04', 0, '2014-08-11 07:29:04', 0, 1, '', NULL),
(119, 23, 1, 2, 0, 12, 'SON20140811', '2014-08-11', 'QW', 2, 17, 17, 1, 0, 3.1305, 1, 0, 'SD', 30, 0, 74, 19.26, 340.26, 340.26, 1, '2014-08-11 07:32:40', 0, '2014-08-11 07:32:40', 0, 1, '', NULL),
(120, 24, 1, 2, 0, 12, 'SON20140811', '2014-08-05', 'AS', 1, 17, 5, 1, 0, 3.1305, 1, 0, 'SD', 30, 0, 74, 19.26, 340.26, 340.26, 1, '2014-08-11 07:37:04', 0, '2014-08-11 07:37:04', 0, 1, '', NULL),
(121, 25, 1, 2, 0, 12, 'SON20140811', '2014-08-11', 'QW', 1, 17, 17, 2, 0, 3.1305, 1, 0, 'A', 26, 0, 5, 0, 1, 1, 1, '2014-08-11 07:38:29', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(122, 26, 1, 2, 0, 12, 'SON20140811', '2014-08-11', 'sd', 1, 15, 18, 1, 0, 3.1305, 1, 0, 'sd', 6, 0, 74, 19.26, 340.26, 340.26, 1, '2014-08-11 07:41:12', 0, '2014-08-11 07:41:12', 0, 1, '', NULL),
(123, 27, 1, 2, 0, 12, 'SON20140811', '2014-08-11', 'sdw', 2, 24, 18, 1, 1, 3.1305, 1, 0, 'cvx', 6, 0, 5, 0, 12, 12, 1, '2014-08-11 07:42:43', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(124, 28, 1, 2, 0, 12, 'SON20140811', '2014-08-11', 'SD', 1, 15, 18, 1, 1, 3.1305, 1, 0, 'XC', 6, 0, 8, 0, 1, 1, 1, '2014-08-11 07:47:27', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(125, 29, 1, 1, 0, 15, 'SON20140811', '2014-08-11', 'SA', 1, 17, 18, 1, 0, 12, 1, 0, 'SD', 6, 0, 74, 21.6, 381.6, 381.6, 1, '2014-08-11 07:49:46', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(126, 1, 15, 2, 0, 18, 'SON', '2014-08-11', 'cust po 0121234124', 3, 19, 17, 2, 2, 3.1305, 14, 0, '', 9, 0, 8, 4.2, 74.2, 74.2, 16, '2014-08-11 07:57:52', 0, '2014-08-15 09:12:26', 0, 0, 'AR20140300000002', NULL),
(127, 30, 1, 1, 0, 15, 'SON20140811', '2014-08-11', 'DA', 2, 17, 7, 1, 0, 1, 1, 0, 'DS', 6, 0, 5, 0, 1, 1, 1, '2014-08-11 08:12:31', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(128, 31, 1, 1, 0, 15, 'SON20140811', '2014-08-11', 'e', 2, 2, 7, 1, 2, 2, 1, 0, 'er', 30, 0, 74, 0, 1, 1, 1, '2014-08-11 08:15:48', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(129, 32, 1, 1, 0, 15, 'SON20140811', '2014-08-11', 'we', 1, 17, 5, 1, 2, 1, 1, 0, 'wq', 6, 0, 74, 73.2, 1293.2, 1293.2, 1, '2014-08-11 08:17:09', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(130, 33, 1, 1, 0, 15, 'SON20140811', '2014-08-11', 'sadf34', 1, 1, 5, 1, 0, 0, 1, 0, '', 30, 0, 74, 0, 36.04, 36.04, 33, '2014-08-11 08:18:38', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(131, 34, 1, 1, 0, 15, 'SON20140811', '2014-08-11', 'asdfasf242134', 1, 2, 5, 1, 0, 0, 1, 0, '', 6, 0, 74, 0, 0, 0, 33, '2014-08-11 10:35:42', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(132, 35, 1, 1, 0, 15, 'SON20140811', '2014-08-11', 'asdfasf242134', 1, 2, 5, 1, 0, 0, 1, 0, '', 6, 0, 74, 0, 0, 0, 33, '2014-08-11 10:35:54', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(133, 36, 1, 1, 0, 15, 'SON20140811', '2014-08-11', 'asdfasf242134', 1, 2, 5, 1, 0, 0, 1, 0, '', 6, 0, 74, 0, 0, 0, 33, '2014-08-11 10:36:57', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(134, 37, 1, 1, 0, 15, 'SON20140811', '2014-08-11', 'asdfasf242134', 1, 2, 5, 1, 0, 0, 1, 0, '', 6, 0, 74, 0, 0, 0, 33, '2014-08-11 10:37:13', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(135, 38, 1, 1, 0, 15, 'SON20140811', '2014-08-11', 'asdfasf242134', 1, 2, 5, 1, 0, 0, 1, 0, '', 6, 0, 74, 0, 0, 0, 33, '2014-08-11 10:37:31', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(136, 39, 1, 1, 0, 15, 'SON20140811', '2014-08-11', 'asdfasf242134', 1, 2, 5, 1, 0, 0, 1, 0, '', 6, 0, 74, 0, 0, 0, 33, '2014-08-11 10:38:02', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(137, 40, 1, 1, 0, 15, 'SON20140811', '2014-08-11', 'asdfasf242134', 1, 2, 5, 1, 0, 0, 1, 0, '', 6, 0, 74, 0, 0, 0, 33, '2014-08-11 10:38:13', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(138, 41, 1, 1, 0, 15, 'SON20140811', '2014-08-11', 'asdfasf242134', 1, 2, 5, 1, 0, 0, 1, 0, '', 6, 0, 74, 0, 0, 0, 33, '2014-08-11 10:44:03', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(139, 42, 1, 1, 0, 12, 'SON20140812', '2014-08-12', 'ASDFAR2EQWER', 1, 1, 5, 1, 1, 3.23, 15, 0, '', 30, 1, 74, 72, 1272, 1272, 33, '2014-08-12 07:56:53', 0, '2014-08-12 07:58:47', 0, 1, '', NULL),
(140, 43, 1, 1, 0, 12, 'SON20140812', '2014-08-12', 'asfasfd234', 1, 1, 5, 2, 1, 3.23, 15, 0, '', 6, 1, 73, 72, 1272, 1272, 33, '2014-08-12 08:02:32', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(141, 44, 1, 2, 0, 15, 'SON20140813', '2014-08-13', 'sdfgdsf4563456', 1, 1, 17, 14, 2, 3, 15, 0, 'ssdfgsdfgsdgf', 6, 1, 73, 288.9, 5, 5, 33, '2014-08-13 10:47:43', 0, '2014-08-21 04:03:24', 0, 1, '', NULL),
(142, 1, 84, 1, 0, 35, 'SON', '2014-01-16', 'dfbnrt6757', 10, 26, 17, 18, 0, 34, 13, 0, '', 29, 0, 73, 0, 0, 0, 33, '2014-08-13 11:12:11', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(143, 2, 84, 1, 0, 35, 'SON', '2014-01-16', 'dfbnrt6757', 10, 26, 17, 18, 0, 34, 13, 0, '', 29, 0, 73, 0, 0, 0, 33, '2014-08-13 11:12:33', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(144, 3, 84, 1, 0, 35, 'SON', '2014-01-16', 'dfbnrt6757', 10, 26, 17, 0, 0, 34, 13, 0, '', 29, 0, 73, 0, 0, 0, 33, '2014-08-13 11:12:33', 0, '2014-08-13 11:12:56', 0, 1, '', NULL),
(145, 45, 1, 2, 0, 12, 'SON20140815', '2014-08-15', 'sa', 1, 1, 17, 7, 1, 12, 15, 0, 'asa', 30, 0, 74, 1.1, 21.1, 21.1, 1, '2014-08-15 06:44:39', 0, '2014-08-15 10:02:14', 0, 0, 'AR20140800000009', NULL),
(146, 2, 15, 2, 0, 17, 'SON', '2014-08-15', 'asfdasf867', 3, 19, 17, 5, 1, 3.45, 14, 0, '', 12, 0, 5, 17.4, 307.4, 307.4, 33, '2014-08-15 09:46:33', 0, '2014-08-20 01:34:37', 0, 1, '', NULL),
(147, 4, 84, 1, 0, 0, 'SON', '2014-01-18', '', 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 33, '2014-08-18 01:28:34', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(148, 5, 84, 1, 0, 35, 'SON', '2014-01-18', 'ADDF2354235', 10, 26, 17, 18, 0, 0, 13, 0, '', 29, 0, 5, 0, 0, 0, 33, '2014-08-18 01:29:43', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(149, 6, 84, 2, 0, 35, 'SON', '2014-01-15', 'afsgafg3543', 10, 26, 17, 18, 0, 3.34, 13, 0, 'fs dfgsf sdfgsdfg sdgf', 29, 0, 74, 74.04, 1308.04, 1308.04, 33, '2014-08-18 02:41:58', 0, '2014-08-18 02:41:58', 0, 1, '', NULL),
(150, 46, 1, 1, 0, 12, 'SON20140818', '2014-08-18', 'sdfs35635', 1, 1, 5, 8, 1, 3.23, 15, 0, '', 6, 0, 74, 0, 0, 0, 33, '2014-08-18 03:03:29', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(151, 47, 1, 1, 0, 12, 'SON20140818', '2014-08-18', 'asf3453525', 1, 1, 5, 8, 1, 3.23, 15, 0, '', 30, 1, 6, 0, 0, 0, 33, '2014-08-18 03:12:50', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(152, 48, 1, 1, 0, 16, 'SON20140818', '2014-08-18', 'asdf234523', 1, 1, 17, 15, 1, 3.23, 15, 0, '', 30, 0, 74, 0, 0, 0, 33, '2014-08-18 03:16:31', 0, '2014-08-18 03:49:19', 0, 1, '', NULL),
(153, 7, 84, 1, 0, 35, 'SON', '2014-08-18', 'WDADS234234', 10, 26, 17, 18, 10, 0, 13, 0, '', 29, 0, 74, 0, 0, 0, 33, '2014-08-18 04:50:03', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(154, 8, 84, 1, 0, 35, 'SON', '2014-08-18', 'svcsf2345234', 10, 26, 5, 19, 10, 0, 13, 0, '', 29, 0, 74, 0, 0, 0, 33, '2014-08-18 04:51:33', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(155, 9, 84, 1, 0, 35, 'SON', '2014-01-15', 'fasdfas245245', 10, 26, 5, 18, 10, 0, 13, 0, '', 29, 1, 6, 0, 0, 0, 33, '2014-08-18 04:54:07', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(156, 10, 84, 1, 0, 35, 'SON', '2014-01-01', 'asfdasdf245354', 10, 26, 17, 18, 10, 3.23, 13, 0, 'asdfasfd', 29, 0, 5, 67.32, 1189.32, 1189.32, 33, '2014-08-20 03:19:22', 0, '2014-08-20 03:20:01', 0, 1, '', NULL),
(157, 3, 15, 2, 0, 19, 'SON', '2014-08-21', 'cust po 0121234124', 3, 19, 17, 2, 2, 0, 14, 0, '', 9, 0, 8, 4.2, 74.2, 74.2, 16, '2014-08-11 07:57:52', 0, '2014-08-21 01:26:39', 0, 1, 'AR20140300000002', NULL),
(158, 49, 1, 2, 0, 12, 'SON20140821', '2014-08-21', 'sew', 1, 1, 17, 8, 1, 3.5, 15, 0, '', 7, 0, 74, 23.400000000000002, 413.4, 413.4, 33, '2014-08-21 06:00:30', 0, '2014-08-21 06:01:35', 0, 1, '', NULL),
(159, 1, 93, 2, 0, 0, 'SON', '2014-09-09', 'sag343', 15, 0, 2, 0, 1, 1, 19, 0, '', 0, 0, 0, 0, 1086, 4755, 16, '2014-09-09 03:59:51', 0, '2014-09-12 01:39:08', 0, 1, '', NULL),
(160, 2, 93, 2, 0, 41, 'SON', '2014-09-09', 'dfr4', 15, 0, 2, 0, 1, 1, 19, 0, '', 0, 0, 0, 0, 2345, 2468, 16, '2014-09-09 04:33:23', 0, '2014-09-09 04:36:17', 0, 1, '', NULL),
(161, 3, 93, 2, 0, 40, 'SON', '2014-09-09', 'fdf34', 15, 0, 2, 0, 1, 1, 19, 0, '', 0, 0, 0, 0, 0, 11050, 16, '2014-09-09 04:40:09', 0, '2014-09-17 02:40:43', 0, 1, '', NULL),
(162, 4, 93, 2, 0, 40, 'SON', '2014-09-09', 'asdfds34345', 15, 0, 3, 0, 1, 1, 19, 0, '', 0, 0, 0, 0, 0, 6000, 16, '2014-09-09 04:43:19', 0, '2014-09-17 02:40:43', 0, 1, '', NULL),
(163, 5, 93, 2, 0, 40, 'SON', '2014-09-09', 'asdg3434', 15, 0, 1, 0, 1, 1, 19, 0, '', 0, 0, 0, 0, 0, 603, 16, '2014-09-09 04:48:04', 0, '2014-09-17 08:10:13', 0, 1, '', NULL),
(164, 6, 93, 2, 0, 40, 'SON', '2014-09-09', 'sdfasf2345', 15, 0, 1, 0, 1, 1, 19, 0, '', 0, 0, 0, 0, 0, 369, 16, '2014-09-09 04:50:10', 0, '2014-09-17 04:46:11', 0, 1, '', NULL),
(165, 7, 93, 2, 0, 40, 'SON', '2014-09-09', 'asfs3434', 15, 0, 1, 0, 1, 1, 19, 0, '', 0, 0, 0, 0, 0, 2689, 16, '2014-09-09 04:51:20', 0, '2014-09-17 08:10:14', 0, 1, '', NULL),
(166, 8, 93, 2, 0, 40, 'SON', '2014-09-09', 'sdf34523', 15, 0, 1, 0, 1, 1, 19, 0, '', 0, 0, 0, 0, 4579, 4579, 16, '2014-09-09 04:55:08', 0, '2014-09-09 04:55:50', 0, 1, '', NULL),
(167, 9, 93, 2, 0, 41, 'SON', '2014-09-09', 'asdf234', 15, 0, 2, 0, 1, 1, 19, 0, '', 0, 0, 0, 0, 0, 886, 16, '2014-09-09 04:56:22', 0, '2014-09-18 09:20:55', 0, 1, '', NULL),
(168, 10, 93, 1, 0, 41, 'SON 1231', '2014-09-11', '123123123', 18, 0, 2, 21, 1, 1, 19, 0, 'dasfasfsfsaf', 37, 1, 4, 0, 0, 0, 42, '2014-09-11 07:18:15', 0, '2014-09-17 04:35:56', 0, 1, '', NULL),
(169, 11, 93, 2, 0, 40, 'SON 1232', '2014-09-11', '12312312324213', 15, 0, 1, 0, 0, 1, 19, 0, 'asdadasdas', 41, 1, 4, 0, 14003, 17000, 42, '2014-09-11 09:14:33', 0, '2014-09-11 09:14:43', 0, 1, '', NULL),
(170, 12, 93, 2, 0, 40, 'SON', '2014-09-15', 'zsa', 18, 30, 3, 0, 1, 1, 19, 0, '', 0, 0, 0, 0, 2000, 2000, 16, '2014-09-15 06:30:20', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(171, 1, 103, 1, 0, 44, '123', '2014-09-16', '123', 23, 0, 1, 22, 1, 1, 0, 0, '', 44, 0, 8, 36, 0, 636, 50, '2014-09-16 02:35:29', 0, '2014-09-16 02:40:19', 0, 0, 'AR20140900000001', NULL),
(172, 13, 93, 1, 0, 41, 'SON', '2014-09-16', 'asdfas234', 15, 0, 2, 21, 1, 1, 0, 0, '', 37, 0, 74, 56.22, 123, 937, 16, '2014-09-16 04:05:39', 0, '2014-09-16 04:07:22', 0, 1, '', NULL),
(173, 14, 93, 1, 0, 41, 'SON', '2014-09-16', 'sdfsdf234234', 15, 30, 2, 21, 1, 1, 0, 0, '', 0, 0, 0, 141.18, 374.18, 2463, 16, '2014-09-16 04:07:56', 0, '2014-09-16 04:08:17', 0, 1, '', NULL),
(174, 1, 105, 1, 0, 45, 'SON', '2014-09-16', '4564', 25, 0, 2, 23, 1, 1, 0, 0, '', 0, 0, 0, 14, 0, 254400, 19, '2014-09-16 05:54:33', 0, '2014-09-16 06:22:07', 0, 0, 'AR20140900000001', NULL),
(175, 2, 105, 2, 0, 45, 'SON', '2014-09-16', 'fgfgf', 24, 0, 2, 0, 1, 1, 21, 0, '', 0, 0, 0, 6000, 106000, 106000, 19, '2014-09-16 06:36:11', 0, '2014-09-16 06:36:21', 0, 0, 'AR20140900000002', NULL),
(176, 15, 93, 1, 0, 41, 'SON', '2014-09-16', 'sadfarq42345', 15, 0, 2, 21, 1, 1, 0, 0, '', 0, 0, 0, 0, 400, 400, 16, '2014-09-16 08:05:31', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(177, 16, 93, 1, 0, 41, 'SON', '2014-09-17', 'asf2435345', 15, 0, 2, 21, 1, 1, 0, 0, '', 0, 0, 0, 14.04, 248.04, 235, 16, '2014-09-17 01:35:10', 0, '2014-09-17 01:35:27', 0, 1, '', NULL),
(178, 17, 93, 1, 0, 40, 'SON', '2014-09-17', 'fdasdf234', 17, 30, 1, 24, 1, 1, 0, 0, '', 0, 0, 0, 6.66, 0, 123, 16, '2014-09-17 01:47:59', 0, '2014-09-17 08:10:14', 0, 1, '', NULL),
(179, 18, 93, 1, 0, 41, 'SON', '2014-09-17', 'asdad123', 15, 0, 2, 21, 1, 1, 0, 0, '', 0, 0, 0, 32.04, 566.04, 566.04, 16, '2014-09-17 07:19:48', 0, '2014-09-17 07:21:30', 0, 1, '', NULL),
(180, 19, 93, 1, 0, 40, 'SON', '2014-09-17', 'sayem1234', 15, 30, 1, 24, 1, 1, 19, 0, '', 0, 1, 0, 3404.1600000000003, 2451.78, 60140.16, 16, '2014-09-17 07:25:05', 0, '2014-09-17 07:25:42', 0, 1, '', NULL),
(181, 20, 93, 1, 0, 40, 'SON', '2014-09-17', 'sayem123', 15, 30, 1, 24, 1, 1, 0, 0, '', 0, 0, 0, 0, 13084.64, 13084.64, 16, '2014-09-17 07:43:25', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(182, 21, 93, 1, 0, 40, 'SON', '2014-09-17', 'Sayem1234', 15, 30, 1, 24, 1, 1, 19, 0, '', 0, 1, 0, 0, 1308.04, 1308.04, 16, '2014-09-17 07:45:00', 0, '0000-00-00 00:00:00', 0, 1, '', NULL),
(183, 22, 93, 1, 0, 40, 'SON', '2014-09-17', 'Sayem1234', 15, 31, 1, 24, 1, 1, 19, 0, '', 0, 1, 0, 74.1, 1309.1, 1309.1, 16, '2014-09-17 07:56:39', 0, '2014-09-17 07:57:20', 0, 1, '', NULL),
(184, 23, 93, 1, 0, 40, 'SON', '2014-09-17', 'Sayem123456', 15, 30, 1, 24, 1, 1, 19, 0, '', 0, 0, 0, 0.06, 0, 0, 16, '2014-09-17 08:02:34', 0, '2014-09-17 08:10:14', 0, 1, '', NULL),
(185, 24, 93, 1, 0, 40, 'SON', '2014-09-17', 'khkjhjh', 15, 30, 2, 24, 1, 1, 19, 0, '', 0, 0, 0, 6, 0, 0, 16, '2014-09-17 08:04:31', 0, '2014-09-17 08:10:14', 0, 1, '', NULL),
(186, 25, 93, 1, 0, 40, 'SON', '2014-09-17', 'asdfas2452345', 15, 30, 1, 24, 1, 1, 19, 0, '', 0, 0, 0, 74.04, 1308.04, 1308.04, 16, '2014-09-17 08:06:31', 0, '2014-09-17 08:07:21', 0, 0, 'AR20140900000005', NULL),
(187, 26, 93, 1, 0, 40, 'SON', '2014-09-17', 'Sayem-last-test123', 15, 30, 1, 24, 1, 1, 19, 0, '', 0, 1, 0, 3328.74, 58807.74, 58807.74, 16, '2014-09-17 08:14:05', 0, '2014-09-17 08:24:23', 0, 0, 'AR20140900000009', NULL),
(188, 27, 93, 1, 0, 40, 'SON', '2014-09-17', 'sayem1235', 15, 30, 2, 24, 1, 1, 19, 0, '', 0, 1, 0, 114.48, 2022.4799999999998, 2022.4799999999998, 16, '2014-09-17 09:17:57', 0, '2014-09-18 01:40:29', 0, 1, '', NULL),
(189, 28, 93, 1, 0, 40, 'SON', '2014-09-18', 'cust po 0121234124', 15, 0, 1, 24, 1, 1, 0, 0, '', 0, 0, 0, 0.6, 10.6, 10.6, 19, '2014-09-18 07:35:52', 0, '2014-09-18 07:35:53', 0, 1, '', NULL),
(190, 29, 93, 1, 0, 40, 'SON', '2014-09-18', 'sfd234', 15, 0, 1, 24, 1, 1, 19, 0, '', 0, 1, 0, 20.7, 710.7, 710.7, 16, '2014-09-18 08:28:27', 0, '2014-09-18 08:28:58', 0, 1, '', NULL),
(191, 30, 93, 1, 0, 41, 'SON', '2014-09-18', 'asdf34345', 15, 30, 2, 21, 1, 1, 19, 0, '', 0, 0, 0, 4679.28, 82667.28, 82667.28, 16, '2014-09-18 08:39:22', 0, '2014-09-18 08:40:19', 0, 1, '', NULL),
(192, 31, 93, 1, 0, 41, 'SON', '2014-09-18', 'asfdd345', 15, 30, 2, 0, 1, 1, 19, 0, '', 0, 0, 0, 294.12, 5196.12, 5196.12, 16, '2014-09-18 08:43:06', 0, '2014-09-18 08:47:04', 0, 1, '', NULL),
(193, 32, 93, 1, 0, 41, 'SON', '2014-09-18', 'asfasf3434', 15, 30, 2, 21, 1, 1, 19, 0, '', 0, 0, 0, 2926.5, 51701.5, 51701.5, 16, '2014-09-18 08:47:47', 0, '2014-09-18 08:48:57', 0, 1, '', NULL),
(194, 33, 93, 1, 0, 40, 'SON', '2014-09-19', 'safasf4343', 15, 30, 2, 24, 1, 1, 19, 0, '', 0, 0, 0, 206.22, 3643.22, 26875.219999999998, 16, '2014-09-19 04:11:36', 0, '2014-09-19 09:32:41', 0, 1, '', NULL),
(195, 34, 93, 1, 0, 41, 'SON', '2014-09-19', 'asdf342', 15, 0, 2, 21, 1, 1, 0, 0, '', 0, 0, 0, 0, 3434, 3434, 16, '2014-09-19 09:29:49', 0, '2014-09-19 09:29:50', 0, 1, '', NULL);

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

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

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

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

--
-- 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'),
(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', 300, 1, 6, 18, 318, 0, 0, 0, 0, 16, '2014-07-07 06:06:10', 16, '2014-07-08 09:06:34'),
(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, 101, 'hasdfasfd245435', 234, 1, 6, 14.04, 248.04, 0, 0, 0, 0, 16, '2014-07-07 06:13:50', 16, '2014-07-09 07:51:24'),
(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'),
(58, 19, 1, 101, 'asdfasd324523', 456, 1, 6, 27.36, 483.36, 0, 0, 0, 0, 16, '2014-07-08 02:21:57', 0, '0000-00-00 00:00:00'),
(59, 19, 2, 101, 'sadf352345', 654, 1, 6, 39.24, 693.24, 0, 0, 0, 0, 16, '2014-07-08 02:22:26', 0, '0000-00-00 00:00:00'),
(81, 75, 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'),
(84, 76, 1, 100, 'trr', 300, 1, 6, 18, 318, 0, 0, 0, 0, 16, '2014-07-07 06:06:10', 16, '2014-07-08 09:06:34'),
(85, 75, 2, 101, 'safg3245', 456, 1, 6, 27.36, 483.36, 0, 0, 0, 0, 16, '2014-07-09 03:07:01', 0, '0000-00-00 00:00:00'),
(86, 0, 2, 101, 'afdasdf345345', 456, 1, 6, 27.36, 483.36, 0, 0, 0, 0, 16, '2014-07-11 01:20:10', 0, '0000-00-00 00:00:00'),
(87, 29, 1, 101, 'sadf2345', 400, 1, 6, 24, 424, 0, 0, 0, 0, 16, '2014-07-11 02:22:15', 16, '2014-07-11 02:23:16'),
(91, 77, 1, 101, 'sadf2345', 400, 1, 6, 24, 424, 0, 0, 0, 0, 16, '2014-07-11 02:22:15', 16, '2014-07-11 02:23:16'),
(92, 78, 1, 101, 'dsfgsd2345', 345, 1, 6, 20.7, 365.7, 0, 0, 0, 0, 16, '2014-07-11 08:25:59', 0, '0000-00-00 00:00:00'),
(93, 79, 1, 101, 'asfd23452', 456, 1, 6, 27.36, 483.36, 0, 0, 0, 0, 16, '2014-07-11 08:38:18', 0, '0000-00-00 00:00:00'),
(94, 80, 1, 101, 'asfasdf3245', 466, 1, 6, 27.96, 493.96, 0, 0, 0, 0, 16, '2014-07-11 08:51:42', 0, '0000-00-00 00:00:00'),
(95, 81, 1, 101, 'asfsa234523', 464, 1, 6, 27.84, 491.84, 0, 0, 0, 0, 16, '2014-07-11 08:59:06', 0, '0000-00-00 00:00:00'),
(96, 81, 2, 102, 'qwer245', 0, 1, 6, 27.18, 453, 0, 0, 0, 0, 16, '2014-07-11 08:59:34', 0, '0000-00-00 00:00:00'),
(97, 89, 1, 101, 'asfsad3452354', 453, 1, 6, 27.18, 480.18, 0, 0, 0, 0, 16, '2014-07-14 00:47:46', 0, '0000-00-00 00:00:00'),
(98, 92, 1, 100, 'sds', 1.1111111111111111e20, 1, 6, 6.666666666666668e18, 1.1777777777777779e20, 0, 0, 0, 0, 16, '2014-07-14 06:58:13', 0, '0000-00-00 00:00:00'),
(100, 95, 1, 101, 'asdf2345', 0, 1, 6, 2.7, 45, 0, 0, 0, 0, 16, '2014-07-16 04:30:27', 0, '0000-00-00 00:00:00'),
(101, 96, 1, 100, 'sds', 1.1111111111111111e20, 1, 6, 6.666666666666668e18, 1.1777777777777779e20, 0, 0, 0, 0, 16, '2014-07-14 06:58:13', 0, '0000-00-00 00:00:00'),
(102, 102, 1, 101, 'swdew', 112, 1, 6, 6.72, 0, 0, 0, 0, 0, 1, '2014-08-05 02:00:22', 0, '0000-00-00 00:00:00'),
(103, 103, 1, 101, 'swdew', 112, 1, 6, 6.72, 0, 0, 0, 0, 0, 1, '2014-08-05 02:00:25', 0, '0000-00-00 00:00:00'),
(104, 104, 1, 101, 'swdew', 112, 1, 6, 6.72, 0, 0, 0, 0, 0, 1, '2014-08-05 02:00:36', 0, '0000-00-00 00:00:00'),
(105, 105, 1, 101, 'swdew', 112, 1, 6, 6.72, 0, 0, 0, 0, 0, 1, '2014-08-05 02:00:38', 0, '0000-00-00 00:00:00'),
(106, 123, 1, 102, 'sds', 12, 4, 0, 0, 12, 0, 0, 0, 0, 1, '2014-08-11 07:42:43', 0, '0000-00-00 00:00:00'),
(107, 127, 1, 101, 'SDS', 1, 5, 0, 0, 0, 0, 0, 0, 0, 1, '2014-08-11 08:12:31', 0, '0000-00-00 00:00:00'),
(108, 128, 1, 101, 'we', 1, 5, 0, 0, 0, 0, 0, 0, 0, 1, '2014-08-11 08:15:48', 0, '0000-00-00 00:00:00'),
(109, 130, 1, 101, 'sdsdf', 34, 1, 6, 2.04, 0, 0, 0, 0, 0, 33, '2014-08-11 08:18:39', 0, '0000-00-00 00:00:00'),
(110, 116, 1, 102, 'H', 1, 4, 0, 0, 1, 0, 0, 0, 0, 1, '2014-08-11 08:48:31', 0, '0000-00-00 00:00:00'),
(111, 126, 1, 290, 'sewa lori', 50, 35, 6, 3, 53, 0, 0, 0, 0, 16, '2014-08-15 07:37:28', 0, '0000-00-00 00:00:00'),
(112, 146, 1, 290, 'sewa lori', 50, 35, 6, 3, 53, 0, 0, 0, 0, 33, '2014-08-15 09:47:02', 16, '2014-08-20 01:34:37'),
(113, 149, 1, 27493, 'asfgsdf3465345', 1234, 98, 6, 74.04, 1308.04, 0, 0, 0, 0, 33, '2014-08-18 02:41:58', 0, '0000-00-00 00:00:00'),
(114, 156, 1, 27494, 'asfdasfd', 234, 98, 6, 14.04, 0, 0, 0, 0, 0, 33, '2014-08-20 03:19:22', 0, '0000-00-00 00:00:00'),
(115, 156, 2, 27494, 'asfsdf245', 0, 99, 6, 20.7, 345, 0, 0, 0, 0, 33, '2014-08-20 03:19:33', 0, '0000-00-00 00:00:00'),
(116, 156, 3, 27494, 'asfsasdf345', 0, 107, 6, 32.58, 543, 0, 0, 0, 0, 33, '2014-08-20 03:19:56', 0, '0000-00-00 00:00:00'),
(117, 157, 1, 290, 'sewa lori', 50, 35, 6, 3, 53, 0, 0, 0, 0, 16, '2014-08-15 07:37:28', 0, '0000-00-00 00:00:00'),
(118, 160, 1, 28370, 'asdfsadf', 2345, 0, 0, 0, 2345, 0, 0, 0, 0, 16, '2014-09-09 04:33:23', 0, '0000-00-00 00:00:00'),
(119, 160, 2, 28370, 'gkkjhkljkhj', 123, 0, 0, 0, 123, 0, 0, 0, 0, 16, '2014-09-09 04:36:17', 0, '0000-00-00 00:00:00'),
(120, 161, 1, 28369, 'asfasfda', 2312, 0, 0, 0, 2312, 0, 0, 0, 0, 16, '2014-09-09 04:41:48', 0, '0000-00-00 00:00:00'),
(121, 163, 1, 28370, 'sfge', 234, 0, 0, 0, 234, 0, 0, 0, 0, 16, '2014-09-09 04:48:17', 0, '0000-00-00 00:00:00'),
(122, 165, 1, 28382, 'asdfasdfasf', 344, 0, 0, 0, 344, 0, 0, 0, 0, 16, '2014-09-09 04:51:20', 0, '0000-00-00 00:00:00'),
(123, 165, 2, 28370, 'asdfasdf', 2345, 0, 0, 0, 2345, 0, 0, 0, 0, 16, '2014-09-09 04:54:02', 0, '0000-00-00 00:00:00'),
(124, 166, 1, 28370, 'asdfa', 345, 0, 0, 0, 345, 0, 0, 0, 0, 16, '2014-09-09 04:55:08', 0, '0000-00-00 00:00:00'),
(125, 166, 2, 28382, 'sdf', 234, 0, 0, 0, 234, 0, 0, 0, 0, 16, '2014-09-09 04:55:22', 0, '0000-00-00 00:00:00'),
(126, 167, 1, 28371, 'swdee', 423, 775, 0, 0, 423, 0, 0, 0, 0, 16, '2014-09-09 04:57:11', 16, '2014-09-09 06:30:18'),
(127, 167, 2, 28382, 'dasdf', 43, 775, 0, 0, 43, 0, 0, 0, 0, 16, '2014-09-09 04:57:31', 16, '2014-09-09 06:30:28'),
(128, 159, 1, 28371, 'asdfasdf', 345, 775, 0, 0, 345, 0, 0, 0, 0, 16, '2014-09-10 03:02:39', 16, '2014-09-10 03:14:34'),
(132, 169, 1, 28360, 'freight charges', 3000, 0, 0, 0, 3000, 0, 0, 0, 0, 42, '2014-09-11 09:14:33', 0, '0000-00-00 00:00:00'),
(133, 172, 1, 28369, 'asdfasdf', 123, 771, 0, 0, 0, 0, 0, 0, 0, 16, '2014-09-16 04:05:39', 0, '0000-00-00 00:00:00'),
(134, 172, 2, 28371, 'ADad234', 0, 769, 6, 14.04, 234, 0, 0, 0, 0, 16, '2014-09-16 04:05:53', 0, '0000-00-00 00:00:00'),
(135, 172, 3, 28370, 'adfsad323', 0, 769, 6, 14.04, 234, 0, 0, 0, 0, 16, '2014-09-16 04:06:40', 0, '0000-00-00 00:00:00'),
(136, 172, 4, 28371, 'qwer234', 0, 769, 6, 14.1, 235, 0, 0, 0, 0, 16, '2014-09-16 04:07:01', 0, '0000-00-00 00:00:00'),
(137, 172, 5, 28370, 'adf2323', 0, 769, 6, 14.04, 234, 0, 0, 0, 0, 16, '2014-09-16 04:07:22', 0, '0000-00-00 00:00:00'),
(138, 173, 1, 28370, 'sdf2344', 353, 769, 6, 21.18, 0, 0, 0, 0, 0, 16, '2014-09-16 04:07:57', 0, '0000-00-00 00:00:00'),
(139, 173, 2, 28369, 'asdfa234123', 0, 772, 0, 0, 343, 0, 0, 0, 0, 16, '2014-09-16 04:08:17', 0, '0000-00-00 00:00:00'),
(140, 177, 1, 28370, 'adfasf', 234, 6, 0, 14.04, 0, 0, 0, 0, 0, 16, '2014-09-17 01:35:10', 0, '0000-00-00 00:00:00'),
(141, 177, 2, 28371, 'asdfasdf', 0, 0, 0, 0, 235, 0, 0, 0, 0, 16, '2014-09-17 01:35:27', 0, '0000-00-00 00:00:00'),
(142, 178, 1, 28370, 'afasdf', 123, 0, 0, 0, 0, 0, 0, 0, 0, 16, '2014-09-17 01:48:00', 0, '0000-00-00 00:00:00'),
(144, 179, 1, 28370, 'Tesr DESC', 234, 770, 6, 14.04, 248.04, 0, 0, 0, 0, 16, '2014-09-17 07:19:48', 16, '2014-09-17 07:21:30'),
(145, 180, 1, 28369, 'Sayem1234', 2313, 6, 0, 138.78, 2451.78, 0, 0, 0, 0, 16, '2014-09-17 07:25:05', 0, '0000-00-00 00:00:00'),
(146, 180, 2, 28370, 'Sayem4321', 54321, 769, 6, 3259.26, 57580.26, 0, 0, 0, 0, 16, '2014-09-17 07:25:42', 0, '0000-00-00 00:00:00'),
(147, 181, 1, 28370, 'Sayem', 12344, 6, 0, 740.64, 13084.64, 0, 0, 0, 0, 16, '2014-09-17 07:43:25', 0, '0000-00-00 00:00:00'),
(148, 182, 1, 28382, 'asdfasdf', 1234, 6, 0, 74.04, 1308.04, 0, 0, 0, 0, 16, '2014-09-17 07:45:00', 0, '0000-00-00 00:00:00'),
(149, 183, 1, 28371, 'Sam1234', 1234, 6, 0, 74.04, 1308.04, 0, 0, 0, 0, 16, '2014-09-17 07:56:39', 0, '0000-00-00 00:00:00'),
(150, 184, 1, 28369, 'asdfasfd', 1234, 6, 0, 74.04, 1308.04, 0, 0, 0, 0, 16, '2014-09-17 08:02:35', 0, '0000-00-00 00:00:00'),
(151, 185, 1, 28382, 'lkjhklj', 7676, 6, 0, 460.56, 8136.56, 0, 0, 0, 0, 16, '2014-09-17 08:04:31', 0, '0000-00-00 00:00:00'),
(152, 186, 1, 28370, 'fsdfgsdfg', 1234, 6, 0, 74.04, 1308.04, 0, 0, 0, 0, 16, '2014-09-17 08:06:31', 0, '0000-00-00 00:00:00'),
(153, 187, 1, 28370, 'Test charge', 54567, 770, 6, 3274.02, 57841.02, 0, 0, 0, 0, 16, '2014-09-17 08:14:05', 16, '2014-09-17 08:24:12'),
(154, 188, 1, 28370, 'asdfasdf', 435, 770, 6, 26.1, 461.1, 0, 0, 0, 0, 16, '2014-09-17 09:17:57', 16, '2014-09-18 01:40:28'),
(155, 188, 2, 28370, 'asdfasdf', 1234, 6, 0, 74.04, 1308.04, 0, 0, 0, 0, 16, '2014-09-17 10:20:44', 16, '2014-09-18 01:21:32'),
(158, 188, 4, 28370, 'asdfasdf', 234, 769, 6, 14.04, 248.04, 0, 0, 0, 0, 16, '2014-09-18 01:27:27', 0, '0000-00-00 00:00:00'),
(160, 189, 1, 28381, 'caj buku cek', 10, 6, 0, 0.6, 10.6, 0, 0, 0, 0, 19, '2014-09-18 07:35:52', 0, '0000-00-00 00:00:00'),
(161, 190, 1, 28371, 'asdf3434', 345, 0, 0, 0, 345, 0, 0, 0, 0, 16, '2014-09-18 08:28:27', 0, '0000-00-00 00:00:00'),
(162, 190, 2, 28370, 'asdf234', 0, 6, 0, 20.7, 345, 0, 0, 0, 0, 16, '2014-09-18 08:28:58', 0, '0000-00-00 00:00:00'),
(163, 191, 1, 28370, 'asffdas342234', 34534, 769, 6, 2072.04, 36606.04, 0, 0, 0, 0, 16, '2014-09-18 08:39:22', 0, '0000-00-00 00:00:00'),
(164, 191, 2, 28369, 'asdf24534', 43454, 778, 6, 2607.24, 46061.24, 0, 0, 0, 0, 16, '2014-09-18 08:39:36', 16, '2014-09-18 08:40:19'),
(165, 192, 1, 28370, 'fasfasdf', 234, 769, 6, 14.04, 248.04, 0, 0, 0, 0, 16, '2014-09-18 08:43:06', 0, '0000-00-00 00:00:00'),
(166, 192, 2, 28371, 'asdfas2324232', 0, 769, 6, 74.04, 1234, 0, 0, 0, 0, 16, '2014-09-18 08:45:54', 0, '0000-00-00 00:00:00'),
(167, 192, 3, 28370, 'asdfasf', 0, 769, 6, 206.04, 3434, 0, 0, 0, 0, 16, '2014-09-18 08:47:03', 0, '0000-00-00 00:00:00'),
(168, 193, 1, 28370, 'asdf3454', 45343, 769, 6, 2720.58, 48063.58, 0, 0, 0, 0, 16, '2014-09-18 08:47:47', 16, '2014-09-18 08:48:57'),
(169, 193, 2, 28382, 'asdf2343', 3432, 770, 6, 205.92, 3637.92, 0, 0, 0, 0, 16, '2014-09-18 08:48:05', 16, '2014-09-18 08:49:01'),
(170, 194, 1, 28370, 'asdfa2423', 3435, 770, 6, 206.1, 3641.1, 0, 0, 0, 0, 16, '2014-09-19 04:11:36', 16, '2014-09-19 04:12:00'),
(171, 195, 1, 28370, 'asdfas', 3434, 775, 0, 0, 3434, 0, 0, 0, 0, 16, '2014-09-19 09:29:49', 0, '0000-00-00 00:00:00'),
(172, 194, 2, 28370, 'asdfs', 23232, 775, 0, 0, 23232, 0, 0, 0, 0, 16, '2014-09-19 09:32:41', 0, '0000-00-00 00:00:00');

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

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

CREATE TABLE IF NOT EXISTS `comp_sales_invoice_detail` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `invoiceID` int(11) NOT NULL,
  `doID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `itemID` int(11) NOT NULL,
  `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=36 ;

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

INSERT INTO `comp_sales_invoice_detail` (`ID`, `invoiceID`, `doID`, `lineNo`, `itemID`, `quantity`, `unitPrice`, `amountExcludedTax`, `taxID`, `taxRate`, `taxAmount`, `amountIncludedTax`, `accountID`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`) VALUES
(1, 31, 0, 1, 7, 1, 1, 1, 0, 0, 0, 1, 0, 1, '2014-09-02 04:48:20', 0, '0000-00-00 00:00:00'),
(2, 159, 0, 1, 26, 6, 123, 738, 775, 0, 0, 738, 0, 16, '2014-09-10 03:00:24', 16, '0000-00-00 00:00:00'),
(3, 159, 0, 2, 29, 3, 1, 3, 775, 0, 0, 3, 0, 16, '2014-09-10 03:00:26', 16, '0000-00-00 00:00:00'),
(4, 161, 0, 1, 26, 4, 123, 492, 0, 0, 0, 492, 0, 16, '2014-09-09 04:40:09', 0, '0000-00-00 00:00:00'),
(5, 161, 0, 2, 29, 4, 2000, 8000, 0, 0, 0, 8000, 0, 16, '2014-09-09 04:41:37', 0, '0000-00-00 00:00:00'),
(6, 161, 0, 3, 27, 2, 123, 246, 0, 0, 0, 246, 0, 16, '2014-09-09 04:42:34', 0, '0000-00-00 00:00:00'),
(7, 162, 0, 1, 29, 3, 2000, 6000, 0, 0, 0, 6000, 0, 16, '2014-09-09 04:43:20', 0, '0000-00-00 00:00:00'),
(8, 163, 0, 1, 26, 3, 123, 369, 0, 0, 0, 369, 0, 16, '2014-09-09 04:48:04', 0, '0000-00-00 00:00:00'),
(9, 164, 0, 1, 26, 3, 123, 369, 0, 0, 0, 369, 0, 16, '2014-09-09 04:50:10', 0, '0000-00-00 00:00:00'),
(10, 166, 0, 1, 29, 2, 2000, 4000, 0, 0, 0, 4000, 0, 16, '2014-09-09 04:55:50', 0, '0000-00-00 00:00:00'),
(11, 167, 0, 1, 29, 2, 0, 0, 775, 0, 0, 0, 0, 16, '2014-09-09 06:30:39', 16, '0000-00-00 00:00:00'),
(12, 167, 0, 2, 27, 2, 210, 420, 775, 0, 0, 420, 0, 16, '2014-09-09 06:30:48', 16, '0000-00-00 00:00:00'),
(14, 169, 0, 1, 29, 7, 2000, 14000, 0, 6, 0, 14000, 0, 42, '2014-09-11 09:14:43', 0, '0000-00-00 00:00:00'),
(15, 0, 0, 1, 26, 1, 0, 0, 769, 6, 0, 0, 0, 16, '2014-09-15 06:28:06', 0, '0000-00-00 00:00:00'),
(16, 0, 0, 1, 26, 1, 0, 0, 769, 6, 0, 0, 0, 16, '2014-09-15 06:28:10', 0, '0000-00-00 00:00:00'),
(17, 170, 0, 1, 29, 1, 2000, 2000, 0, 1, 0, 2000, 0, 16, '2014-09-15 06:30:20', 0, '0000-00-00 00:00:00'),
(18, 171, 17, 1, 32, 200, 3, 600, 1182, 0, 36, 636, 0, 50, '2014-09-16 02:35:29', 0, '0000-00-00 00:00:00'),
(19, 173, 7, 1, 29, 1, 2000, 2000, 769, 0, 120, 2120, 0, 16, '2014-09-16 04:07:57', 0, '0000-00-00 00:00:00'),
(20, 174, 18, 1, 39, 2, 120000, 240000, 1308, 0, 14400, 254400, 0, 19, '2014-09-16 05:54:33', 0, '0000-00-00 00:00:00'),
(21, 175, 0, 1, 39, 2, 50000, 100000, 1308, 6, 6000, 106000, 0, 19, '2014-09-16 06:36:11', 0, '0000-00-00 00:00:00'),
(22, 176, 15, 1, 27, 20, 20, 400, 774, 0, 0, 400, 0, 16, '2014-09-16 08:05:31', 0, '0000-00-00 00:00:00'),
(23, 178, 6, 1, 26, 100, 1, 100, 769, 0, 6, 106, 0, 16, '2014-09-17 01:48:00', 0, '0000-00-00 00:00:00'),
(24, 178, 11, 2, 25, 1, 1, 1, 769, 0, 0.06, 1.06, 0, 16, '2014-09-17 01:48:00', 0, '0000-00-00 00:00:00'),
(25, 178, 11, 3, 27, 1, 10, 10, 769, 0, 0.6, 10.6, 0, 16, '2014-09-17 01:48:00', 0, '0000-00-00 00:00:00'),
(27, 179, 20, 1, 29, 3, 100, 300, 770, 0, 18, 318, 0, 16, '2014-09-17 07:19:48', 0, '0000-00-00 00:00:00'),
(28, 180, 13, 1, 29, 1, 2, 2, 769, 0, 0.12, 2.12, 0, 16, '2014-09-17 07:25:05', 0, '0000-00-00 00:00:00'),
(29, 180, 13, 2, 26, 10, 10, 100, 769, 0, 6, 106, 0, 16, '2014-09-17 07:25:05', 0, '0000-00-00 00:00:00'),
(30, 183, 13, 1, 25, 1, 1, 1, 769, 0, 0.06, 1.06, 0, 16, '2014-09-17 07:56:39', 0, '0000-00-00 00:00:00'),
(31, 184, 16, 1, 25, 1, 1, 1, 769, 0, 0.06, 1.06, 0, 16, '2014-09-17 08:02:34', 0, '0000-00-00 00:00:00'),
(32, 185, 16, 1, 26, 10, 10, 100, 769, 0, 6, 106, 0, 16, '2014-09-17 08:04:31', 0, '0000-00-00 00:00:00'),
(33, 187, 19, 1, 25, 2, 456, 912, 769, 6, 54.72, 966.72, 0, 16, '2014-09-17 08:23:38', 16, '0000-00-00 00:00:00'),
(34, 188, 19, 1, 27, 5, 1, 5, 770, 6, 0.3, 5.3, 0, 16, '2014-09-18 01:38:28', 16, '0000-00-00 00:00:00'),
(35, 194, 21, 1, 25, 2, 1, 2, 770, 0, 0.12, 2.12, 0, 16, '2014-09-19 04:11:36', 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,
  `serialNo` int(16) NOT NULL,
  `companyID` int(11) NOT NULL,
  `invoiceID` int(11) NOT NULL,
  `customerID` int(11) DEFAULT NULL,
  `OrderNo` varchar(32) DEFAULT NULL,
  `formNo` varchar(32) DEFAULT NULL,
  `currencyID` int(11) DEFAULT NULL,
  `exchangeRate` double DEFAULT '1',
  `salesOrderDate` date DEFAULT NULL,
  `dateRequired` date DEFAULT NULL,
  `deliveryToID` int(11) DEFAULT NULL,
  `salesPerson` int(11) DEFAULT NULL,
  `memo` varchar(128) DEFAULT NULL,
  `supplierID` int(11) DEFAULT NULL,
  `totalAmount` double DEFAULT NULL,
  `totalReceivable` double DEFAULT NULL,
  `status` tinyint(1) DEFAULT '1',
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `is_delete` smallint(16) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=20 ;

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

INSERT INTO `comp_sales_order` (`ID`, `serialNo`, `companyID`, `invoiceID`, `customerID`, `OrderNo`, `formNo`, `currencyID`, `exchangeRate`, `salesOrderDate`, `dateRequired`, `deliveryToID`, `salesPerson`, `memo`, `supplierID`, `totalAmount`, `totalReceivable`, `status`, `createdBy`, `createdTS`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(1, 0, 1, 0, 12, 'SON20140718', 'SON', 1, 1, '2014-06-11', NULL, 8, 6, 'test memo', NULL, 29400, NULL, 1, 1, '2014-09-08 06:27:39', 1, '0000-00-00 00:00:00', 0),
(2, 0, 1, 0, 15, 'SON20140718', 'SON', 2, 1, '2014-06-18', NULL, 7, 0, '', NULL, 542540, NULL, 1, 1, '2014-09-08 06:27:39', 1, '0000-00-00 00:00:00', 0),
(3, 0, 1, 0, 12, 'SON20140718', 'SON', 1, 1, '2014-06-18', NULL, 7, 0, '', NULL, 530200, NULL, 1, 1, '2014-09-08 06:27:39', 1, '0000-00-00 00:00:00', 0),
(4, 0, 1, 0, 16, 'SON20140718', 'SON', 1, 1, '2014-06-18', NULL, 0, 0, '', NULL, 1000000, NULL, 1, 1, '2014-09-08 06:27:39', 0, '0000-00-00 00:00:00', 0),
(5, 0, 1, 0, 20, 'SON20140718', 'SON', 1, 1, '2014-06-18', NULL, 0, 0, '', NULL, 35000, NULL, 1, 1, '2014-09-08 06:27:39', 0, '0000-00-00 00:00:00', 0),
(6, 0, 15, 0, 17, 'SON20140718', 'SON', 1, 1, '2014-07-17', NULL, 6, 9, '', NULL, 250, NULL, 1, 16, '2014-09-08 06:27:39', 0, '0000-00-00 00:00:00', 0),
(7, 0, 1, 0, 12, 'SON20140718', 'SON', 1, 1, '2014-07-18', NULL, 7, 0, '', NULL, 69, NULL, 1, 16, '2014-09-08 06:27:39', 0, '0000-00-00 00:00:00', 0),
(8, 0, 1, 0, 12, 'SON20140718', 'SON', 1, 1, '2014-07-18', NULL, 7, 6, '', NULL, 584, NULL, 1, 16, '2014-09-08 06:27:39', 16, '0000-00-00 00:00:00', 0),
(9, 1, 81, 0, 34, 'SON', 'SON', 1, 1, '2014-08-05', NULL, 0, 22, '', NULL, 170, NULL, 1, 29, '2014-09-08 06:27:39', 0, '0000-00-00 00:00:00', 0),
(10, 1, 93, 0, 41, 'SON', 'SON', 1, 1, '2014-09-08', NULL, 21, 37, '', NULL, 4000, NULL, 1, 43, '2014-09-08 06:27:39', 0, '0000-00-00 00:00:00', 0),
(11, 1, 1, 0, 12, 'SON20140908', 'SON20140908', 1, 1, '2014-09-08', NULL, 8, 30, 'sdacds', NULL, 200, NULL, 1, 16, '2014-09-08 07:20:31', 16, '0000-00-00 00:00:00', 0),
(12, 2, 1, 0, 15, 'SON20140908', 'SON20140908', 2, 3.1305, '2014-09-08', NULL, 14, 6, 'sds', NULL, 1, NULL, 1, 16, '2014-09-08 07:21:56', 0, '0000-00-00 00:00:00', 0),
(13, 1, 84, 0, 35, 'SON', 'SON', 10, 1, '2014-09-08', NULL, 18, 29, '', NULL, 1825, NULL, 1, 33, '2014-09-08 10:17:19', 33, '0000-00-00 00:00:00', 0),
(14, 2, 93, 0, 40, 'SON', 'SON', 1, 1, '2014-09-09', NULL, 0, 36, '', NULL, 22, NULL, 1, 16, '2014-09-09 01:28:01', 16, '0000-00-00 00:00:00', 0),
(15, 1, 15, 0, 17, 'SON', 'SON', 1, 1, '2014-09-09', NULL, 6, 8, '', NULL, 1000, NULL, 1, 16, '2014-09-09 02:00:56', 0, '0000-00-00 00:00:00', 0),
(16, 3, 93, 0, 41, 'SON', 'SON', 1, 1, '2014-09-10', NULL, 21, 0, '', NULL, 1000, NULL, 1, 16, '2014-09-10 07:47:31', 0, '0000-00-00 00:00:00', 0),
(17, 4, 93, 0, 40, 'SON', 'SON', 1, 1, '2014-09-10', NULL, 0, 0, '', NULL, 100, NULL, 1, 16, '2014-09-10 09:40:28', 0, '0000-00-00 00:00:00', 0),
(18, 1, 103, 0, 44, '123', '123', 1, 1, '2014-09-16', NULL, 0, 0, '', NULL, 600, NULL, 1, 50, '2014-09-16 02:12:20', 0, '0000-00-00 00:00:00', 0),
(19, 1, 105, 0, 45, 'SON', 'SON', 1, 1, '2014-09-16', NULL, 23, 45, '', NULL, 240000, NULL, 1, 19, '2014-09-16 05:48:00', 0, '0000-00-00 00:00:00', 0);

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

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

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

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

--
-- 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
(3, 1, 15, 8, 2, 2, '2014-06-05', '2014-06-24', 111111111111, 16, 1, '2014-06-05 09:14:48', '2014-09-08 09:33:30'),
(4, 1, 15, 1, 2, 2, '2014-07-21', '2014-07-21', 345.44, 0, 16, '2014-07-21 03:38:48', '2014-07-21 03:38:48'),
(5, 1, 15, 1, 2, 2, '2014-07-21', '2014-07-21', 3345, 0, 16, '2014-07-21 03:47:42', '2014-07-21 03:47:42'),
(6, 1, 15, 1, 0, 2, '2014-07-21', '2014-07-21', 245234, 0, 16, '2014-07-21 04:03:07', '2014-07-21 04:03:07'),
(7, 1, 12, 13, 0, 2, '2014-07-21', '2014-07-21', 1111, 0, 16, '2014-07-21 04:03:44', '2014-07-21 04:03:44'),
(9, 1, 12, 1, 0, 2, '2014-07-21', '2014-07-21', 54321, 0, 16, '2014-07-21 04:15:45', '2014-07-21 04:15:45'),
(10, 1, 12, 1, 0, 13, '2014-07-21', '2014-07-30', 1234567, 0, 16, '2014-07-21 04:16:46', '2014-07-21 04:16:46'),
(13, 1, 15, 4, 2, 12, '2014-07-24', '2014-07-24', 3456, 0, 16, '2014-07-24 03:53:18', '2014-07-24 03:53:18'),
(14, 87, 38, 21, 1, 3, '2014-01-01', '2014-08-31', 1000, 0, 35, '2014-08-21 04:11:56', '2014-08-21 04:11:56'),
(15, 87, 38, 21, 1, 3, '2014-08-21', '2014-08-21', 2000, 0, 35, '2014-08-21 04:12:57', '2014-08-21 04:12:57'),
(16, 1, 12, 10, 1, 13, '2005-09-23', '2015-09-25', 100, 0, 1, '2014-09-02 03:56:24', '2014-09-02 03:56:24'),
(17, 1, -1, 7, 0, 13, '2006-09-06', '2016-09-13', 50, 0, 1, '2014-09-02 06:25:20', '2014-09-02 06:25:20'),
(18, 1, -1, 1, 1, 13, '2005-09-15', '2017-09-20', 50, 0, 1, '2014-09-02 07:06:09', '2014-09-02 07:06:09'),
(19, 1, 16, 4, 1, 2, '2014-09-03', '2014-09-20', 100, 0, 16, '2014-09-03 10:09:20', '2014-09-03 10:09:20'),
(20, 93, 40, 29, 1, 3, '2014-09-05', '2014-12-05', 2000, 42, 43, '2014-09-05 07:45:57', '2014-09-12 03:00:09'),
(21, 1, -1, 4, 0, 13, '2014-09-08', '2014-09-08', 200, 0, 16, '2014-09-08 09:12:42', '2014-09-08 09:12:42'),
(22, 1, 12, 10, 1, 13, '2014-09-08', '2014-09-08', 12, 0, 16, '2014-09-08 09:18:49', '2014-09-08 09:18:49'),
(23, 1, -1, 4, 11, 13, '2014-09-08', '2014-09-08', 122, 0, 16, '2014-09-08 09:32:56', '2014-09-08 09:32:56'),
(24, 1, 15, 2, 2, 1, '2014-09-08', '2014-09-08', 22, 16, 16, '2014-09-08 09:34:01', '2014-09-08 09:34:21'),
(26, 93, 40, 26, 1, 2, '2014-09-01', '2014-09-30', 2123, 0, 16, '2014-09-12 02:55:55', '2014-09-12 02:55:55'),
(27, 93, 40, 27, 1, 2, '2014-09-01', '2014-09-30', 4345, 0, 16, '2014-09-12 02:56:40', '2014-09-12 02:56:40'),
(28, 93, 41, 25, 1, 3, '2014-09-12', '2014-12-31', 1500, 42, 42, '2014-09-12 03:02:23', '2014-09-12 03:02:39'),
(29, 1, 12, 4, 1, 13, '2014-09-22', '2014-09-22', 23, 0, 16, '2014-09-22 03:33:04', '2014-09-22 03:33:04');

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

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

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

--
-- Dumping data for table `comp_section`
--

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

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

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

--
-- 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),
(4, 1, 1, '201407', 0, 0, 0, 0),
(5, 1, 20, '201407', 0, 0, 0, 0),
(6, 1, 23, '201407', 0, 0, 0, 0),
(7, 1, 24, '201407', 0, 0, 0, 0),
(8, 27, 25, '201407', 0, 0, 0, 0),
(9, 15, 26, '201407', 0, 685.7, 0, -685.7),
(10, 15, 27, '201407', 0, 0, 0, 0),
(11, 15, 28, '201407', 0, 0, 0, 0),
(12, 45, 29, '201407', 0, 0, 0, 0),
(13, 57, 30, '201407', 0, 0, 0, 0),
(14, 1, 31, '201407', 0, 0, 0, 0),
(15, 81, 32, '201407', 0, 0, 0, 0);

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

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

--
-- 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'),
(157, 1, 1, '2014-07-09', 0, 0, 0, 0, '2014-07-08 16:00:00'),
(158, 1, 20, '2014-07-09', 0, 0, 0, 0, '2014-07-08 16:00:00'),
(159, 1, 23, '2014-07-09', 0, 0, 0, 0, '2014-07-08 16:00:00'),
(160, 1, 24, '2014-07-09', 0, 0, 0, 0, '2014-07-08 16:00:00'),
(161, 27, 25, '2014-07-09', 0, 0, 0, 0, '2014-07-08 16:00:00'),
(162, 15, 26, '2014-07-09', 0, 0, 0, 0, '2014-07-08 16:00:00'),
(163, 15, 27, '2014-07-09', 0, 0, 0, 0, '2014-07-08 16:00:00'),
(164, 15, 28, '2014-07-09', 0, 0, 0, 0, '2014-07-08 16:00:00'),
(165, 45, 29, '2014-07-09', 0, 0, 0, 0, '2014-07-08 16:00:00'),
(172, 1, 1, '2014-07-10', 0, 0, 0, 0, '2014-07-09 16:00:00'),
(173, 1, 20, '2014-07-10', 0, 0, 0, 0, '2014-07-09 16:00:00'),
(174, 1, 23, '2014-07-10', 0, 0, 0, 0, '2014-07-09 16:00:00'),
(175, 1, 24, '2014-07-10', 0, 0, 0, 0, '2014-07-09 16:00:00'),
(176, 27, 25, '2014-07-10', 0, 0, 0, 0, '2014-07-09 16:00:00'),
(177, 15, 26, '2014-07-10', 0, 0, 0, 0, '2014-07-09 16:00:00'),
(178, 15, 27, '2014-07-10', 0, 0, 0, 0, '2014-07-09 16:00:00'),
(179, 15, 28, '2014-07-10', 0, 0, 0, 0, '2014-07-09 16:00:00'),
(180, 45, 29, '2014-07-10', 0, 0, 0, 0, '2014-07-09 16:00:00'),
(181, 57, 30, '2014-07-10', 0, 0, 0, 0, '2014-07-09 16:00:00'),
(182, 1, 31, '2014-07-10', 0, 0, 0, 0, '2014-07-09 16:00:00'),
(187, 1, 1, '2014-07-11', 0, 0, 0, 0, '2014-07-10 16:00:28'),
(188, 1, 20, '2014-07-11', 0, 0, 0, 0, '2014-07-10 16:00:28'),
(189, 1, 23, '2014-07-11', 0, 0, 0, 0, '2014-07-10 16:00:28'),
(190, 1, 24, '2014-07-11', 0, 0, 0, 0, '2014-07-10 16:00:28'),
(191, 27, 25, '2014-07-11', 0, 0, 0, 0, '2014-07-10 16:00:28'),
(192, 15, 26, '2014-07-11', 0, 0, 0, 0, '2014-07-10 16:00:28'),
(193, 15, 27, '2014-07-11', 0, 0, 0, 0, '2014-07-10 16:00:28'),
(194, 15, 28, '2014-07-11', 0, 0, 0, 0, '2014-07-10 16:00:28'),
(195, 45, 29, '2014-07-11', 0, 0, 0, 0, '2014-07-10 16:00:28'),
(196, 57, 30, '2014-07-11', 0, 0, 0, 0, '2014-07-10 16:00:28'),
(197, 1, 31, '2014-07-11', 0, 0, 0, 0, '2014-07-10 16:00:28'),
(202, 1, 1, '2014-07-12', 0, 0, 0, 0, '2014-07-11 16:00:04'),
(203, 1, 20, '2014-07-12', 0, 0, 0, 0, '2014-07-11 16:00:04'),
(204, 1, 23, '2014-07-12', 0, 0, 0, 0, '2014-07-11 16:00:04'),
(205, 1, 24, '2014-07-12', 0, 0, 0, 0, '2014-07-11 16:00:04'),
(206, 27, 25, '2014-07-12', 0, 0, 0, 0, '2014-07-11 16:00:04'),
(207, 15, 26, '2014-07-12', 0, 0, 0, 0, '2014-07-11 16:00:04'),
(208, 15, 27, '2014-07-12', 0, 0, 0, 0, '2014-07-11 16:00:04'),
(209, 15, 28, '2014-07-12', 0, 0, 0, 0, '2014-07-11 16:00:04'),
(210, 45, 29, '2014-07-12', 0, 0, 0, 0, '2014-07-11 16:00:04'),
(211, 57, 30, '2014-07-12', 0, 0, 0, 0, '2014-07-11 16:00:04'),
(212, 1, 31, '2014-07-12', 0, 0, 0, 0, '2014-07-11 16:00:04'),
(217, 1, 1, '2014-07-13', 0, 0, 0, 0, '2014-07-12 16:00:00'),
(218, 1, 20, '2014-07-13', 0, 0, 0, 0, '2014-07-12 16:00:00'),
(219, 1, 23, '2014-07-13', 0, 0, 0, 0, '2014-07-12 16:00:00'),
(220, 1, 24, '2014-07-13', 0, 0, 0, 0, '2014-07-12 16:00:00'),
(221, 27, 25, '2014-07-13', 0, 0, 0, 0, '2014-07-12 16:00:00'),
(222, 15, 26, '2014-07-13', 0, 0, 0, 0, '2014-07-12 16:00:00'),
(223, 15, 27, '2014-07-13', 0, 0, 0, 0, '2014-07-12 16:00:00'),
(224, 15, 28, '2014-07-13', 0, 0, 0, 0, '2014-07-12 16:00:00'),
(225, 45, 29, '2014-07-13', 0, 0, 0, 0, '2014-07-12 16:00:00'),
(226, 57, 30, '2014-07-13', 0, 0, 0, 0, '2014-07-12 16:00:00'),
(227, 1, 31, '2014-07-13', 0, 0, 0, 0, '2014-07-12 16:00:00'),
(232, 1, 1, '2014-07-14', 0, 0, 0, 0, '2014-07-13 16:00:00'),
(233, 1, 20, '2014-07-14', 0, 0, 0, 0, '2014-07-13 16:00:00'),
(234, 1, 23, '2014-07-14', 0, 0, 0, 0, '2014-07-13 16:00:00'),
(235, 1, 24, '2014-07-14', 0, 0, 0, 0, '2014-07-13 16:00:00'),
(236, 27, 25, '2014-07-14', 0, 0, 0, 0, '2014-07-13 16:00:00'),
(237, 15, 26, '2014-07-14', 0, 0, 0, 0, '2014-07-13 16:00:00'),
(238, 15, 27, '2014-07-14', 0, 0, 0, 0, '2014-07-13 16:00:00'),
(239, 15, 28, '2014-07-14', 0, 0, 0, 0, '2014-07-13 16:00:00'),
(240, 45, 29, '2014-07-14', 0, 0, 0, 0, '2014-07-13 16:00:00'),
(241, 57, 30, '2014-07-14', 0, 0, 0, 0, '2014-07-13 16:00:00'),
(242, 1, 31, '2014-07-14', 0, 0, 0, 0, '2014-07-13 16:00:00'),
(247, 1, 1, '2014-07-15', 0, 0, 0, 0, '2014-07-14 16:00:00'),
(248, 1, 20, '2014-07-15', 0, 0, 0, 0, '2014-07-14 16:00:00'),
(249, 1, 23, '2014-07-15', 0, 0, 0, 0, '2014-07-14 16:00:00'),
(250, 1, 24, '2014-07-15', 0, 0, 0, 0, '2014-07-14 16:00:00'),
(251, 27, 25, '2014-07-15', 0, 0, 0, 0, '2014-07-14 16:00:00'),
(252, 15, 26, '2014-07-15', 0, 0, 0, 0, '2014-07-14 16:00:00'),
(253, 15, 27, '2014-07-15', 0, 0, 0, 0, '2014-07-14 16:00:00'),
(254, 15, 28, '2014-07-15', 0, 0, 0, 0, '2014-07-14 16:00:00'),
(255, 45, 29, '2014-07-15', 0, 0, 0, 0, '2014-07-14 16:00:00'),
(256, 57, 30, '2014-07-15', 0, 0, 0, 0, '2014-07-14 16:00:00'),
(257, 1, 31, '2014-07-15', 0, 0, 0, 0, '2014-07-14 16:00:00'),
(262, 1, 1, '2014-07-16', 0, 0, 0, 0, '2014-07-15 16:00:00'),
(263, 1, 20, '2014-07-16', 0, 0, 0, 0, '2014-07-15 16:00:00'),
(264, 1, 23, '2014-07-16', 0, 0, 0, 0, '2014-07-15 16:00:00'),
(265, 1, 24, '2014-07-16', 0, 0, 0, 0, '2014-07-15 16:00:00'),
(266, 27, 25, '2014-07-16', 0, 0, 0, 0, '2014-07-15 16:00:00'),
(267, 15, 26, '2014-07-16', 0, 0, 0, 0, '2014-07-15 16:00:00'),
(268, 15, 27, '2014-07-16', 0, 0, 0, 0, '2014-07-15 16:00:00'),
(269, 15, 28, '2014-07-16', 0, 0, 0, 0, '2014-07-15 16:00:00'),
(270, 45, 29, '2014-07-16', 0, 0, 0, 0, '2014-07-15 16:00:00'),
(271, 57, 30, '2014-07-16', 0, 0, 0, 0, '2014-07-15 16:00:00'),
(272, 1, 31, '2014-07-16', 0, 0, 0, 0, '2014-07-15 16:00:00'),
(277, 1, 1, '2014-07-17', 0, 0, 0, 0, '2014-07-16 16:00:00'),
(278, 1, 20, '2014-07-17', 0, 0, 0, 0, '2014-07-16 16:00:00'),
(279, 1, 23, '2014-07-17', 0, 0, 0, 0, '2014-07-16 16:00:00'),
(280, 1, 24, '2014-07-17', 0, 0, 0, 0, '2014-07-16 16:00:00'),
(281, 27, 25, '2014-07-17', 0, 0, 0, 0, '2014-07-16 16:00:00'),
(282, 15, 26, '2014-07-17', 0, 0, 0, 0, '2014-07-16 16:00:00'),
(283, 15, 27, '2014-07-17', 0, 0, 0, 0, '2014-07-16 16:00:00'),
(284, 15, 28, '2014-07-17', 0, 0, 0, 0, '2014-07-16 16:00:00'),
(285, 45, 29, '2014-07-17', 0, 0, 0, 0, '2014-07-16 16:00:00'),
(286, 57, 30, '2014-07-17', 0, 0, 0, 0, '2014-07-16 16:00:00'),
(287, 1, 31, '2014-07-17', 0, 0, 0, 0, '2014-07-16 16:00:00'),
(292, 1, 1, '2014-07-18', 0, 0, 0, 0, '2014-07-17 16:00:30'),
(293, 1, 20, '2014-07-18', 0, 0, 0, 0, '2014-07-17 16:00:30'),
(294, 1, 23, '2014-07-18', 0, 0, 0, 0, '2014-07-17 16:00:30'),
(295, 1, 24, '2014-07-18', 0, 0, 0, 0, '2014-07-17 16:00:30'),
(296, 27, 25, '2014-07-18', 0, 0, 0, 0, '2014-07-17 16:00:30'),
(297, 15, 26, '2014-07-18', 0, 0, 0, 0, '2014-07-17 16:00:30'),
(298, 15, 27, '2014-07-18', 0, 0, 0, 0, '2014-07-17 16:00:30'),
(299, 15, 28, '2014-07-18', 0, 0, 0, 0, '2014-07-17 16:00:30'),
(300, 45, 29, '2014-07-18', 0, 0, 0, 0, '2014-07-17 16:00:30'),
(301, 57, 30, '2014-07-18', 0, 0, 0, 0, '2014-07-17 16:00:30'),
(302, 1, 31, '2014-07-18', 0, 0, 0, 0, '2014-07-17 16:00:30'),
(307, 1, 1, '2014-07-19', 0, 0, 0, 0, '2014-07-18 16:00:03'),
(308, 1, 20, '2014-07-19', 0, 0, 0, 0, '2014-07-18 16:00:03'),
(309, 1, 23, '2014-07-19', 0, 0, 0, 0, '2014-07-18 16:00:03'),
(310, 1, 24, '2014-07-19', 0, 0, 0, 0, '2014-07-18 16:00:03'),
(311, 27, 25, '2014-07-19', 0, 0, 0, 0, '2014-07-18 16:00:03'),
(312, 15, 26, '2014-07-19', 0, 0, 0, 0, '2014-07-18 16:00:03'),
(313, 15, 27, '2014-07-19', 0, 0, 0, 0, '2014-07-18 16:00:03'),
(314, 15, 28, '2014-07-19', 0, 0, 0, 0, '2014-07-18 16:00:03'),
(315, 45, 29, '2014-07-19', 0, 0, 0, 0, '2014-07-18 16:00:03'),
(316, 57, 30, '2014-07-19', 0, 0, 0, 0, '2014-07-18 16:00:03'),
(317, 1, 31, '2014-07-19', 0, 0, 0, 0, '2014-07-18 16:00:03'),
(322, 1, 1, '2014-07-20', 0, 0, 0, 0, '2014-07-19 16:00:00'),
(323, 1, 20, '2014-07-20', 0, 0, 0, 0, '2014-07-19 16:00:00'),
(324, 1, 23, '2014-07-20', 0, 0, 0, 0, '2014-07-19 16:00:00'),
(325, 1, 24, '2014-07-20', 0, 0, 0, 0, '2014-07-19 16:00:00'),
(326, 27, 25, '2014-07-20', 0, 0, 0, 0, '2014-07-19 16:00:00'),
(327, 15, 26, '2014-07-20', 0, 0, 0, 0, '2014-07-19 16:00:00'),
(328, 15, 27, '2014-07-20', 0, 0, 0, 0, '2014-07-19 16:00:00'),
(329, 15, 28, '2014-07-20', 0, 0, 0, 0, '2014-07-19 16:00:00'),
(330, 45, 29, '2014-07-20', 0, 0, 0, 0, '2014-07-19 16:00:00'),
(331, 57, 30, '2014-07-20', 0, 0, 0, 0, '2014-07-19 16:00:00'),
(332, 1, 31, '2014-07-20', 0, 0, 0, 0, '2014-07-19 16:00:00'),
(337, 1, 1, '2014-07-21', 0, 0, 0, 0, '2014-07-20 16:00:00'),
(338, 1, 20, '2014-07-21', 0, 0, 0, 0, '2014-07-20 16:00:00'),
(339, 1, 23, '2014-07-21', 0, 0, 0, 0, '2014-07-20 16:00:00'),
(340, 1, 24, '2014-07-21', 0, 0, 0, 0, '2014-07-20 16:00:00'),
(341, 27, 25, '2014-07-21', 0, 0, 0, 0, '2014-07-20 16:00:00'),
(342, 15, 26, '2014-07-21', 0, 0, 0, 0, '2014-07-20 16:00:00'),
(343, 15, 27, '2014-07-21', 0, 0, 0, 0, '2014-07-20 16:00:00'),
(344, 15, 28, '2014-07-21', 0, 0, 0, 0, '2014-07-20 16:00:00'),
(345, 45, 29, '2014-07-21', 0, 0, 0, 0, '2014-07-20 16:00:00'),
(346, 57, 30, '2014-07-21', 0, 0, 0, 0, '2014-07-20 16:00:00'),
(347, 1, 31, '2014-07-21', 0, 0, 0, 0, '2014-07-20 16:00:00'),
(352, 1, 1, '2014-07-22', 0, 0, 0, 0, '2014-07-21 16:00:00'),
(353, 1, 20, '2014-07-22', 0, 0, 0, 0, '2014-07-21 16:00:00'),
(354, 1, 23, '2014-07-22', 0, 0, 0, 0, '2014-07-21 16:00:00'),
(355, 1, 24, '2014-07-22', 0, 0, 0, 0, '2014-07-21 16:00:00'),
(356, 27, 25, '2014-07-22', 0, 0, 0, 0, '2014-07-21 16:00:00'),
(357, 15, 26, '2014-07-22', 0, 0, 0, 0, '2014-07-21 16:00:00'),
(358, 15, 27, '2014-07-22', 0, 0, 0, 0, '2014-07-21 16:00:00'),
(359, 15, 28, '2014-07-22', 0, 0, 0, 0, '2014-07-21 16:00:00'),
(360, 45, 29, '2014-07-22', 0, 0, 0, 0, '2014-07-21 16:00:00'),
(361, 57, 30, '2014-07-22', 0, 0, 0, 0, '2014-07-21 16:00:00'),
(362, 1, 31, '2014-07-22', 0, 0, 0, 0, '2014-07-21 16:00:00'),
(363, 81, 32, '2014-07-22', 0, 0, 0, 0, '2014-07-21 16:00:00'),
(367, 1, 1, '2014-07-23', 0, 0, 0, 0, '2014-07-22 16:00:00'),
(368, 1, 20, '2014-07-23', 0, 0, 0, 0, '2014-07-22 16:00:00'),
(369, 1, 23, '2014-07-23', 0, 0, 0, 0, '2014-07-22 16:00:00'),
(370, 1, 24, '2014-07-23', 0, 0, 0, 0, '2014-07-22 16:00:00'),
(371, 27, 25, '2014-07-23', 0, 0, 0, 0, '2014-07-22 16:00:00'),
(372, 15, 26, '2014-07-23', 0, 0, 0, 0, '2014-07-22 16:00:00'),
(373, 15, 27, '2014-07-23', 0, 0, 0, 0, '2014-07-22 16:00:00'),
(374, 15, 28, '2014-07-23', 0, 0, 0, 0, '2014-07-22 16:00:00'),
(375, 45, 29, '2014-07-23', 0, 0, 0, 0, '2014-07-22 16:00:00'),
(376, 57, 30, '2014-07-23', 0, 0, 0, 0, '2014-07-22 16:00:00'),
(377, 1, 31, '2014-07-23', 0, 0, 0, 0, '2014-07-22 16:00:00'),
(378, 81, 32, '2014-07-23', 0, 0, 0, 0, '2014-07-22 16:00:00'),
(382, 1, 1, '2014-07-24', 0, 0, 0, 0, '2014-07-23 16:00:00'),
(383, 1, 20, '2014-07-24', 0, 0, 0, 0, '2014-07-23 16:00:00'),
(384, 1, 23, '2014-07-24', 0, 0, 0, 0, '2014-07-23 16:00:00'),
(385, 1, 24, '2014-07-24', 0, 0, 0, 0, '2014-07-23 16:00:00'),
(386, 27, 25, '2014-07-24', 0, 0, 0, 0, '2014-07-23 16:00:00'),
(387, 15, 26, '2014-07-24', 0, 0, 0, 0, '2014-07-23 16:00:00'),
(388, 15, 27, '2014-07-24', 0, 0, 0, 0, '2014-07-23 16:00:00'),
(389, 15, 28, '2014-07-24', 0, 0, 0, 0, '2014-07-23 16:00:00'),
(390, 45, 29, '2014-07-24', 0, 0, 0, 0, '2014-07-23 16:00:00'),
(391, 57, 30, '2014-07-24', 0, 0, 0, 0, '2014-07-23 16:00:00'),
(392, 1, 31, '2014-07-24', 0, 0, 0, 0, '2014-07-23 16:00:00'),
(393, 81, 32, '2014-07-24', 0, 0, 0, 0, '2014-07-23 16:00:00'),
(397, 1, 1, '2014-07-25', 0, 0, 0, 0, '2014-07-24 16:00:27'),
(398, 1, 20, '2014-07-25', 0, 0, 0, 0, '2014-07-24 16:00:27'),
(399, 1, 23, '2014-07-25', 0, 0, 0, 0, '2014-07-24 16:00:27'),
(400, 1, 24, '2014-07-25', 0, 0, 0, 0, '2014-07-24 16:00:27'),
(401, 27, 25, '2014-07-25', 0, 0, 0, 0, '2014-07-24 16:00:27'),
(402, 15, 26, '2014-07-25', 0, 0, 0, 0, '2014-07-24 16:00:27'),
(403, 15, 27, '2014-07-25', 0, 0, 0, 0, '2014-07-24 16:00:27'),
(404, 15, 28, '2014-07-25', 0, 0, 0, 0, '2014-07-24 16:00:27'),
(405, 45, 29, '2014-07-25', 0, 0, 0, 0, '2014-07-24 16:00:27'),
(406, 57, 30, '2014-07-25', 0, 0, 0, 0, '2014-07-24 16:00:27'),
(407, 1, 31, '2014-07-25', 0, 0, 0, 0, '2014-07-24 16:00:27'),
(408, 81, 32, '2014-07-25', 0, 0, 0, 0, '2014-07-24 16:00:27'),
(412, 1, 1, '2014-07-26', 0, 0, 0, 0, '2014-07-25 16:00:00'),
(413, 1, 20, '2014-07-26', 0, 0, 0, 0, '2014-07-25 16:00:00'),
(414, 1, 23, '2014-07-26', 0, 0, 0, 0, '2014-07-25 16:00:00'),
(415, 1, 24, '2014-07-26', 0, 0, 0, 0, '2014-07-25 16:00:00'),
(416, 27, 25, '2014-07-26', 0, 0, 0, 0, '2014-07-25 16:00:00'),
(417, 15, 26, '2014-07-26', 0, 0, 0, 0, '2014-07-25 16:00:00'),
(418, 15, 27, '2014-07-26', 0, 0, 0, 0, '2014-07-25 16:00:00'),
(419, 15, 28, '2014-07-26', 0, 0, 0, 0, '2014-07-25 16:00:00'),
(420, 45, 29, '2014-07-26', 0, 0, 0, 0, '2014-07-25 16:00:00'),
(421, 57, 30, '2014-07-26', 0, 0, 0, 0, '2014-07-25 16:00:00'),
(422, 1, 31, '2014-07-26', 0, 0, 0, 0, '2014-07-25 16:00:00'),
(423, 81, 32, '2014-07-26', 0, 0, 0, 0, '2014-07-25 16:00:00'),
(427, 1, 1, '2014-07-27', 0, 0, 0, 0, '2014-07-26 16:00:00'),
(428, 1, 20, '2014-07-27', 0, 0, 0, 0, '2014-07-26 16:00:00'),
(429, 1, 23, '2014-07-27', 0, 0, 0, 0, '2014-07-26 16:00:00'),
(430, 1, 24, '2014-07-27', 0, 0, 0, 0, '2014-07-26 16:00:00'),
(431, 27, 25, '2014-07-27', 0, 0, 0, 0, '2014-07-26 16:00:00'),
(432, 15, 26, '2014-07-27', 0, 0, 0, 0, '2014-07-26 16:00:00'),
(433, 15, 27, '2014-07-27', 0, 0, 0, 0, '2014-07-26 16:00:00'),
(434, 15, 28, '2014-07-27', 0, 0, 0, 0, '2014-07-26 16:00:00'),
(435, 45, 29, '2014-07-27', 0, 0, 0, 0, '2014-07-26 16:00:00'),
(436, 57, 30, '2014-07-27', 0, 0, 0, 0, '2014-07-26 16:00:00'),
(437, 1, 31, '2014-07-27', 0, 0, 0, 0, '2014-07-26 16:00:00'),
(438, 81, 32, '2014-07-27', 0, 0, 0, 0, '2014-07-26 16:00:00'),
(442, 1, 1, '2014-07-28', 0, 0, 0, 0, '2014-07-27 16:00:00'),
(443, 1, 20, '2014-07-28', 0, 0, 0, 0, '2014-07-27 16:00:00'),
(444, 1, 23, '2014-07-28', 0, 0, 0, 0, '2014-07-27 16:00:00'),
(445, 1, 24, '2014-07-28', 0, 0, 0, 0, '2014-07-27 16:00:00'),
(446, 27, 25, '2014-07-28', 0, 0, 0, 0, '2014-07-27 16:00:00'),
(447, 15, 26, '2014-07-28', 0, 0, 0, 0, '2014-07-27 16:00:00'),
(448, 15, 27, '2014-07-28', 0, 0, 0, 0, '2014-07-27 16:00:00'),
(449, 15, 28, '2014-07-28', 0, 0, 0, 0, '2014-07-27 16:00:00'),
(450, 45, 29, '2014-07-28', 0, 0, 0, 0, '2014-07-27 16:00:00'),
(451, 57, 30, '2014-07-28', 0, 0, 0, 0, '2014-07-27 16:00:00'),
(452, 1, 31, '2014-07-28', 0, 0, 0, 0, '2014-07-27 16:00:00'),
(453, 81, 32, '2014-07-28', 0, 0, 0, 0, '2014-07-27 16:00:00'),
(457, 1, 1, '2014-07-29', 0, 0, 0, 0, '2014-07-28 16:00:00'),
(458, 1, 20, '2014-07-29', 0, 0, 0, 0, '2014-07-28 16:00:00'),
(459, 1, 23, '2014-07-29', 0, 0, 0, 0, '2014-07-28 16:00:00'),
(460, 1, 24, '2014-07-29', 0, 0, 0, 0, '2014-07-28 16:00:00'),
(461, 27, 25, '2014-07-29', 0, 0, 0, 0, '2014-07-28 16:00:00'),
(462, 15, 26, '2014-07-29', 0, 0, 0, 0, '2014-07-28 16:00:00'),
(463, 15, 27, '2014-07-29', 0, 0, 0, 0, '2014-07-28 16:00:00'),
(464, 15, 28, '2014-07-29', 0, 0, 0, 0, '2014-07-28 16:00:00'),
(465, 45, 29, '2014-07-29', 0, 0, 0, 0, '2014-07-28 16:00:00'),
(466, 57, 30, '2014-07-29', 0, 0, 0, 0, '2014-07-28 16:00:00'),
(467, 1, 31, '2014-07-29', 0, 0, 0, 0, '2014-07-28 16:00:00'),
(468, 81, 32, '2014-07-29', 0, 0, 0, 0, '2014-07-28 16:00:00'),
(472, 1, 1, '2014-07-30', 0, 0, 0, 0, '2014-07-29 16:00:00'),
(473, 1, 20, '2014-07-30', 0, 0, 0, 0, '2014-07-29 16:00:00'),
(474, 1, 23, '2014-07-30', 0, 0, 0, 0, '2014-07-29 16:00:00'),
(475, 1, 24, '2014-07-30', 0, 0, 0, 0, '2014-07-29 16:00:00'),
(476, 27, 25, '2014-07-30', 0, 0, 0, 0, '2014-07-29 16:00:00'),
(477, 15, 26, '2014-07-30', 0, 0, 0, 0, '2014-07-29 16:00:00'),
(478, 15, 27, '2014-07-30', 0, 0, 0, 0, '2014-07-29 16:00:00'),
(479, 15, 28, '2014-07-30', 0, 0, 0, 0, '2014-07-29 16:00:00'),
(480, 45, 29, '2014-07-30', 0, 0, 0, 0, '2014-07-29 16:00:00'),
(481, 57, 30, '2014-07-30', 0, 0, 0, 0, '2014-07-29 16:00:00'),
(482, 1, 31, '2014-07-30', 0, 0, 0, 0, '2014-07-29 16:00:00'),
(483, 81, 32, '2014-07-30', 0, 0, 0, 0, '2014-07-29 16:00:00'),
(487, 1, 1, '2014-07-31', 0, 0, 0, 0, '2014-07-30 16:00:00'),
(488, 1, 20, '2014-07-31', 0, 0, 0, 0, '2014-07-30 16:00:00'),
(489, 1, 23, '2014-07-31', 0, 0, 0, 0, '2014-07-30 16:00:00'),
(490, 1, 24, '2014-07-31', 0, 0, 0, 0, '2014-07-30 16:00:00'),
(491, 27, 25, '2014-07-31', 0, 0, 0, 0, '2014-07-30 16:00:00'),
(492, 15, 26, '2014-07-31', 0, 0, 0, 0, '2014-07-30 16:00:00'),
(493, 15, 27, '2014-07-31', 0, 0, 0, 0, '2014-07-30 16:00:00'),
(494, 15, 28, '2014-07-31', 0, 0, 0, 0, '2014-07-30 16:00:00'),
(495, 45, 29, '2014-07-31', 0, 0, 0, 0, '2014-07-30 16:00:00'),
(496, 57, 30, '2014-07-31', 0, 0, 0, 0, '2014-07-30 16:00:00'),
(497, 1, 31, '2014-07-31', 0, 0, 0, 0, '2014-07-30 16:00:00'),
(498, 81, 32, '2014-07-31', 0, 0, 0, 0, '2014-07-30 16:00:00'),
(502, 1, 1, '2014-08-01', 0, 0, 0, 0, '2014-07-31 16:00:28'),
(503, 1, 20, '2014-08-01', 0, 0, 0, 0, '2014-07-31 16:00:28'),
(504, 1, 23, '2014-08-01', 0, 0, 0, 0, '2014-07-31 16:00:28'),
(505, 1, 24, '2014-08-01', 0, 0, 0, 0, '2014-07-31 16:00:28'),
(506, 27, 25, '2014-08-01', 0, 0, 0, 0, '2014-07-31 16:00:28'),
(507, 15, 26, '2014-08-01', 0, 0, 0, 0, '2014-07-31 16:00:28'),
(508, 15, 27, '2014-08-01', 0, 0, 0, 0, '2014-07-31 16:00:28'),
(509, 15, 28, '2014-08-01', 0, 0, 0, 0, '2014-07-31 16:00:28'),
(510, 45, 29, '2014-08-01', 0, 0, 0, 0, '2014-07-31 16:00:28'),
(511, 57, 30, '2014-08-01', 0, 0, 0, 0, '2014-07-31 16:00:28'),
(512, 1, 31, '2014-08-01', 0, 0, 0, 0, '2014-07-31 16:00:28'),
(513, 81, 32, '2014-08-01', 0, 0, 0, 0, '2014-07-31 16:00:28'),
(517, 1, 1, '2014-08-02', 0, 0, 0, 0, '2014-08-01 16:00:05'),
(518, 1, 20, '2014-08-02', 0, 0, 0, 0, '2014-08-01 16:00:05'),
(519, 1, 23, '2014-08-02', 0, 0, 0, 0, '2014-08-01 16:00:05'),
(520, 1, 24, '2014-08-02', 0, 0, 0, 0, '2014-08-01 16:00:05'),
(521, 27, 25, '2014-08-02', 0, 0, 0, 0, '2014-08-01 16:00:05'),
(522, 15, 26, '2014-08-02', 0, 0, 0, 0, '2014-08-01 16:00:05'),
(523, 15, 27, '2014-08-02', 0, 0, 0, 0, '2014-08-01 16:00:05'),
(524, 15, 28, '2014-08-02', 0, 0, 0, 0, '2014-08-01 16:00:05'),
(525, 45, 29, '2014-08-02', 0, 0, 0, 0, '2014-08-01 16:00:05'),
(526, 57, 30, '2014-08-02', 0, 0, 0, 0, '2014-08-01 16:00:05'),
(527, 1, 31, '2014-08-02', 0, 0, 0, 0, '2014-08-01 16:00:05'),
(528, 81, 32, '2014-08-02', 0, 0, 0, 0, '2014-08-01 16:00:05'),
(532, 1, 1, '2014-08-03', 0, 0, 0, 0, '2014-08-02 16:00:00'),
(533, 1, 20, '2014-08-03', 0, 0, 0, 0, '2014-08-02 16:00:00'),
(534, 1, 23, '2014-08-03', 0, 0, 0, 0, '2014-08-02 16:00:00'),
(535, 1, 24, '2014-08-03', 0, 0, 0, 0, '2014-08-02 16:00:00'),
(536, 27, 25, '2014-08-03', 0, 0, 0, 0, '2014-08-02 16:00:00'),
(537, 15, 26, '2014-08-03', 0, 0, 0, 0, '2014-08-02 16:00:00'),
(538, 15, 27, '2014-08-03', 0, 0, 0, 0, '2014-08-02 16:00:00'),
(539, 15, 28, '2014-08-03', 0, 0, 0, 0, '2014-08-02 16:00:00'),
(540, 45, 29, '2014-08-03', 0, 0, 0, 0, '2014-08-02 16:00:00'),
(541, 57, 30, '2014-08-03', 0, 0, 0, 0, '2014-08-02 16:00:00'),
(542, 1, 31, '2014-08-03', 0, 0, 0, 0, '2014-08-02 16:00:00'),
(543, 81, 32, '2014-08-03', 0, 0, 0, 0, '2014-08-02 16:00:00'),
(547, 1, 1, '2014-08-04', 0, 0, 0, 0, '2014-08-03 16:00:00'),
(548, 1, 20, '2014-08-04', 0, 0, 0, 0, '2014-08-03 16:00:00'),
(549, 1, 23, '2014-08-04', 0, 0, 0, 0, '2014-08-03 16:00:00'),
(550, 1, 24, '2014-08-04', 0, 0, 0, 0, '2014-08-03 16:00:00'),
(551, 27, 25, '2014-08-04', 0, 0, 0, 0, '2014-08-03 16:00:00'),
(552, 15, 26, '2014-08-04', 0, 0, 0, 0, '2014-08-03 16:00:00'),
(553, 15, 27, '2014-08-04', 0, 0, 0, 0, '2014-08-03 16:00:00'),
(554, 15, 28, '2014-08-04', 0, 0, 0, 0, '2014-08-03 16:00:00'),
(555, 45, 29, '2014-08-04', 0, 0, 0, 0, '2014-08-03 16:00:00'),
(556, 57, 30, '2014-08-04', 0, 0, 0, 0, '2014-08-03 16:00:00'),
(557, 1, 31, '2014-08-04', 0, 0, 0, 0, '2014-08-03 16:00:00'),
(558, 81, 32, '2014-08-04', 0, 0, 0, 0, '2014-08-03 16:00:00'),
(562, 1, 1, '2014-08-05', 0, 0, 0, 0, '2014-08-04 16:00:00'),
(563, 1, 20, '2014-08-05', 0, 0, 0, 0, '2014-08-04 16:00:00'),
(564, 1, 23, '2014-08-05', 0, 0, 0, 0, '2014-08-04 16:00:00'),
(565, 1, 24, '2014-08-05', 0, 0, 0, 0, '2014-08-04 16:00:00'),
(566, 27, 25, '2014-08-05', 0, 0, 0, 0, '2014-08-04 16:00:00'),
(567, 15, 26, '2014-08-05', 0, 0, 0, 0, '2014-08-04 16:00:00'),
(568, 15, 27, '2014-08-05', 0, 0, 0, 0, '2014-08-04 16:00:00'),
(569, 15, 28, '2014-08-05', 0, 0, 0, 0, '2014-08-04 16:00:00'),
(570, 45, 29, '2014-08-05', 0, 0, 0, 0, '2014-08-04 16:00:00'),
(571, 57, 30, '2014-08-05', 0, 0, 0, 0, '2014-08-04 16:00:00'),
(572, 1, 31, '2014-08-05', 0, 0, 0, 0, '2014-08-04 16:00:00'),
(573, 81, 32, '2014-08-05', 0, 0, 0, 0, '2014-08-04 16:00:00'),
(574, 81, 33, '2014-08-05', 0, 0, 0, 0, '2014-08-04 16:00:00'),
(577, 1, 1, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(578, 1, 20, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(579, 1, 23, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(580, 1, 24, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(581, 27, 25, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(582, 15, 26, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(583, 15, 27, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(584, 15, 28, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(585, 45, 29, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(586, 57, 30, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(587, 1, 31, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(588, 81, 32, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(589, 81, 33, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(590, 84, 34, '2014-08-06', 0, 0, 0, 0, '2014-08-05 16:00:00'),
(592, 1, 1, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(593, 1, 20, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(594, 1, 23, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(595, 1, 24, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(596, 27, 25, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(597, 15, 26, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(598, 15, 27, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(599, 15, 28, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(600, 45, 29, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(601, 57, 30, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(602, 1, 31, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(603, 81, 32, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(604, 81, 33, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(605, 84, 34, '2014-08-07', 0, 0, 0, 0, '2014-08-06 16:00:00'),
(607, 1, 1, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(608, 1, 20, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(609, 1, 23, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(610, 1, 24, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(611, 27, 25, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(612, 15, 26, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(613, 15, 27, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(614, 15, 28, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(615, 45, 29, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(616, 57, 30, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(617, 1, 31, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(618, 81, 32, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(619, 81, 33, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(620, 84, 34, '2014-08-08', 0, 0, 0, 0, '2014-08-07 16:00:28'),
(622, 1, 1, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(623, 1, 20, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(624, 1, 23, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(625, 1, 24, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(626, 27, 25, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(627, 15, 26, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(628, 15, 27, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(629, 15, 28, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(630, 45, 29, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(631, 57, 30, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(632, 1, 31, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(633, 81, 32, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(634, 81, 33, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(635, 84, 34, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(636, 82, 35, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(637, 82, 36, '2014-08-09', 0, 0, 0, 0, '2014-08-08 16:00:04'),
(653, 1, 1, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(654, 1, 20, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(655, 1, 23, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(656, 1, 24, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(657, 27, 25, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(658, 15, 26, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(659, 15, 27, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(660, 15, 28, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(661, 45, 29, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(662, 57, 30, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(663, 1, 31, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(664, 81, 32, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(665, 81, 33, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(666, 84, 34, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(667, 82, 35, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(668, 82, 36, '2014-08-10', 0, 0, 0, 0, '2014-08-09 16:00:00'),
(684, 1, 1, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(685, 1, 20, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(686, 1, 23, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(687, 1, 24, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(688, 27, 25, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(689, 15, 26, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(690, 15, 27, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(691, 15, 28, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(692, 45, 29, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(693, 57, 30, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(694, 1, 31, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(695, 81, 32, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(696, 81, 33, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(697, 84, 34, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(698, 82, 35, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(699, 82, 36, '2014-08-11', 0, 0, 0, 0, '2014-08-10 16:00:00'),
(715, 1, 1, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(716, 1, 20, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(717, 1, 23, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(718, 1, 24, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(719, 27, 25, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(720, 15, 26, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(721, 15, 27, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(722, 15, 28, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(723, 45, 29, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(724, 57, 30, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(725, 1, 31, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(726, 81, 32, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(727, 81, 33, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(728, 84, 34, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(729, 82, 35, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(730, 82, 36, '2014-08-12', 0, 0, 0, 0, '2014-08-11 16:00:00'),
(746, 1, 1, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(747, 1, 20, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(748, 1, 23, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(749, 1, 24, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(750, 27, 25, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(751, 15, 26, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(752, 15, 27, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(753, 15, 28, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(754, 45, 29, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(755, 57, 30, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(756, 1, 31, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(757, 81, 32, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(758, 81, 33, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(759, 84, 34, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(760, 82, 35, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(761, 82, 36, '2014-08-13', 0, 0, 0, 0, '2014-08-12 16:00:00'),
(777, 1, 1, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(778, 1, 20, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(779, 1, 23, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(780, 1, 24, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(781, 27, 25, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(782, 15, 26, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(783, 15, 27, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(784, 15, 28, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(785, 45, 29, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(786, 57, 30, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(787, 1, 31, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(788, 81, 32, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(789, 81, 33, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(790, 84, 34, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(791, 82, 35, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(792, 82, 36, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(793, 1, 37, '2014-08-14', 0, 0, 0, 0, '2014-08-13 16:00:00'),
(794, 1, 38, '2014-08-14', 0, 0, 0, 0, '2014-08-13 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,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `creditNoteDate` date NOT NULL,
  `supplierInvoiceID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `termsID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `agentID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `employeeID` int(11) NOT NULL,
  `shippingMethodID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `amountPaid` decimal(10,0) NOT NULL,
  `totalTaxAmount` double NOT NULL,
  `totalPayable` double NOT NULL,
  `total` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  `updateAble` tinyint(1) NOT NULL DEFAULT '1',
  `journalNo` varchar(32) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=38 ;

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

INSERT INTO `comp_supplier_creditnote` (`ID`, `serialNo`, `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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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-07-09 04:12:56', 0, 0, ''),
(19, 1, 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, 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, ''),
(21, 1, 1, 1, 'PCN', '2014-07-14', 71, 17, 0, 0, 1, 0, '', 0, 0, 0, '0', 0.06, 1.06, 0, 16, '2014-07-14 04:45:59', 0, '2014-07-14 04:45:59', 0, 1, ''),
(22, 1, 1, 1, 'PCN', '2014-07-14', 71, 15, 0, 0, 1, 0, '', 0, 0, 5.0600000000000005, '0', 0.06, 1.06, 0, 16, '2014-07-14 04:55:42', 0, '2014-07-14 04:56:38', 0, 1, ''),
(23, 1, 1, 1, 'PCN', '2014-07-14', 71, 17, 0, 0, 1, 0, 'sds', 0, 0, 1.06, '0', 0.06, 1.06, 0, 16, '2014-07-14 05:03:55', 0, '2014-07-14 05:03:55', 0, 1, ''),
(24, 1, 1, 1, 'PCN', '2014-07-14', 72, 1, 0, 0, 1, 0, '', 0, 0, 1.01, '0', 0.0006, 1, 0, 16, '2014-07-14 05:08:21', 0, '2014-07-14 05:08:53', 0, 1, ''),
(25, 1, 1, 1, 'PCN', '2014-07-14', 71, 1, 0, 0, 1, 0, 'juo', 0, 0, 23555555558.5, '0', 1333333333.4999998, 2.12, 0, 16, '2014-07-14 05:10:22', 0, '2014-07-14 06:04:58', 0, 1, ''),
(26, 1, 93, 46, 'PCN', '2014-09-08', 244, 0, 0, 0, 0, 0, '', 0, 0, 234, '0', 0, 0, 0, 16, '2014-09-08 09:33:38', 0, '2014-09-17 05:21:32', 0, 1, ''),
(27, 2, 93, 47, 'PCN', '2014-09-18', 247, 0, 0, 0, 1, 0, '', 0, 0, 10, '0', 0.6, 10.6, 0, 16, '2014-09-18 05:59:28', 0, '0000-00-00 00:00:00', 0, 1, ''),
(28, 3, 93, 47, 'PCN', '2014-09-18', 247, 30, 0, 0, 1, 0, '', 0, 0, 10, '0', 0.6, 10.6, 0, 16, '2014-09-18 05:59:47', 0, '0000-00-00 00:00:00', 0, 1, ''),
(29, 4, 93, 47, 'PCN', '2014-09-18', 247, 30, 0, 0, 1, 0, '', 0, 0, 10, '0', 0.6, 10.6, 0, 16, '2014-09-18 06:02:10', 0, '0000-00-00 00:00:00', 0, 1, ''),
(30, 5, 93, 47, 'PCN', '2014-09-18', 247, 30, 0, 0, 1, 0, '', 0, 0, 10, '0', 0.6, 10.6, 0, 16, '2014-09-18 06:10:09', 0, '0000-00-00 00:00:00', 0, 1, ''),
(31, 6, 93, 48, 'PCN', '2014-09-18', 253, 30, 0, 0, 1, 0, 'sds', 0, 0, 10, '0', 0, 10, 0, 16, '2014-09-18 06:27:17', 0, '0000-00-00 00:00:00', 0, 1, ''),
(32, 7, 93, 48, 'PCN', '2014-09-18', 253, 30, 0, 0, 1, 0, 'sds', 0, 0, 10, '0', 0, 10, 0, 16, '2014-09-18 06:27:20', 0, '0000-00-00 00:00:00', 0, 1, ''),
(33, 8, 93, 48, 'PCN', '2014-09-18', 253, 30, 0, 0, 1, 0, 'sds', 0, 0, 10, '0', 0, 10, 0, 16, '2014-09-18 06:27:31', 0, '0000-00-00 00:00:00', 0, 1, ''),
(34, 9, 93, 48, 'PCN', '2014-09-18', 253, 30, 0, 0, 1, 0, 'sds', 0, 0, 149.92, '0', 7.92, 10, 0, 16, '2014-09-18 06:27:49', 0, '2014-09-18 07:25:58', 0, 0, ''),
(35, 10, 93, 47, 'PCN', '2014-09-19', 251, 0, 0, 0, 0, 0, '', 0, 0, 3698.38, '0', 309.12, 0, 0, 16, '2014-09-19 08:53:25', 0, '2014-09-19 09:24:12', 0, 1, ''),
(36, 11, 93, 46, 'PCN', '2014-09-19', 248, 0, 0, 0, 0, 0, '', 0, 0, 70900, '0', 0, 0, 0, 16, '2014-09-19 10:00:24', 0, '2014-09-19 10:02:49', 0, 1, ''),
(37, 12, 93, 46, 'PCN', '2014-09-19', 248, 0, 0, 0, 0, 0, '', 0, 0, 3434, '0', 0, 0, 0, 16, '2014-09-19 10:02:23', 0, '2014-09-19 10:02:23', 0, 1, '');

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

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

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

CREATE TABLE IF NOT EXISTS `comp_supplier_creditnote_charges` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `creditNoteID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `accountNoID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text NOT NULL,
  `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=49 ;

--
-- 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'),
(32, 25, 1, 101, '', 'sdad', 0, 0, 22222222222, 1, 0, 1333333333.32, 23555555555.32, 0, 0, 0, 0, 16, '2014-07-14 05:11:15', 16, '2014-07-14 06:04:58'),
(33, 25, 2, 100, '', 'as', 0, 0, 1, 1, 0, 0.06, 1.06, 0, 0, 0, 0, 16, '2014-07-14 05:19:34', 16, '2014-07-14 06:01:39'),
(34, 26, 1, 28370, '', 'sdfadasfd', 0, 0, 234, 0, 0, 0, 234, 0, 0, 0, 0, 16, '2014-09-08 09:33:38', 0, '0000-00-00 00:00:00'),
(36, 34, 1, 28370, '', 'asa', 0, 0, 122, 768, 0, 7.32, 129.32, 0, 0, 0, 0, 16, '2014-09-18 06:28:05', 0, '0000-00-00 00:00:00'),
(37, 35, 1, 28370, '', 'asdfasfd', 0, 0, 1234, 785, 0, 0, 1234, 0, 0, 0, 0, 16, '2014-09-19 08:53:25', 16, '2014-09-19 09:06:22'),
(43, 35, 6, 28370, '', 'dfasdf', 0, 0, 2323, 768, 0, 139.38, 2462.38, 0, 0, 0, 0, 16, '2014-09-19 09:23:01', 0, '0000-00-00 00:00:00'),
(45, 36, 1, 28382, '', 'asdfa', 0, 0, 2323, 787, 0, 0, 2323, 0, 0, 0, 0, 16, '2014-09-19 10:00:24', 16, '2014-09-19 10:02:33'),
(46, 36, 2, 28369, '', 'afasdf', 0, 0, 34343, 0, 0, 0, 34343, 0, 0, 0, 0, 16, '2014-09-19 10:01:10', 0, '0000-00-00 00:00:00'),
(47, 37, 1, 28370, '', 'asdfas', 0, 0, 3434, 787, 0, 0, 3434, 0, 0, 0, 0, 16, '2014-09-19 10:02:23', 0, '0000-00-00 00:00:00'),
(48, 36, 2, 28370, '', 'asfdasdf', 0, 0, 34234, 787, 0, 0, 34234, 0, 0, 0, 0, 16, '2014-09-19 10:02:49', 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=55 ;

--
-- 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'),
(32, 21, 1, 1, '0', 'Teak wooden chair with natural finish', 1, 1, 1, 0, 6, 0.06, 1.06, 0, 16, '2014-07-14 04:45:59', 0, '0000-00-00 00:00:00'),
(33, 21, 2, 1, '', 'Teak wooden chair with natural finish', 1, 1, 1, 0, 6, 0.06, 1.06, 0, 16, '2014-07-14 04:52:24', 0, '0000-00-00 00:00:00'),
(34, 22, 1, 1, '0', 'Teak wooden chair with natural finish', 1, 1, 1, 0, 6, 0.06, 1.06, 0, 16, '2014-07-14 04:55:42', 0, '0000-00-00 00:00:00'),
(35, 22, 2, 4, '', 'Plastic Chair - Blue', 2, 2, 4, 1, 0, 0, 4, 0, 16, '2014-07-14 04:56:38', 0, '0000-00-00 00:00:00'),
(36, 23, 1, 7, '0', 'Plastic Chair - Red', 1, 1, 1, 1, 6, 0.06, 1.06, 0, 16, '2014-07-14 05:03:55', 0, '0000-00-00 00:00:00'),
(37, 24, 1, 7, '0', 'Plastic Chair - Red', 1, 1, 1, 0, 0, 0, 1, 0, 16, '2014-07-14 05:08:21', 0, '0000-00-00 00:00:00'),
(38, 24, 2, 1, '', 'Teak wooden chair with natural finish', 1, 0.01, 0, 0, 6, 0.0006, 0.01, 0, 16, '2014-07-14 05:08:53', 0, '0000-00-00 00:00:00'),
(39, 25, 1, 1, '0', 'Teak wooden chair with natural finish', 1, 1, 1, 0, 6, 0.06, 1.06, 0, 16, '2014-07-14 05:10:22', 0, '0000-00-00 00:00:00'),
(40, 25, 2, 1, '', 'Teak wooden chair with natural finish', 1, 1, 1, 0, 6, 0.06, 1.06, 0, 16, '2014-07-14 05:18:41', 0, '0000-00-00 00:00:00'),
(43, 27, 1, 25, '0', 'Table with Glass', 1, 10, 10, 782, 6, 0.6, 10.6, 0, 16, '2014-09-18 05:59:28', 0, '0000-00-00 00:00:00'),
(44, 28, 1, 25, '0', 'Table with Glass', 1, 10, 10, 782, 6, 0.6, 10.6, 0, 16, '2014-09-18 05:59:47', 0, '0000-00-00 00:00:00'),
(45, 29, 1, 25, '0', 'Table with Glass', 1, 10, 10, 782, 6, 0.6, 10.6, 0, 16, '2014-09-18 06:02:11', 0, '0000-00-00 00:00:00'),
(46, 30, 1, 25, '0', 'Table with Glass', 1, 10, 10, 782, 6, 0.6, 10.6, 0, 16, '2014-09-18 06:10:09', 0, '0000-00-00 00:00:00'),
(47, 30, 2, 27, '', 'STAT', 1, 10, 10, 782, 6, 0.6, 10.6, 0, 16, '2014-09-18 06:11:22', 0, '0000-00-00 00:00:00'),
(48, 31, 1, 27, '0', 'STAT', 1, 10, 10, 787, 0, 0, 10, 0, 16, '2014-09-18 06:27:17', 0, '0000-00-00 00:00:00'),
(49, 32, 1, 27, '0', 'STAT', 1, 10, 10, 787, 0, 0, 10, 0, 16, '2014-09-18 06:27:21', 0, '0000-00-00 00:00:00'),
(50, 33, 1, 27, '0', 'STAT', 1, 10, 10, 787, 0, 0, 10, 0, 16, '2014-09-18 06:27:31', 0, '0000-00-00 00:00:00'),
(51, 34, 1, 27, '0', 'STAT', 1, 10, 10, 787, 0, 0, 10, 0, 16, '2014-09-18 06:27:49', 0, '0000-00-00 00:00:00'),
(52, 34, 2, 27, '', 'STAT', 1, 10, 10, 782, 6, 0.6, 10.6, 0, 16, '2014-09-18 07:23:49', 0, '0000-00-00 00:00:00'),
(54, 35, 2, 29, '', 'Laptop Dell', 23, 123, 2, 782, 6, 169.74, 2, 0, 16, '2014-09-19 09:23:39', 0, '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,
  `serialNo` int(11) NOT NULL DEFAULT '1',
  `companyID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  `formNo` varchar(32) NOT NULL,
  `debitNoteDate` date NOT NULL,
  `supplierInvoiceID` int(11) NOT NULL,
  `projectID` int(11) NOT NULL,
  `termsID` int(11) NOT NULL,
  `currencyID` int(11) NOT NULL,
  `exchangeRate` double NOT NULL,
  `agentID` int(11) NOT NULL,
  `memo` text NOT NULL,
  `employeeID` int(11) NOT NULL,
  `shippingMethodID` int(11) NOT NULL,
  `totalAmount` double NOT NULL,
  `amountPaid` decimal(10,0) NOT NULL,
  `totalTaxAmount` double NOT NULL,
  `totalPayable` double NOT NULL,
  `total` double NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedBy` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  `is_delete` smallint(16) NOT NULL,
  `updateAble` tinyint(1) NOT NULL DEFAULT '1',
  `journalNo` varchar(32) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=42 ;

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

INSERT INTO `comp_supplier_debitnote` (`ID`, `serialNo`, `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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 1, 'PDN', '2014-06-23', 71, 16, 0, 1, 1, 0, '', 0, 0, 1.06, '0', 0.06, 1.06, 0, 16, '2014-06-23 09:50:16', 0, '2014-07-14 05:19:34', 0, 1, ''),
(26, 1, 1, 1, 'PDN', '2014-06-23', 71, 10, 0, 1, 1, 0, 'sa DEc', 0, 0, 1668, '0', 72, 1668, 0, 16, '2014-06-23 10:35:58', 0, '2014-09-17 05:21:15', 0, 1, ''),
(27, 1, 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, 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, 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, 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-09 04:09:10', 0, 0, 'AP20140600000014'),
(31, 1, 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, ''),
(32, 1, 1, 1, 'PDN', '2014-07-14', 72, 15, 0, 1, 1, 0, 'asd', 0, 0, 15323.77, '0', 756.77, 2368.45, 0, 16, '2014-07-14 03:37:34', 0, '2014-07-14 03:41:14', 0, 1, ''),
(33, 1, 1, 20, 'PDN', '2014-07-14', 76, 15, 0, 1, 1, 0, 'sds', 0, 0, 4.24, '0', 0.24, 1.06, 0, 16, '2014-07-14 03:42:17', 0, '2014-07-14 04:20:09', 0, 1, ''),
(34, 2, 1, 1, 'PDN', '2013-09-19', 71, 0, 0, 0, 3.1305, 0, '', 0, 0, 11.7, '0', 0, 11.7, 0, 33, '2014-09-02 03:35:43', 0, '0000-00-00 00:00:00', 0, 1, ''),
(36, 1, 93, 46, 'PDN', '2014-09-08', 244, 0, 0, 0, 1, 0, '', 0, 0, 235.06, '0', 0.06, 234, 0, 16, '2014-09-08 08:48:36', 0, '2014-09-19 08:18:46', 0, 0, 'AP20140900000013'),
(37, 2, 93, 46, 'PDN', '2014-09-12', 248, 0, 0, 0, 1, 0, '', 0, 0, 2556, '0', 0, 233, 0, 16, '2014-09-12 01:45:34', 0, '2014-09-19 09:59:10', 0, 1, ''),
(38, 3, 93, 47, 'PDN', '2014-09-12', 255, 0, 0, 0, 1, 0, '', 0, 0, 130.38, '0', 7.38, 130.38, 0, 16, '2014-09-12 01:46:07', 0, '2014-09-12 01:46:08', 0, 1, ''),
(39, 4, 93, 47, 'PDN', '2014-09-12', 250, 0, 0, 0, 1, 0, '', 0, 0, 774.9, '0', 36.9, 651.9, 0, 16, '2014-09-12 06:05:50', 0, '2014-09-18 04:14:43', 0, 0, 'AP20140900000010'),
(40, 5, 93, 47, 'PDN', '2014-09-19', 247, 30, 0, 0, 1, 0, '', 0, 0, 251047.76, '0', 14078.759999999998, 246262.38, 0, 16, '2014-09-19 07:28:49', 0, '2014-09-19 08:18:22', 0, 0, 'AP20140900000012'),
(41, 6, 93, 47, 'PDN', '2014-09-19', 250, 30, 0, 0, 1, 0, '', 0, 0, 2462.38, '0', 139.38, 2462.38, 0, 16, '2014-09-19 08:21:20', 0, '2014-09-19 08:41:34', 0, 1, '');

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

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

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

CREATE TABLE IF NOT EXISTS `comp_supplier_debitnote_charges` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `debitNoteID` int(11) NOT NULL,
  `lineNo` int(11) NOT NULL,
  `accountNoID` int(11) NOT NULL,
  `itemname` varchar(64) NOT NULL,
  `itemdescription` text NOT NULL,
  `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=73 ;

--
-- 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'),
(48, 32, 1, 101, '', 'asa', 0, 0, 11111, 1, 0, 666.66, 11777.66, 0, 0, 0, 0, 16, '2014-07-14 03:41:14', 0, '0000-00-00 00:00:00'),
(49, 33, 1, 102, '', 'sds', 0, 0, 1, 1, 0, 0.06, 1.06, 0, 0, 0, 0, 16, '2014-07-14 03:42:17', 0, '0000-00-00 00:00:00'),
(50, 33, 2, 102, '', 'aq', 0, 0, 1, 1, 0, 0.06, 1.06, 0, 0, 0, 0, 16, '2014-07-14 03:42:56', 16, '2014-07-14 04:13:43'),
(51, 36, 1, 28370, '', 'adfafd', 0, 0, 234, 0, 0, 0, 234, 0, 0, 0, 0, 16, '2014-09-08 08:48:36', 0, '0000-00-00 00:00:00'),
(52, 37, 1, 28370, '', 'scvzcv', 0, 0, 233, 787, 0, 0, 233, 0, 0, 0, 0, 16, '2014-09-12 01:45:34', 16, '2014-09-19 09:58:55'),
(53, 38, 1, 28370, '', 'dfasdf', 0, 0, 123, 783, 0, 7.38, 130.38, 0, 0, 0, 0, 16, '2014-09-12 01:46:08', 0, '0000-00-00 00:00:00'),
(54, 39, 1, 28370, '', 'sfgsdf', 0, 0, 123, 785, 0, 0, 123, 0, 0, 0, 0, 16, '2014-09-12 06:05:52', 0, '0000-00-00 00:00:00'),
(55, 36, 1, 28370, '', 'sds', 0, 0, 1, 768, 0, 0.06, 1.06, 0, 0, 0, 0, 16, '2014-09-17 05:06:07', 0, '0000-00-00 00:00:00'),
(56, 40, 1, 28370, '', 'asfasdf', 0, 0, 232323, 782, 0, 13939.38, 246262.38, 0, 0, 0, 0, 16, '2014-09-19 07:28:49', 0, '0000-00-00 00:00:00'),
(58, 40, 2, 28370, '', 'asdfasf', 0, 0, 2323, 0, 0, 0, 2323, 0, 0, 0, 0, 16, '2014-09-19 07:47:21', 16, '2014-09-19 07:53:52'),
(59, 40, 2, 28370, '', 'asfasf', 0, 0, 2323, 782, 0, 139.38, 2462.38, 0, 0, 0, 0, 16, '2014-09-19 07:54:13', 16, '2014-09-19 08:17:11'),
(71, 41, 11, 28370, '', 'dafasdf', 0, 0, 2323, 768, 0, 139.38, 2462.38, 0, 0, 0, 0, 16, '2014-09-19 08:41:34', 0, '0000-00-00 00:00:00'),
(72, 37, 2, 28369, '', 'ADAd', 0, 0, 2323, 787, 0, 0, 2323, 0, 0, 0, 0, 16, '2014-09-19 09:59:10', 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=52 ;

--
-- 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'),
(45, 32, 1, 7, '', 'Plastic Chair - Red', 1, 2345, 2345, 0, 1, 23.45, 2368.45, 0, 16, '2014-07-14 03:37:34', 0, '0000-00-00 00:00:00'),
(46, 32, 2, 1, '', 'Teak wooden chair with natural finish', 1, 1111, 1111, 0, 6, 66.66, 1177.66, 0, 16, '2014-07-14 03:39:55', 0, '0000-00-00 00:00:00'),
(47, 33, 1, 1, '', 'Teak wooden chair with natural finish', 2, 1, 2, 0, 6, 0.12, 2.12, 0, 16, '2014-07-14 04:20:09', 16, '0000-00-00 00:00:00'),
(48, 34, 1, 7, '', 'Plastic Chair - Red', 5, 2.34, 11.7, 0, 0, 0, 11.7, 0, 33, '2014-09-02 03:35:43', 0, '0000-00-00 00:00:00'),
(50, 39, 1, 27, '', 'STAT', 5, 123, 615, 782, 6, 36.9, 651.9, 0, 16, '2014-09-12 06:05:50', 0, '0000-00-00 00:00:00');

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

--
