
CREATE TABLE IF NOT EXISTS `master` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `description` varchar(128) NOT NULL,
  `createdby` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedby` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  ;

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

INSERT INTO `master` (`ID`, `name`, `description`, `createdby`) VALUES
(1, 'Status', 'status active or inactive', 1),
(2, 'Shipping Method', '', 1),
(3, 'State', 'State', 1),
(4, 'Module', 'Application module', 1),
(5, 'Gender', 'Gender Male or Female', 1),
(6, 'Bank', 'List of bank', 1),
(7, 'Payment Method', 'List of payment method', 1),
(8, 'Item Category', 'List of item category', 1),
(9, 'Item Type', 'List of item type - product or service', 1),
(10, 'Language', 'Language selection English or Bahasa Malasyia', 1),
(11, 'Accounting Method', 'Accounting Closing/Opening method monthly or yearly', 1),
(12, 'Unit of Measure', 'Unit of measurement such as kg, feet, meter, cubic', 1),
(13, 'Account Type', 'Account type for chart of accounts', 1),
(14, 'Business Type', 'Business type based on industry selected', 1),
(15, 'Industry', 'List of industry classification - retail, manufacturing, service, others', 1),
(16, 'Invoice Purchase Code', '', 1),
(17, 'Invoice Sales Code', '', 1),
(18, 'System Form', '', 1),
(19, 'Address', 'List of Address', 1),
(20, 'Movement Type', 'List of inventory movement type', 1),
(21, 'General Setup', 'General Setup Parameters', 1);

//(18, 'System Form', '', 1),

CREATE TABLE IF NOT EXISTS `master_code` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `masterID` int(11) NOT NULL,
  `parentFilterID` int(11) DEFAULT NULL,
  `code` varchar(4) NOT NULL,
  `name` varchar(64) NOT NULL,
  `shortName` varchar(8) NOT NULL,
  `description` varchar(128) NOT NULL,
  `orderNo` int(11) NOT NULL,
  `createdby` int(11) NOT NULL,
  `createdTS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedby` int(11) NOT NULL,
  `updatedTS` timestamp NOT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  ;

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

INSERT INTO `master_code` (`ID`, `masterID`, `parentFilterID`, `code`, `name`, `shortName`, `description`, `orderNo`, `createdBy`) VALUES
(1, 1, NULL, '0', 'Active', 'Active', '', 1, 0 ),
(2, 1, NULL, '1', 'Inactive', 'Inactive', '', 2, 0),
(3, 2, NULL, 'FR', 'Freight', 'Freight', '', 1, 0),
(4, 2, NULL, 'FE', 'FedEx', 'FE', '', 2, 0),
(5, 2, NULL, 'UPS', 'UPS', 'UPS', '', 3, 0),
(6, 2, NULL, 'CLNK', 'CityLink', 'CLNK', '', 2, 0),
(7, 2, NULL, 'PL', 'Pos Laju', 'PL', '', 5, 0),
(8, 2, NULL, 'DHL', 'DHL', 'DHL', '', 4, 0),
(9, 5, NULL, 'M', 'Male', 'Male', '', 1, 0),
(10, 5, NULL, 'F', 'Female', '', '', 2, 0),
(11, 15, NULL, 'MFC', 'Manufacturing', 'MFC', '', 1, 0),
(12, 15, NULL, 'RT', 'Retail', 'RT', '', 2, 0),
(13, 15, NULL, 'SERV', 'Service', 'SERV', '', 3, 0),
(14, 15, NULL, 'OTH', 'Others', 'OTH', '', 4, 0),
(15, 10, NULL, 'ENG', 'English', 'ENG', '', 1, 0),
(16, 10, NULL, 'BM', 'Bahasa Malaysia', 'BM', '', 2, 0),
(17, 11, NULL, 'MTH', 'Monthly', 'MTH', '', 0, 0),
(18, 11, NULL, 'YR', 'Yearly', 'YR', '', 0, 0),
(19, 8, NULL, 'E', 'Electrical Appliance', 'EA', '', 5, 1),
(20, 8, NULL, 'S', 'Stationary', 'ST', '', 10, 1),
(21, 8, NULL, 'I', 'IT', 'IT', '', 15, 1),
(22, 9, 30, 'FC', 'Chair', 'Chair', '', 1, 1),
(23, 9, 30, 'FT', 'Table', 'Table', '', 5, 1),
(24, 9, 19, 'EF', 'Fans', 'Fans', '', 10, 1),
(25, 9, 19, 'EA', 'Aircondition', 'Air-cond', '', 15, 1),
(26, 9, 20, 'SC', 'Calculator', 'CALC', '', 15, 1),
(27, 9, 20, 'SP', 'Printing Paper', 'Paper', '', 15, 1),
(28, 9, 21, 'IP', 'Printer', 'Printer', '', 15, 1),
(29, 9, 21, 'II', 'Printer toner', 'toner', '', 15, 1),
(30, 8, NULL, 'F', 'Furniture', 'FR', '', 1, 1),
(31, 16, NULL, '1', 'Purchase Invoice', '', '', 10, 1),
(32, 16, NULL, '2', 'Direct Purchase Invcoice', '', '', 20, 1),
(33, 16, NULL, '3', 'Debit Note', '', 'Purchase Invoice Debit Note (Adjustment)', 30, 1),
(34, 16, NULL, '4', 'Credit Note', '', 'Purchase Invoice Credit Note (Adjustment)', 40, 1),
(35, 17, NULL, '1', 'Sales Invoice', '', '', 50, 1),
(36, 17, NULL, '2', 'Direct Sales Invcoice', '', '', 60, 1),
(37, 17, NULL, '3', 'Debit Note', '', 'Sales Invoice Debit Note (Adjustment)', 70, 1),
(38, 17, NULL, '4', 'Credit Note', '', 'Sales Invoice Credit Note (Adjustment)', 80, 1),

(39, 18, NULL, 'PR', 'Purchase Request', 'PR', 'Purchase Request Form', 90, 1),
(40, 18, NULL, 'PO', 'Purchase Order', 'PO', 'Purchase Order Form', 100, 1),
(41, 18, NULL, 'PINV', 'Purchase Invoice', 'PURINV', 'Form Purchase Invoice', 110, 1),
(42, 18, NULL, 'PDN', 'Purchase Debit Note', 'PDN', 'Purchase Debit Note Form', 120, 1),
(43, 18, NULL, 'PCN', 'Purchase Credit Note', 'PCN', 'Purchase Credit Note Form', 140, 1),
(44, 18, NULL, 'PP', 'Purchase Payment', 'PP', 'Purchase Payment Form', 150, 1),
(45, 18, NULL, 'GRN', 'Good Received Note', 'PP', 'Godd Received Note Form', 160, 1),
(46, 18, NULL, 'LT', 'Inventory Movement', 'LT', 'Inventory Movement Form', 170, 1),
(47, 18, NULL, 'SQN', 'Sales Quotation', 'SQN', 'Sales Quotation Form', 180, 1),
(48, 18, NULL, 'SON', 'Sales Order', 'SON', 'Sales Order Form', 190, 1),
(49, 18, NULL, 'SDN', 'Delivery Order', 'SDN', 'Delivery Order Form', 200, 1),
(50, 18, NULL, 'INV', 'Invoice', 'INV', 'Invoice Form', 210, 1),
(51, 18, NULL, 'SDN', 'Sales Debit Note', 'PDN', 'Sales Debit Note Form', 230, 1),
(52, 18, NULL, 'SCN', 'Sales Credit Note', 'PCN', 'Sales Credit Note Form', 240, 1),
(53, 18, NULL, 'RP', 'Receive Payment', 'RP', 'Receive Payment Form', 250, 1),
(54, 18, NULL, 'GRN', 'General Transaction', 'PP', 'General Transaction Form', 260, 1),

(55, 18, NULL, 'OPN', 'Others Payment', 'OPN', 'Others Payment Form', 270, 1),
(56, 18, NULL, 'ORI', 'Others Receive', 'ORI', 'Others Receive Form', 280, 1),
(57, 18, NULL, 'SLR', 'Sales Return', 'SLR', 'Sales Return Form', 290, 1),
(58, 18, NULL, 'IA', 'Item Adjustment', 'IA', 'Item Adjustment Form', 300, 1),

(59, 12, NULL, 'KG', 'Kilogram', '', '', 10, 1),
(60, 12, NULL, 'G', 'gram', '', '', 20, 1),
(61, 12, NULL, 'l', 'liter', '', '', 30, 1),
(62, 12, NULL, 'Tonne', 'tonne', '', '', 40, 1),
(63, 12, NULL, 'Unit', 'unit', '', '', 50, 1),
(64, 12, NULL, 'ml', 'mili liter', '', '', 60, 1),
(65, 12, NULL, 'm', 'meter', '', '', 70, 1),
(66, 12, NULL, 'cm', 'centimeter', '', '', 80, 1),
(67, 12, NULL, 'cc', 'cubic cm', '', '', 90, 1),
(68,7,NULL,'','Cash', '', '', 10, 1),
(69,7,NULL,'','Cheque', '', '', 10, 1),
(75,19,NULL,'1','Billing Address', '', '', 10, 1),
(76,19,NULL,'2','HQ', '', '', 20, 1),
(77,19,NULL,'3','Ship To', '', '', 30, 1),
(78,20,NULL,'S','Small', 'Small', '', 10, 1),
(79,20,NULL,'B','Bulk', 'Bulk', '', 30, 1),

(80,21,NULL,NULL,'retainedEarnings','','Retained Earnings',10,1),
(81,21,NULL,NULL,'profitlostYear','','Profit/Loss Year',10,1),
(82,21,NULL,NULL,'exchangeVariances','','Exchange Variances Account',10,1),
(83,21,NULL,NULL,'bankchargesAccount','','Bank Charges Account',10,1),

(84,21,NULL,NULL,'rcvacct','','Receivable Account',10,1),
(85,21,NULL,NULL,'saleacct','','Sales Account',10,1),
(86,21,NULL,NULL,'saledisacct','','Sales Discount Account',10,1),
(87,21,NULL,NULL,'promptpaydisacct','','Prompt Payment Discount Account',10,1),
(88,21,NULL,NULL,'commissionexp','','Commission Expense',10,1),
(89,21,NULL,NULL,'commisionpay','','Commission Payable',10,1),

(90,21,NULL,NULL,'payAcct','','Payable Account',10,1),
(91,21,NULL,NULL,'payDisc','','Payable Discount',10,1),
(92,21,NULL,NULL,'freightcharges','','Freight Charges',10,1),
(93,21,NULL,NULL,'exchangediff','','Exchange Difference',10,1),

(94,21,NULL,NULL,'invAcct','','Inventory Account',10,1),
(95,21,NULL,NULL,'cogs','','C.O.G.S Account',10,1),
(96,21,NULL,NULL,'invAdjAcct','','Inventory Adjustment Account',10,1),

(97,21,NULL,NULL,'gstInputTax','','GST-Input Tax',10,1),
(98,21,NULL,NULL,'gstOutTax','','GST-Output Tax',10,1),
(99,21,NULL,NULL,'susgstInTax','','Suspense-GST Input Tax',10,1),
(100,21,NULL,NULL,'susgstOuTax','','Suspense-GST Output Tax',10,1),
(101,21,NULL,NULL,'gstnoclaim','','GST Not Claimable',10,1),
(102,21,NULL,NULL,'imdutypay','','Import Duty Payable',10,1),
(103,21,NULL,NULL,'saletaxpay','','Sale Tax Payable',10,1),
(104,21,NULL,NULL,'servtaxpay','','Service Tax Payable',10,1),

(105,21,NULL,NULL,'zakat','','Zakat Expenses',10,1),
(106,21,NULL,NULL,'uninvoiceAP','','AP-Accrual Inventory',10,1),
(107,21,NULL,NULL,'bank','','Banking Account',35,1),





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


INSERT INTO `wakaf_beneficiaries` (`ID`, `shortName`, `name`, `createdTS`, `createdBy`) VALUES
(1, 'School', 'School/Madrasa',  1),
(2, 'Mosque', 'Masjid/Surau',  1),
(3, 'Hospital', 'Hospital',  1),
(4, 'Orphanage', 'Orphanage',  1),
(5, 'Quran', 'Quran/Books',  1 ),
(6, 'Others', 'Others (please specify)',  1);





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

--
-- Dumping data for table `wakaf_center`
--

INSERT INTO `wakaf_center` (`ID`, `shortName`, `name`, `line1`, `line2`, `line3`, `city`, `postCode`, `stateID`, `countryID`, `noTel`, `noFax`, `email`, `website`, `createdTS`, `createdBy`, `updatedBy`, `updatedTS`, `is_delete`) VALUES
(1, 'MAIPS', 'Baitulmal Unit Wakaf, Majlis Agama Islam dan Adat Istiadat Melayu Perlis', 'A2,', 'Taman Pengkalan Asam,', 'Jalan Kangar- Alor Setar', 'Kangar', '01000', 1928, 458, '', '', '', '', '2014-07-09 00:36:51', 0, 0, '2014-07-09 00:36:51', 0),
(2, 'MAIKS', 'Bahagian Wakaf, Majlis Agama Islam Negeri Kedah', '', 'Bangunan Wan Mat Saman', '', 'Alor Setar', '05000', 1923, 458, '', '', '', '', '2014-07-09 00:40:15', 0, 0, '2014-07-09 00:40:15', 0),
(3, 'MAINPP', 'Bahagian Wakaf, Majlis Agama Islam Pulau Pinang', 'Tingkat 8 & 9', 'Menara UMNO,', '128 Jalan Macalister', '', '10400', 1929, 458, '', '', '', '', '2014-07-09 00:42:02', 0, 0, '2014-07-09 00:42:02', 0),
(4, 'MAIAMP', 'Majlis Agama Islam dan Adat Melayu Perak', 'Tingkat 1', 'Kompleks Islam Darul Ridzuan,', 'Jalan Panglima BUkit Gantang Wahab', 'Ipoh', '30000', 0, 458, '034567894', '', '', '', '2014-07-09 00:43:46', 0, 1, '2014-07-09 00:43:46', 0),
(30, 'MAIWP', 'Bahagian Baitulmal Majlis Agama Islam Wilayah Persekutuan ', 'Bangunan Daruzzakah Lorong Haji Hussein 2 ', '', '', ' KUALA LUMPUR', '50676', 1933, 458, '603-2617 5222', '603-2617 5252', 'baitulmal@maiwp.gov.my', 'http://www.maiwp.gov.my/', '2014-07-17 02:23:07', 0, 16, '2014-07-17 02:23:07', 0),
(31, '(PWS), MAIS', 'Perbadanan Wakaf Selangor Majlis Agama Islam Selangor', 'Tingkat 10 Menara Selatan,', ' Bangunan Sultan Idris Shah', '', 'Shah Alam', ' 40000 ', 1931, 458, '603-5514 3758 / 3759', '603-5514 3759', 'wakaf@wakafselangor.gov.my', 'www.wakafselangor.gov.my', '2014-07-17 02:28:23', 0, 16, '2014-07-17 02:28:23', 0),
(32, 'MAIM', 'Majlis Agama Islam Melaka', 'Pusat Islam Melaka ', 'Bukit Palah', '', 'Melaka', '75400 ', 1924, 458, '606-283 7416, 283 2077, 284 9809', '606-282 6033', 'admin@maim.gov.my', 'www.maim.gov.my', '2014-07-17 02:34:11', 0, 16, '2014-07-17 02:34:11', 0),
(33, 'MAIJ', 'Pejabat Wakaf Majlis Agama Islam Negeri Johor', 'Jalan Abdul Rahman Andak', '', '', 'Johor Bahru', '80100', 1921, 458, '607-2221655', '607-2221677', 'wakaf@maij.gov.my', 'www.maij.gov.my', '2014-07-17 02:44:43', 0, 16, '2014-07-17 02:44:43', 0),
(34, 'MAIK', 'Majlis Agama Islam Dan Adat Istiadat Melayu Kelantan', 'Kompleks Balai Islam  Lundang', '', '', 'Kota Bharu', '15200', 1923, 458, '609-7481512 ', '609-7485512', 'maik@e-maik.my', 'www.e-maik.my', '2014-07-17 02:46:37', 0, 16, '2014-07-17 02:46:37', 0),
(35, 'MAIDAM', 'Majlis Agama Islam dan Adat Melayu Terengganu', 'Pusat Pentadbiran Islam Negeri', 'Kompleks Seri Iman', 'Jalan Sultan Mohamad', 'Kuala Terengganu', '20676 ', 1932, 458, '609-6303030 / 6252525', '609-6248134 / 6235185', ' info@maidam.gov.my', 'www.maidam.gov.my', '2014-07-17 03:00:34', 0, 16, '2014-07-17 03:00:34', 0),
(36, 'MUIP', 'Majlis Ugama Islam Dan Adat Resam Melayu Pahang', 'Kompleks Islam Sultan Haji Ahmad Shah', ' Jalan Istana Permai', '', ' Pekan', '26600', 1926, 458, '609-4221311', '609-4221885', 'info@muip.gov.my', 'www.muip.gov.my', '2014-07-17 03:04:39', 0, 16, '2014-07-17 03:04:39', 0),
(37, 'TBS', 'Tabung Baitulmal Majlis Islam Sarawak', 'Tabung Baitulmal Sarawak Bangunan Baitulmal', ' Lot 71, Seksyen 8, KTLD', ' Jalan Haji Muhamad Kassim', 'Kuching', '93400 ', 1930, 458, ' 6082-415563', ' 6082-253786', '', 'www.tbs.org.my', '2014-07-17 03:10:33', 0, 16, '2014-07-17 03:10:33', 0),
(38, 'MUIS', 'Pusat Zakat Sabah Majlis Ugama Islam Sabah', 'Tingkat 1, Blok A & B', 'Wisma MUIS', 'Peti Surat 11666', 'Kota Kibabalu', '88818', 1935, 458, '6088-240 160', '6088-260 246', '', 'www.zakat@sabah.gov.my', '2014-07-17 03:31:14', 0, 16, '2014-07-17 03:31:14', 0),
(39, 'JWM', 'Yayasan Waqaf Malaysia', 'No. 13, Jalan Diplomatik 2/2', 'Presint Diplomatik Putrajaya', '', ' Putrajaya', ' 62050', 1936, 458, '603-8890 4071 / 72 / 73', '603-8890 1010 / 2091', ' info@ywm.gov.my', 'www.ywm.gov.my', '2014-07-17 03:35:37', 0, 16, '2014-07-17 03:35:37', 0);
