-- MySqlBackup.NET 2.0.10
-- Dump Time: 2018-08-14 12:34:35
-- --------------------------------------




-- 
-- Definition of ame_ap_dn
-- 

CREATE TABLE IF NOT EXISTS `ame_ap_dn` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_venid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_pmtstatus` varchar(100) DEFAULT 'Unpaid',
  `var_term` varchar(100) DEFAULT NULL,
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_po` varchar(250) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_due` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT NULL,
  `dou_net` double DEFAULT '0',
  `dou_paid` double DEFAULT '0',
  `dou_rate` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `dou_funpaid` double DEFAULT '0',
  `tin_taxbfdisc` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`),
  KEY `ind1` (`var_venid`) USING BTREE,
  KEY `ind2` (`var_claid`) USING BTREE,
  KEY `ind3` (`var_cur`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ap_dn
-- 



-- 
-- Definition of ame_ap_dn_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ap_dn_det` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_accid` varchar(100) DEFAULT '',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_poid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  `dou_foc` double DEFAULT '0',
  `dou_price` double DEFAULT '0',
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT '0',
  `dou_net` double DEFAULT '0',
  `dou_funprice` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `int_batchno` int(11) DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  `tin_vat` tinyint(1) DEFAULT '0',
  `tin_wht` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`,`var_type`,`int_line`),
  KEY `ind1` (`var_accid`) USING BTREE,
  KEY `ind2` (`var_itemid`) USING BTREE,
  KEY `ind3` (`var_locid`) USING BTREE,
  KEY `ind4` (`var_claid`) USING BTREE,
  KEY `ind5` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ap_dn_det
-- 



-- 
-- Definition of ame_ap_in
-- 

CREATE TABLE IF NOT EXISTS `ame_ap_in` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_venid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_pmtstatus` varchar(100) DEFAULT 'Unpaid',
  `var_retstatus` varchar(100) DEFAULT 'Open',
  `var_retpmtstatus` varchar(100) DEFAULT 'Not Returned',
  `var_term` varchar(100) DEFAULT NULL,
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_po` varchar(250) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_due` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT NULL,
  `dou_net` double DEFAULT '0',
  `dou_paid` double DEFAULT '0',
  `dou_rate` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `dou_funpaid` double DEFAULT '0',
  `tin_taxbfdisc` tinyint(1) DEFAULT '0',
  `var_cal_ac` varchar(100) DEFAULT NULL,
  `dou_cal_ac` double DEFAULT '0',
  `dou_ac` double DEFAULT '0',
  `dou_funac` double DEFAULT '0',
  PRIMARY KEY (`var_id`),
  KEY `ind1` (`var_venid`) USING BTREE,
  KEY `ind2` (`var_claid`) USING BTREE,
  KEY `ind3` (`var_cur`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ap_in
-- 



-- 
-- Definition of ame_ap_in_ac
-- 

CREATE TABLE IF NOT EXISTS `ame_ap_in_ac` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `dou_ac1` double DEFAULT '0',
  `dou_ac2` double DEFAULT '0',
  `dou_ac3` double DEFAULT '0',
  `dou_ac4` double DEFAULT '0',
  `dou_ac5` double DEFAULT '0',
  `dou_funac1` double DEFAULT '0',
  `dou_funac2` double DEFAULT '0',
  `dou_funac3` double DEFAULT '0',
  `dou_funac4` double DEFAULT '0',
  `dou_funac5` double DEFAULT '0',
  `int_batchno` int(11) DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`),
  KEY `ind2` (`var_itemid`) USING BTREE,
  KEY `ind3` (`var_locid`) USING BTREE,
  KEY `ind4` (`var_claid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ap_in_ac
-- 



-- 
-- Definition of ame_ap_in_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ap_in_det` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_accid` varchar(100) DEFAULT '',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_poid` varchar(100) DEFAULT NULL,
  `dou_orderqty` double DEFAULT '0',
  `dou_orderfoc` double DEFAULT '0',
  `dou_qty` double DEFAULT '0',
  `dou_foc` double DEFAULT '0',
  `dou_price` double DEFAULT '0',
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT '0',
  `dou_net` double DEFAULT '0',
  `dou_funprice` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `int_batchno` int(11) DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  `tin_vat` tinyint(1) DEFAULT '0',
  `tin_wht` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`,`var_type`,`int_line`),
  KEY `ind1` (`var_accid`) USING BTREE,
  KEY `ind2` (`var_itemid`) USING BTREE,
  KEY `ind3` (`var_locid`) USING BTREE,
  KEY `ind4` (`var_claid`) USING BTREE,
  KEY `ind5` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ap_in_det
-- 



-- 
-- Definition of ame_ap_po
-- 

CREATE TABLE IF NOT EXISTS `ame_ap_po` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_venid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_status` varchar(10) DEFAULT 'Open',
  `var_pmtstatus` varchar(30) DEFAULT 'Not Received',
  `var_term` varchar(100) DEFAULT NULL,
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_shipid` varchar(100) DEFAULT NULL,
  `var_shipaddr` varchar(2000) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_due` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT NULL,
  `dou_net` double DEFAULT '0',
  `dou_paid` double DEFAULT '0',
  `dou_rate` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `dou_funpaid` double DEFAULT '0',
  `tin_taxbfdisc` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`),
  KEY `ind1` (`var_venid`) USING BTREE,
  KEY `ind2` (`var_claid`) USING BTREE,
  KEY `ind3` (`var_cur`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ap_po
-- 



-- 
-- Definition of ame_ap_po_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ap_po_det` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_accid` varchar(100) DEFAULT '',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_poid` varchar(100) DEFAULT NULL,
  `dou_orderqty` double DEFAULT '0',
  `dou_orderfoc` double DEFAULT '0',
  `dou_qty` double DEFAULT '0',
  `dou_foc` double DEFAULT '0',
  `dou_price` double DEFAULT '0',
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT '0',
  `dou_net` double DEFAULT '0',
  `dou_funprice` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `int_batchno` int(11) DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  `tin_vat` tinyint(1) DEFAULT '0',
  `tin_wht` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`,`var_type`,`int_line`),
  KEY `ind1` (`var_accid`) USING BTREE,
  KEY `ind2` (`var_itemid`) USING BTREE,
  KEY `ind3` (`var_locid`) USING BTREE,
  KEY `ind4` (`var_claid`) USING BTREE,
  KEY `ind5` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ap_po_det
-- 



-- 
-- Definition of ame_ap_py
-- 

CREATE TABLE IF NOT EXISTS `ame_ap_py` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `var_venid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_status` varchar(10) DEFAULT 'Open',
  `var_pmtstatus` varchar(50) DEFAULT 'Unpaid',
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_pmttype` varchar(100) DEFAULT NULL,
  `var_pmtref` varchar(250) DEFAULT NULL,
  `var_prefix` varchar(100) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `dou_disc` double DEFAULT '0',
  `dou_app` double DEFAULT '0',
  `dou_amt` double DEFAULT '0',
  `dou_net` double DEFAULT '0',
  `dou_paid` double DEFAULT '0',
  `tin_paid` tinyint(1) DEFAULT '0',
  `var_cur` varchar(100) DEFAULT NULL,
  `dou_rate` double DEFAULT '0',
  `dou_fundisc` double DEFAULT '0',
  `dou_funapp` double DEFAULT '0',
  `dou_funamt` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `dou_funpaid` double DEFAULT '0',
  `dou_funar` double DEFAULT '0',
  PRIMARY KEY (`var_id`),
  KEY `ind1` (`var_venid`) USING BTREE,
  KEY `ind2` (`var_accid`) USING BTREE,
  KEY `ind3` (`var_claid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ap_py
-- 



-- 
-- Definition of ame_ap_py_app
-- 

CREATE TABLE IF NOT EXISTS `ame_ap_py_app` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(4) NOT NULL,
  `var_num` varchar(100) NOT NULL,
  `var_doctype` varchar(100) DEFAULT NULL,
  `var_docid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `dou_app` double DEFAULT '0',
  `dou_funapp` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`,`var_num`),
  KEY `ind1` (`var_claid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ap_py_app
-- 



-- 
-- Definition of ame_ap_py_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ap_py_det` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(4) NOT NULL,
  `var_docid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `dou_disc` double DEFAULT '0',
  `dou_amt` double DEFAULT '0',
  `dou_app` double DEFAULT '0',
  `dou_fundisc` double DEFAULT '0',
  `dou_funapp` double DEFAULT '0',
  `dou_funamt` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ap_py_det
-- 



-- 
-- Definition of ame_ap_ret
-- 

CREATE TABLE IF NOT EXISTS `ame_ap_ret` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_venid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_pmtstatus` varchar(100) DEFAULT 'Unpaid',
  `var_term` varchar(100) DEFAULT NULL,
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_po` varchar(250) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_due` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT NULL,
  `dou_net` double DEFAULT '0',
  `dou_paid` double DEFAULT '0',
  `dou_rate` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `dou_funpaid` double DEFAULT '0',
  `tin_taxbfdisc` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`),
  KEY `var_venid` (`var_venid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ap_ret
-- 



-- 
-- Definition of ame_ap_ret_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ap_ret_det` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_accid` varchar(100) DEFAULT '',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_poid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  `dou_foc` double DEFAULT '0',
  `dou_price` double DEFAULT '0',
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT '0',
  `dou_net` double DEFAULT '0',
  `dou_funprice` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `int_batchno` int(11) DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  `tin_vat` tinyint(1) DEFAULT '0',
  `tin_wht` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`,`var_type`,`int_line`),
  KEY `var_accid` (`var_accid`) USING BTREE,
  KEY `var_itemid` (`var_itemid`) USING BTREE,
  KEY `var_locid` (`var_locid`) USING BTREE,
  KEY `var_claid` (`var_claid`) USING BTREE,
  KEY `var_uomid` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ap_ret_det
-- 



-- 
-- Definition of ame_ar_cn
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_cn` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_empid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_pricecode` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_pmtstatus` varchar(100) DEFAULT 'Unpaid',
  `var_shipstatus` varchar(100) DEFAULT 'Open',
  `var_shippmtstatus` varchar(100) DEFAULT 'Unshipped',
  `var_term` varchar(100) DEFAULT NULL,
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_po` varchar(250) DEFAULT NULL,
  `var_so` varchar(250) DEFAULT NULL,
  `var_shipid` varchar(100) DEFAULT NULL,
  `var_shipaddr` varchar(2000) DEFAULT NULL,
  `var_prefix` varchar(255) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_due` datetime DEFAULT NULL,
  `dat_from` datetime DEFAULT NULL,
  `dat_to` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT NULL,
  `dou_net` double DEFAULT '0',
  `dou_paid` double DEFAULT '0',
  `dou_rate` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `dou_funpaid` double DEFAULT '0',
  `dou_fungainloss` double DEFAULT '0',
  `tin_taxbfdisc` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`),
  KEY `var_venid` (`var_cusid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_cn
-- 



-- 
-- Definition of ame_ar_cn_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_cn_det` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_accid` varchar(100) DEFAULT '',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_potype` varchar(100) DEFAULT NULL,
  `var_poid` varchar(100) DEFAULT NULL,
  `dou_orderqty` double DEFAULT '0',
  `dou_orderfoc` double DEFAULT '0',
  `dou_shipqty` double DEFAULT '0',
  `dou_shipfoc` double DEFAULT '0',
  `dou_qty` double DEFAULT '0',
  `dou_foc` double DEFAULT '0',
  `dou_price` double DEFAULT '0',
  `dou_pricecom` double DEFAULT '0',
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT '0',
  `dou_net` double DEFAULT '0',
  `dou_funprice` double DEFAULT '0',
  `dou_funpricecom` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `int_batchno` int(11) DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  `tin_vat` tinyint(1) DEFAULT '0',
  `tin_wht` tinyint(1) DEFAULT '0',
  `dou_uc` double DEFAULT '0',
  `dou_ac1` double DEFAULT '0',
  `dou_ac2` double DEFAULT '0',
  `dou_ac3` double DEFAULT '0',
  `dou_ac4` double DEFAULT '0',
  `dou_ac5` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`),
  KEY `var_accid` (`var_accid`) USING BTREE,
  KEY `var_itemid` (`var_itemid`) USING BTREE,
  KEY `var_locid` (`var_locid`) USING BTREE,
  KEY `var_claid` (`var_claid`) USING BTREE,
  KEY `var_uomid` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_cn_det
-- 



-- 
-- Definition of ame_ar_in
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_in` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_empid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_pricecode` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_pmtstatus` varchar(100) DEFAULT 'Unpaid',
  `var_retstatus` varchar(100) DEFAULT 'Open',
  `var_retpmtstatus` varchar(100) DEFAULT 'Not Returned',
  `var_shipstatus` varchar(100) DEFAULT 'Open',
  `var_shippmtstatus` varchar(100) DEFAULT 'Unshipped',
  `var_term` varchar(100) DEFAULT NULL,
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_po` varchar(250) DEFAULT NULL,
  `var_so` varchar(250) DEFAULT NULL,
  `var_shipid` varchar(100) DEFAULT NULL,
  `var_shipaddr` varchar(2000) DEFAULT NULL,
  `var_prefix` varchar(100) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_due` datetime DEFAULT NULL,
  `dat_from` datetime DEFAULT NULL,
  `dat_to` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT NULL,
  `dou_net` double DEFAULT '0',
  `dou_paid` double DEFAULT '0',
  `dou_rate` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `dou_funpaid` double DEFAULT '0',
  `tin_taxbfdisc` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`),
  KEY `var_venid` (`var_cusid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_in
-- 



-- 
-- Definition of ame_ar_in_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_in_det` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_accid` varchar(100) DEFAULT '',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_potype` varchar(100) DEFAULT NULL,
  `var_poid` varchar(100) DEFAULT NULL,
  `dou_orderqty` double DEFAULT '0',
  `dou_orderfoc` double DEFAULT '0',
  `dou_shipqty` double DEFAULT '0',
  `dou_shipfoc` double DEFAULT '0',
  `dou_qty` double DEFAULT '0',
  `dou_foc` double DEFAULT '0',
  `dou_price` double DEFAULT '0',
  `dou_pricecom` double DEFAULT '0',
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT '0',
  `dou_net` double DEFAULT '0',
  `dou_funprice` double DEFAULT '0',
  `dou_funpricecom` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `int_batchno` int(11) DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  `tin_vat` tinyint(1) DEFAULT '0',
  `tin_wht` tinyint(1) DEFAULT '0',
  `dou_uc` double DEFAULT '0',
  `dou_ac1` double DEFAULT '0',
  `dou_ac2` double DEFAULT '0',
  `dou_ac3` double DEFAULT '0',
  `dou_ac4` double DEFAULT '0',
  `dou_ac5` double DEFAULT '0',
  `dou_vb_meavalue` double DEFAULT '0',
  `var_vb_meatype` varchar(10) DEFAULT '',
  `dou_vb_meaprice` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`),
  KEY `ind1` (`var_accid`) USING BTREE,
  KEY `ind2` (`var_itemid`) USING BTREE,
  KEY `ind3` (`var_locid`) USING BTREE,
  KEY `ind4` (`var_claid`) USING BTREE,
  KEY `ind5` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_in_det
-- 



-- 
-- Definition of ame_ar_py
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_py` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_status` varchar(10) DEFAULT 'Open',
  `var_pmtstatus` varchar(50) DEFAULT 'Unpaid',
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_pmttype` varchar(100) DEFAULT NULL,
  `var_pmtref` varchar(250) DEFAULT NULL,
  `var_prefix` varchar(100) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `dou_disc` double DEFAULT '0',
  `dou_app` double DEFAULT '0',
  `dou_amt` double DEFAULT '0',
  `dou_net` double DEFAULT '0',
  `dou_paid` double DEFAULT '0',
  `tin_paid` tinyint(1) DEFAULT '0',
  `tin_paid_sd` tinyint(1) DEFAULT '0',
  `var_cur` varchar(100) DEFAULT NULL,
  `dou_rate` double DEFAULT '0',
  `dou_fundisc` double DEFAULT '0',
  `dou_funapp` double DEFAULT '0',
  `dou_funamt` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `dou_funpaid` double DEFAULT '0',
  `dou_funar` double DEFAULT '0',
  PRIMARY KEY (`var_id`),
  KEY `var_venid` (`var_cusid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_py
-- 



-- 
-- Definition of ame_ar_py_app
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_py_app` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(4) NOT NULL,
  `var_num` varchar(100) NOT NULL,
  `var_doctype` varchar(100) DEFAULT NULL,
  `var_docid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `dou_app` double DEFAULT '0',
  `dou_funapp` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`,`var_num`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_py_app
-- 



-- 
-- Definition of ame_ar_py_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_py_det` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(4) NOT NULL,
  `var_docid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `dou_disc` double DEFAULT '0',
  `dou_amt` double DEFAULT '0',
  `dou_app` double DEFAULT '0',
  `dou_fundisc` double DEFAULT '0',
  `dou_funapp` double DEFAULT '0',
  `dou_funamt` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_py_det
-- 



-- 
-- Definition of ame_ar_py_sd
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_py_sd` (
  `var_id` varchar(100) NOT NULL,
  `int_id` int(11) NOT NULL,
  `dat_date` datetime DEFAULT NULL,
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_period` varchar(100) DEFAULT NULL,
  `var_method` varchar(100) DEFAULT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `dou_sch` double DEFAULT '0',
  `dou_rate_per` double DEFAULT '0',
  `dou_rate_penalty` double DEFAULT '0',
  `int_term` int(11) DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_py_sd
-- 



-- 
-- Definition of ame_ar_py_sd_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_py_sd_det` (
  `var_id` varchar(100) NOT NULL,
  `int_id` int(11) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `dat_date` datetime DEFAULT NULL,
  `dou_sch` double DEFAULT '0',
  `dou_amt` double DEFAULT '0',
  `dou_rate_dol` double DEFAULT '0',
  `dou_net` double DEFAULT '0',
  `dou_balance` double DEFAULT '0',
  `dou_penalty` double DEFAULT '0',
  `int_day` int(11) DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_id`,`int_line`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_py_sd_det
-- 



-- 
-- Definition of ame_ar_quo
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_quo` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_empid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_pricecode` varchar(100) DEFAULT NULL,
  `var_status` varchar(10) DEFAULT 'Open',
  `var_pmtstatus` varchar(30) DEFAULT 'Not Received',
  `var_term` varchar(100) DEFAULT NULL,
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_shipid` varchar(100) DEFAULT NULL,
  `var_shipaddr` varchar(2000) CHARACTER SET utf8mb4 DEFAULT '',
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_due` datetime DEFAULT NULL,
  `dat_from` datetime DEFAULT NULL,
  `dat_to` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT NULL,
  `dou_net` double DEFAULT '0',
  `dou_paid` double DEFAULT '0',
  `dou_rate` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `dou_funpaid` double DEFAULT '0',
  `tin_taxbfdisc` tinyint(1) DEFAULT '0',
  `tin_editable` tinyint(1) DEFAULT NULL,
  `var_authId` varchar(255) DEFAULT NULL,
  `var_auth_status` varchar(255) DEFAULT NULL,
  `dat_approved` datetime DEFAULT NULL,
  PRIMARY KEY (`var_id`),
  KEY `ind1` (`var_cusid`) USING BTREE,
  KEY `ind2` (`var_empid`) USING BTREE,
  KEY `ind3` (`var_claid`) USING BTREE,
  KEY `ind4` (`var_pricecode`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_quo
-- 



-- 
-- Definition of ame_ar_quo_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_quo_det` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_accid` varchar(100) DEFAULT '',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_poid` varchar(100) DEFAULT NULL,
  `dou_orderqty` double DEFAULT '0',
  `dou_orderfoc` double DEFAULT '0',
  `dou_qty` double DEFAULT '0',
  `dou_foc` double DEFAULT '0',
  `dou_price` double DEFAULT '0',
  `dou_pricecom` double DEFAULT '0',
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT '0',
  `dou_net` double DEFAULT '0',
  `dou_funprice` double DEFAULT '0',
  `dou_funpricecom` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `int_batchno` int(11) DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  `tin_vat` tinyint(1) DEFAULT '0',
  `tin_wht` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`),
  KEY `var_accid` (`var_accid`) USING BTREE,
  KEY `var_itemid` (`var_itemid`) USING BTREE,
  KEY `var_locid` (`var_locid`) USING BTREE,
  KEY `var_claid` (`var_claid`) USING BTREE,
  KEY `var_uomid` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_quo_det
-- 



-- 
-- Definition of ame_ar_ret
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_ret` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_empid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_pricecode` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_pmtstatus` varchar(100) DEFAULT 'Unpaid',
  `var_shipstatus` varchar(100) DEFAULT 'Open',
  `var_shippmtstatus` varchar(100) DEFAULT 'Unshipped',
  `var_term` varchar(100) DEFAULT NULL,
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_po` varchar(250) DEFAULT NULL,
  `var_so` varchar(250) DEFAULT NULL,
  `var_shipid` varchar(100) DEFAULT NULL,
  `var_shipaddr` varchar(2000) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_due` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT NULL,
  `dou_net` double DEFAULT '0',
  `dou_paid` double DEFAULT '0',
  `dou_rate` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `dou_funpaid` double DEFAULT '0',
  `tin_taxbfdisc` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`),
  KEY `var_venid` (`var_cusid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_ret
-- 



-- 
-- Definition of ame_ar_ret_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_ret_det` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_accid` varchar(100) DEFAULT '',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_poid` varchar(100) DEFAULT NULL,
  `dou_shipqty` double DEFAULT '0',
  `dou_shipfoc` double DEFAULT '0',
  `dou_qty` double DEFAULT '0',
  `dou_foc` double DEFAULT '0',
  `dou_price` double DEFAULT '0',
  `dou_pricecom` double DEFAULT '0',
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT '0',
  `dou_net` double DEFAULT '0',
  `dou_funprice` double DEFAULT '0',
  `dou_funpricecom` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `int_batchno` int(11) DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  `tin_vat` tinyint(1) DEFAULT '0',
  `tin_wht` tinyint(1) DEFAULT '0',
  `dou_uc` double DEFAULT '0',
  `dou_ac1` double DEFAULT '0',
  `dou_ac2` double DEFAULT '0',
  `dou_ac3` double DEFAULT '0',
  `dou_ac4` double DEFAULT '0',
  `dou_ac5` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`),
  KEY `var_accid` (`var_accid`) USING BTREE,
  KEY `var_itemid` (`var_itemid`) USING BTREE,
  KEY `var_locid` (`var_locid`) USING BTREE,
  KEY `var_claid` (`var_claid`) USING BTREE,
  KEY `var_uomid` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_ret_det
-- 



-- 
-- Definition of ame_ar_sm
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_sm` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `tin_progress` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`),
  KEY `var_venid` (`var_cusid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_sm
-- 



-- 
-- Definition of ame_ar_sm_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_sm_det` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_poid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  `dou_foc` double DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_sm_det
-- 



-- 
-- Definition of ame_ar_so
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_so` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_empid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_pricecode` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_pmtstatus` varchar(100) DEFAULT 'Not Received',
  `var_term` varchar(100) DEFAULT NULL,
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_po` varchar(250) DEFAULT NULL,
  `var_so` varchar(250) DEFAULT NULL,
  `var_shipid` varchar(100) DEFAULT NULL,
  `var_shipaddr` varchar(2000) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_due` datetime DEFAULT NULL,
  `dat_from` datetime DEFAULT NULL,
  `dat_to` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT NULL,
  `dou_net` double DEFAULT '0',
  `dou_paid` double DEFAULT '0',
  `dou_rate` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `dou_funpaid` double DEFAULT '0',
  `tin_taxbfdisc` tinyint(1) DEFAULT '0',
  `tin_editable` tinyint(1) DEFAULT NULL,
  `var_authId` varchar(255) DEFAULT NULL,
  `var_auth_status` varchar(255) DEFAULT NULL,
  `var_approved` datetime DEFAULT NULL,
  `int_vb_code` int(11) DEFAULT NULL,
  PRIMARY KEY (`var_id`),
  KEY `var_venid` (`var_cusid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_so
-- 



-- 
-- Definition of ame_ar_so_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ar_so_det` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_accid` varchar(100) DEFAULT '',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_poid` varchar(100) DEFAULT NULL,
  `dou_orderqty` double DEFAULT '0',
  `dou_orderfoc` double DEFAULT '0',
  `dou_qty` double DEFAULT '0',
  `dou_foc` double DEFAULT '0',
  `dou_price` double DEFAULT '0',
  `dou_pricecom` double DEFAULT '0',
  `dou_sub` double DEFAULT '0',
  `dou_disper` double DEFAULT '0',
  `dou_disdol` double DEFAULT '0',
  `dou_taxper` double DEFAULT '0',
  `dou_taxdol` double DEFAULT '0',
  `dou_taxper1` double DEFAULT '0',
  `dou_taxdol1` double DEFAULT '0',
  `dou_net` double DEFAULT '0',
  `dou_funprice` double DEFAULT '0',
  `dou_funpricecom` double DEFAULT '0',
  `dou_funsub` double DEFAULT '0',
  `dou_fundisdol` double DEFAULT '0',
  `dou_funtaxdol` double DEFAULT '0',
  `dou_funtaxdol1` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  `int_batchno` int(11) DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  `tin_vat` tinyint(1) DEFAULT '0',
  `tin_wht` tinyint(1) DEFAULT '0',
  `dou_vb_meavalue` double DEFAULT '0',
  `var_vb_meatype` varchar(10) DEFAULT '',
  `dou_vb_meaprice` double DEFAULT '0',
  `dou_vb_availqty` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`),
  KEY `var_accid` (`var_accid`) USING BTREE,
  KEY `var_itemid` (`var_itemid`) USING BTREE,
  KEY `var_locid` (`var_locid`) USING BTREE,
  KEY `var_claid` (`var_claid`) USING BTREE,
  KEY `var_uomid` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ar_so_det
-- 



-- 
-- Definition of ame_gl
-- 

CREATE TABLE IF NOT EXISTS `ame_gl` (
  `var_accid` varchar(100) NOT NULL DEFAULT '',
  `var_claid` varchar(100) NOT NULL DEFAULT '',
  `var_cur` varchar(100) NOT NULL DEFAULT '',
  `dat_date` date NOT NULL,
  `dou_dr` double DEFAULT '0',
  `dou_cr` double DEFAULT '0',
  `dou_fundr` double DEFAULT '0',
  `dou_funcr` double DEFAULT '0',
  PRIMARY KEY (`var_accid`,`var_claid`,`var_cur`,`dat_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_gl
-- 



-- 
-- Definition of ame_gl_his
-- 

CREATE TABLE IF NOT EXISTS `ame_gl_his` (
  `int_jid` int(11) DEFAULT NULL,
  `int_line` int(11) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_modid` varchar(20) DEFAULT NULL,
  `var_doctype` varchar(100) DEFAULT '',
  `var_docid` varchar(100) DEFAULT '',
  `var_docref` varchar(250) DEFAULT NULL,
  `var_empid` varchar(100) DEFAULT '',
  `var_venid` varchar(100) DEFAULT '',
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_itemid` varchar(100) DEFAULT '',
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_drcr` varchar(2) DEFAULT NULL,
  `var_docterm` varchar(100) DEFAULT NULL,
  `var_pmttype` varchar(100) DEFAULT NULL,
  `var_pmtref` varchar(250) DEFAULT NULL,
  `var_pricecode` varchar(100) DEFAULT NULL,
  `var_shipaddr` varchar(2000) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_docdate` datetime DEFAULT NULL,
  `dat_docdue` datetime DEFAULT NULL,
  `dou_amt` double DEFAULT NULL,
  `var_appterm` varchar(100) DEFAULT NULL,
  `var_appmodid` varchar(20) DEFAULT NULL,
  `var_apptype` varchar(100) DEFAULT NULL,
  `var_appid` varchar(100) DEFAULT NULL,
  `var_appref` varchar(250) DEFAULT NULL,
  `var_appdesc` varchar(2000) DEFAULT NULL,
  `dat_appdate` datetime DEFAULT NULL,
  `dat_appdue` datetime DEFAULT NULL,
  `var_acctype` varchar(100) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `dou_rate` double DEFAULT '0',
  `dou_funamt` double DEFAULT '0',
  KEY `var_itemid` (`var_itemid`) USING BTREE,
  KEY `var_venid` (`var_venid`) USING BTREE,
  KEY `var_empid` (`var_empid`) USING BTREE,
  KEY `var_cusid` (`var_cusid`) USING BTREE,
  KEY `var_accid` (`var_accid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_gl_his
-- 



-- 
-- Definition of ame_gl_je
-- 

CREATE TABLE IF NOT EXISTS `ame_gl_je` (
  `int_jid` int(11) NOT NULL,
  `var_modid` varchar(100) DEFAULT NULL,
  `var_doctype` varchar(100) DEFAULT NULL,
  `var_docid` varchar(100) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_prefix` varchar(100) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `dou_tamt` double DEFAULT '0',
  `dou_tnet` double DEFAULT '0',
  `var_acctype` varchar(100) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `dou_rate` double DEFAULT '1',
  `dou_funamt` double DEFAULT '0',
  `dou_funnet` double DEFAULT '0',
  PRIMARY KEY (`int_jid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_gl_je
-- 



-- 
-- Definition of ame_gl_je_det
-- 

CREATE TABLE IF NOT EXISTS `ame_gl_je_det` (
  `int_jid` int(11) DEFAULT NULL,
  `int_line` int(11) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_modid` varchar(100) DEFAULT NULL,
  `var_doctype` varchar(100) DEFAULT '',
  `var_docid` varchar(100) DEFAULT '',
  `var_docref` varchar(250) DEFAULT NULL,
  `var_empid` varchar(100) DEFAULT '',
  `var_venid` varchar(100) DEFAULT '',
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_itemid` varchar(100) DEFAULT '',
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_drcr` varchar(2) DEFAULT NULL,
  `var_docterm` varchar(100) DEFAULT NULL,
  `var_pmttype` varchar(100) DEFAULT NULL,
  `var_pmtref` varchar(250) DEFAULT NULL,
  `var_pricecode` varchar(100) DEFAULT NULL,
  `var_shipaddr` varchar(2000) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_docdate` datetime DEFAULT NULL,
  `dat_docdue` datetime DEFAULT NULL,
  `dou_amt` double DEFAULT NULL,
  `var_appterm` varchar(100) DEFAULT NULL,
  `var_appmodid` varchar(20) DEFAULT NULL,
  `var_apptype` varchar(100) DEFAULT NULL,
  `var_appid` varchar(100) DEFAULT NULL,
  `var_appref` varchar(250) DEFAULT NULL,
  `var_appdesc` varchar(2000) DEFAULT NULL,
  `dat_appdate` datetime DEFAULT NULL,
  `dat_appdue` datetime DEFAULT NULL,
  `var_acctype` varchar(100) DEFAULT '',
  `var_cur` varchar(100) DEFAULT NULL,
  `dou_rate` double DEFAULT '0',
  `dou_funamt` double DEFAULT '0',
  KEY `var_itemid` (`var_itemid`) USING BTREE,
  KEY `var_venid` (`var_venid`) USING BTREE,
  KEY `var_empid` (`var_empid`) USING BTREE,
  KEY `var_cusid` (`var_cusid`) USING BTREE,
  KEY `var_accid` (`var_accid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_gl_je_det
-- 



-- 
-- Definition of ame_ic_ia
-- 

CREATE TABLE IF NOT EXISTS `ame_ic_ia` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `dou_rate` double DEFAULT '1',
  `int_jid` int(11) DEFAULT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ic_ia
-- 



-- 
-- Definition of ame_ic_ia_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ic_ia_det` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_claid` varchar(100) DEFAULT NULL,
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  `dou_price` double DEFAULT '0',
  `int_batchno` int(11) DEFAULT NULL,
  `int_poline` int(11) DEFAULT '0',
  `dou_uc` double DEFAULT '0',
  `dou_ac1` double DEFAULT '0',
  `dou_ac2` double DEFAULT '0',
  `dou_ac3` double DEFAULT '0',
  `dou_ac4` double DEFAULT '0',
  `dou_ac5` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ic_ia_det
-- 



-- 
-- Definition of ame_ic_icuom
-- 

CREATE TABLE IF NOT EXISTS `ame_ic_icuom` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `dou_rate` double DEFAULT '1',
  `int_jid` int(11) DEFAULT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ic_icuom
-- 



-- 
-- Definition of ame_ic_icuom_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ic_icuom_det` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_claid` varchar(100) DEFAULT NULL,
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_toitemid` varchar(100) DEFAULT NULL,
  `var_tolocid` varchar(100) DEFAULT NULL,
  `var_touomid` varchar(100) DEFAULT NULL,
  `var_convtype` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  `dou_conv` double DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  `dou_uc` double DEFAULT '0',
  `dou_ac1` double DEFAULT '0',
  `dou_ac2` double DEFAULT '0',
  `dou_ac3` double DEFAULT '0',
  `dou_ac4` double DEFAULT '0',
  `dou_ac5` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ic_icuom_det
-- 



-- 
-- Definition of ame_ic_ip
-- 

CREATE TABLE IF NOT EXISTS `ame_ic_ip` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `dou_rate` double DEFAULT '1',
  `int_jid` int(11) DEFAULT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ic_ip
-- 



-- 
-- Definition of ame_ic_ip_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ic_ip_det` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  `dou_price` double DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  `dou_uc` double DEFAULT '0',
  `dou_ac1` double DEFAULT '0',
  `dou_ac2` double DEFAULT '0',
  `dou_ac3` double DEFAULT '0',
  `dou_ac4` double DEFAULT '0',
  `dou_ac5` double DEFAULT '0',
  `tin_pro` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ic_ip_det
-- 



-- 
-- Definition of ame_ic_iu
-- 

CREATE TABLE IF NOT EXISTS `ame_ic_iu` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `dou_rate` double DEFAULT '1',
  `int_jid` int(11) DEFAULT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ic_iu
-- 



-- 
-- Definition of ame_ic_iu_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ic_iu_det` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `var_appitemid` varchar(100) DEFAULT NULL,
  `var_appacid` varchar(100) DEFAULT NULL,
  `var_applocid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  `int_appbatchno` int(11) DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  `dou_uc` double DEFAULT '0',
  `dou_ac1` double DEFAULT '0',
  `dou_ac2` double DEFAULT '0',
  `dou_ac3` double DEFAULT '0',
  `dou_ac4` double DEFAULT '0',
  `dou_ac5` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ic_iu_det
-- 



-- 
-- Definition of ame_ic_tf
-- 

CREATE TABLE IF NOT EXISTS `ame_ic_tf` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `dou_rate` double DEFAULT '1',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ic_tf
-- 



-- 
-- Definition of ame_ic_tf_det
-- 

CREATE TABLE IF NOT EXISTS `ame_ic_tf_det` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_tolocid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  `int_poline` int(11) DEFAULT '0',
  `dou_uc` double DEFAULT '0',
  `dou_ac1` double DEFAULT '0',
  `dou_ac2` double DEFAULT '0',
  `dou_ac3` double DEFAULT '0',
  `dou_ac4` double DEFAULT '0',
  `dou_ac5` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_ic_tf_det
-- 



-- 
-- Definition of ame_mt_acc
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_acc` (
  `var_id` varchar(100) NOT NULL DEFAULT '',
  `var_name` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `int_typeid` int(4) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`),
  KEY `int_typeid` (`int_typeid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_acc
-- 



-- 
-- Definition of ame_mt_acc_set
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_acc_set` (
  `var_type` varchar(100) NOT NULL,
  `var_groupid` varchar(100) NOT NULL,
  `var_subgroupid` varchar(100) NOT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`var_type`,`var_groupid`,`var_subgroupid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_acc_set
-- 



-- 
-- Definition of ame_mt_acc_type
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_acc_type` (
  `var_id` int(4) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_group1` varchar(250) DEFAULT NULL,
  `var_group2` varchar(250) DEFAULT NULL,
  `var_group3` varchar(250) DEFAULT NULL,
  `var_group4` varchar(250) DEFAULT NULL,
  `var_group5` varchar(10) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`),
  KEY `var_name` (`var_name`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_acc_type
-- 

INSERT INTO `ame_mt_acc_type`(`var_id`,`var_name`,`var_group1`,`var_group2`,`var_group3`,`var_group4`,`var_group5`,`tin_inactive`) VALUES
(110,'Cash and Bank','Current Assets','Assets','B',NULL,'A10',0),
(120,'Account Receivable','Current Assets','Assets','B','Operating Activities','A20',0),
(130,'Other Current Assets','Current Assets','Assets','B','Operating Activities','A30',0),
(140,'Inventories','Current Assets','Assets','B','Operating Activities','A40',0),
(150,'Fixed Assets','Non-Current Assets','Assets','B','Investing Activities','A50',0),
(160,'Accumulated Depreciation','Non-Current Assets','Assets','B','Operating Activities','A60',0),
(210,'Account Payable','Current Liabilities','Liabilities & Equity','B','Operating Activities','L10',0),
(220,'Other Current Liabilities','Current Liabilities','Liabilities & Equity','B','Operating Activities','L20',0),
(250,'Long Term Liabilities','Non-Current Liabilities','Liabilities & Equity','B','Financing Activities','L50',0),
(310,'Shareholder''s Equity','Owner''s Equity','Liabilities & Equity','B','Financing Activities','E10',0),
(350,'Retained Earnings','Owner''s Equity','Liabilities & Equity','B','Financing Activities','E50',0),
(410,'Revenue','Gross Profit','Net Profit / (Loss)','P',NULL,'R10',0),
(450,'Cost of Sales','Gross Profit','Net Profit / (Loss)','P',NULL,'X10',0),
(510,'Other Revenues','Other Revenues','Net Profit / (Loss)','P',NULL,'R50',0),
(610,'Salary and Wages','Total Expenses','Net Profit / (Loss)','P',NULL,'X20',0),
(620,'Other Employee Related Expenses','Total Expenses','Net Profit / (Loss)','P',NULL,'X30',0),
(630,'Other Expenses','Total Expenses','Net Profit / (Loss)','P',NULL,'X80',0),
(640,'Depreciation and Amortisation','Total Expenses','Net Profit / (Loss)','P',NULL,'X40',0),
(650,'Finance Costs','Total Expenses','Net Profit / (Loss)','P',NULL,'X50',0),
(690,'Tax on Profit','Total Tax on Profit','Net Profit / (Loss)','P',NULL,'X90',0),
(900,'Current Year P&L Transfer','Current Year P&L Transfer','Current Year P&L Transfer','P',NULL,'',0);

-- 
-- Definition of ame_mt_cla
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_cla` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT '',
  `var_desc` varchar(2000) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_cla
-- 



-- 
-- Definition of ame_mt_com
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_com` (
  `var_id` varchar(100) NOT NULL DEFAULT '',
  `var_name1` varchar(250) DEFAULT NULL,
  `var_name2` varchar(250) DEFAULT NULL,
  `var_addr1` varchar(2000) DEFAULT NULL,
  `var_addr2` varchar(2000) DEFAULT NULL,
  `var_tel1` varchar(100) DEFAULT NULL,
  `var_tel2` varchar(100) DEFAULT NULL,
  `var_fax` varchar(250) DEFAULT NULL,
  `var_email` varchar(250) DEFAULT NULL,
  `var_website` varchar(250) DEFAULT NULL,
  `var_repheader` varchar(250) DEFAULT NULL,
  `var_taxid` varchar(250) DEFAULT NULL,
  `var_logo1` varchar(250) DEFAULT NULL,
  `var_logo2` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_com
-- 

INSERT INTO `ame_mt_com`(`var_id`,`var_name1`,`var_name2`,`var_addr1`,`var_addr2`,`var_tel1`,`var_tel2`,`var_fax`,`var_email`,`var_website`,`var_repheader`,`var_taxid`,`var_logo1`,`var_logo2`) VALUES
('1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

-- 
-- Definition of ame_mt_com_acc
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_com_acc` (
  `var_id` varchar(100) NOT NULL DEFAULT '',
  `int_line` int(2) NOT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  PRIMARY KEY (`var_id`,`int_line`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_com_acc
-- 



-- 
-- Definition of ame_mt_cur
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_cur` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT '',
  `var_symbol` varchar(10) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `tin_default` tinyint(1) DEFAULT '0',
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_cur
-- 

INSERT INTO `ame_mt_cur`(`var_id`,`var_name`,`var_symbol`,`var_desc`,`tin_default`,`tin_inactive`) VALUES
('USD','US Dollar','$','',1,0),
('KHR','Cambodian Riel','៛','',0,0),
('THB','Thai Bat','‎฿','',0,0),
('VND','Vietnamese Dong','₫','',0,0),
('MYR','Malaysian Ringgit','RM','',0,0),
('MMK','Myanmar kyat','K','',0,1),
('CAD','Canadian Dollar','C$','',0,1),
('EUR','Euro','€','',0,1),
('CNY','Chinese Yuan Renminbi','¥','',0,1);

-- 
-- Definition of ame_mt_cur_rate
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_cur_rate` (
  `var_id` varchar(100) NOT NULL,
  `dat_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `dou_rate` double DEFAULT '1',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_cur_rate
-- 

INSERT INTO `ame_mt_cur_rate`(`var_id`,`dat_date`,`dou_rate`) VALUES
('CAD','2018-04-03 08:43:23',1),
('USD','2017-12-20 07:08:24',1),
('THB','2018-07-02 16:26:33',0.035),
('KHR','2018-07-10 11:40:20',0.00025);

-- 
-- Definition of ame_mt_cur_rate_his
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_cur_rate_his` (
  `int_line` int(11) NOT NULL AUTO_INCREMENT,
  `var_id` varchar(100) NOT NULL,
  `dat_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `dou_rate` double DEFAULT '1',
  PRIMARY KEY (`int_line`,`var_id`)
) ENGINE=MyISAM AUTO_INCREMENT=71 DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_cur_rate_his
-- 

INSERT INTO `ame_mt_cur_rate_his`(`int_line`,`var_id`,`dat_date`,`dou_rate`) VALUES
(1,'USD','2017-12-20 08:34:23',1),
(2,'KHR','2017-12-20 08:34:35',0.00025),
(3,'KHR','2017-12-20 08:38:23',0.00029),
(4,'KHR','2017-12-20 08:39:03',0.00025),
(5,'BAT','2017-12-20 08:48:03',1),
(6,'KHR','2017-12-21 04:45:45',0.00024),
(7,'CAD','2018-02-14 09:47:03',1.36),
(8,'CAD','2018-02-14 09:47:35',0.89),
(9,'CAD','2018-02-19 13:36:44',0.899),
(10,'CAD','2018-02-19 13:36:58',0.99),
(11,'CAD','2018-02-19 13:37:53',0.1),
(12,'CAD','2018-02-19 13:38:03',0.98),
(13,'CAD','2018-02-19 15:59:45',0.89),
(14,'CAD','2018-02-19 16:26:38',0.98),
(15,'CAD','2018-02-21 16:15:06',0.99),
(16,'CAD','2018-02-21 16:19:17',0.98),
(17,'CAD','2018-02-21 16:22:34',1),
(18,'CAD','2018-02-21 16:24:26',0.89),
(19,'CAD','2018-02-21 16:32:13',0.99),
(20,'CAD','2018-02-21 16:33:37',1),
(21,'CAD','2018-02-21 16:34:04',0.98),
(22,'CAD','2018-02-21 16:34:21',0.99),
(23,'CAD','2018-02-22 12:05:38',0.98),
(24,'CAD','2018-02-22 13:29:54',0.99),
(25,'CAD','2018-02-23 16:00:52',0.5),
(26,'CAD','2018-02-23 16:01:16',0.99),
(27,'CAD','2018-02-23 16:44:59',0.98),
(28,'CAD','2018-02-24 11:35:10',0),
(29,'CAD','2018-02-24 11:43:20',0.98),
(30,'CAD','2018-02-24 11:43:59',0),
(31,'CAD','2018-02-24 11:54:30',0.98),
(32,'CAD','2018-02-24 13:30:10',0),
(33,'CAD','2018-02-24 13:30:28',0.99),
(34,'CAD','2018-02-24 13:42:13',0.98),
(35,'CAD','2018-02-24 13:42:28',0),
(36,'CAD','2018-02-24 13:45:50',0.89),
(37,'CAD','2018-02-24 13:47:05',1),
(38,'CAD','2018-02-24 13:47:31',0.89),
(39,'CAD','2018-02-24 14:48:39',0.98),
(40,'CAD','2018-02-26 17:02:19',0.99),
(41,'CAD','2018-02-26 17:05:11',0.98),
(42,'CAD','2018-02-27 08:48:39',0.99),
(43,'CAD','2018-02-27 09:00:09',0.98),
(44,'CAD','2018-02-27 11:36:27',0.99),
(45,'CAD','2018-02-27 14:02:01',0.98),
(46,'CAD','2018-02-28 08:48:20',0.99),
(47,'CAD','2018-02-28 08:57:13',0.98),
(48,'CAD','2018-03-03 16:32:38',1),
(49,'CAD','2018-03-03 17:01:49',0.97),
(50,'CAD','2018-03-13 08:31:27',0.99),
(51,'CAD','2018-03-13 09:33:00',0.97),
(52,'CAD','2018-03-13 10:15:27',0.99),
(53,'CAD','2018-03-13 10:17:01',0.97),
(54,'CAD','2018-03-13 14:59:37',0.99),
(55,'CAD','2018-03-14 09:42:06',0.97),
(56,'','2018-03-22 17:14:12',1),
(57,'CAD','2018-04-03 08:43:23',1),
(58,'THB','2018-04-06 08:25:20',0.032138),
(59,'THB','2018-04-06 11:34:31',0.03214),
(60,'THB','2018-04-09 09:05:41',0.032138),
(61,'THB','2018-04-09 09:10:04',0.03214),
(62,'THB','2018-04-10 11:04:48',0.05),
(63,'THB','2018-04-10 11:10:06',0.03214),
(64,'THB','2018-06-25 15:05:06',0.05),
(65,'THB','2018-06-25 16:11:34',0.03214),
(66,'THB','2018-07-02 16:26:33',0.035),
(67,'KHR','2018-07-08 14:27:13',0.000243902),
(68,'KHR','2018-07-08 14:31:11',0.00025),
(69,'KHR','2018-07-08 14:37:32',0.000243902),
(70,'KHR','2018-07-10 11:40:20',0.00025);

-- 
-- Definition of ame_mt_cus
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_cus` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT '',
  `var_name_other` varchar(250) DEFAULT NULL,
  `var_name_con` varchar(250) DEFAULT NULL,
  `var_tel1` varchar(250) DEFAULT NULL,
  `var_tel2` varchar(250) DEFAULT NULL,
  `var_fax` varchar(250) DEFAULT NULL,
  `var_web` varchar(250) DEFAULT NULL,
  `var_email` varchar(250) DEFAULT NULL,
  `var_addr` varchar(2000) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_pricecode` varchar(250) DEFAULT NULL,
  `var_groupid` varchar(100) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `var_tax` varchar(250) DEFAULT NULL,
  `var_term` varchar(100) DEFAULT NULL,
  `var_pmttype` varchar(100) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_img` varchar(250) DEFAULT NULL,
  `var_addr1` varchar(250) DEFAULT NULL,
  `var_addr2` varchar(250) DEFAULT NULL,
  `var_addr3` varchar(250) DEFAULT NULL,
  `var_addr4` varchar(250) DEFAULT NULL,
  `var_addr5` varchar(250) DEFAULT NULL,
  `var_addr6` varchar(250) DEFAULT NULL,
  `var_addr7` varchar(250) DEFAULT NULL,
  `dou_limit` double DEFAULT '0',
  `int_msg` int(4) DEFAULT '0',
  `tin_so` tinyint(1) DEFAULT '0',
  `tin_si` tinyint(1) DEFAULT '0',
  `tin_overcredit` tinyint(1) DEFAULT '0',
  `tin_overduedate` tinyint(1) DEFAULT '0',
  `tin_block` tinyint(1) DEFAULT '0',
  `tin_alertmsg` tinyint(1) DEFAULT '0',
  `tin_inactive` tinyint(1) DEFAULT '0',
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `var_crm_latitude` varchar(100) DEFAULT '',
  `var_crm_longitude` varchar(100) DEFAULT '',
  `var_crm_approval` varchar(50) DEFAULT '',
  `var_crm_facebook` varchar(255) DEFAULT '',
  `var_crm_line` varchar(255) DEFAULT '',
  `var_crm_viber` varchar(255) DEFAULT '',
  `var_crm_whatapp` varchar(255) DEFAULT '',
  `var_crm_industry` int(255) DEFAULT '0',
  `var_crm_type` int(255) DEFAULT '0',
  `tin_editable` tinyint(1) DEFAULT NULL,
  `var_authId` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_cus
-- 



-- 
-- Definition of ame_mt_cus_emp
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_cus_emp` (
  `var_cusid` varchar(100) NOT NULL DEFAULT '',
  `var_empid` varchar(100) NOT NULL DEFAULT '',
  `var_desc` varchar(2000) DEFAULT NULL,
  PRIMARY KEY (`var_cusid`,`var_empid`),
  KEY `var_cusid` (`var_cusid`) USING BTREE,
  KEY `var_empid` (`var_empid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_cus_emp
-- 

INSERT INTO `ame_mt_cus_emp`(`var_cusid`,`var_empid`,`var_desc`) VALUES
('C00096','E-00005',NULL),
('C00025','E00002',''),
('C00026','E-00004',''),
('C00013','E-00005',''),
('C00011','E-00004',''),
('C00038','E-00005',' '),
('C00041','E-00005',NULL),
('C00002','E00002',NULL),
('C00003','E00004',NULL),
('C00004','E00002',NULL),
('C00100','E-00005',NULL),
('C00101','E-00004',NULL),
('C00001','E-00004',NULL),
('C00102','E-00004',NULL);

-- 
-- Definition of ame_mt_cus_gro
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_cus_gro` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_cus_gro
-- 



-- 
-- Definition of ame_mt_cus_msg
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_cus_msg` (
  `int_id` int(11) NOT NULL,
  `var_desc` varchar(2000) DEFAULT '',
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`int_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_cus_msg
-- 



-- 
-- Definition of ame_mt_emp
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_emp` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT '',
  `var_name_other` varchar(250) DEFAULT NULL,
  `var_name_con` varchar(250) DEFAULT NULL,
  `var_tel1` varchar(250) DEFAULT NULL,
  `var_tel2` varchar(250) DEFAULT NULL,
  `var_fax` varchar(250) DEFAULT NULL,
  `var_web` varchar(250) DEFAULT NULL,
  `var_email` varchar(250) DEFAULT NULL,
  `var_addr` varchar(2000) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_groupid` varchar(100) DEFAULT NULL,
  `var_posid` varchar(100) DEFAULT NULL,
  `var_term` varchar(100) DEFAULT NULL,
  `var_pmttype` varchar(100) DEFAULT NULL,
  `var_cardid` varchar(100) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_img` varchar(250) DEFAULT NULL,
  `var_addr1` varchar(250) DEFAULT NULL,
  `var_addr2` varchar(250) DEFAULT NULL,
  `var_addr3` varchar(250) DEFAULT NULL,
  `var_addr4` varchar(250) DEFAULT NULL,
  `var_addr5` varchar(250) DEFAULT NULL,
  `var_addr6` varchar(250) DEFAULT NULL,
  `var_addr7` varchar(250) DEFAULT NULL,
  `dou_limit` double DEFAULT '0',
  `tin_rep` tinyint(1) DEFAULT '0',
  `int_msg` int(4) DEFAULT '0',
  `tin_overcredit` tinyint(1) DEFAULT '0',
  `tin_overduedate` tinyint(1) DEFAULT '0',
  `tin_block` tinyint(1) DEFAULT '0',
  `tin_alertmsg` tinyint(1) DEFAULT '0',
  `tin_inactive` tinyint(1) DEFAULT '0',
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `var_hrm_sex` varchar(50) DEFAULT NULL,
  `var_hrm_passportid` varchar(100) DEFAULT NULL,
  `dat_hrm_visaexpire` date DEFAULT NULL,
  `var_hrm_nssfid` varchar(100) DEFAULT NULL,
  `var_hrm_marital_status` varchar(100) DEFAULT NULL,
  `dat_hrm_dob` date DEFAULT NULL,
  `dat_hrm_joindate` date DEFAULT NULL,
  `tin_hrm_probation` tinyint(4) DEFAULT NULL,
  `dat_hrm_enddateprobation` date DEFAULT NULL,
  `var_hrm_salutation` varchar(100) DEFAULT NULL,
  `var_hrm_home_tel` varchar(100) DEFAULT NULL,
  `var_hrm_company_tel` varchar(100) DEFAULT NULL,
  `var_hrm_emergency_person_name` varchar(100) DEFAULT NULL,
  `var_hrm_emergency_relationship` varchar(100) DEFAULT NULL,
  `var_hrm_emergency_tel` varchar(100) DEFAULT NULL,
  `var_hrm_company_email` varchar(100) DEFAULT NULL,
  `var_hrm_address_kh` varchar(2000) DEFAULT NULL,
  `var_hrm_status` varchar(100) DEFAULT NULL,
  `dat_hrm_date` date DEFAULT NULL,
  `var_hrm_supervisor` varchar(100) DEFAULT NULL,
  `dat_hrm_contact_date` date DEFAULT NULL,
  `var_hrm_grade` varchar(100) DEFAULT NULL,
  `var_hrm_type` varchar(100) DEFAULT NULL,
  `var_hrm_category` varchar(100) DEFAULT NULL,
  `var_hrm_department_id` varchar(100) DEFAULT NULL,
  `var_hrm_branch_id` varchar(100) DEFAULT NULL,
  `var_hrm_nationality` varchar(100) DEFAULT NULL,
  `var_hrm_nationals` varchar(100) DEFAULT NULL,
  `var_hrm_bank_id` varchar(100) DEFAULT NULL,
  `var_hrm_account_no` varchar(100) DEFAULT NULL,
  `var_hrm_shift_type` varchar(100) DEFAULT NULL,
  `var_hrm_shift_id` varchar(255) DEFAULT NULL,
  `tin_hrm_allow_login` tinyint(4) DEFAULT NULL,
  `tin_hrm_notification_email` tinyint(4) DEFAULT NULL,
  `var_hrm_state` varchar(100) DEFAULT NULL,
  `var_hrm_permanent_address` varchar(2000) DEFAULT NULL,
  `var_hrm_permanent_home_no` varchar(100) DEFAULT NULL,
  `var_hrm_permanent_street` varchar(100) DEFAULT NULL,
  `var_hrm_permanent_village` varchar(100) DEFAULT NULL,
  `var_hrm_permanent_district` varchar(100) DEFAULT NULL,
  `var_hrm_permanent_commune` varchar(100) DEFAULT NULL,
  `var_hrm_permanent_city` varchar(100) DEFAULT NULL,
  `var_hrm_permanent_state` varchar(100) DEFAULT NULL,
  `var_hrm_permanent_country` varchar(100) DEFAULT NULL,
  `var_hrm_description` varchar(2000) DEFAULT NULL,
  `var_hrm_fpid` varchar(100) DEFAULT NULL,
  `var_hrm_internal_id` varchar(100) DEFAULT NULL,
  `tin_hrm_late_deduction` tinyint(4) DEFAULT NULL,
  `dat_hrm_date_status` date DEFAULT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_emp
-- 



-- 
-- Definition of ame_mt_emp_gro
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_emp_gro` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_emp_gro
-- 



-- 
-- Definition of ame_mt_hol
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_hol` (
  `int_id` int(10) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`int_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_hol
-- 



-- 
-- Definition of ame_mt_ite
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_ite` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_name` varchar(500) DEFAULT NULL,
  `var_name_other` varchar(250) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_groupid` varchar(100) DEFAULT NULL,
  `var_venid` varchar(100) DEFAULT NULL,
  `var_itemcode` varchar(100) DEFAULT NULL,
  `var_barcode` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_desc_pur` varchar(2000) DEFAULT NULL,
  `var_desc_sal` varchar(2000) DEFAULT NULL,
  `var_img` varchar(250) DEFAULT NULL,
  `dou_order_pt` double DEFAULT '0',
  `dou_order_qty` double DEFAULT '0',
  `tin_inactive` tinyint(1) DEFAULT '0',
  `tin_no_disc` tinyint(1) DEFAULT '0',
  `tin_no_sal` tinyint(1) DEFAULT '0',
  `tin_vat` tinyint(1) DEFAULT '0',
  `tin_wht` tinyint(1) DEFAULT '0',
  `tin_sct` tinyint(1) DEFAULT '0',
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `int_vb_orderId` int(11) DEFAULT NULL,
  PRIMARY KEY (`var_id`),
  KEY `var_uomid` (`var_uomid`) USING BTREE,
  KEY `var_groupid` (`var_groupid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_ite
-- 



-- 
-- Definition of ame_mt_ite_ass
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_ite_ass` (
  `var_id` varchar(80) NOT NULL,
  `var_itemid` varchar(80) NOT NULL,
  `var_uomid_ass` varchar(80) NOT NULL,
  `var_uomid` varchar(80) NOT NULL,
  `int_line` int(10) NOT NULL DEFAULT '1',
  `dou_qty` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`var_itemid`,`var_uomid_ass`,`var_uomid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_ite_ass
-- 



-- 
-- Definition of ame_mt_ite_gro
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_ite_gro` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT '',
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_accid_ic` varchar(100) DEFAULT NULL,
  `var_accid_pl` varchar(100) DEFAULT NULL,
  `var_accid_pl_ret` varchar(100) DEFAULT NULL,
  `var_accid_cogs` varchar(100) DEFAULT NULL,
  `var_accid_ac1` varchar(100) DEFAULT NULL,
  `var_accid_ac2` varchar(100) DEFAULT NULL,
  `var_accid_ac3` varchar(100) DEFAULT NULL,
  `var_accid_ac4` varchar(100) DEFAULT NULL,
  `var_accid_ac5` varchar(100) DEFAULT NULL,
  `var_accid_ia` varchar(100) DEFAULT NULL,
  `var_accid_iu` varchar(100) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_ite_gro
-- 



-- 
-- Definition of ame_mt_ite_pri
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_ite_pri` (
  `var_id` varchar(80) NOT NULL,
  `var_pricecode` varchar(90) NOT NULL,
  `var_uomid` varchar(80) NOT NULL,
  `var_cur` varchar(80) NOT NULL,
  `int_line` int(10) DEFAULT '1',
  `dou_price` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`var_pricecode`,`var_uomid`,`var_cur`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_ite_pri
-- 



-- 
-- Definition of ame_mt_ite_pri_his
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_ite_pri_his` (
  `int_line` int(11) NOT NULL AUTO_INCREMENT,
  `var_id` varchar(100) DEFAULT NULL,
  `var_pricecode` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dou_price` double DEFAULT '0',
  PRIMARY KEY (`int_line`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_ite_pri_his
-- 



-- 
-- Definition of ame_mt_ite_pro_hie
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_ite_pro_hie` (
  `int_id` int(11) NOT NULL,
  `int_parid` int(11) NOT NULL DEFAULT '0',
  `var_name` varchar(250) DEFAULT '',
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`int_id`,`int_parid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_ite_pro_hie
-- 

INSERT INTO `ame_mt_ite_pro_hie`(`int_id`,`int_parid`,`var_name`,`tin_inactive`) VALUES
(1,0,'D1',0),
(2,0,'D2',0),
(3,1,'D1_1',0),
(4,1,'D1_2',1),
(5,2,'D2_1',1),
(6,2,'D2_2',0),
(7,3,'D1_1_1',0);

-- 
-- Definition of ame_mt_ite_uom
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_ite_uom` (
  `var_id` varchar(100) NOT NULL,
  `var_uomid` varchar(100) NOT NULL,
  `int_line` int(10) DEFAULT '1',
  `dou_conv` double DEFAULT '1',
  `tin_pur` tinyint(1) DEFAULT '0',
  `tin_sal` tinyint(1) DEFAULT '0',
  `tin_def` tinyint(1) DEFAULT '0',
  `int_tm_amount` int(11) DEFAULT NULL,
  PRIMARY KEY (`var_id`,`var_uomid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_ite_uom
-- 



-- 
-- Definition of ame_mt_loc
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_loc` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_addr` varchar(2000) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT '0',
  `tin_posloc` tinyint(1) DEFAULT NULL,
  `var_wifi` varchar(255) DEFAULT NULL,
  `var_name_kh` varchar(255) DEFAULT NULL,
  `var_tel1` varchar(255) DEFAULT NULL,
  `var_tel2` varchar(255) DEFAULT NULL,
  `var_inv_footer` varchar(255) DEFAULT NULL,
  `var_inv_logo` varchar(255) DEFAULT NULL,
  `var_prefix` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_loc
-- 



-- 
-- Definition of ame_mt_msg
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_msg` (
  `int_id` int(11) NOT NULL,
  `var_desc` varchar(2000) DEFAULT '',
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`int_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_msg
-- 

INSERT INTO `ame_mt_msg`(`int_id`,`var_desc`,`tin_inactive`) VALUES
(1,'This customer is difficult to collect the money.\nPls ask supervisor for new issue invoice.',0),
(2,'Chea Sophorn 2',0),
(3,'Chea Sophorn 1',0),
(4,'Not allowed sales',0);

-- 
-- Definition of ame_mt_of
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_of` (
  `int_id` int(11) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `int_sort` int(11) DEFAULT '0',
  `tin_ven` tinyint(1) DEFAULT '0',
  `tin_cus` tinyint(1) DEFAULT '0',
  `tin_emp` tinyint(1) DEFAULT '0',
  `tin_item` tinyint(1) DEFAULT '0',
  `tin_req` tinyint(1) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`int_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_of
-- 



-- 
-- Definition of ame_mt_of_list
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_of_list` (
  `int_id` varchar(255) NOT NULL,
  `int_line` int(11) NOT NULL,
  `var_value` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`int_id`,`int_line`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_of_list
-- 



-- 
-- Definition of ame_mt_of_value
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_of_value` (
  `int_id` int(11) NOT NULL,
  `var_modid` varchar(100) NOT NULL,
  `var_num` varchar(100) NOT NULL,
  `var_value` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`int_id`,`var_modid`,`var_num`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_of_value
-- 



-- 
-- Definition of ame_mt_pmt_meth
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_pmt_meth` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT '',
  `var_desc` varchar(2000) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_pmt_meth
-- 



-- 
-- Definition of ame_mt_pmt_term
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_pmt_term` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT '',
  `var_type` varchar(100) DEFAULT NULL,
  `dou_disc` double DEFAULT '0',
  `int_daydue` int(11) DEFAULT '0',
  `int_daydisc` int(11) DEFAULT '0',
  `int_dayminpay` int(11) DEFAULT '0',
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_pmt_term
-- 



-- 
-- Definition of ame_mt_pos
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_pos` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_addr` varchar(2000) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT '0',
  `int_level` int(11) NOT NULL DEFAULT '0',
  `var_description` varchar(2000) DEFAULT NULL,
  PRIMARY KEY (`var_id`,`int_level`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_pos
-- 



-- 
-- Definition of ame_mt_pri_cod
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_pri_cod` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT '',
  `var_desc` varchar(2000) DEFAULT '',
  `tin_reportprice` tinyint(1) DEFAULT '0',
  `tin_inactive` tinyint(1) DEFAULT '0',
  `tin_vb_isDefault` tinyint(1) DEFAULT '0',
  `dou_vb_serviceCharge` double DEFAULT '0',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_pri_cod
-- 



-- 
-- Definition of ame_mt_ship_addr
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_ship_addr` (
  `var_num` varchar(100) NOT NULL,
  `var_type` varchar(100) NOT NULL,
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_addr` varchar(2000) DEFAULT NULL,
  `var_addr1` varchar(250) DEFAULT '0',
  `var_addr2` varchar(250) DEFAULT NULL,
  `var_addr3` varchar(250) DEFAULT NULL,
  `var_addr4` varchar(250) DEFAULT NULL,
  `var_addr5` varchar(250) DEFAULT NULL,
  `var_addr6` varchar(250) DEFAULT NULL,
  `var_addr7` varchar(250) DEFAULT NULL,
  `tin_default` tinyint(1) DEFAULT '0',
  `var_crm_latitude` varchar(100) DEFAULT '',
  `var_crm_longitude` varchar(100) DEFAULT '',
  PRIMARY KEY (`var_num`,`var_type`,`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_ship_addr
-- 



-- 
-- Definition of ame_mt_tem_odd
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_tem_odd` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Requested',
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_from` datetime DEFAULT NULL,
  `dat_to` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `tin_editable` tinyint(1) DEFAULT NULL,
  `var_authId` varchar(255) DEFAULT NULL,
  `dat_approved` datetime DEFAULT NULL,
  `var_crm_relate` varchar(255) DEFAULT NULL,
  `var_crm_relateid` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_tem_odd
-- 

INSERT INTO `ame_mt_tem_odd`(`var_id`,`var_type`,`var_cusid`,`var_status`,`var_desc`,`var_create`,`var_modify`,`dat_date`,`dat_from`,`dat_to`,`dat_create`,`dat_modify`,`tin_editable`,`var_authId`,`dat_approved`,`var_crm_relate`,`var_crm_relateid`) VALUES
('OD00001',NULL,'C00001','Deleted','','ADMIN','ADMIN','2018-05-18 17:41:17','2018-05-18 17:41:17','2018-05-18 17:41:17','2018-05-18 17:41:02','2018-05-18 17:41:17',NULL,NULL,NULL,NULL,NULL),
('OD00002','Customer','C00002','Requested','Kheav Chansotheara Kheav Chansotheara','ADMIN','ADMIN','2018-05-18 11:51:20','2018-05-18 11:51:20','2018-05-18 11:51:20','2018-05-18 17:41:25','2018-05-19 11:51:20',NULL,NULL,NULL,NULL,NULL),
('OD00003','Vendor','V00012','Requested','','ADMIN','ADMIN','2018-05-19 11:55:25','2018-05-19 11:55:25','2018-05-19 11:55:25','2018-05-19 11:51:09','2018-05-19 11:55:25',NULL,NULL,NULL,NULL,NULL),
('OD00007','Customer','C00002','Deleted','ddddddddddddddddd','balancika','balancika',NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 11:22:18','2018-07-17 11:25:03',1,NULL,NULL,'Quotation','QUO00001'),
('OD00008','Customer','C00002','Cancelled','SFSFSFSFSFS','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 11:27:03',NULL,1,NULL,NULL,'Quotation','QUO00001'),
('OD00009','Customer','C00002','Requested','adsfdasdasdasdasdasdasdasdasdasasdasdasdasdasdasd\nasd\nasd\nasd\nas\ndas\ndas\nds\nasd','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 14:34:20',NULL,1,NULL,NULL,'Quotation','QUO00001'),
('OD00010','Customer','C00002','Requested','','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 14:36:28',NULL,1,'Auth-00012',NULL,'Quotation','QUO00001'),
('OD00011','Customer','C00002','Requested','','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 14:39:34',NULL,1,'Auth-00012',NULL,'Quotation','QUO00001'),
('OD00012','Customer','C00002','Requested','','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 14:48:22',NULL,1,NULL,NULL,'Quotation','QUO00001'),
('OD00013','Customer','C00002','Requested','','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 14:52:12',NULL,1,NULL,NULL,'Quotation','QUO00001'),
('OD00014','Customer','C00002','Requested','','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 14:54:27',NULL,1,NULL,NULL,'Quotation','QUO00001'),
('OD00015','Customer','C00002','Requested','','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 14:56:13',NULL,1,'Auth-00012',NULL,'Quotation','QUO00001'),
('OD00050','Customer','C00096','Approved','','ADMIN',NULL,'2018-07-31 17:33:01','2018-07-31 17:33:01','2018-07-31 17:33:01','2018-07-31 17:33:01',NULL,NULL,NULL,NULL,NULL,NULL),
('OD00051','Customer','C00096','Requested','','ADMIN','ADMIN','2018-07-31 17:35:20','2018-07-31 17:35:20','2018-07-31 17:35:20','2018-07-31 17:33:55','2018-07-31 17:35:20',NULL,NULL,NULL,NULL,NULL);

-- 
-- Definition of ame_mt_tem_tc
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_tem_tc` (
  `var_id` varchar(100) NOT NULL,
  `var_type` varchar(100) DEFAULT NULL,
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Approved',
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_from` datetime DEFAULT NULL,
  `dat_to` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dou_amt` double DEFAULT '0',
  `dou_funamt` double DEFAULT '0',
  `dou_rate` double DEFAULT '1',
  `tin_editable` tinyint(1) DEFAULT NULL,
  `var_authId` varchar(255) DEFAULT NULL,
  `var_crm_relate` varchar(255) DEFAULT NULL,
  `var_crm_relateid` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_tem_tc
-- 

INSERT INTO `ame_mt_tem_tc`(`var_id`,`var_type`,`var_cusid`,`var_status`,`var_desc`,`var_cur`,`var_create`,`var_modify`,`dat_date`,`dat_from`,`dat_to`,`dat_create`,`dat_modify`,`dou_amt`,`dou_funamt`,`dou_rate`,`tin_editable`,`var_authId`,`var_crm_relate`,`var_crm_relateid`) VALUES
('TC00001',NULL,'C00001','Deleted','','THB','ADMIN','ADMIN','2018-05-18 13:41:18','2018-05-18 13:41:18','2018-05-18 13:41:18','2018-05-18 10:38:02','2018-05-18 13:41:18',1000,32.14,0.03214,NULL,NULL,NULL,NULL),
('TC00002','','C00001','Requested','','THB','ADMIN','ADMIN','2018-05-18 11:31:40','2018-05-18 11:31:40','2018-05-18 11:31:40','2018-05-18 10:39:00','2018-05-19 11:31:40',3000,96.42,0.03214,NULL,NULL,NULL,NULL),
('TC00003',NULL,'C00005','Requested','','USD','ADMIN',NULL,'2018-05-18 11:14:39','2018-05-18 11:14:39','2018-05-18 11:14:39','2018-05-18 11:14:39',NULL,0,0,1,NULL,NULL,NULL,NULL),
('TC00004',NULL,'C00001','Requested','','THB','ADMIN',NULL,'2018-05-18 11:24:53','2018-05-18 11:24:53','2018-05-18 11:24:53','2018-05-18 11:24:53',NULL,30000,964.2,0.03214,NULL,NULL,NULL,NULL),
('TC00005','Customer','V00003','Requested','','USD','ADMIN','ADMIN','2018-05-18 11:49:30','2018-05-18 11:49:30','2018-05-18 11:49:30','2018-05-18 11:25:12','2018-05-19 11:49:30',300,300,1,NULL,NULL,NULL,NULL),
('TC00006','Customer','C00001','Requested','','THB','ADMIN','ADMIN','2018-05-18 11:35:23','2018-05-18 11:35:23','2018-05-18 11:35:23','2018-05-18 11:31:35','2018-05-19 11:35:23',6325,203.29,0.03214,NULL,NULL,NULL,NULL),
('TC00007',NULL,'C00001','Deleted','','THB','ADMIN',NULL,'2018-05-18 11:34:18','2018-05-18 11:34:18','2018-05-18 11:34:18','2018-05-18 11:34:18',NULL,6325,203.29,0.03214,NULL,NULL,NULL,NULL),
('TC00008',NULL,'C00001','Deleted','','THB','ADMIN','ADMIN','2018-05-18 17:01:14','2018-05-18 17:01:14','2018-05-18 17:01:14','2018-05-18 11:35:45','2018-05-18 17:01:14',6325,203.29,0.03214,NULL,NULL,NULL,NULL),
('TC00009','Customer','C00001','Approved','','THB','ADMIN',NULL,'2018-05-19 11:34:56','2018-05-19 11:34:56','2018-05-19 11:34:56','2018-05-19 11:34:56',NULL,2000,64.28,0.03214,NULL,NULL,NULL,NULL),
('TC00010','Vendor','V00012','Approved','','THB','ADMIN',NULL,'2018-05-19 11:51:40','2018-05-19 11:51:40','2018-05-19 11:51:40','2018-05-19 11:51:40',NULL,200,6.43,0.03214,NULL,NULL,NULL,NULL),
('TC00011','Employee','E00001','Approved','','USD','ADMIN','ADMIN','2018-05-20 12:13:03','2018-05-20 12:13:03','2018-05-20 12:13:03','2018-05-20 12:12:16','2018-05-20 12:13:03',500,500,1,NULL,NULL,NULL,NULL),
('1',NULL,NULL,'Approved',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,NULL,NULL,NULL,NULL),
('TC00012','Customer','C00002','Deleted','dddddddddddddddddd','USD','balancika','balancika',NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 09:52:18','2018-07-17 10:07:31',100,100,1,1,NULL,'Quotation','QUO00001'),
('TC00013','Customer','C00002','Cancelled','wgfwgwg23h23h','USD','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 10:13:46',NULL,34534,34534,1,1,NULL,'Quotation','QUO00001'),
('TC00014','Customer','C00002','Requested','asdsdasasdasdasasdasdasdasdasdasdasdsdsdsdasdasdasd','USD','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 11:48:21',NULL,100000,100000,1,1,NULL,'Quotation','QUO00001'),
('TC00015','Customer','C00002','Requested','asfdsfdsdsdsds','USD','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 14:00:45',NULL,100000000,100000000,1,0,'Auth-00012','Quotation','QUO00001'),
('TC00016','Customer','C00002','Requested','','USD','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 14:24:02',NULL,11,11,1,1,'Auth-00012','Quotation','QUO00001'),
('TC00017','Customer','C00002','Requested','123123123','USD','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 14:51:57',NULL,123123123,123123123,1,1,NULL,'Quotation','QUO00001'),
('TC00018','Customer','C00002','Requested','','USD','balancika',NULL,NULL,'2018-07-17 00:00:00','2018-07-17 00:00:00','2018-07-17 14:54:43',NULL,12312312,12312312,1,1,'Auth-00012','Quotation','QUO00001'),
('TC00019','Customer','C00002','Requested','','USD','balancika',NULL,NULL,'2018-07-18 00:00:00','2018-07-18 00:00:00','2018-07-18 10:35:41',NULL,123,123,1,1,'Auth-00014','Quotation','QUO00001'),
('TC00020','Customer','C00002','Requested','123','USD','balancika',NULL,NULL,'2018-07-18 00:00:00','2018-07-18 00:00:00','2018-07-18 10:35:59',NULL,123,123,1,1,'Auth-00014','Sale Order','SO00001'),
('TC00021','Customer','C00002','Requested','123','USD','balancika',NULL,NULL,'2018-07-18 00:00:00','2018-07-18 00:00:00','2018-07-18 10:36:10',NULL,123,123,1,1,'Auth-00014','Sale Order','SO00001'),
('TC00022','Customer','C00002','Requested','123\ndfgd\ngd','USD','balancika',NULL,NULL,'2018-07-18 00:00:00','2018-07-18 00:00:00','2018-07-18 10:36:17',NULL,123,123,1,1,'Auth-00014','Sale Order','SO00001'),
('TC00023','Customer','C00002','Deleted','123','USD','balancika',NULL,NULL,'2018-07-18 00:00:00','2018-07-18 00:00:00','2018-07-18 10:37:58',NULL,12312312,12312312,1,1,'Auth-00014','Quotation','QUO00001'),
('TC00024','Customer','C00002','Requested','','USD','balancika',NULL,NULL,'2018-07-18 00:00:00','2018-07-18 00:00:00','2018-07-18 10:38:35',NULL,11,11,1,1,'Auth-00014','Sale Order','SO00001'),
('TC00025','Customer','C00002','Requested','','USD','balancika',NULL,NULL,'2018-07-18 00:00:00','2018-07-18 00:00:00','2018-07-18 10:42:30',NULL,123123,123123,1,0,'Auth-00014','Quotation','QUO00001'),
('TC00050','Customer','C00096','Approved','','USD','ADMIN','ADMIN','2018-07-31 09:51:54','2018-07-31 09:51:54','2018-07-31 09:51:54','2018-07-31 17:32:54','2018-08-01 09:51:54',200,200,1,NULL,NULL,NULL,NULL);

-- 
-- Definition of ame_mt_uom
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_uom` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_uom
-- 



-- 
-- Definition of ame_mt_ven
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_ven` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT '',
  `var_name_other` varchar(250) DEFAULT NULL,
  `var_name_con` varchar(250) DEFAULT NULL,
  `var_tel1` varchar(250) DEFAULT NULL,
  `var_tel2` varchar(250) DEFAULT NULL,
  `var_fax` varchar(250) DEFAULT NULL,
  `var_web` varchar(250) DEFAULT NULL,
  `var_email` varchar(250) DEFAULT NULL,
  `var_addr` varchar(1000) DEFAULT NULL,
  `var_desc` varchar(1000) DEFAULT NULL,
  `var_groupid` varchar(100) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `var_tax` varchar(250) DEFAULT NULL,
  `var_term` varchar(250) DEFAULT NULL,
  `var_pmttype` varchar(100) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `var_img` varchar(250) DEFAULT NULL,
  `var_addr1` varchar(250) DEFAULT NULL,
  `var_addr2` varchar(250) DEFAULT NULL,
  `var_addr3` varchar(250) DEFAULT NULL,
  `var_addr4` varchar(250) DEFAULT NULL,
  `var_addr5` varchar(250) DEFAULT NULL,
  `var_addr6` varchar(250) DEFAULT NULL,
  `var_addr7` varchar(250) DEFAULT NULL,
  `dou_limit` double DEFAULT '0',
  `int_msg` int(4) DEFAULT '0',
  `tin_po` tinyint(1) DEFAULT '0',
  `tin_pi` tinyint(1) DEFAULT '0',
  `tin_overcredit` tinyint(1) DEFAULT '0',
  `tin_overduedate` tinyint(1) DEFAULT '0',
  `tin_block` tinyint(1) DEFAULT '0',
  `tin_alertmsg` tinyint(1) DEFAULT '0',
  `tin_inactive` tinyint(1) DEFAULT '0',
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_ven
-- 



-- 
-- Definition of ame_mt_ven_gro
-- 

CREATE TABLE IF NOT EXISTS `ame_mt_ven_gro` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_mt_ven_gro
-- 



-- 
-- Definition of ame_refund
-- 

CREATE TABLE IF NOT EXISTS `ame_refund` (
  `var_id` varchar(100) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_doctype` varchar(100) DEFAULT NULL,
  `var_docid` varchar(100) DEFAULT NULL,
  `var_perid` varchar(100) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `var_preaccid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_status` varchar(100) DEFAULT 'Open',
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_pmttype` varchar(100) DEFAULT NULL,
  `var_pmtref` varchar(250) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `var_post` varchar(100) DEFAULT NULL,
  `var_void` varchar(100) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `dat_post` datetime DEFAULT NULL,
  `dat_void` datetime DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `dou_amt` double DEFAULT '0',
  `var_cur` varchar(100) DEFAULT NULL,
  `dou_rate` double DEFAULT '1',
  `dou_funamt` double DEFAULT '0',
  `dou_funar` double DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_line`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_refund
-- 



-- 
-- Definition of ame_sl_ap
-- 

CREATE TABLE IF NOT EXISTS `ame_sl_ap` (
  `var_venid` varchar(100) NOT NULL DEFAULT '',
  `var_cur` varchar(100) NOT NULL DEFAULT '',
  `dat_date` date NOT NULL,
  `dou_dr` double DEFAULT '0',
  `dou_cr` double DEFAULT '0',
  `dou_fundr` double DEFAULT '0',
  `dou_funcr` double DEFAULT '0',
  PRIMARY KEY (`var_venid`,`var_cur`,`dat_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sl_ap
-- 



-- 
-- Definition of ame_sl_ap_his
-- 

CREATE TABLE IF NOT EXISTS `ame_sl_ap_his` (
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_modid` varchar(20) DEFAULT NULL,
  `var_doctype` varchar(100) DEFAULT NULL,
  `var_docid` varchar(100) DEFAULT NULL,
  `var_venid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `var_apaccid` varchar(100) DEFAULT NULL,
  `var_term` varchar(100) DEFAULT NULL,
  `var_pmttype` varchar(100) DEFAULT NULL,
  `var_pmtref` varchar(250) DEFAULT NULL,
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_due` datetime DEFAULT NULL,
  `dou_dr` double DEFAULT NULL,
  `dou_cr` double DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `dou_rate` double DEFAULT '1',
  `dou_fundr` double DEFAULT '0',
  `dou_funcr` double DEFAULT '0',
  PRIMARY KEY (`int_line`),
  KEY `var_venid` (`var_venid`) USING BTREE,
  KEY `var_claid` (`var_claid`) USING BTREE,
  KEY `var_accid` (`var_accid`) USING BTREE,
  KEY `var_apaccid` (`var_apaccid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sl_ap_his
-- 



-- 
-- Definition of ame_sl_ar
-- 

CREATE TABLE IF NOT EXISTS `ame_sl_ar` (
  `var_cusid` varchar(100) NOT NULL DEFAULT '',
  `var_cur` varchar(100) NOT NULL DEFAULT '',
  `dat_date` date NOT NULL,
  `dou_dr` double DEFAULT '0',
  `dou_cr` double DEFAULT '0',
  `dou_fundr` double DEFAULT '0',
  `dou_funcr` double DEFAULT '0',
  PRIMARY KEY (`var_cusid`,`var_cur`,`dat_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sl_ar
-- 



-- 
-- Definition of ame_sl_ar_his
-- 

CREATE TABLE IF NOT EXISTS `ame_sl_ar_his` (
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_modid` varchar(20) DEFAULT NULL,
  `var_doctype` varchar(50) DEFAULT NULL,
  `var_docid` varchar(100) DEFAULT NULL,
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_empid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_accid` varchar(100) DEFAULT NULL,
  `var_araccid` varchar(100) DEFAULT NULL,
  `var_term` varchar(100) DEFAULT NULL,
  `var_pmttype` varchar(100) DEFAULT NULL,
  `var_pmtref` varchar(250) DEFAULT NULL,
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dat_due` datetime DEFAULT NULL,
  `dou_dr` double DEFAULT NULL,
  `dou_cr` double DEFAULT NULL,
  `int_jid` int(11) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `dou_rate` double DEFAULT '1',
  `dou_fundr` double DEFAULT '0',
  `dou_funcr` double DEFAULT '0',
  PRIMARY KEY (`int_line`),
  KEY `var_cusid` (`var_cusid`) USING BTREE,
  KEY `var_empid` (`var_empid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sl_ar_his
-- 



-- 
-- Definition of ame_sl_ic
-- 

CREATE TABLE IF NOT EXISTS `ame_sl_ic` (
  `var_locid` varchar(100) NOT NULL DEFAULT '',
  `var_itemid` varchar(100) NOT NULL DEFAULT '',
  `int_batchno` int(11) NOT NULL,
  `dat_date` date NOT NULL,
  `dou_drqty` double DEFAULT '0',
  `dou_druc` double DEFAULT '0',
  `dou_drac1` double DEFAULT '0',
  `dou_drac2` double DEFAULT '0',
  `dou_drac3` double DEFAULT '0',
  `dou_drac4` double DEFAULT '0',
  `dou_drac5` double DEFAULT '0',
  `dou_crqty` double DEFAULT '0',
  `dou_cruc` double DEFAULT '0',
  `dou_crac1` double DEFAULT '0',
  `dou_crac2` double DEFAULT '0',
  `dou_crac3` double DEFAULT '0',
  `dou_crac4` double DEFAULT '0',
  `dou_crac5` double DEFAULT '0',
  PRIMARY KEY (`var_locid`,`var_itemid`,`int_batchno`,`dat_date`),
  KEY `ind1` (`var_locid`) USING BTREE,
  KEY `ind2` (`var_itemid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sl_ic
-- 



-- 
-- Definition of ame_sl_ic_batch
-- 

CREATE TABLE IF NOT EXISTS `ame_sl_ic_batch` (
  `var_locid` varchar(100) NOT NULL,
  `var_itemid` varchar(100) NOT NULL,
  `int_batchno` int(11) NOT NULL,
  `dou_drqty` double DEFAULT '0',
  `dou_druc` double DEFAULT '0',
  `dou_drac1` double DEFAULT '0',
  `dou_drac2` double DEFAULT '0',
  `dou_drac3` double DEFAULT '0',
  `dou_drac4` double DEFAULT '0',
  `dou_drac5` double DEFAULT '0',
  `dou_crqty` double DEFAULT '0',
  `dou_cruc` double DEFAULT '0',
  `dou_crac1` double DEFAULT '0',
  `dou_crac2` double DEFAULT '0',
  `dou_crac3` double DEFAULT '0',
  `dou_crac4` double DEFAULT '0',
  `dou_crac5` double DEFAULT '0',
  `dou_qty` double DEFAULT '0',
  PRIMARY KEY (`var_locid`,`var_itemid`,`int_batchno`),
  KEY `ind1` (`var_locid`) USING BTREE,
  KEY `ind2` (`var_itemid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sl_ic_batch
-- 



-- 
-- Definition of ame_sl_ic_his
-- 

CREATE TABLE IF NOT EXISTS `ame_sl_ic_his` (
  `int_id` int(11) NOT NULL,
  `int_line` int(11) NOT NULL,
  `var_locid` varchar(100) DEFAULT NULL,
  `var_itemid` varchar(100) DEFAULT NULL,
  `int_batchno` int(11) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  `dou_uc` double DEFAULT '0',
  `dou_ac1` double DEFAULT '0',
  `dou_ac2` double DEFAULT '0',
  `dou_ac3` double DEFAULT '0',
  `dou_ac4` double DEFAULT '0',
  `dou_ac5` double DEFAULT '0',
  `var_modid` varchar(100) DEFAULT NULL,
  `var_doctype` varchar(100) DEFAULT NULL,
  `var_docid` varchar(100) DEFAULT NULL,
  `var_venid` varchar(100) DEFAULT NULL,
  `var_cusid` varchar(100) DEFAULT NULL,
  `var_empid` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_ref` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_desc_det` varchar(2000) DEFAULT NULL,
  `var_cur` varchar(100) DEFAULT NULL,
  `dou_rate` double DEFAULT '1',
  `dou_foc` double DEFAULT '0',
  `int_jid` int(11) DEFAULT '0',
  PRIMARY KEY (`int_id`,`int_line`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sl_ic_his
-- 



-- 
-- Definition of ame_sys_add_cost
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_add_cost` (
  `var_id` varchar(10) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_header` varchar(250) DEFAULT NULL,
  `int_line` int(4) DEFAULT '0',
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_add_cost
-- 

INSERT INTO `ame_sys_add_cost`(`var_id`,`var_name`,`var_desc`,`var_header`,`int_line`,`tin_inactive`) VALUES
('AC1','Freight-in','Freight-in','Freight-in',1,0),
('AC2','Custom Duty','Custom Duty','Custom Duty',2,0),
('AC3','Handling Cost','Handling Cost','Handling Cost',3,0),
('AC4','Packaging Cost','Packaging Cost','Packaging Cost',4,0),
('AC5','Other Costs','Other Costs','Other Costs',5,0);

-- 
-- Definition of ame_sys_config
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_config` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `int_line` int(11) DEFAULT '0',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_config
-- 

INSERT INTO `ame_sys_config`(`var_id`,`var_name`,`var_desc`,`int_line`) VALUES
('IMG_PATH','\\\\192.168.123.87\\My Image','Image path',1),
('TAX_BF_DISC','FALSE','AME calculate tax before disc.',2),
('POST_ONE_TIME','FALSE','AME generate posting GL automatically',3),
('STOCK_NEGATIVE','FALSE','AME allowed save data with negative stock',4),
('RECEIVE','FALSE','AME allowed receive quantity over purchase order',5),
('ISSUE','FALSE','AME allowed issue quantity over quotation/sales order',6),
('CLASS','FALSE','AME not allowed save record without choose class',7),
('MULTI_CURRENCY','TRUE','AME created multiple currency',8),
('IMG_PATH_WEB','\\\\192.168.123.87\\My Image','Web Image path',10),
('POS_SYNC','FALSE','POS Synchronizable',9),
('EXC_SATURDAY','FALSE','Exclude saturday',11),
('EXC_SUNDAY','FALSE','Exclude sunday',12),
('EXC_HOLIDAY','FALSE','Exclude holiday',13),
('IMG_UP_WEB','C:\\wamp64\\www\\VbuyImage','',9),
('IMG_GE_WEB','http://192.168.123.72/VbuyImage/','',14);

-- 
-- Definition of ame_sys_custom_com
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_custom_com` (
  `int_id` int(11) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`int_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_custom_com
-- 

INSERT INTO `ame_sys_custom_com`(`int_id`,`var_name`,`tin_inactive`) VALUES
(1,'Company 1',0),
(2,'Company 2',1),
(3,'Company 3',1);

-- 
-- Definition of ame_sys_custom_rep
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_custom_rep` (
  `int_id` int(11) NOT NULL,
  `var_modid` varchar(100) NOT NULL,
  `var_name_split1` varchar(2000) DEFAULT NULL,
  `var_name_split2` varchar(2000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_custom_rep
-- 

INSERT INTO `ame_sys_custom_rep`(`int_id`,`var_modid`,`var_name_split1`,`var_name_split2`) VALUES
(1,'AR-IN','Invoice;Tax Invoice','Invoice;Tax Invoice'),
(1,'M001D001','Purchase 1','Purchase 1;Purchase 2');

-- 
-- Definition of ame_sys_decimal
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_decimal` (
  `var_id` varchar(100) NOT NULL DEFAULT '',
  `int_qty` int(2) DEFAULT '5',
  `int_cost` int(2) DEFAULT '5',
  `int_price` int(2) DEFAULT '5',
  `int_amt` int(2) DEFAULT '2',
  `int_per` int(2) DEFAULT '5',
  `int_rate` int(2) DEFAULT '0',
  `int_line` int(10) DEFAULT '1',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_decimal
-- 

INSERT INTO `ame_sys_decimal`(`var_id`,`int_qty`,`int_cost`,`int_price`,`int_amt`,`int_per`,`int_rate`,`int_line`) VALUES
('USD',2,2,2,2,2,6,1),
('VND',5,5,5,2,5,6,1),
('THB',5,5,5,2,5,6,1),
('KHR',5,5,5,2,5,9,1),
('MYR',5,5,5,2,5,6,1),
('MMK',5,5,5,2,5,6,1),
('CAD',5,5,5,2,5,6,1),
('EUR',5,5,5,2,5,6,1),
('CNY',5,5,5,2,5,6,1);

-- 
-- Definition of ame_sys_def_acc
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_def_acc` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT '',
  `int_line` int(2) DEFAULT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_def_acc
-- 

INSERT INTO `ame_sys_def_acc`(`var_id`,`var_name`,`int_line`) VALUES
('CASH-PMT','Payment from Cash/Bank',1),
('CASH-ADVANCE','Advance to Employee',3),
('DISC-AR-IN','Sale Discount',6),
('DISC-AR-PY','Discount on Receipt of Sale Invoice',7),
('DISC-AP-IN','Purchase Discount',4),
('DISC-AP-PY','Discount on Payment of Purchase Invoice',5),
('TAX-VAT-IN','VAT Input (Receivable)',9),
('TAX-VAT-OUT','VAT Output (Payable)',10),
('IC-IA','Inventory Adjustment Expense',12),
('CARD','Membership Card Balance Payable',16),
('OE','Retained Earnings',13),
('REVENUE','Sale',17),
('COGS','Cost of Goods Sold (COGS)',20),
('IC','Inventory (Asset)',19),
('AP','Account Payable',14),
('AR','Account Receivable',15),
('COGS-AC1','Additional Costing: Freight-in',21),
('TAX-WHT','Withholding Tax Payable',11),
('COGS-AC2','Additional Costing: Custom Duty',22),
('COGS-AC3','Additional Costing: Handling Cost',23),
('COGS-AC4','Additional Costing: Packaging Cost',24),
('COGS-AC5','Additional Costing: Other Costs',25),
('FOC-AP-IN','Purchase FOC (Revenue)',26),
('FOC-AR-IN','Sale FOC (Expense)',27),
('GAINLOSS-EXC','Gain/Loss on Exchange Rate',28),
('GAINLOSS-RET','Gain/Loss on Purchase Return/Debit Note',29),
('GAINLOSS-ROU','Gain/Loss on Rounding Defference ',30),
('TAX-SCT','Specific Tax Payable',8),
('REVENUE_RETURN','Sale Return',18),
('CASH-RCP','Receive to Cash/Bank',2),
('IC-IU','Internal Usage Expense',31),
('CASH-RCP-PRE','Deposit Received from Customer',33),
('CASH-PMT-PRE','Deposit Paid to Vendor',32),
('CLEARANCE-AC','Additional Cost Payable Clearing',34),
('POS-PMT-MET','POS Payment Account',35),
('CASH-RCP-INTEREST','Interest Income',36),
('CASH-RCP-PENALTY','Penalty Income',37),
('POS-SVC','POS Service Charge Payable',38);

-- 
-- Definition of ame_sys_dialog
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_dialog` (
  `var_id` varchar(100) NOT NULL DEFAULT '',
  `var_name` varchar(200) NOT NULL DEFAULT '',
  `var_min_max_date` varchar(100) NOT NULL,
  `var_procedure` varchar(500) NOT NULL,
  `int_sortor` int(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`var_id`,`var_name`),
  KEY `var_id` (`var_id`) USING BTREE,
  KEY `var_name` (`var_name`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_dialog
-- 

INSERT INTO `ame_sys_dialog`(`var_id`,`var_name`,`var_min_max_date`,`var_procedure`,`int_sortor`) VALUES
('MT_CLA','All;Class Id;Class Name;Remark','','AME_PRO_DIALOG_MT_CLA',0),
('MT_ITE_GRO','All;Item Group Id;Item Group Name;Remark','','AME_PRO_DIALOG_MT_ITE_GRO',4),
('MT_PRI_COD','All;Price Code;Description;Remark','','AME_PRO_DIALOG_MT_PRI_COD',2),
('MT_CUS_GRO','All;Group Id;Group Name;Remark','','AME_PRO_DIALOG_MT_CUS_GRO',8),
('MT_VEN_GRO','All;Vendor Group Id;Vendor Group Name;Remark','','AME_PRO_DIALOG_MT_VEN_GRO',6),
('MT_LOC','All;Location Id;Location Name;Remark','','AME_PRO_DIALOG_MT_LOC',1),
('MT_UOM',' All;Uom Id;Uom Name;Remark','','AME_PRO_DIALOG_MT_UOM',2),
('MT_CUS','All;Customer Id;Customer Name;Contact Name;Phone Number;Customer Group Id;Price Level Id;Remark','','AME_PRO_DIALOG_MT_CUS',7),
('MT_SUP','All;Vendor Id;Vendor Name;Contact Name;Phone Number;Group Id;Remark','','AME_PRO_DIALOG_MT_VEN',5),
('MT_ITE','All;Item Id;Item Name;Barcode;Item Code;Remark','','AME_PRO_DIALOG_MT_ITE',5),
('AP_IN','All;Entry No;Reference;Purchase Date;Supplier Id;Class Id;Remark;Status','ame_ap_in;dat_date','AME_PRO_DIALOG_AP_IN',0),
('MT_ITE_UOM',' All;Uom Id;Uom Name;Remark','','AME_PRO_DIALOG_MT_ITE_UOM',2),
('MT_EMP','All;Employee Id;Employee Name;Contact Name;Phone Number;Remark','','AME_PRO_DIALOG_MT_EMP',5),
('AR_IN','All;Entry No;Trans. Type;Reference;Customer Id;Customer Name;Remark;Post Status','ame_ar_in;dat_date','AME_PRO_DIALOG_AR_IN',0),
('MT_ACC','All;Account Id;Account Name;Account Type Id;Account Type Name;Remark','','AME_PRO_DIALOG_MT_ACC',0),
('AP_PY','All;Entry No;Trans. Type;Reference;Date;Vendor Id;Vendor Name;Remark;Post Status','ame_ap_py;dat_date','AME_PRO_DIALOG_AP_PY',0),
('AR_PY','All;Entry No;Trans. Type;Reference;Date;Vendor Id;Vendor Name;Remark;Post Status','ame_ar_py;dat_date','AME_PRO_DIALOG_AR_PY',0),
('GL_JE','All;Entry No;Reference','ame_gl_je;dat_date','AME_PRO_DIALOG_GL_JE',0),
('MT_SHIP_ADDR','All;Address Name;Address','','AME_PRO_DIALOG_MT_SHIP_ADDR',0),
('MT_ACC_TYPE','All;Account Type Id;Account Type Name','','AME_PRO_DIALOG_MT_ACC_TYPE',0),
('FL_USER_LOG','All;Account Type Id;Account Type Name','','AME_PRO_LOAD_FL_USER_LOG',0),
('SL_IC_BATCH','All;Batch No;Location Id','','AME_PRO_DIALOG_SL_IC_BATCH',0),
('AP_IN_INV','All;Entry No;Reference;Date;Vendor Id;Class Id;Remark;Status','ame_ap_in;dat_date','AME_PRO_DIALOG_AP_IN_INV',0),
('AP_RF','All;Entry No;Trans. Type;Reference;Date;Vendor Id;Vendor Name;Remark;Post Status','ame_refund;dat_date','AME_PRO_DIALOG_AP_RF',0),
('REFUND_DOC','All;Entry No;Trans. Type;Reference;Date;Vendor/Customer Id;Vendor/Customer Name;Remark;Post Status','ame_refund;dat_date','AME_PRO_DIALOG_REFUND_DOC',0),
('AP_DN','All;Entry No;Reference;Date;Vendor Id;Class Id;Remark;Status','ame_ap_dn;dat_date','AME_PRO_DIALOG_AP_DN',0),
('AP_RET','All;Entry No;Reference;Date;Vendor Id;Class Id;Remark;Status','ame_ap_ret;dat_date','AME_PRO_DIALOG_AP_RET',0),
('AP_RET_DOC','All;Entry No;Reference;Date;Vendor Id;Class Id;Remark;Status','ame_ap_in;dat_date','AME_PRO_DIALOG_AP_RET_DOC',0),
('AP_PO','All;Entry No;Reference;Vendor Id;Vendor Name;Class Id;Remark;Status;Receipt Status','ame_ap_po;dat_date','AME_PRO_DIALOG_AP_PO',0),
('MT_CUR','All;Currency Id;Currency Name;Remark','','AME_PRO_DIALOG_MT_CUR',0),
('AR_QUO','All;Entry No;Reference;Date;Customer Id;Class Id;Remark;Status','ame_ar_quo;dat_date','AME_PRO_DIALOG_AR_QUO',0),
('AR_SO','All;Entry No;Reference;Date;Customer Id;Class Id;Remark;Status','ame_ar_so;dat_date','AME_PRO_DIALOG_AR_SO',0),
('AR_CN','All;Entry No;Trans. Type;Reference;Customer Id;Customer Name;Remark;Post Status','ame_ar_cn;dat_date','AME_PRO_DIALOG_AR_CN',0),
('MT_MSG','All;Message Id;Message','','AME_PRO_DIALOG_MT_MSG',0),
('AR_RET','All;Entry No;Type;Reference;Customer Id;Customer Name;Remark;Post Status','ame_ar_ret;dat_date','AME_PRO_DIALOG_AR_RET',0),
('MT_POS','All;Position Id;Position Name 1;Position Name 2;Remark','','AME_PRO_DIALOG_MT_POS',0),
('AR_SM','All;Entry No;Type;Reference;Customer Id;Customer Name;Remark;Post Status','ame_ar_sm;dat_date','AME_PRO_DIALOG_AR_SM',0),
('IC_TF','All;Entry No;Type;Reference;Remark;Post Status','ame_ic_tf;dat_date','AME_PRO_DIALOG_IC_TF',0),
('IC_IU','All;Entry No;Type;Reference;Remark;Post Status','ame_ic_iu;dat_date','AME_PRO_DIALOG_IC_IU',0),
('IC_ICUOM','All;Entry No;Type;Reference;Remark;Post Status','ame_ic_icuom;dat_date','AME_PRO_DIALOG_IC_ICUOM',0),
('IC_IA','All;Entry No;Type;Reference;Remark;Post Status','ame_ic_ia;dat_date','AME_PRO_DIALOG_IC_IA',0),
('IC_IP','All;Entry No;Type;Reference;Remark;Post Status','ame_ic_ip;dat_date','AME_PRO_DIALOG_IC_IP',0),
('MT_PMT_METH','All;Payment Method Id;Description;Remark','','AME_PRO_DIALOG_MT_PMT_METH',0),
('MT_PMT_TERM','All;Payment Term Id;Description;Remark','','AME_PRO_DIALOG_MT_PMT_TERM',0),
('MT_TEM_TC','All;Entry No;Remark;Status','ame_mt_tem_tc;dat_date','AME_PRO_DIALOG_MT_TEM_TC',0),
('MT_TEM_ODD','All;Entry No;Remark;Status','ame_mt_tem_odd;dat_date','AME_PRO_DIALOG_MT_TEM_ODD',0),
('AR_RF','All;Entry No;Trans. Type;Reference;Date;Customer Id;Customer Name;Remark;Post Status','ame_refund;dat_date','AME_PRO_DIALOG_AR_RF',0),
('SL_IC_BATCH_MT_ITE_PRI','All;Batch No;Location Id','','AME_PRO_DIALOG_SL_IC_BATCH_MT_ITE_PRI',0),
('MT_OPT','All;Field ID;Field Name;Type;Description','','AME_PRO_DIALOG_MT_OPT',0),
('MT_HOL','All;Holiday Name','','AME_PRO_DIALOG_MT_HOL',0),
('MT_OPT_VAL','All;Value','','AME_PRO_DIALOG_MT_OPT_VAL',0),
('POS_AR_IN','All;Entry No;Trans. Type;Reference;Customer Id;Customer Name;Remark;Post Status','pos_ar_in;dat_date','POS_PRO_DIALOG_AR_IN',0);

-- 
-- Definition of ame_sys_dialog_con
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_dialog_con` (
  `var_id` varchar(100) DEFAULT '',
  `var_name` varchar(250) DEFAULT '',
  `var_value` varchar(2000) DEFAULT NULL,
  `int_line` int(5) DEFAULT '0',
  `tin_to` tinyint(1) DEFAULT '0',
  `tin_all` tinyint(1) DEFAULT '0',
  `tin_btn` tinyint(1) DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_dialog_con
-- 

INSERT INTO `ame_sys_dialog_con`(`var_id`,`var_name`,`var_value`,`int_line`,`tin_to`,`tin_all`,`tin_btn`) VALUES
('M001D005','D_Dates','All;Range;Today;This Period;This Year',0,0,0,1),
('M001D005','C_Type','All;Purchase Inventory;Additional Costing;Apply to GL Account',1,0,0,1),
('M001D005','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M001D006','C_Type','All;Purchase Inventory;Additional Costing;Apply to GL Account',1,0,0,1),
('M003D006','T_Item','',1,1,1,1),
('M003D004','T_Location','',1,1,1,1),
('M001D005','KL_Transactions','All;Purchase;Purchase Return;Debit Note;Prepayment',12,1,1,1),
('M002D007','T_Payment Method','',2,0,1,1),
('M003D005','T_Price Code',NULL,2,1,1,1),
('M003D006','T_Item Group','',0,1,1,1),
('M002D007','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D007','C_Type','All;General Item Sale;Apply to GL Account',1,0,0,1),
('M001D005','T_Term','',3,0,1,1),
('M001D005','T_Purchase Number','',4,1,1,1),
('M001D005','T_Vendor Group','',5,1,1,1),
('M001D005','T_Vendor','',6,1,1,1),
('M001D005','T_Class','',7,1,1,1),
('M001D005','T_Location','',8,1,1,1),
('M001D005','T_Item Group','',9,1,1,1),
('M001D005','T_Item','',10,1,1,1),
('M001D005','T_Account','',11,1,1,1),
('M003D004','D_Dates','All;Range;Today;This Period;This Year',0,0,0,1),
('M003D004','T_Item','',3,1,1,1),
('M003D008','D_Dates','All;Range;Today;This Period;This Year',0,1,1,1),
('M002D006','C_Type','All;Purchase Inventory;Additional Costing;Apply to GL Account',1,0,0,1),
('M003D008','C_Status','All;Open;Posted;Deleted',1,0,0,1),
('M002D006','T_Term','',3,0,1,1),
('M002D006','T_Sales Number','',4,1,1,1),
('M002D006','T_Customer Group','',5,1,1,1),
('M002D006','T_Customer','',6,1,1,1),
('M003D008','T_Class','',5,1,1,1),
('M003D008','T_Location','',2,1,1,1),
('M002D006','T_Item Group','',11,1,1,1),
('M003D008','T_Item','',4,1,1,1),
('M002D006','T_Account','',13,1,1,1),
('M002D006','KL_Transactions','All;Sales;Sales Return;Credit Note;Prepayment',14,1,1,1),
('M002D006','T_Employee Group','',7,1,1,1),
('M002D006','T_Employee','',8,1,1,1),
('M006D005','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M006D005','C_Type','All;Retails;Dine In;Take Away',1,0,0,1),
('M006D005','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M006D001','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M006D005','T_Employee',NULL,4,1,1,1),
('M006D005','T_Customer',NULL,5,1,1,1),
('M006D005','T_Location','',3,1,1,1),
('M006D001','C_Type','All;Retails;Dine In;Take Away',1,0,0,1),
('M006D001','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D007','T_Term','',3,0,1,1),
('M001D006','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D007','T_Customer Group','',4,1,1,1),
('M002D007','T_Customer','',5,1,1,1),
('M002D007','K_Hide Opening Balance','',9,1,1,1),
('M002D007','T_Class','',6,1,1,1),
('M002D007','T_Receivable Account','',7,1,1,1),
('M002D007','KL_Transactions','All;Sales;Sales Return;Credit Note;Prepayment',8,1,1,1),
('M001D006','T_Payment Method','',2,0,1,1),
('M001D006','T_Term','',3,0,1,1),
('M001D006','T_Vendor Group','',4,1,1,1),
('M001D006','T_Vendor','',5,1,1,1),
('M001D006','T_Class','',6,1,1,1),
('M001D006','T_Payable Account','',7,1,1,1),
('M001D006','KL_Transactions','All;Purchase;Purchase Return;Debit Note;Prepayment',8,1,1,1),
('M001D006','K_Hide Opening Balance','',9,1,1,1),
('M004D001','T_Vendor','',3,1,1,1),
('M004D001','T_Customer','',4,1,1,1),
('M005D001','T_Class','',2,1,1,1),
('M005D001','T_Account','',1,1,1,1),
('M004D001','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M004D001','T_Employee','',5,1,1,1),
('M004D001','T_Item','',6,1,1,1),
('M003D003','T_Location','',0,1,1,1),
('M003D004','T_Item Group','',2,1,1,1),
('M002D008','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D008','C_Type','All;Apply to Sale Invoice;Prepayment;Apply to GL Account',1,0,0,1),
('M002D008','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D008','T_Payment Method','',3,0,1,1),
('M002D008','T_Payment Number','',4,1,1,1),
('M002D008','T_Customer Group','',5,1,1,1),
('M002D008','T_Customer','',6,1,1,1),
('M002D008','T_Employee Group','',7,1,1,1),
('M002D008','T_Employee','',8,1,1,1),
('M002D008','T_Class','',9,1,1,1),
('M002D008','T_Cash Account','',10,1,1,1),
('M002D008','T_Account','',11,1,1,1),
('M002D008','T_Sales Number','',12,1,1,1),
('M001D007','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M001D002','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M001D007','C_Type','All;Apply to Sale Invoice;Prepayment;Apply to GL Account',1,0,0,1),
('M001D007','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M001D007','T_Payment Method','',3,0,1,1),
('M001D007','T_Payment Number','',4,1,1,1),
('M001D007','T_Vendor Group','',5,1,1,1),
('M001D007','T_Vendor','',6,1,1,1),
('M001D007','T_Class','',7,1,1,1),
('M001D007','T_Cash Account','',8,1,1,1),
('M001D007','T_Account','',9,1,1,1),
('M001D007','T_Purchase Number','',10,1,1,1),
('M001D002','C_Type','All;Purchase Inventory;Additional Costing;Apply to GL Account',1,0,0,1),
('M001D002','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M001D002','T_Term','',3,0,1,1),
('M001D002','T_Purchase Number','',4,1,1,1),
('M001D002','T_Vendor Group','',5,1,1,1),
('M001D002','T_Vendor','',6,1,1,1),
('M001D002','T_Class','',7,1,1,1),
('M001D002','T_Location','',8,1,1,1),
('M001D002','T_Item Group','',9,1,1,1),
('M001D002','T_Item','',10,1,1,1),
('M001D002','T_Account','',11,1,1,1),
('M001D002','KL_Transactions','All;Purchase Order;Purchase;Purchase Return;Debit Note;Prepayment',12,1,1,1),
('M001D003','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M001D003','C_Type','All;Purchase Inventory;Additional Costing;Apply to GL Account',1,0,0,1),
('M001D003','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M001D003','T_Term','',3,0,1,1),
('M001D003','T_Purchase Number','',4,1,1,1),
('M001D003','T_Vendor Group','',5,1,1,1),
('M001D003','T_Vendor','',6,1,1,1),
('M001D003','T_Class','',7,1,1,1),
('M001D003','T_Location','',8,1,1,1),
('M001D003','T_Item Group','',9,1,1,1),
('M001D003','T_Item','',10,1,1,1),
('M001D003','T_Account','',11,1,1,1),
('M001D003','KL_Transactions','All;Purchase Order;Purchase;Purchase Return;Debit Note;Prepayment',12,1,1,1),
('M001D004','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M001D004','C_Type','All;Purchase Inventory;Additional Costing;Apply to GL Account',1,0,0,1),
('M001D004','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M001D004','T_Term','',3,0,1,1),
('M001D004','T_Purchase Number','',4,1,1,1),
('M001D004','T_Vendor Group','',5,1,1,1),
('M001D004','T_Vendor','',6,1,1,1),
('M001D004','T_Class','',7,1,1,1),
('M001D004','T_Location','',8,1,1,1),
('M001D004','T_Item Group','',9,1,1,1),
('M001D004','T_Item','',10,1,1,1),
('M001D004','T_Account','',11,1,1,1),
('M001D004','KL_Transactions','All;Purchase Order;Purchase;Purchase Return;Debit Note;Prepayment',12,1,1,1),
('M002D003','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D003','C_Type','All;Purchase Inventory;Additional Costing;Apply to GL Account',1,0,0,1),
('M002D003','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D003','T_Term','',3,0,1,1),
('M002D003','T_Sales Number','',4,1,1,1),
('M002D003','T_Customer Group','',5,1,1,1),
('M002D003','T_Customer','',6,1,1,1),
('M002D003','T_Employee Group','',7,1,1,1),
('M002D003','T_Employee','',8,1,1,1),
('M002D003','T_Class','',9,1,1,1),
('M002D003','T_Location','',10,1,1,1),
('M002D003','T_Item Group','',11,1,1,1),
('M002D003','T_Item','',12,1,1,1),
('M002D003','T_Account','',13,1,1,1),
('M002D003','KL_Transactions','All;Quotation;Sales Order;Sales;Sales Return;Credit Note;Prepayment',14,1,1,1),
('M002D002','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D002','C_Type','All;Purchase Inventory;Additional Costing;Apply to GL Account',1,0,0,1),
('M002D002','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D002','T_Term','',3,0,1,1),
('M002D002','T_Sales Number','',4,1,1,1),
('M002D002','T_Customer Group','',5,1,1,1),
('M002D002','T_Customer','',6,1,1,1),
('M002D002','T_Employee Group','',7,1,1,1),
('M002D002','T_Employee','',8,1,1,1),
('M002D002','T_Class','',9,1,1,1),
('M002D002','T_Location','',10,1,1,1),
('M002D002','T_Item Group','',11,1,1,1),
('M002D002','T_Item','',12,1,1,1),
('M002D002','T_Account','',13,1,1,1),
('M002D002','KL_Transactions','All;Quotation;Sales Order;Sales;Sales Return;Credit Note;Prepayment',14,1,1,1),
('M002D001','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D001','C_Type','All;Purchase Inventory;Additional Costing;Apply to GL Account',1,0,0,1),
('M002D001','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D001','T_Term','',3,0,1,1),
('M002D001','T_Sales Number','',4,1,1,1),
('M002D001','T_Customer Group','',5,1,1,1),
('M002D001','T_Customer','',6,1,1,1),
('M002D001','T_Employee Group','',7,1,1,1),
('M002D001','T_Employee','',8,1,1,1),
('M002D001','T_Class','',9,1,1,1),
('M002D001','T_Location','',10,1,1,1),
('M002D001','T_Item Group','',11,1,1,1),
('M002D001','T_Item','',12,1,1,1),
('M002D001','T_Account','',13,1,1,1),
('M002D001','KL_Transactions','All;Quotation;Sales Order;Sales;Sales Return;Credit Note;Prepayment',14,1,1,1),
('M002D004','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D004','C_Type','All;Purchase Inventory;Additional Costing;Apply to GL Account',1,0,0,1),
('M002D004','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D004','T_Term','',3,0,1,1),
('M002D004','T_Sales Number','',4,1,1,1),
('M002D004','T_Customer Group','',5,1,1,1),
('M002D004','T_Customer','',6,1,1,1),
('M002D004','T_Employee Group','',7,1,1,1),
('M002D004','T_Employee','',8,1,1,1),
('M002D004','T_Class','',9,1,1,1),
('M002D004','T_Location','',10,1,1,1),
('M002D004','T_Item Group','',11,1,1,1),
('M002D004','T_Item','',12,1,1,1),
('M002D004','T_Account','',13,1,1,1),
('M002D004','KL_Transactions','All;Quotation;Sales Order;Sales;Sales Return;Credit Note;Prepayment',14,1,1,1),
('M002D005','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D005','C_Type','All;Purchase Inventory;Additional Costing;Apply to GL Account',1,0,0,1),
('M002D005','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D005','T_Term','',3,0,1,1),
('M002D005','T_Sales Number','',4,1,1,1),
('M002D005','T_Customer Group','',5,1,1,1),
('M002D005','T_Customer','',6,1,1,1),
('M002D005','T_Employee Group','',7,1,1,1),
('M002D005','T_Employee','',8,1,1,1),
('M002D005','T_Class','',9,1,1,1),
('M002D005','T_Location','',10,1,1,1),
('M002D005','T_Item Group','',11,1,1,1),
('M002D005','T_Item','',12,1,1,1),
('M002D005','T_Account','',13,1,1,1),
('M002D005','KL_Transactions','All;Quotation;Sales Order;Sales;Sales Return;Credit Note;Prepayment',14,1,1,1),
('M002D009','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D009','C_Type','All;General Item Sale;Apply to GL Account',1,0,0,1),
('M002D009','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D009','T_Term','',3,0,1,1),
('M002D009','T_Sales Number','',4,1,1,1),
('M002D009','T_Customer Group','',5,1,1,1),
('M002D009','T_Customer','',6,1,1,1),
('M002D009','T_Employee Group','',7,1,1,1),
('M002D009','T_Employee','',8,1,1,1),
('M002D009','T_Class','',9,1,1,1),
('M002D009','T_Location','',10,1,1,1),
('M002D009','T_Item Group','',11,1,1,1),
('M002D009','T_Item','',12,1,1,1),
('M002D009','T_Account','',13,1,1,1),
('M002D009','KL_Transactions','All;Sales;Sales Return;Credit Note',14,1,1,1),
('M002D010','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D010','C_Type','All;General Item Sale;Apply to GL Account',1,0,0,1),
('M002D010','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D010','T_Term','',3,0,1,1),
('M002D010','T_Sales Number','',4,1,1,1),
('M002D010','T_Customer Group','',5,1,1,1),
('M002D010','T_Customer','',6,1,1,1),
('M002D010','T_Employee Group','',7,1,1,1),
('M002D010','T_Employee','',8,1,1,1),
('M002D010','T_Class','',9,1,1,1),
('M002D010','T_Location','',10,1,1,1),
('M002D010','T_Item Group','',11,1,1,1),
('M002D010','T_Item','',12,1,1,1),
('M002D010','T_Account','',13,1,1,1),
('M002D010','KL_Transactions','All;Sales;Sales Return;Credit Note',14,1,1,1),
('M002D011','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D011','C_Type','All;General Item Sale;Apply to GL Account',1,0,0,1),
('M002D011','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D011','T_Term','',3,0,1,1),
('M002D011','T_Sales Number','',4,1,1,1),
('M002D011','T_Customer Group','',5,1,1,1),
('M002D011','T_Customer','',6,1,1,1),
('M002D011','T_Employee Group','',7,1,1,1),
('M002D011','T_Employee','',8,1,1,1),
('M002D011','T_Class','',9,1,1,1),
('M002D011','T_Location','',10,1,1,1),
('M002D011','T_Item Group','',11,1,1,1),
('M002D011','T_Item','',12,1,1,1),
('M002D011','T_Account','',13,1,1,1),
('M002D011','KL_Transactions','All;Sales;Sales Return;Credit Note',14,1,1,1),
('M002D012','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D012','C_Type','All;General Item Sale;Apply to GL Account',1,0,0,1),
('M002D012','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D012','T_Term','',3,0,1,1),
('M002D012','T_Sales Number','',4,1,1,1),
('M002D012','T_Customer Group','',5,1,1,1),
('M002D012','T_Customer','',6,1,1,1),
('M002D012','T_Employee Group','',7,1,1,1),
('M002D012','T_Employee','',8,1,1,1),
('M002D012','T_Class','',9,1,1,1),
('M002D012','T_Location','',10,1,1,1),
('M002D012','T_Item Group','',11,1,1,1),
('M002D012','T_Item','',12,1,1,1),
('M002D012','T_Account','',13,1,1,1),
('M002D012','KL_Transactions','All;Sales;Sales Return;Credit Note',14,1,1,1),
('M002D013','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D013','C_Type','All;General Item Sale;Apply to GL Account',1,0,0,1),
('M002D013','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D013','T_Term','',3,0,1,1),
('M002D013','T_Sales Number','',4,1,1,1),
('M002D013','T_Customer Group','',5,1,1,1),
('M002D013','T_Customer','',6,1,1,1),
('M002D013','T_Employee Group','',7,1,1,1),
('M002D013','T_Employee','',8,1,1,1),
('M002D013','T_Class','',9,1,1,1),
('M002D013','T_Location','',10,1,1,1),
('M002D013','T_Item Group','',11,1,1,1),
('M002D013','T_Item','',12,1,1,1),
('M002D013','T_Account','',13,1,1,1),
('M002D013','KL_Transactions','All;Sales;Sales Return;Credit Note',14,1,1,1),
('M002D014','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M002D014','C_Type','All;General Item Sale;Apply to GL Account',1,0,0,1),
('M002D014','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D014','T_Term','',3,0,1,1),
('M002D014','T_Sales Number','',4,1,1,1),
('M002D014','T_Customer Group','',5,1,1,1),
('M002D014','T_Customer','',6,1,1,1),
('M002D014','T_Employee Group','',7,1,1,1),
('M002D014','T_Employee','',8,1,1,1),
('M002D014','T_Class','',9,1,1,1),
('M002D014','T_Location','',10,1,1,1),
('M002D014','T_Item Group','',11,1,1,1),
('M002D014','T_Item','',12,1,1,1),
('M002D014','T_Account','',13,1,1,1),
('M002D014','KL_Transactions','All;Sales;Sales Return;Credit Note',14,1,1,1),
('M003D001','T_Vendor','',5,1,1,1),
('M003D001','T_Customer','',6,1,1,1),
('M003D001','T_Class','',4,1,1,1),
('M003D001','T_Location','',1,1,1,1),
('M003D001','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M003D001','T_Employee','',7,1,1,1),
('M003D001','T_Item','',3,1,1,1),
('M003D001','T_Item Group','',2,1,1,1),
('M003D001','K_Hide Openning Balance','',8,0,0,1),
('M005D001','D_Dates','All;Range;Today;This Period;This Year',0,0,0,1),
('M004D001','T_Account','',1,1,1,1),
('M004D001','T_Class','',2,1,1,1),
('M005D002','D_Dates','All;Range;Today;This Period;This Year',0,0,0,1),
('M005D002','T_Account','',1,1,1,1),
('M005D002','T_Class','',2,1,1,1),
('M005D003','D_Dates','All;Range;Today;This Period;This Year',0,0,0,1),
('M005D003','T_Account','',1,1,1,1),
('M005D003','T_Class','',2,1,1,1),
('M005D004','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M005D004','T_Account','',1,1,1,1),
('M005D004','T_Class','',2,1,1,1),
('M005D005','D_Dates','All;Range;Today;This Period;This Year',0,0,0,1),
('M005D005','T_Account','',1,1,1,1),
('M005D005','T_Class','',2,1,1,1),
('M005D006','T_Account','',1,1,1,1),
('M005D006','T_Class','',2,1,1,1),
('M005D006','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M005D007','D_Dates','All;Range;Today;This Period;This Year',0,0,0,1),
('M005D007','T_Account','',1,1,1,1),
('M005D007','T_Class','',2,1,1,1),
('M005D008','D_Dates','All;Range;Today;This Period;This Year',0,0,0,1),
('M005D008','T_Account','',1,1,1,1),
('M005D008','T_Class','',2,1,1,1),
('M005D009','D_Dates','All;Range;Today;This Period;This Year',0,0,0,1),
('M005D009','T_Account','',1,1,1,1),
('M005D009','T_Class','',2,1,1,1),
('M005D010','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M005D010','T_Account','',1,1,1,1),
('M005D010','T_Class','',2,1,1,1),
('M003D002','T_Vendor','',5,1,1,1),
('M003D002','T_Customer','',6,1,1,1),
('M003D002','T_Class','',4,1,1,1),
('M003D002','T_Location','',1,1,1,1),
('M003D002','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M003D002','T_Employee','',7,1,1,1),
('M003D002','T_Item','',3,1,1,1),
('M003D002','T_Item Group','',2,1,1,1),
('M003D002','K_Hide Openning Balance','',8,0,0,1),
('M003D003','T_Item','',2,1,1,1),
('M003D003','T_Item Group','',1,1,1,1),
('M003D005','T_Currency',NULL,3,1,1,1),
('M003D005','T_Item','',1,1,1,1),
('M003D005','T_Item Group','',0,1,1,1),
('M003D006','C_Item Type','All;Inventory Part;Inventory Assembly;Non-Inventory Part;Fixed Asset',2,0,0,1),
('M002D006','D_Dates','All;Range;Today;This Period;This Year',0,0,0,1),
('M002D006','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M002D006','T_Class','',9,1,1,1),
('M002D006','T_Location','',10,1,1,1),
('M002D006','T_Item','',12,1,1,1),
('M005D001','K_Hide Zero Amount','',3,1,1,1),
('M003D008','T_Item Group','',3,1,1,1),
('M003D007','D_Dates','All;Range;Today;This Period;This Year',0,1,1,1),
('M003D007','C_Status','All;Open;Posted;Deleted',1,0,0,1),
('M003D007','T_Class','',6,1,1,1),
('M003D007','T_From Location','',2,1,1,1),
('M003D007','T_Item','',5,1,1,1),
('M003D007','T_To Location','',3,1,1,1),
('M003D007','T_Item Group','',4,1,1,1),
('M005D002','K_Hide Zero Amount','',3,1,1,1),
('M005D007','K_Hide Zero Amount','',3,1,1,1),
('M005D008','K_Hide Zero Amount','',3,1,1,1),
('M005D003','K_Hide Zero Amount','',3,1,1,1),
('M005D004','K_Hide Zero Amount','',3,1,1,1),
('M005D005','K_Hide Zero Amount','',3,1,1,1),
('M005D006','K_Hide Zero Amount','',3,1,1,1),
('M005D009','K_Hide Zero Amount','',3,1,1,1),
('M005D010','K_Hide Zero Amount','',3,1,1,1),
('M001D001','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M001D001','C_Type','All;Purchase Inventory;Additional Costing;Apply to GL Account',1,0,0,1),
('M001D001','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M001D001','T_Term','',3,0,1,1),
('M001D001','T_Purchase Number','',4,1,1,1),
('M001D001','T_Vendor Group','',5,1,1,1),
('M001D001','T_Vendor','',6,1,1,1),
('M001D001','T_Class','',7,1,1,1),
('M001D001','T_Location','',8,1,1,1),
('M001D001','T_Item Group','',9,1,1,1),
('M001D001','T_Item','',10,1,1,1),
('M001D001','T_Account','',11,1,1,1),
('M001D001','KL_Transactions','All;Purchase Order;Purchase;Purchase Return;Debit Note;Prepayment',12,1,1,1),
('M006D004','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M006D004','C_Type','All;Retails;Dine In;Take Away',1,0,0,1),
('M006D004','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M006D004','T_Employee','',4,1,1,1),
('M006D004','T_Customer','',5,1,1,1),
('M006D004','T_Location','',3,1,1,1),
('M006D002','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M006D002','C_Type','All;Retails;Dine In;Take Away',1,0,0,1),
('M006D002','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M006D002','T_Employee','',4,1,1,1),
('M006D002','T_Customer','',5,1,1,1),
('M006D002','T_Location','',3,1,1,1),
('M006D004','T_Item Group',NULL,6,1,1,1),
('M006D004','T_Item',NULL,7,1,1,1),
('M006D003','D_Dates','All;Range;Today;This Period;This Year',0,1,0,1),
('M006D003','C_Type','All;Retails;Dine In;Take Away',1,0,0,1),
('M006D003','C_Status','All;Open;Posted;Deleted',2,0,0,1),
('M006D001','T_Employee','',4,1,1,1),
('M006D001','T_Customer','',5,1,1,1),
('M006D001','T_Location','',3,1,1,1),
('M006D003','T_Employee','',4,1,1,1),
('M006D003','T_Customer','',5,1,1,1),
('M006D003','T_Location','',3,1,1,1);

-- 
-- Definition of ame_sys_form
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_form` (
  `frmsysname` varchar(30) NOT NULL,
  `frmname` varchar(50) DEFAULT NULL,
  `mnuname` varchar(50) DEFAULT NULL,
  `sortkey` int(11) DEFAULT NULL,
  `isform` tinyint(1) DEFAULT NULL,
  `iconname` varchar(255) DEFAULT NULL,
  `menuseparator` varchar(5) DEFAULT NULL,
  `frmtag` varchar(255) DEFAULT NULL,
  `status` text,
  `var_modid` varchar(100) DEFAULT '',
  KEY `FrmSysName` (`frmsysname`) USING BTREE,
  KEY `SortKey` (`sortkey`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_form
-- 

INSERT INTO `ame_sys_form`(`frmsysname`,`frmname`,`mnuname`,`sortkey`,`isform`,`iconname`,`menuseparator`,`frmtag`,`status`,`var_modid`) VALUES
('File','File','',10000,0,'','','File','Balancika**@@123',NULL),
('Setting','Setting','',20000,0,'','','Setting','Balancika**@@123',NULL),
('Maintain','Maintain','',30000,0,'','','Maintain','Balancika**@@123',NULL),
('Transactions','Transactions','',40000,0,'','','Transactions','Balancika**@@123',NULL),
('Report','Report','',50000,0,'','','Report','Balancika**@@123',NULL),
('Help','Help','',60000,0,'','','Help','Balancika**@@123',NULL),
('FL_USER_LIST','Users and Roles','File',10100,1,'','','FL_USER_LIST','Balancika**@@123',NULL),
('FL_CHA_PWD','Change Your Password','File',10200,1,'','','FL_CHA_PWD','Balancika**@@123',NULL),
('FL_USER_LOG','Transaction Logs','File',10300,1,'','up','FL_USER_LOG','Balancika**@@123',NULL),
('FL_BACKUP','Backup and Restore','File',10400,1,'','up','FL_BACKUP','Balancika**@@123',NULL),
('MT_LOG_OUT','Logout','File',10500,1,'','up','MT_LOG_OUT','Balancika**@@123',NULL),
('Close','Exit','File',10600,1,'','up','Close','Balancika**@@123',NULL),
('MT_GEN_SET','General​​​ Setting','Setting',20100,1,'','','MT_GEN_SET','Balancika**@@123',NULL),
('MT_CUR','Currency','Setting',20200,1,'','','MT_CUR','Balancika**@@123',NULL),
('MT_DEC','Decimal Places','Setting',20300,1,'','','MT_DEC','Balancika**@@123',NULL),
('MT_PREFIX','Number Prefix','Setting',20400,1,'','','MT_PREFIX','Balancika**@@123',NULL),
('MT_LOCK','Lock Period','Setting',20500,1,'','','MT_LOCK','Balancika**@@123',NULL),
('MT_CLA','Class','Setting',20600,1,'','up','MT_CLA','Balancika**@@123',NULL),
('MT_LOC','Location','Setting',20700,1,'','','MT_LOC','Balancika**@@123',NULL),
('MT_PRI_COD','Price Code','Setting',20800,1,'','','MT_PRI_COD','Balancika**@@123',NULL),
('MT_UOM','Unit of Measure','Setting',20900,1,'','','MT_UOM','Balancika**@@123',NULL),
('MT_VEN_GRO','Vendor Group','Setting',21000,1,'','up','MT_VEN_GRO','Balancika**@@123',NULL),
('MT_CUS_GRO','Customer Group','Setting',21100,1,'','up','MT_CUS_GRO','Balancika**@@123',NULL),
('MT_ITE_GRO','Item Group','Setting',21200,1,'','up','MT_ITE_GRO','Balancika**@@123',NULL),
('MT_POS','Position','Setting',21300,1,'','up','MT_POS','Balancika**@@123',NULL),
('MT_EMP_GRO','Employee Group','Setting',21400,1,'','','MT_EMP_GRO','Balancika**@@123',NULL),
('MT_PMT_TERM','Payment Term','Setting',21500,1,'','up','MT_PMT_TERM','Balancika**@@123',NULL),
('MT_COM','Company Information','Maintain',30100,1,'','','MT_COM','Balancika**@@123',NULL),
('MT_ACC','Chart of Account','Maintain',30200,1,'','up','MT_ACC','Balancika**@@123',NULL),
('MT_VEN','Vendor','Maintain',30300,1,'','up','MT_VEN','Balancika**@@123',NULL),
('MT_CUS','Customer','Maintain',30400,1,'','','MT_CUS','Balancika**@@123',NULL),
('MT_EMP','Employee','Maintain',30500,1,'','','MT_EMP','Balancika**@@123',NULL),
('MT_ITE','Item','Maintain',30600,1,'','up','MT_ITE','Balancika**@@123',NULL),
('AR_IN_POS','POS Invoicing','AR',41410,1,'','','AR_IN_POS','Balancika**@@123',NULL),
('POST','Post Transactions','Transactions',46100,1,'','up','POST','Balancika**@@123',NULL),
('AP','Account Payable','Transactions',40100,0,'','','AP','Balancika**@@123',NULL),
('AP_PO','Purchase Order','AP',40200,1,'','','AP_PO','Balancika**@@123',NULL),
('AP_IN','Purchase / Receive Inventory','AP',40300,1,'','','AP_IN','Balancika**@@123',NULL),
('AP_RET','Purchase Return','AP',40400,1,'','up','AP_RET','Balancika**@@123',NULL),
('AP_DN','Debit Note','AP',40500,1,'','','AP_DN','Balancika**@@123',NULL),
('AP_PY','Make Payment','AP',40600,1,'','up','AP_PY','Balancika**@@123',NULL),
('AR','Account Receivable','Transactions',41100,0,'','up','AR','Balancika**@@123',NULL),
('AR_QUO','Quotation','AR',41200,1,'','','AR_QUO','Balancika**@@123',NULL),
('AR_SO','Sales Order','AR',41300,1,'','','AR_SO','Balancika**@@123',NULL),
('AR_IN','Sales Invoicing','AR',41400,1,'','','AR_IN','Balancika**@@123',NULL),
('AR_RET','Sales Return','AR',41500,1,'','up','AR_RET','Balancika**@@123',NULL),
('AR_CN','Credit Note','AR',41600,1,'','','AR_CN','Balancika**@@123',NULL),
('AR_SM','Shipment','AR',41700,1,'','up','AR_SM','Balancika**@@123',NULL),
('AR_SM_LIS','Shipment Listing','AR',41800,1,'','','AR_SM_LIS','Balancika**@@123',NULL),
('AR_PY','Receive Payment','AR',41900,1,'','up','AR_PY','Balancika**@@123',NULL),
('IC','Inventory Control','Transactions',42100,0,'','up','IC','Balancika**@@123',NULL),
('IC_TF','Inventory Transfer','IC',42200,1,'','','IC_TF','Balancika**@@123',NULL),
('IC_IU','Internal Usage','IC',42300,1,'','up','IC_IU','Balancika**@@123',NULL),
('IC_ICUOM','Inventory Convert UOM','IC',42400,1,'','up','IC_ICUOM','Balancika**@@123',NULL),
('IC_IP','Inventory Production','IC',42500,1,'','up','IC_IP','Balancika**@@123',NULL),
('MT_OPT','Optional Field','Setting',21700,1,NULL,'up','MT_OPT','Balancika**@@123',NULL),
('IC_IA','Inventory Adjustment','IC',42700,1,'','','IC_IA','Balancika**@@123',NULL),
('GL_JE','Make Journal Entry','Transactions',45100,1,'','up','GL_JE','Balancika**@@123',NULL),
('MT_HOL','Holiday','Setting',21800,1,'','up','MT_OPT','Balancika**@@123',NULL),
('RPT_CTRL','Report Selector','Report',50100,1,'','','RPT_CTRL','Balancika**@@123',NULL),
('MT_ITE_PRI','Change Item Prices','Maintain',30700,1,'','','MT_ITE_PRI','Balancika**@@123',NULL),
('AR_RF','Pay Refund','AR',41950,1,'','up','AR_RF','Balancika**@@123',NULL),
('MT_PMT_METH','Payment Method','Setting',21600,1,'','','MT_PMT_METH','Balancika**@@123',NULL),
('AP_RF','Receive Refund','AP',40700,1,'','up','AP_RF','Balancika**@@123',NULL),
('POS_SET','POS','Setting',21900,0,NULL,'up','POS','Balancika**@@123',''),
('POS_PMT_MET','Payment Method','POS_SET',21910,1,NULL,NULL,'POS_PMT_MET','Balancika**@@123',''),
('IC_IA_LIS','Inventory Physical Count','IC',42600,1,'','up','IC_IA_LIS','Balancika**@@123','');

-- 
-- Definition of ame_sys_grid
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_grid` (
  `var_modid` varchar(100) NOT NULL,
  `var_type` varchar(100) NOT NULL,
  `var_id` varchar(100) NOT NULL,
  `var_desc` varchar(250) DEFAULT NULL,
  `var_columntype` varchar(100) DEFAULT NULL,
  `var_deckey` varchar(100) DEFAULT '0',
  `int_width` int(4) DEFAULT '0',
  `int_displayindex` int(2) DEFAULT '0',
  `int_sortor` int(2) DEFAULT '0',
  `tin_visible` tinyint(1) DEFAULT '0',
  `tin_readonly` tinyint(1) DEFAULT '0',
  `tin_showbutton` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_modid`,`var_type`,`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_grid
-- 

INSERT INTO `ame_sys_grid`(`var_modid`,`var_type`,`var_id`,`var_desc`,`var_columntype`,`var_deckey`,`int_width`,`int_displayindex`,`int_sortor`,`tin_visible`,`tin_readonly`,`tin_showbutton`) VALUES
('AP-IN','Purchase Inventory','9','Disc %','T','PER',10,-1,10,1,0,0),
('AP-IN','Purchase Inventory','10','Disc','T','AMT',10,-1,11,1,0,0),
('AP-IN','Purchase Inventory','14','WHT','K','-1',5,-1,15,1,0,0),
('AP-IN','Purchase Inventory','11','Grand Total','T','AMT',10,-1,12,1,1,0),
('AP-IN','Purchase Inventory','5','Uom Id','T','-1',10,-1,6,1,0,1),
('AP-IN','Purchase Inventory','6','Quantity','T','QTY',10,-1,7,1,0,0),
('AP-IN','Purchase Inventory','7','Cost','T','UC',10,-1,8,1,0,0),
('AP-IN','Purchase Inventory','8','Sub Total','T','AMT',10,-1,9,1,0,0),
('AP-IN','Purchase Inventory','0','Item Id','T','-1',10,-1,1,1,0,1),
('AP-IN','Purchase Inventory','1','Item Name','T','-1',20,-1,2,1,1,0),
('AP-IN','Purchase Inventory','2','Description','T','-1',20,-1,3,1,0,1),
('AP-IN','Purchase Inventory','3','Location Id','T','-1',10,-1,4,1,0,1),
('AP-IN','Purchase Inventory','4','Class Id','T','-1',10,-1,5,1,0,1),
('AR-IN-POS','','0','Item Id','T','-1',10,-1,1,1,0,1),
('AR-IN-POS','','1','Item Name','T','-1',20,-1,2,1,1,0),
('AR-IN-POS','','2','Description','T','-1',20,-1,3,1,0,1),
('AR-IN-POS','','3','Uom Id','T','-1',10,-1,4,1,0,1),
('AR-IN-POS','','4','Quantity','T','QTY',10,-1,5,1,0,0),
('AR-IN-POS','','5','Price','T','UP',10,-1,6,1,0,0),
('AR-IN-POS','','6','Sub Total','T','AMT',10,-1,7,1,0,0),
('AR-IN-POS','','7','Disc %','T','PER',10,-1,8,1,0,0),
('AR-IN-POS','','8','Disc','T','AMT',10,-1,9,1,0,0),
('AR-IN-POS','','9','Grand Total','T','AMT',10,-1,10,1,1,0),
('AR-IN-POS','','10','FOC','T','QTY',10,7,11,1,0,0),
('GL-JE','GL-JE','0','Account Id','T','-1',10,-1,1,1,0,1),
('AP-IN','Additional Costing','3','AC Id','T','-1',10,-1,4,1,0,1),
('AP-IN','Additional Costing','4','AC Name','T','-1',20,-1,5,1,1,0),
('AP-IN','Additional Costing','0','Item Id','T','-1',10,-1,1,1,0,1),
('AP-IN','Additional Costing','1','Item Name','T','-1',20,-1,2,1,1,0),
('AP-IN','Additional Costing','2','Description','T','-1',20,-1,3,1,0,1),
('AP-IN','Additional Costing','6','Batch No','T','-1',10,-1,7,1,1,1),
('AP-IN','Additional Costing','7','Location Id','T','-1',10,-1,8,1,1,0),
('AP-IN','Additional Costing','5','Class Id','T','-1',10,-1,6,1,0,1),
('AP-IN','Additional Costing','8','Total AC','T','AMT',10,-1,9,1,0,0),
('AP-IN','Apply to GL Account','0','Account Id','T','-1',10,-1,1,1,0,1),
('AP-IN','Apply to GL Account','1','Account Name','T','-1',20,-1,2,1,1,0),
('AP-IN','Apply to GL Account','2','Class Id','T','-1',10,-1,3,1,0,1),
('AP-IN','Apply to GL Account','3','Description','T','-1',20,-1,4,1,0,1),
('AP-IN','Apply to GL Account','4','Amount','T','AMT',10,-1,5,1,0,0),
('AP-PY','Apply to Purchase Invoice','0','Entry No','T','-1',10,-1,1,1,1,0),
('AP-PY','Apply to Purchase Invoice','1','Reference','T','-1',10,-1,2,1,1,0),
('AP-PY','Apply to Purchase Invoice','2','Date','T','-1',8,-1,3,1,1,0),
('AP-PY','Apply to Purchase Invoice','3','Original Amount','T','AMT',12,-1,4,1,1,0),
('AP-PY','Apply to Purchase Invoice','4','Payment to Date','T','AMT',12,-1,5,1,1,0),
('AP-PY','Apply to Purchase Invoice','5','Amount Due','T','AMT',12,-1,6,1,1,0),
('AP-PY','Apply to Purchase Invoice','6','Balance','T','AMT',12,-1,7,1,1,0),
('AP-PY','Apply to Purchase Invoice','8','Discount','T','AMT',10,-1,9,1,0,0),
('AP-PY','Apply to Purchase Invoice','9','Payment from Cash Acc.','T','AMT',15,-1,10,1,0,0),
('AP-PY','Apply to Purchase Invoice','10','','K','-1',4,-1,11,1,0,0),
('AP-PY','Apply to Purchase Invoice','7','Description','T','-1',20,-1,8,1,0,1),
('AP-PY','Apply to GL Account','0','Account Id','T','-1',10,-1,1,1,0,1),
('AP-PY','Apply to GL Account','1','Account Name','T','-1',20,-1,2,1,1,0),
('AP-PY','Apply to GL Account','2','Class Id','T','-1',10,-1,3,1,0,1),
('AP-PY','Apply to GL Account','3','Description','T','-1',20,-1,4,1,0,1),
('AP-PY','Apply to GL Account','4','Amount','T','AMT',10,-1,5,1,0,0),
('AP-PY','Apply Document','0','Doc. Type','T','-1',10,-1,1,1,1,0),
('AP-PY','Prepayment','0','Account Id','T','-1',10,-1,1,1,0,1),
('AP-PY','Prepayment','1','Account Name','T','-1',20,-1,2,1,1,0),
('AP-PY','Prepayment','2','Class Id','T','-1',10,-1,3,1,0,1),
('AP-PY','Prepayment','3','Description','T','-1',20,-1,4,1,0,1),
('AP-PY','Prepayment','4','Amount','T','AMT',10,-1,5,1,0,0),
('AP-PY','Apply Document','1','Doc. Id','T','-1',10,-1,1,1,1,0),
('AP-PY','Apply Document','2','Reference','T','-1',10,-1,2,1,1,0),
('AP-PY','Apply Document','3','Date','T','-1',8,-1,3,1,1,0),
('AP-PY','Apply Document','4','Original Amount','T','AMT',12,-1,4,1,1,0),
('AP-PY','Apply Document','5','Applied Amount','T','AMT',12,-1,5,1,1,0),
('AP-PY','Apply Document','6','Outstanding Amount','T','AMT',13,-1,6,1,1,0),
('AP-PY','Apply Document','7','Balance','T','AMT',12,-1,7,1,1,0),
('AR-IN','Apply to GL Account','0','Account Id','T','-1',10,-1,1,1,0,1),
('AP-PY','Apply Document','9','Applied Payment','T','AMT',12,-1,9,1,0,0),
('AP-PY','Apply Document','10','','K','-1',4,-1,10,1,0,0),
('AP-PY','Apply Document','8','Description','T','-1',20,-1,8,1,0,1),
('AP-PY','Apply to Purchase Invoice','11','Applied Payment','T','AMT',10,8,11,1,1,0),
('AR-IN','Apply to GL Account','1','Account Name','T','-1',20,-1,2,1,1,0),
('AR-IN','Apply to GL Account','2','Class Id','T','-1',10,-1,3,1,0,1),
('AR-IN','Apply to GL Account','3','Description','T','-1',20,-1,4,1,0,1),
('AR-IN','Apply to GL Account','4','Amount','T','AMT',10,-1,5,1,0,0),
('AR-PY','Apply to Sale Invoice','0','Entry No','T','-1',10,-1,1,1,1,0),
('AR-PY','Apply to Sale Invoice','1','Reference','T','-1',10,-1,2,1,1,0),
('AR-PY','Apply to Sale Invoice','2','Date','T','-1',8,-1,3,1,1,0),
('AR-PY','Apply to Sale Invoice','3','Original Amount','T','AMT',12,-1,4,1,1,0),
('AR-PY','Apply to Sale Invoice','4','Payment to Date','T','AMT',12,-1,5,1,1,0),
('AR-PY','Apply to Sale Invoice','5','Amount Due','T','AMT',12,-1,6,1,1,0),
('AR-PY','Apply to Sale Invoice','6','Balance','T','AMT',12,-1,7,1,1,0),
('AR-PY','Apply to Sale Invoice','8','Discount','T','AMT',12,-1,9,1,0,0),
('AR-PY','Apply to Sale Invoice','9','Payment from Cash Acc.','T','AMT',15,-1,10,1,0,0),
('AR-PY','Apply to Sale Invoice','10','','K','-1',4,-1,11,1,0,0),
('AR-PY','Apply to Sale Invoice','7','Description','T','-1',20,-1,8,1,0,1),
('AR-PY','Apply to GL Account','0','Account Id','T','-1',10,-1,1,1,0,1),
('AR-PY','Apply to GL Account','1','Account Name','T','-1',20,-1,2,1,1,0),
('AR-PY','Apply to GL Account','2','Class Id','T','-1',10,-1,3,1,0,1),
('AR-PY','Apply to GL Account','3','Description','T','-1',20,-1,4,1,0,1),
('AR-PY','Apply to GL Account','4','Amount','T','AMT',10,-1,5,1,0,0),
('AR-PY','Apply Document','0','Doc. Type','T','-1',10,-1,1,1,1,0),
('AR-PY','Prepayment','0','Account Id','T','-1',10,-1,1,1,0,1),
('AR-PY','Prepayment','1','Account Name','T','-1',20,-1,2,1,1,0),
('AR-PY','Prepayment','2','Class Id','T','-1',10,-1,3,1,0,1),
('AR-PY','Prepayment','3','Description','T','-1',20,-1,4,1,0,1),
('AR-PY','Prepayment','4','Amount','T','2',10,-1,5,1,0,0),
('AR-PY','Apply Document','1','Doc. Id','T','-1',10,-1,1,1,1,0),
('AR-PY','Apply Document','2','Reference','T','-1',10,-1,2,1,1,0),
('AR-PY','Apply Document','3','Date','T','-1',8,-1,3,1,1,0),
('AR-PY','Apply Document','4','Original Amount','T','AMT',12,-1,4,1,1,0),
('AR-PY','Apply Document','5','Applied Amount','T','AMT',12,-1,5,1,1,0),
('AR-PY','Apply Document','6','Outstanding Amount','T','AMT',13,-1,6,1,1,0),
('AR-PY','Apply Document','7','Balance','T','AMT',12,-1,7,1,1,0),
('AR-PY','Apply Document','9','Applied Payment','T','AMT',12,-1,9,1,0,0),
('AR-PY','Apply Document','10','','T','-1',4,-1,10,1,0,0),
('AR-PY','Apply Document','8','Description','T','-1',20,-1,8,1,0,1),
('AR-PY','Apply to Sale Invoice','11','Applied Payment','T','AMT',12,8,11,1,1,0),
('GL-JE','GL-JE','1','Account Name','T','-1',20,-1,2,1,1,0),
('GL-JE','GL-JE','2','Date','T','-1',8,-1,3,1,1,0),
('GL-JE','GL-JE','3','Class Id','T','-1',9,-1,4,1,0,1),
('GL-JE','GL-JE','4','Description','T','-1',20,-1,5,1,0,1),
('GL-JE','GL-JE','5','Debit','T','AMT',11,-1,6,1,0,0),
('GL-JE','GL-JE','7','Line No','T','-1',10,-1,8,0,1,0),
('GL-JE','GL-JE','6','Credit','T','AMT',11,-1,7,1,0,0),
('GL-JE','GL-JE','8','DrCr','T','-1',10,-1,9,0,1,0),
('AP-IN','Purchase Inventory','12','FOC','T','QTY',10,7,13,1,0,0),
('MT-ITE','UOM','0','Conversion','T','QTY',10,-1,1,0,0,1),
('AP-IN','Additional Costing','9','Disc %','T','PER',10,-1,10,1,0,0),
('AP-IN','Additional Costing','10','Disc','T','AMT',10,-1,11,1,0,0),
('AP-IN','Additional Costing','12','VAT','K','-1',5,-1,13,1,0,0),
('AP-IN','Apply to GL Account','5','Disc %','T','PER',10,-1,6,1,0,0),
('AP-IN','Apply to GL Account','6','Disc','T','AMT',10,-1,7,1,0,0),
('AP-IN','Apply to GL Account','9','WHT','K','-1',5,-1,10,1,0,0),
('AP-IN','Additional Costing','11','Grand Total','T','AMT',10,-1,12,1,1,0),
('AP-IN','Apply to GL Account','7','Grand Total','T','AMT',10,-1,8,1,1,0),
('AP-IN','Purchase Inventory','13','VAT','K','-1',5,-1,14,1,0,0),
('AP-IN','Additional Costing','13','WHT','K','-1',5,-1,14,1,0,0),
('AP-IN','Apply to GL Account','8','VAT','K','-1',5,-1,9,1,0,0),
('AP-RET','Purchase Inventory','0','Item Id','T','-1',10,-1,1,1,1,0),
('AP-RET','Purchase Inventory','1','Item Name','T','-1',20,-1,2,1,1,0),
('AP-RET','Purchase Inventory','2','Description','T','-1',20,-1,3,1,0,1),
('AP-RET','Purchase Inventory','3','Location Id','T','-1',10,-1,4,1,1,0),
('AP-RET','Purchase Inventory','4','Class Id','T','-1',10,-1,5,1,1,0),
('AP-RET','Purchase Inventory','5','Uom Id','T','-1',10,-1,6,1,1,0),
('AP-RET','Purchase Inventory','6','Return Quantity','T','QTY',10,-1,7,1,0,0),
('AP-RET','Purchase Inventory','7','Cost','T','UC',10,-1,8,1,0,0),
('AP-RET','Purchase Inventory','8','Sub Total','T','AMT',10,-1,9,1,0,0),
('AP-RET','Purchase Inventory','9','Disc %','T','PER',10,-1,10,1,0,0),
('AP-RET','Purchase Inventory','10','Disc','T','AMT',10,-1,11,1,0,0),
('AP-RET','Purchase Inventory','11','Grand Total','T','AMT',10,-1,12,1,1,0),
('AP-RET','Purchase Inventory','12','FOC','T','QTY',10,7,13,1,0,0),
('AP-RET','Purchase Inventory','13','VAT','K','-1',5,-1,14,1,0,0),
('AP-RET','Purchase Inventory','14','WHT','K','-1',5,-1,15,1,0,0),
('AP-RET','Purchase Inventory','15','Purchase Quantity','T','QTY',11,6,16,1,1,0),
('AP-RET','Purchase Inventory','16','Returned Quantity','T','QTY',12,7,17,1,1,0),
('AP-RET','Purchase Inventory','17','Purchase FOC','T','QTY',10,8,18,1,1,0),
('AP-RET','Purchase Inventory','18','Returned FOC','T','QTY',10,9,19,1,1,0),
('AP-RET','Purchase Inventory','19','Batch','T','-1',6,-1,20,0,1,0),
('AP-RET','Purchase Inventory','20','Line','T','-1',6,-1,21,0,1,0),
('AP-DN','Apply to GL Account','0','Account Id','T','-1',10,-1,1,1,0,1),
('AP-DN','Apply to GL Account','1','Account Name','T','-1',20,-1,2,1,1,0),
('AP-DN','Apply to GL Account','2','Class Id','T','-1',10,-1,3,1,0,1),
('AP-DN','Apply to GL Account','3','Description','T','-1',20,-1,4,1,0,1),
('AP-DN','Apply to GL Account','4','Amount','T','2',10,-1,5,1,0,0),
('AP-DN','Apply to GL Account','5','Disc %','T','5',10,-1,6,1,0,0),
('AP-DN','Apply to GL Account','6','Disc','T','2',10,-1,7,1,0,0),
('AP-DN','Apply to GL Account','7','Grand Total','T','2',10,-1,8,1,1,0),
('AP-DN','Apply to GL Account','8','VAT','K','-1',5,-1,9,1,0,0),
('AP-DN','Apply to GL Account','9','WHT','K','-1',5,-1,10,1,0,0),
('AP-DN','Purchase Inventory','0','Item Id','T','-1',10,-1,1,1,0,1),
('AP-DN','Purchase Inventory','1','Item Name','T','-1',20,-1,2,1,1,0),
('AP-DN','Purchase Inventory','2','Description','T','-1',20,-1,3,1,0,1),
('AP-DN','Purchase Inventory','3','Location Id','T','-1',10,-1,4,1,0,1),
('AP-DN','Purchase Inventory','4','Class Id','T','-1',10,-1,5,1,0,1),
('AP-DN','Purchase Inventory','5','Uom Id','T','-1',10,-1,6,1,0,1),
('AP-DN','Purchase Inventory','6','Quantity','T','QTY',10,-1,7,1,0,0),
('AP-DN','Purchase Inventory','7','Cost','T','UC',10,-1,8,1,0,0),
('AP-DN','Purchase Inventory','8','Sub Total','T','AMT',10,-1,9,1,0,0),
('AP-DN','Purchase Inventory','9','Disc %','T','PER',10,-1,10,1,0,0),
('AP-DN','Purchase Inventory','10','Disc','T','AMT',10,-1,11,1,0,0),
('AP-DN','Purchase Inventory','11','Grand Total','T','AMT',10,-1,12,1,1,0),
('AP-DN','Purchase Inventory','12','FOC','T','QTY',10,7,13,1,0,0),
('AP-DN','Purchase Inventory','13','VAT','K','-1',5,-1,14,1,0,0),
('AP-DN','Purchase Inventory','14','WHT','K','-1',5,-1,15,1,0,0),
('AP-PO','Purchase Inventory','0','Item Id','T','-1',10,-1,1,1,0,1),
('AP-PO','Purchase Inventory','1','Item Name','T','-1',20,-1,2,1,1,0),
('AP-PO','Purchase Inventory','2','Description','T','-1',20,-1,3,1,0,1),
('AP-PO','Purchase Inventory','3','Location Id','T','-1',10,-1,4,1,0,1),
('AP-PO','Purchase Inventory','4','Class Id','T','-1',10,-1,5,1,0,1),
('AP-PO','Purchase Inventory','5','Uom Id','T','-1',10,-1,6,1,0,1),
('AP-PO','Purchase Inventory','6','Quantity','T','QTY',10,-1,7,1,0,0),
('AP-PO','Purchase Inventory','7','Cost','T','UC',10,-1,8,1,0,0),
('AP-PO','Purchase Inventory','8','Sub Total','T','AMT',10,-1,9,1,0,0),
('AP-PO','Purchase Inventory','9','Disc %','T','PER',10,-1,10,1,0,0),
('AP-PO','Purchase Inventory','10','Disc','T','AMT',10,-1,11,1,0,0),
('AP-PO','Purchase Inventory','11','Grand Total','T','AMT',10,-1,12,1,1,0),
('AP-PO','Purchase Inventory','12','FOC','T','QTY',10,7,13,1,0,0),
('AP-PO','Purchase Inventory','13','VAT','K','-1',5,-1,14,1,0,0),
('AP-PO','Purchase Inventory','14','WHT','K','-1',5,-1,15,1,0,0),
('AP-PO','Purchase Inventory','15','Qty Received','T','QTY',10,6,16,1,1,0),
('AP-PO','Purchase Inventory','17','Line','T','-1',5,-1,18,0,1,0),
('AP-IN','RPT','0','SELECT','K','-1',6,-1,1,1,0,0),
('AP-IN','RPT','1','Description 1','T','-1',15,-1,2,1,0,0),
('AP-IN','RPT','2','Description 2','T','-1',15,-1,3,1,0,0),
('AP-IN','RPT','3','Employee Id','T','-1',10,-1,4,1,1,1),
('AP-IN','RPT','4','Position Id','T','-1',10,-1,5,1,1,1),
('AP-IN','Purchase Inventory','15','Line','T','-1',5,-1,16,0,1,0),
('AP-IN','Purchase Inventory','16','Num','T','-1',5,-1,17,0,1,0),
('AP-PO','Purchase Inventory','16','FOC Received','T','QTY',10,6,17,0,1,0),
('AP-RET','Purchase Inventory','21','Num','T','-1',6,-1,22,0,1,0),
('AP-IN','Purchase Inventory','17','Qty Returned','T','QTY',10,6,18,0,1,0),
('AP-IN','Purchase Inventory','18','FOC Returned','T','QTY',10,6,19,0,1,0),
('AP-IN','RPT','5','Sort Order','T','-1',10,-1,5,0,1,0),
('AR-QUO','General Item Sale','0','Item Id','T','-1',10,-1,1,1,0,1),
('AR-QUO','General Item Sale','1','Item Name','T','-1',20,-1,2,1,1,0),
('AR-QUO','General Item Sale','2','Description','T','-1',20,-1,3,1,0,1),
('AR-QUO','General Item Sale','3','Location Id','T','-1',10,-1,4,1,0,1),
('AR-QUO','General Item Sale','4','Class Id','T','-1',10,-1,5,1,0,1),
('AR-QUO','General Item Sale','5','Uom Id','T','-1',10,-1,6,1,0,1),
('AR-QUO','General Item Sale','6','Quantity','T','QTY',10,-1,7,1,0,0),
('AR-QUO','General Item Sale','7','Price','T','UP',10,-1,8,1,0,0),
('AR-QUO','General Item Sale','8','Sub Total','T','AMT',10,-1,9,1,0,0),
('AR-QUO','General Item Sale','9','Disc %','T','PER',10,-1,10,1,0,0),
('AR-QUO','General Item Sale','10','Disc','T','AMT',10,-1,11,1,0,0),
('AR-QUO','General Item Sale','11','Grand Total','T','AMT',10,-1,12,1,1,0),
('AR-QUO','General Item Sale','12','FOC','T','QTY',10,7,13,1,0,0),
('AR-QUO','General Item Sale','13','VAT','K','-1',5,-1,14,1,0,0),
('AR-QUO','General Item Sale','14','WHT','K','-1',5,-1,15,1,0,0),
('AR-QUO','General Item Sale','15','Qty Received','T','QTY',10,6,16,1,1,0),
('AR-QUO','General Item Sale','16','FOC Received','T','QTY',10,6,17,0,1,0),
('AR-QUO','General Item Sale','17','Line','T','-1',5,-1,18,0,1,0),
('AR-QUO','General Item Sale','18','Comparative Price','T','UP',12,11,19,1,0,0),
('AR-IN-POS','','11','VAT','K','-1',5,-1,12,1,0,0),
('AR-SO','General Item Sale','0','Item Id','T','-1',10,-1,1,1,0,1),
('AR-SO','General Item Sale','1','Item Name','T','-1',20,-1,2,1,1,0),
('AR-SO','General Item Sale','2','Description','T','-1',20,-1,3,1,0,1),
('AR-SO','General Item Sale','3','Location Id','T','-1',10,-1,4,1,0,1),
('AR-SO','General Item Sale','4','Class Id','T','-1',10,-1,5,1,0,1),
('AR-SO','General Item Sale','5','Uom Id','T','-1',10,-1,6,1,0,1),
('AR-SO','General Item Sale','6','Quantity','T','QTY',10,-1,7,1,0,0),
('AR-SO','General Item Sale','7','Price','T','UP',10,-1,8,1,0,0),
('AR-SO','General Item Sale','8','Sub Total','T','AMT',10,-1,9,1,0,0),
('AR-SO','General Item Sale','9','Disc %','T','PER',10,-1,10,1,0,0),
('AR-SO','General Item Sale','10','Disc','T','AMT',10,-1,11,1,0,0),
('AR-SO','General Item Sale','11','Grand Total','T','AMT',10,-1,12,1,1,0),
('AR-SO','General Item Sale','12','FOC','T','AMT',10,7,13,1,0,0),
('AR-SO','General Item Sale','13','VAT','K','-1',5,-1,14,1,0,0),
('AR-SO','General Item Sale','14','WHT','K','-1',5,-1,15,1,0,0),
('AR-SO','General Item Sale','15','Qty Received','T','QTY',10,6,16,1,1,0),
('AR-SO','General Item Sale','16','FOC Received','T','QTY',10,6,17,0,1,0),
('AR-SO','General Item Sale','17','Line','T','-1',5,-1,18,0,1,0),
('AR-SO','General Item Sale','18','Comparative Price','T','UP',12,11,19,1,0,0),
('AR-SO','General Item Sale','19','Num','T','-1',5,-1,20,0,1,0),
('AR-IN-POS','','12','WHT','K','-1',5,-1,13,1,0,0),
('AR-IN-POS','','14','Qty Received','T','QTY',10,6,15,0,1,0),
('AR-IN-POS','','15','FOC Received','T','QTY',10,6,16,0,1,0),
('AR-IN-POS','','16','Line','T','-1',5,-1,17,0,1,0),
('AR-IN-POS','','13','SVC','K','-1',5,-1,14,1,0,0),
('AR-IN-POS','','17','Num','T','-1',5,-1,18,0,1,0),
('AR-IN-POS','','18','NumType','T','-1',5,-1,19,0,1,0),
('AR-CN','Apply to GL Account','0','Account Id','T','-1',10,-1,1,1,0,1),
('AR-CN','Apply to GL Account','1','Account Name','T','-1',20,-1,2,1,1,0),
('AR-CN','Apply to GL Account','2','Class Id','T','-1',10,-1,3,1,0,1),
('AR-CN','Apply to GL Account','3','Description','T','-1',20,-1,4,1,0,1),
('AR-CN','Apply to GL Account','4','Amount','T','AMT',10,-1,5,1,0,0),
('AR-CN','General Item Sale','0','Item Id','T','-1',10,-1,1,1,0,1),
('AR-CN','General Item Sale','1','Item Name','T','-1',20,-1,2,1,1,0),
('AR-CN','General Item Sale','2','Description','T','-1',20,-1,3,1,0,1),
('AR-CN','General Item Sale','3','Location Id','T','-1',10,-1,4,1,0,1),
('AR-CN','General Item Sale','4','Class Id','T','-1',10,-1,5,1,0,1),
('AR-CN','General Item Sale','5','Uom Id','T','-1',10,-1,6,1,0,1),
('AR-CN','General Item Sale','6','Quantity','T','QTY',10,-1,7,1,0,0),
('AR-CN','General Item Sale','7','Price','T','UP',10,-1,8,1,0,0),
('AR-CN','General Item Sale','8','Sub Total','T','AMT',10,-1,9,1,0,0),
('AR-CN','General Item Sale','9','Disc %','T','PER',10,-1,10,1,0,0),
('AR-CN','General Item Sale','10','Disc','T','AMT',10,-1,11,1,0,0),
('AR-CN','General Item Sale','11','Grand Total','T','AMT',10,-1,12,1,1,0),
('AR-CN','General Item Sale','12','FOC','T','QTY',10,7,13,1,0,0),
('AR-CN','General Item Sale','13','VAT','K','-1',5,-1,14,1,0,0),
('AR-CN','General Item Sale','14','WHT','K','-1',5,-1,15,1,0,0),
('AR-CN','General Item Sale','15','Qty Received','T','QTY',10,6,16,0,1,0),
('AR-CN','General Item Sale','16','FOC Received','T','QTY',10,6,17,0,1,0),
('AR-CN','General Item Sale','17','Line','T','-1',5,-1,18,0,1,0),
('AR-CN','General Item Sale','18','Comparative Price','T','UP',12,11,19,1,0,0),
('AR-CN','General Item Sale','19','Num','T','-1',5,-1,20,0,1,0),
('AR-CN','General Item Sale','20','NumType','T','-1',5,-1,21,0,1,0),
('AR-IN','Apply to GL Account','5','Disc %','T','PER',10,-1,6,1,0,0),
('AR-IN','Apply to GL Account','6','Disc','T','AMT',10,-1,7,1,0,0),
('AR-IN','Apply to GL Account','7','Grand Total','T','AMT',10,-1,8,1,1,0),
('AR-IN','Apply to GL Account','8','VAT','K','-1',5,-1,9,1,0,0),
('AR-IN','Apply to GL Account','9','WHT','K','-1',5,-1,10,1,0,0),
('AR-CN','Apply to GL Account','5','Disc %','T','PER',10,-1,6,1,0,0),
('AR-CN','Apply to GL Account','6','Disc','T','AMT',10,-1,7,1,0,0),
('AR-CN','Apply to GL Account','7','Grand Total','T','AMT',10,-1,8,1,1,0),
('AR-CN','Apply to GL Account','8','VAT','K','-1',5,-1,9,1,0,0),
('AR-CN','Apply to GL Account','9','WHT','K','-1',5,-1,10,1,0,0),
('AR-RET','General Item Sale','0','Item Id','T','-1',10,-1,1,1,1,0),
('AR-RET','General Item Sale','1','Item Name','T','-1',20,-1,2,1,1,0),
('AR-RET','General Item Sale','2','Description','T','-1',20,-1,3,1,0,1),
('AR-RET','General Item Sale','3','Location Id','T','-1',10,-1,4,1,1,0),
('AR-RET','General Item Sale','4','Class Id','T','-1',10,-1,5,1,1,0),
('AR-RET','General Item Sale','5','Uom Id','T','-1',10,-1,6,1,1,0),
('AR-RET','General Item Sale','6','Return Quantity','T','QTY',10,-1,7,1,0,0),
('AR-RET','General Item Sale','7','Price','T','UP',10,-1,8,1,0,0),
('AR-RET','General Item Sale','8','Sub Total','T','AMT',10,-1,9,1,0,0),
('AR-RET','General Item Sale','9','Disc %','T','PER',10,-1,10,1,0,0),
('AR-RET','General Item Sale','10','Disc','T','AMT',10,-1,11,1,0,0),
('AR-RET','General Item Sale','11','Grand Total','T','AMT',10,-1,12,1,1,0),
('AR-RET','General Item Sale','12','FOC','T','QTY',10,7,13,1,0,0),
('AR-RET','General Item Sale','13','VAT','K','-1',5,-1,14,1,0,0),
('AR-RET','General Item Sale','14','WHT','K','-1',5,-1,15,1,0,0),
('AR-RET','General Item Sale','15','Sales Quantity','T','QTY',11,6,16,1,1,0),
('AR-RET','General Item Sale','16','Returned Quantity','T','QTY',12,7,17,1,1,0),
('AR-RET','General Item Sale','17','Sales FOC','T','QTY',10,8,18,1,1,0),
('AR-RET','General Item Sale','18','Returned FOC','T','QTY',10,9,19,1,1,0),
('AR-RET','General Item Sale','19','Batch','T','-1',6,-1,20,0,1,0),
('AR-RET','General Item Sale','20','Line','T','-1',6,-1,21,0,1,0),
('AR-RET','General Item Sale','21','Num','T','-1',6,-1,22,0,1,0),
('AR-RET','General Item Sale','22','Comparative Price','T','UP',11,13,23,1,0,0),
('GL-JE','GL-JE','9','Debit (Fun. Currency)','T','AMT',13,-1,10,1,1,0),
('GL-JE','GL-JE','10','Credit (Fun. Currency)','T','AMT',13,-1,11,1,1,0),
('AR-SM','AR-SM','0','Item Id','T','-1',10,-1,1,1,1,0),
('AR-SM','AR-SM','1','Item Name','T','-1',20,-1,2,1,1,0),
('AR-SM','AR-SM','2','Description','T','-1',20,-1,3,1,0,1),
('AR-SM','AR-SM','3','Location Id','T','-1',10,-1,4,1,1,0),
('IC-TF','Inventory Transfer','0','Item Id','T','-1',10,-1,1,1,0,1),
('AR-SM','AR-SM','4','Uom Id','T','-1',10,-1,6,1,1,0),
('AR-SM','AR-SM','9','Ship Quantity','T','QTY',10,-1,11,1,0,0),
('IC-TF','Inventory Transfer','2','Description','T','-1',20,-1,3,1,0,1),
('IC-TF','Inventory Transfer','3','From Location Id','T','-1',10,-1,4,1,0,1),
('IC-TF','Inventory Transfer','6','Uom Id','T','-1',10,-1,7,1,0,1),
('IC-TF','Inventory Transfer','7','Quantity','T','QTY',10,-1,8,1,0,0),
('AR-SM','AR-SM','10','Ship FOC','T','QTY',10,-1,12,1,0,0),
('AR-SM','AR-SM','11','','K','-1',5,-1,13,1,0,0),
('IC-TF','Inventory Transfer','1','Item Name','T','-1',20,-1,2,1,1,0),
('AR-SM','AR-SM','5','Doc. Quantity','T','QTY',10,-1,7,1,1,0),
('AR-SM','AR-SM','6','Doc. FOC','T','QTY',10,-1,8,1,1,0),
('AR-SM','AR-SM','7','Shipped Quantity','T','QTY',11,-1,9,1,1,0),
('AR-SM','AR-SM','8','Shipped FOC','T','QTY',10,-1,10,1,1,0),
('AR-SM','AR-SM','12','Line','T','-1',6,-1,14,0,1,0),
('AR-SM','AR-SM','13','Num','T','-1',6,-1,15,0,1,0),
('IC-TF','Inventory Transfer','5','Class Id','T','-1',10,-1,6,1,0,1),
('IC-IU','Internal Usage','0','Item Id','T','-1',10,-1,1,1,0,1),
('IC-IU','Internal Usage','1','Item Name','T','-1',20,-1,2,1,1,0),
('IC-TF','Inventory Transfer','8','Line','T','-1',6,-1,9,0,1,0),
('IC-TF','Inventory Transfer','4','To Location Id','T','-1',10,-1,5,1,0,1),
('IC-IU','Internal Usage','2','Description','T','-1',20,-1,3,1,0,1),
('IC-IU','Internal Usage','3','Usage Type','T','-1',15,-1,4,1,1,1),
('IC-IU','Internal Usage','4','Location Id','T','-1',10,-1,5,1,0,1),
('IC-IU','Internal Usage','5','Class Id','T','-1',10,-1,6,1,0,1),
('IC-IU','Internal Usage','6','Uom Id','T','-1',10,-1,7,1,0,1),
('IC-IU','Internal Usage','7','Quantity','T','QTY',10,-1,8,1,0,0),
('IC-IU','Internal Usage','16','Line','T','-1',6,-1,17,0,1,0),
('IC-IU','Internal Usage','8','Usage Acc. Id','T','-1',10,-1,9,1,0,1),
('IC-IU','Internal Usage','9','Usage Acc. Name','T','-1',20,-1,10,1,1,0),
('IC-IU','Internal Usage','10','Apply to Item Id','T','-1',10,-1,11,1,0,1),
('IC-IU','Internal Usage','11','Apply to Item Name','T','-1',20,-1,12,1,1,0),
('IC-IU','Internal Usage','12','Apply to AC Id','T','-1',10,-1,13,1,0,1),
('IC-IU','Internal Usage','13','Apply to AC Name','T','-1',20,-1,14,1,1,0),
('IC-IU','Internal Usage','14','Apply to Batch No','T','-1',11,-1,15,1,1,1),
('IC-IU','Internal Usage','15','Apply to Location Id','T','-1',12,-1,16,1,1,0),
('IC-ICUOM','Inventory Convert UOM','0','From Item Id','T','-1',10,-1,1,1,0,1),
('IC-ICUOM','Inventory Convert UOM','1','From Item Name','T','-1',20,-1,2,1,1,0),
('IC-ICUOM','Inventory Convert UOM','2','Description','T','-1',20,-1,3,1,0,1),
('IC-ICUOM','Inventory Convert UOM','3','From Location Id','T','-1',10,-1,4,1,0,1),
('IC-ICUOM','Inventory Convert UOM','4','Class Id','T','-1',10,-1,5,1,0,1),
('IC-ICUOM','Inventory Convert UOM','5','From Uom Id','T','-1',10,-1,6,1,0,1),
('IC-ICUOM','Inventory Convert UOM','6','Quantity','T','QTY',10,-1,7,1,0,0),
('IC-ICUOM','Inventory Convert UOM','7','To Item Id','T','-1',10,-1,8,1,0,1),
('IC-ICUOM','Inventory Convert UOM','8','To Item Name','T','-1',20,-1,9,1,1,0),
('IC-ICUOM','Inventory Convert UOM','9','To Location Id','T','-1',10,-1,10,1,0,1),
('IC-ICUOM','Inventory Convert UOM','10','To Uom Id','T','-1',10,-1,11,1,0,1),
('IC-ICUOM','Inventory Convert UOM','11','Conversion Type','T','-1',10,-1,12,1,1,1),
('IC-ICUOM','Inventory Convert UOM','12','Conversion Factor','T','QTY',11,-1,13,1,0,0),
('IC-ICUOM','Inventory Convert UOM','13','Line','T','-1',6,-1,14,0,1,0),
('IC-IA','Inventory Adjustment','1','Item Name','T','-1',20,-1,2,1,1,0),
('IC-IA','Inventory Adjustment','0','Item Id','T','-1',10,-1,1,1,0,1),
('IC-IA','Inventory Adjustment','2','Description','T','-1',20,-1,3,1,0,1),
('IC-IA','Inventory Adjustment','3','Location Id','T','-1',10,-1,4,1,1,1),
('IC-IA','Inventory Adjustment','4','Class Id','T','-1',10,-1,5,1,0,1),
('IC-IA','Inventory Adjustment','5','Uom Id','T','-1',10,-1,6,1,0,1),
('IC-IA','Inventory Adjustment','7','Quantity','T','QTY',10,-1,9,1,0,0),
('IC-IA','Inventory Adjustment','6','Batch No','T','-1',10,3,7,1,1,1),
('IC-IP','Inventory Production','4','Location Id','T','-1',10,-1,5,1,1,1),
('IC-IA','Inventory Adjustment','8','Cost','T','UC',10,-1,10,1,0,0),
('IC-IP','Inventory Production','3','Description','T','-1',20,-1,4,1,0,1),
('IC-IP','Inventory Production','1','Item Id','T','-1',10,-1,2,1,0,1),
('IC-IP','Inventory Production','2','Item Name','T','-1',20,-1,3,1,1,0),
('IC-IA','Inventory Adjustment','9','Line','T','-1',6,-1,11,0,1,0),
('IC-IP','Inventory Production','5','Class Id','T','-1',10,-1,6,1,0,1),
('IC-IP','Inventory Production','6','Uom Id','T','-1',10,-1,7,1,0,1),
('IC-IP','Inventory Production','0','Type','T','-1',10,-1,1,1,1,1),
('IC-IP','Inventory Production','7','Quantity','T','QTY',10,-1,8,1,0,0),
('IC-IP','Inventory Production','10','Amount','T','AMT',10,-1,11,1,0,0),
('IC-IP','Inventory Production','12','Line','T','-1',6,-1,13,0,1,0),
('IC-IP','Inventory Production','8','Account Id','T','-1',10,-1,9,1,0,1),
('IC-IP','Inventory Production','9','Account Name','T','-1',20,-1,10,1,1,0),
('IC-IP','Inventory Production','13','Production','T','-1',3,-1,14,0,1,0),
('IC-IP','Inventory Production','11','Cost Allocation %','T','PER',11,-1,12,1,0,0),
('AP-IN','Additional Costing','14','Line','T','-1',5,-1,15,0,1,0),
('AP-IN','Additional Costing','15','Num','T','-1',5,-1,16,0,1,0),
('AR-IN','General Item Sale','0','Item Id','T','-1',10,-1,1,1,0,1),
('AR-IN','General Item Sale','1','Item Name','T','-1',20,-1,2,1,1,0),
('AR-IN','General Item Sale','2','Description','T','-1',20,-1,3,1,0,1),
('AR-IN','General Item Sale','3','Location Id','T','-1',10,-1,4,1,0,1),
('AR-IN','General Item Sale','4','Class Id','T','-1',10,-1,5,1,0,1),
('AR-IN','General Item Sale','5','Uom Id','T','-1',10,-1,6,1,0,1),
('AR-IN','General Item Sale','6','Quantity','T','QTY',10,-1,7,1,0,0),
('AR-IN','General Item Sale','7','Price','T','UP',10,-1,8,1,0,0),
('AR-IN','General Item Sale','8','Sub Total','T','AMT',10,-1,9,1,0,0),
('AR-IN','General Item Sale','9','Disc %','T','PER',10,-1,10,1,0,0),
('AR-IN','General Item Sale','10','Disc','T','AMT',10,-1,11,1,0,0),
('AR-IN','General Item Sale','11','Grand Total','T','AMT',10,-1,12,1,1,0),
('AR-IN','General Item Sale','12','FOC','T','QTY',10,7,13,1,0,0),
('AR-IN','General Item Sale','13','VAT','K','-1',5,-1,14,1,0,0),
('AR-IN','General Item Sale','14','WHT','K','-1',5,-1,15,1,0,0),
('AR-IN','General Item Sale','15','Qty Received','T','QTY',10,6,16,0,1,0),
('AR-IN','General Item Sale','16','FOC Received','T','QTY',10,6,17,0,1,0),
('AR-IN','General Item Sale','17','Line','T','-1',5,-1,18,0,1,0),
('AR-IN','General Item Sale','18','Comparative Price','T','UP',12,11,19,1,0,0),
('AR-IN','General Item Sale','19','Num','T','-1',5,-1,20,0,1,0),
('AR-IN','General Item Sale','20','NumType','T','-1',5,-1,21,0,1,0);

-- 
-- Definition of ame_sys_lock
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_lock` (
  `var_id` varchar(100) NOT NULL DEFAULT '',
  `int_year` int(4) NOT NULL,
  `int_month` int(2) NOT NULL,
  `dat_start` date DEFAULT NULL,
  `dat_end` date DEFAULT NULL,
  `tin_lock` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_year`,`int_month`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_lock
-- 

INSERT INTO `ame_sys_lock`(`var_id`,`int_year`,`int_month`,`dat_start`,`dat_end`,`tin_lock`) VALUES
('UNDEFINE',2012,12,'2012-12-01 00:00:00','2012-12-30 00:00:00',1),
('UNDEFINE',2012,11,'2012-11-01 00:00:00','2012-11-30 00:00:00',1),
('UNDEFINE',2012,10,'2012-10-01 00:00:00','2012-10-30 00:00:00',1),
('UNDEFINE',2012,9,'2012-09-01 00:00:00','2012-09-30 00:00:00',1),
('UNDEFINE',2012,8,'2012-08-01 00:00:00','2012-08-31 00:00:00',1),
('UNDEFINE',2012,7,'2012-07-01 00:00:00','2012-07-30 00:00:00',1),
('UNDEFINE',2012,6,'2012-06-01 00:00:00','2012-06-30 00:00:00',1),
('UNDEFINE',2012,5,'2012-05-01 00:00:00','2012-05-30 00:00:00',1),
('UNDEFINE',2012,4,'2012-04-01 00:00:00','2012-04-30 00:00:00',1),
('UNDEFINE',2012,3,'2012-03-01 00:00:00','2012-03-29 00:00:00',1),
('UNDEFINE',2012,2,'2012-02-01 00:00:00','2012-02-29 00:00:00',1),
('UNDEFINE',2012,1,'2012-01-01 00:00:00','2012-01-31 00:00:00',1),
('UNDEFINE',2022,12,'2022-12-01 00:00:00','2022-12-30 00:00:00',0),
('UNDEFINE',2022,11,'2022-11-01 00:00:00','2022-11-30 00:00:00',0),
('UNDEFINE',2022,10,'2022-10-01 00:00:00','2022-10-30 00:00:00',0),
('UNDEFINE',2022,9,'2022-09-01 00:00:00','2022-09-30 00:00:00',0),
('UNDEFINE',2022,8,'2022-08-01 00:00:00','2022-08-31 00:00:00',0),
('UNDEFINE',2022,7,'2022-07-01 00:00:00','2022-07-30 00:00:00',0),
('UNDEFINE',2022,6,'2022-06-01 00:00:00','2022-06-30 00:00:00',0),
('UNDEFINE',2022,5,'2022-05-01 00:00:00','2022-05-30 00:00:00',0),
('UNDEFINE',2022,4,'2022-04-01 00:00:00','2022-04-30 00:00:00',0),
('UNDEFINE',2022,3,'2022-03-01 00:00:00','2022-03-28 00:00:00',0),
('UNDEFINE',2022,2,'2022-02-01 00:00:00','2022-02-28 00:00:00',0),
('UNDEFINE',2022,1,'2022-01-01 00:00:00','2022-01-31 00:00:00',0),
('UNDEFINE',2013,1,'2013-01-01 00:00:00','2013-01-31 00:00:00',1),
('UNDEFINE',2013,2,'2013-02-01 00:00:00','2013-02-28 00:00:00',1),
('UNDEFINE',2013,3,'2013-03-01 00:00:00','2013-03-28 00:00:00',1),
('UNDEFINE',2013,4,'2013-04-01 00:00:00','2013-04-30 00:00:00',1),
('UNDEFINE',2013,5,'2013-05-01 00:00:00','2013-05-30 00:00:00',1),
('UNDEFINE',2013,6,'2013-06-01 00:00:00','2013-06-30 00:00:00',1),
('UNDEFINE',2013,7,'2013-07-01 00:00:00','2013-07-30 00:00:00',1),
('UNDEFINE',2013,8,'2013-08-01 00:00:00','2013-08-31 00:00:00',1),
('UNDEFINE',2013,9,'2013-09-01 00:00:00','2013-09-30 00:00:00',1),
('UNDEFINE',2013,10,'2013-10-01 00:00:00','2013-10-30 00:00:00',1),
('UNDEFINE',2013,11,'2013-11-01 00:00:00','2013-11-30 00:00:00',1),
('UNDEFINE',2013,12,'2013-12-01 00:00:00','2013-12-30 00:00:00',1),
('UNDEFINE',2018,12,'2018-12-01 00:00:00','2018-12-30 00:00:00',0),
('UNDEFINE',2018,11,'2018-11-01 00:00:00','2018-11-30 00:00:00',0),
('UNDEFINE',2018,10,'2018-10-01 00:00:00','2018-10-30 00:00:00',0),
('UNDEFINE',2018,9,'2018-09-01 00:00:00','2018-09-30 00:00:00',0),
('UNDEFINE',2018,8,'2018-08-01 00:00:00','2018-08-31 00:00:00',0),
('UNDEFINE',2018,7,'2018-07-01 00:00:00','2018-07-30 00:00:00',0),
('UNDEFINE',2018,6,'2018-06-01 00:00:00','2018-06-30 00:00:00',0),
('UNDEFINE',2018,5,'2018-05-01 00:00:00','2018-05-30 00:00:00',0),
('UNDEFINE',2018,4,'2018-04-01 00:00:00','2018-04-30 00:00:00',0),
('UNDEFINE',2018,3,'2018-03-01 00:00:00','2018-03-28 00:00:00',0),
('UNDEFINE',2018,2,'2018-02-01 00:00:00','2018-02-28 00:00:00',0),
('UNDEFINE',2018,1,'2018-01-01 00:00:00','2018-01-31 00:00:00',0);

-- 
-- Definition of ame_sys_menu
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_menu` (
  `Name` varchar(255) DEFAULT NULL,
  `Text` varchar(255) DEFAULT NULL,
  `SortKey` int(11) DEFAULT NULL,
  `Status` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_menu
-- 

INSERT INTO `ame_sys_menu`(`Name`,`Text`,`SortKey`,`Status`) VALUES
('AR','Account Receivable',2000,'Balancika**@@123'),
('AP','Account Payable',1000,'Balancika**@@123'),
('IC','Inventory Control',4000,'Balancika**@@123'),
('GL','General Ledger',7000,'Balancika**@@123'),
('FEV','Favorite',8000,'Balancika**@@123'),
('OW','Open Windows',9000,'Balancika**@@123'),
('REM','Reminder',10000,'Balancika**@@123');

-- 
-- Definition of ame_sys_menu_fev
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_menu_fev` (
  `var_name` varchar(255) NOT NULL,
  `var_text` varchar(255) DEFAULT NULL,
  `int_sortkey` int(11) DEFAULT NULL,
  `var_uid` varchar(200) NOT NULL,
  `var_tag` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`var_name`,`var_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_menu_fev
-- 

INSERT INTO `ame_sys_menu_fev`(`var_name`,`var_text`,`int_sortkey`,`var_uid`,`var_tag`) VALUES
('AP_IN','Purchase / Receive Inventory',2,'ADMIN','AP_IN'),
('IC_TF','Inventory Transfer',3,'ADMIN','IC_TF'),
('MT_CUS','Customer',1,'ADMIN','MT_CUS');

-- 
-- Definition of ame_sys_menu_process
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_menu_process` (
  `name` varchar(255) DEFAULT NULL,
  `text` varchar(255) DEFAULT NULL,
  `sortkey` int(11) DEFAULT NULL,
  `status` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_menu_process
-- 

INSERT INTO `ame_sys_menu_process`(`name`,`text`,`sortkey`,`status`) VALUES
('AR','Setting',1,'Balancika**@@123'),
('AR','Maintain',2,'Balancika**@@123'),
('AR','Transactions',3,'Balancika**@@123'),
('AP','Setting',1,'Balancika**@@123'),
('AP','Maintain',2,'Balancika**@@123'),
('AP','Transactions',3,'Balancika**@@123'),
('IC','Setting',1,'Balancika**@@123'),
('IC','Maintain',2,'Balancika**@@123'),
('IC','Transactions',3,'Balancika**@@123'),
('GL','Setting',1,'Balancika**@@123'),
('GL','Maintain',2,'Balancika**@@123'),
('GL','Transactions',3,'Balancika**@@123');

-- 
-- Definition of ame_sys_menudetail
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_menudetail` (
  `Name` varchar(255) DEFAULT NULL,
  `SortKey` int(11) DEFAULT NULL,
  `FrmSysName` varchar(255) DEFAULT NULL,
  `FrmName` varchar(255) DEFAULT NULL,
  `Status` varchar(255) DEFAULT NULL,
  `FrmTag` varchar(255) DEFAULT NULL,
  `FrmStatus` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_menudetail
-- 

INSERT INTO `ame_sys_menudetail`(`Name`,`SortKey`,`FrmSysName`,`FrmName`,`Status`,`FrmTag`,`FrmStatus`) VALUES
('IC',10,'MT_CLA','Class','Setting','MT_CLA','Balancika**@@123'),
('IC',20,'MT_LOC','Location','Setting','MT_LOC','Balancika**@@123'),
('IC',30,'MT_PRI_COD','Price Code','Setting','MT_PRI_COD','Balancika**@@123'),
('IC',40,'MT_UOM','Unit of Measure','Setting','MT_UOM','Balancika**@@123'),
('AP',50,'MT_VEN_GRO','Vendor Group','Setting','MT_VEN_GRO','Balancika**@@123'),
('IC',50,'MT_ITE_GRO','Item Group','Setting','MT_ITE_GRO','Balancika**@@123'),
('IC',10,'MT_ITE','Item','Maintain','MT_ITE','Balancika**@@123'),
('AR',20,'AR_QUO','Quotation','Transactions','AR_QUO','Balancika**@@123'),
('AR',30,'AR_SO','Sales Order','Transactions','AR_SO','Balancika**@@123'),
('AR',40,'AR_IN','Sales Invoicing','Transactions','AR_IN','Balancika**@@123'),
('AR',50,'AR_RET','Sales Return','Transactions','AR_RET','Balancika**@@123'),
('AR',60,'AR_CN','Credit Note','Transactions','AR_CN','Balancika**@@123'),
('AR',70,'AR_SM','Shipment','Transactions','AR_SM','Balancika**@@123'),
('AR',80,'AR_SM_LIS','Shipment Listing','Transactions','AR_SM_LIS','Balancika**@@123'),
('AR',90,'AR_PY','Receive Payment','Transactions','AR_PY','Balancika**@@123'),
('AR',10,'MT_CLA','Class','Setting','MT_CLA','Balancika**@@123'),
('AR',20,'MT_LOC','Location','Setting','MT_LOC','Balancika**@@123'),
('AR',30,'MT_PRI_COD','Price Code','Setting','MT_PRI_COD','Balancika**@@123'),
('AR',40,'MT_UOM','Unit of Measure','Setting','MT_UOM','Balancika**@@123'),
('AR',50,'MT_CUS_GRO','Customer Group','Setting','MT_CUS_GRO','Balancika**@@123'),
('AR',60,'MT_ITE_GRO','Item Group','Setting','MT_ITE_GRO','Balancika**@@123'),
('AR',10,'MT_ACC','Chart of Account','Maintain','MT_ACC','Balancika**@@123'),
('AR',20,'MT_CUS','Customer','Maintain','MT_CUS','Balancika**@@123'),
('AR',30,'MT_EMP','Employee','Maintain','MT_EMP','Balancika**@@123'),
('AR',10,'MT_ITE','Item','Maintain','MT_ITE','Balancika**@@123'),
('AP',10,'AP_PO','Purchase Order','Transactions','AP_PO','Balancika**@@123'),
('AP',20,'AP_IN','Purchase / Receive Inventory','Transactions','AP_IN','Balancika**@@123'),
('AP',30,'AP_RET','Purchase Return','Transactions','AP_RET','Balancika**@@123'),
('AP',40,'AP_DN','Debit Note','Transactions','AP_DN','Balancika**@@123'),
('AP',50,'AP_PY','Make Payment','Transactions','AP_PY','Balancika**@@123'),
('AP',10,'MT_CLA','Class','Setting','MT_CLA','Balancika**@@123'),
('AP',20,'MT_LOC','Location','Setting','MT_LOC','Balancika**@@123'),
('AP',30,'MT_PRI_COD','Price Code','Setting','MT_PRI_COD','Balancika**@@123'),
('AP',40,'MT_UOM','Unit of Measure','Setting','MT_UOM','Balancika**@@123'),
('AP',60,'MT_ITE_GRO','Item Group','Setting','MT_ITE_GRO','Balancika**@@123'),
('AP',10,'MT_ACC','Chart of Account','Maintain','MT_ACC','Balancika**@@123'),
('AP',20,'MT_VEN','Vendor','Maintain','MT_VEN','Balancika**@@123'),
('AP',30,'MT_EMP','Employee','Maintain','MT_EMP','Balancika**@@123'),
('AP',10,'MT_ITE','Item','Maintain','MT_ITE','Balancika**@@123'),
('IC',10,'IC_TF','Inventory Transfer','Transactions','IC_TF','Balancika**@@123'),
('IC',20,'IC_IU','Internal Usage','Transactions','IC_IU','Balancika**@@123'),
('IC',30,'IC_ICUOM','Inventory Convert UOM','Transactions','IC_ICUOM','Balancika**@@123'),
('IC',40,'IC_IP','Inventory Production','Transactions','IC_IP','Balancika**@@123'),
('IC',60,'IC_IA','Inventory Adjustment','Transactions','IC_IA','Balancika**@@123'),
('IC',20,'MT_ACC','Chart of Account','Maintain','MT_ACC','Balancika**@@123'),
('GL',10,'MT_CLA','Class','Setting','MT_CLA','Balancika**@@123'),
('GL',10,'MT_ACC','Chart of Account','Maintain','MT_ACC','Balancika**@@123'),
('GL',10,'GL_JE','Make Journal Entry','Transactions','GL_JE','Balancika**@@123');

-- 
-- Definition of ame_sys_msg
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_msg` (
  `var_keyword` varchar(100) NOT NULL,
  `var_msg` varchar(1000) DEFAULT NULL,
  PRIMARY KEY (`var_keyword`),
  KEY `SysCode` (`var_keyword`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_msg
-- 

INSERT INTO `ame_sys_msg`(`var_keyword`,`var_msg`) VALUES
('INF_INS','The new param1 record with id: ''param2'' was successfully added.'),
('INF_UPD','The param1 record with id: ''param2'' was successfully saved.'),
('INF_DEL','The param1 record with id: ''param2'' was successfully deleted.'),
('QUE_DEL','Are you sure you want to delete param1 record with id: ''param2'' from the system?'),
('QUE_CLO','Are you sure '),
('ERR_EXC','Error: param1'),
('WAR_EXIST','The param1: ''param2'' is already existed.'),
('WAR_INVALID','Invalid param1!'),
('WAR_NOT_FOU','No match found.'),
('INF_POS','param1 Completed.'),
('WAR_PMT','The payment is over amount due. Operation not allowed!'),
('WAR_PMT_DATE','The param1 date is less than param2 date. Operation not allowed!'),
('STATUS','The param1 record with id: ''param2'' is invalid status. Operation not allowed!'),
('ZERO_AMT','Not allowed zero value.'),
('QUE_POS','Are you sure you want to post transaction?'),
('QUE_POS_REV','Are you sure you want to repost transaction?'),
('QUE_POS_DEL','Are you sure you want to delete posted transaction from the system?'),
('WAR_PMT_APP','Applied Payments not equal to Credit & GL Acc. Operation not allowed!'),
('WAR_BLANK','The name cannot be blank. Please specify a name.'),
('WAR_INUSE','AME cannot delete this name because it is used in at least one transaction.'),
('INF_SUC','Successfully Saved.'),
('WAR_PER','You have no permission for ''param1''. Please contact administrator!'),
('WAR_LOCK_PERIOD','The param1 with record id : ''param2'' in date : ''param3'' was locked. The system will continue automatically.'),
('WAR_BLANK_DESC','The description cannot be blank. Please specify a description.'),
('WAR_BLANK_OPT','The Optional Field param1 cannot be blank. Please specify a param1.');

-- 
-- Definition of ame_sys_of
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_of` (
  `int_id` int(11) NOT NULL,
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_datatype` varchar(100) DEFAULT NULL,
  `var_value` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `tin_ven` tinyint(1) DEFAULT '0',
  `tin_cus` tinyint(1) DEFAULT '0',
  `tin_emp` tinyint(1) DEFAULT '0',
  `tin_item` tinyint(1) DEFAULT '0',
  `tin_req` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`int_id`,`int_line`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_of
-- 

INSERT INTO `ame_sys_of`(`int_id`,`int_line`,`var_datatype`,`var_value`,`var_desc`,`tin_ven`,`tin_cus`,`tin_emp`,`tin_item`,`tin_req`) VALUES
(1,1,'LIST','Color','Item Color',0,0,0,1,1),
(2,2,'LIST','Brand','Item Brand',0,0,0,1,1);

-- 
-- Definition of ame_sys_of_list
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_of_list` (
  `int_id` int(11) NOT NULL,
  `int_line` int(11) NOT NULL,
  `var_value` varchar(250) DEFAULT NULL,
  `tin_ven` tinyint(1) DEFAULT NULL,
  `tin_cus` tinyint(1) DEFAULT NULL,
  `tin_emp` tinyint(1) DEFAULT NULL,
  `tin_item` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`int_id`,`int_line`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_of_list
-- 

INSERT INTO `ame_sys_of_list`(`int_id`,`int_line`,`var_value`,`tin_ven`,`tin_cus`,`tin_emp`,`tin_item`) VALUES
(1,1,'Red',NULL,NULL,NULL,NULL),
(1,2,'Blue',NULL,NULL,NULL,NULL),
(1,3,'Black',NULL,NULL,NULL,NULL);

-- 
-- Definition of ame_sys_of_value
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_of_value` (
  `int_id` int(11) NOT NULL,
  `var_modid` varchar(100) NOT NULL,
  `var_num` varchar(100) NOT NULL,
  `var_value` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`int_id`,`var_modid`,`var_num`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_of_value
-- 

INSERT INTO `ame_sys_of_value`(`int_id`,`var_modid`,`var_num`,`var_value`) VALUES
(1,'MT-CUS','C00001','Black'),
(1,'MT-ITE','A','Red');

-- 
-- Definition of ame_sys_per_frm
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_per_frm` (
  `var_modid` varchar(30) NOT NULL,
  `var_name` varchar(50) DEFAULT NULL,
  `var_name_menu` varchar(50) DEFAULT NULL,
  `int_line` int(6) DEFAULT NULL,
  `tin_per1` tinyint(1) DEFAULT '0',
  `tin_per2` tinyint(1) DEFAULT '0',
  `tin_per3` tinyint(1) DEFAULT '0',
  `tin_per4` tinyint(1) DEFAULT '0',
  `tin_per5` tinyint(1) DEFAULT '0',
  `tin_per6` tinyint(1) DEFAULT '0',
  `tin_per7` tinyint(1) DEFAULT '0',
  `tin_per8` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_modid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_per_frm
-- 

INSERT INTO `ame_sys_per_frm`(`var_modid`,`var_name`,`var_name_menu`,`int_line`,`tin_per1`,`tin_per2`,`tin_per3`,`tin_per4`,`tin_per5`,`tin_per6`,`tin_per7`,`tin_per8`) VALUES
('FL_USER_LIST','Users and Roles','File',1100,1,1,1,1,0,0,0,0),
('FL_USER_LOG','Transaction Log','File',1300,1,0,0,0,0,0,0,0),
('FL_BACKUP','Backup and Restore','File',1400,1,0,0,0,0,0,0,0),
('MT_GEN_SET','General Setting','Setting',2100,1,0,1,0,0,0,0,0),
('MT_PREFIX','Number Prefix','Setting',2140,1,0,1,0,0,0,0,0),
('MT_ITE_GRO','Item Group','Setting',2220,1,1,1,1,0,0,0,0),
('MT_UOM','Unit of Measure','Setting',2190,1,1,1,1,0,0,0,0),
('MT_LOC','Location','Setting',2170,1,1,1,1,0,0,0,0),
('MT_PRI_COD','Price Code','Setting',2180,1,1,1,1,0,0,0,0),
('MT_CLA','Class','Setting',2160,1,1,1,1,0,0,0,0),
('MT_CUS_GRO','Customer Group','Setting',2210,1,1,1,1,0,0,0,0),
('MT_VEN_GRO','Vendor Group','Setting',2200,1,1,1,1,0,0,0,0),
('MT_ITE','Item','Maintain',3300,1,1,1,1,0,0,0,0),
('MT_COM','Company Information','Maintain',3100,1,0,1,0,0,0,0,0),
('MT_CUS','Customer','Maintain',3200,1,1,1,1,0,0,0,0),
('MT_VEN','Vendor','Maintain',3220,1,1,1,1,0,0,0,0),
('MT_EMP','Employee','Maintain',3230,1,1,1,1,0,0,0,0),
('MT_ITE_PRI','Change Item Prices','Maintain',3350,1,0,1,0,0,0,0,0),
('AP_IN','Purchase / Receive Inventory','Transaction',4110,1,1,1,1,1,1,1,1),
('AP_RET','Purchase Return','Transaction',4120,1,1,1,1,1,1,1,1),
('AP_PY','Make Payment','Transaction',4140,1,1,1,1,1,1,1,1),
('AR_QUO','Quotation','Transaction',4200,1,1,1,1,0,0,0,1),
('AR_IN','Sales / Invoicing','Transaction',4220,1,1,1,1,1,1,1,1),
('AR_RET','Sales Return','Transaction',4230,1,1,1,1,1,1,1,1),
('AR_CN','Credit Note','Transaction',4240,1,1,1,1,1,1,1,1),
('AR_PY','Receive Payment','Transaction',4270,1,1,1,1,1,1,1,1),
('IC_TF','Inventory Transfer','Transaction',4310,1,1,1,1,1,1,1,1),
('IC_IU','Internal Usage','Transaction',4320,1,1,1,1,1,1,1,1),
('IC_IA','Inventory Adjustment','Transaction',4360,1,1,1,1,1,1,1,1),
('IC_ICUOM','Inventory Convert UOM','Transaction',4340,1,1,1,1,1,1,1,1),
('GL_JE','Make Journal Entry','Transaction',4800,1,1,1,1,1,1,1,1),
('SYS_POST','Post Transactions','Transaction',4900,1,0,0,0,0,0,0,0),
('SYS_LICENSCE','Change License','Help',6100,1,0,0,0,0,0,0,0),
('AP_DN','Debit Note','Transaction',4130,1,1,1,1,1,1,1,1),
('AP_PO','Purchase Order','Transaction',4100,1,1,1,1,0,0,0,1),
('AR_SO','Sales Order','Transaction',4210,1,1,1,1,0,0,0,1),
('AR_SM_LIS','Shipment Listing','Transaction',4260,1,0,0,0,0,0,0,0),
('MT_LOCK','Lock Period','Setting',2150,1,0,1,0,0,0,0,0),
('MT_CUR','Currency','Setting',2120,1,1,1,1,0,0,0,0),
('AR_SM','Shipment','Transaction',4250,1,1,1,1,0,0,0,0),
('IC_PRO','Inventory Production','Transaction',4350,1,1,1,1,1,1,1,1),
('MT_DEC','Decimal Places','Setting',2130,1,0,1,0,0,0,0,0),
('MT_POS','Position','Setting',2230,1,1,1,1,0,0,0,0),
('MT_EMP_GRO','Employee Group','Setting',2240,1,1,1,1,0,0,0,0),
('MT_PMT_TERM','Payment Term','Setting',2250,1,1,1,1,0,0,0,0),
('MT_PMT_METH','Payment Method','Setting',2260,1,1,1,1,0,0,0,0),
('AP_RF','Receive Refund','Transaction',4150,1,1,1,1,1,1,1,1),
('AR_RF','Pay Refund','Transaction',4280,1,1,1,1,1,1,1,1),
('RPT_CTRL','Report Selector','Report',5000,1,0,0,0,0,0,0,0),
('FL_CHA_PWD','Change Your Password','File',1200,1,0,1,0,0,0,0,0),
('MT_ACC','Chart of Account','Maintain',3150,1,1,1,1,0,0,0,0);

-- 
-- Definition of ame_sys_per_oth
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_per_oth` (
  `var_modid` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `int_line` int(6) DEFAULT NULL,
  PRIMARY KEY (`var_modid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_per_oth
-- 

INSERT INTO `ame_sys_per_oth`(`var_modid`,`var_name`,`int_line`) VALUES
('HCI','Hide costing information',1),
('MJE','User can modify generated journal entries',2);

-- 
-- Definition of ame_sys_per_rep
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_per_rep` (
  `var_modid` varchar(100) DEFAULT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_name_menu` varchar(250) DEFAULT NULL,
  `var_name_split1` varchar(2000) DEFAULT NULL,
  `var_name_split2` varchar(2000) DEFAULT NULL,
  `var_sort_split1` varchar(2000) DEFAULT NULL,
  `var_sort_split2` varchar(2000) DEFAULT NULL,
  `int_line` int(6) DEFAULT NULL,
  `int_group` int(2) DEFAULT NULL,
  `tin_show` tinyint(1) DEFAULT '0',
  `var_status` text
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_per_rep
-- 

INSERT INTO `ame_sys_per_rep`(`var_modid`,`var_name`,`var_name_menu`,`var_name_split1`,`var_name_split2`,`var_sort_split1`,`var_sort_split2`,`int_line`,`int_group`,`tin_show`,`var_status`) VALUES
('M002D001','Sales Register','Account Receivable','Sales Register Summary;Sales Register Summary - All Columns','Sales Register Detail;Sales Register Detail - All Columns','Default,Date,Type,Reference,Customer Name,Employee Name,Remark,Location,Class Id,Term,Due Date,Status,Payment Status,User,Sub Total,Discount,VAT,Grand Total,Applied PMT,Discount PMT,Cash PMT;Default,Date,Customer Name,Sub Total,Discount,VAT,Grand Total,Applied PMT,Discount PMT,Cash PMT','',1,2,1,'Balancika**@@123'),
('M002D002','Sales by Customer','Account Receivable','Sales by Customer Summary;Sales by Customer Summary - All Columns;Sales by Customer by Item Summary','Sales by Customer by Invoice Summary;Sales by Customer by Invoice Summary - All Columns;Sales by Customer by Invoice Detail;Sales by Customer by Invoice Detail - All Columns;Sales by Customer by Item Detail;Sales by Customer by Item Detail - All Columns','','',2,2,1,'Balancika**@@123'),
('M002D005','Sales by Item','Account Receivable','Sales by Item Summary','Sales by Item Detail;Sales by Item Detail - All Columns','','',5,2,1,'Balancika**@@123'),
('M002D006','Aged Receivable','Account Receivable','Aged Receivable by Customer Summary','Aged Receivable by Customer Detail;Aged Receivable by Customer Detail - All Columns','Default,Customer Name,Debit,Credit,Balance','Default,Customer Name,Debit,Credit,Balance',6,2,1,'Balancika**@@123'),
('M002D007','Customer Ledger','Account Receivable','Customer Ledger','Customer Ledger','','',7,2,1,'Balancika**@@123'),
('M002D008','Receipt Register','Account Receivable','Receipt Register Summary;Receipt Register Summary - All Columns','Receipt Register Detail;Receipt Register Detail - All Columns','','',8,2,1,'Balancika**@@123'),
('M001D001','Purchases Register','Account Payable','Purchases Register Summary;Purchases Register Summary - All Columns','Purchases Register Detail;Purchases Register Detail - All Columns','Default,Date,Type,Reference,Vendor Name,Remark,Location,Class Id,Term,Due Date,Status,Payment Status,User,Sub Total,Discount,VAT,Grand Total,Applied PMT,Discount PMT,Cash PMT','',1,1,1,'Balancika**@@123'),
('M001D002','Purchases by Vendor','Account Payable','Purchases by Vendor​​ Summary;Purchases by Vendor Summary - All Columns;Purchases by Vendor​​ by Item Summary','Purchases by Vendor​​ by Invoice Summary;Purchases by Vendor​​ by Invoice Summary - All Columns;Purchases by Vendor​​ by Invoice Detail;Purchases by Vendor​​ by Invoice Detail - All Columns;Purchases by Vendor​​ by Item Detail;Purchases by Vendor​​ by Item Detail - All Columns','','',2,1,1,'Balancika**@@123'),
('M001D003','Purchases by Location','Account Payable','Purchases by Location Summary','Purchases by Location Detail;Purchases by Location Detail - All Columns','Default,Location Id,Location Name,Sub Total,Discount,VAT,WHT,Grand Total','',3,1,1,'Balancika**@@123'),
('M001D005','Aged Payable','Account Payable','Aged Payable by Vendor Summary','Aged Payable by Vendor Detail;Aged Payable by Vendor Detail - All Columns','Default,Item Id,Item Name,Sub Total,Discount,VAT,WHT,Grand Total','',5,1,1,'Balancika**@@123'),
('M001D006','Vendor Ledger','Account Payable','Vendor Ledger Summary','Vendor Ledger Detail;Vendor Ledger Detail - All Columns','Default,Vendor Id,Vendor Name,Original Amount,1 - 30 Days,31 - 60 Days,61 - 90 Days,> 90 Days,Balance','',6,1,1,'Balancika**@@123'),
('M006D005','Sales By Invoice','Point Of Sales','Sales By Invoice (By Location);Sales By Invoice (By Employee);Sales By Invoice (By Customer)','Sales By Invoice (By Location);Sales By Invoice (By Employee);Sales By Invoice (By Customer)',NULL,NULL,5,6,1,'Balancika**@@123'),
('M001D007','Payment Register','Account Payable','Payment Register Summary;Payment Register Summary - All Columns','Payment Register Detail;Payment Register Detail - All Columns','Default,Vendor Id,Vendor Name,Debit,Credit,Balance','Default,Vendor Id,Vendor Name,Debit,Credit,Balance',7,1,1,'Balancika**@@123'),
('M001D004','Purchases by Item','Account Payable','Purchases by Item Summary','Purchases by Item Detail;Purchases by Item Detail - All Colunms','Default,Date,Reference,Vendor Name,Cash Account,Applied PMT,Discount PMT,Cash PMT,Total Paid','',4,1,1,'Balancika**@@123'),
('M002D004','Sales by Location','Account Receivable','Sales by Location Summary','Sales by Location Detail;Sales by Location Detail - All Columns','Default,Location Id,Location Name,Sub Total,Discount,VAT,WHT,Grand Total','',4,2,1,'Balancika**@@123'),
('M002D003','Sales by Employee','Account Receivable','Sales by Employee Summary;Sales by Employee Summary - All Columns;Sales by Employee by Item Summary','Sales by Employee by Invoice Summary;Sales by Employee by Invoice Summary - All Columns;Sales by Employee by Invoice Detail;Sales by Employee by Invoice Detail - All Columns;Sales by Employee by Item Detail;Sales by Employee by Item Detail - All Columns','Default,Location Id,Location Name,Sub Total,Discount,VAT,WHT,Grand Total','',3,2,1,'Balancika**@@123'),
('M006D004','Sales By Item','Point Of Sales','Sales By Item (By Item Group);Sales By Item (By Location);Sales By Item (By Employee);Sales By Item (By Customer)','Sales By Item (By Item Group);Sales By Item (By Location);Sales By Item (By Employee);Sales By Item (By Customer)',NULL,NULL,4,6,1,'Balancika**@@123'),
('M004D001','General Ledger Account','General Ledger','General Ledger Account Summary','General Ledger Account Detail','Default,Account Number,Class ID,Vendor Name,Customer Name,Employee Name,Item Name','',1,4,1,'Balancika**@@123'),
('M002D009','Gross Profit by Sales Register','Account Receivable','Gross Profit by Sales Register Summary;Gross Profit by Sales Register Summary - All Columns','Gross Profit by Sales Register Detail;Gross Profit by Sales Register Detail - All Columns','','',8,2,1,'Balancika**@@123'),
('M002D010','Gross Profit by Customer','Account Receivable','Gross Profit by Customer Summary;Gross Profit by Customer Summary - All Columns;Gross Profit by Customer by Item Summary;Gross Profit by Customer by Item Summary - All Columns','Gross Profit by Customer by Invoice Summary;Gross Profit by Customer by Invoice Summary - All Columns;Gross Profit by Customer by Invoice Detail;Gross Profit by Customer by Invoice Detail - All Columns;Gross Profit by Customer by Item Detail;Gross Profit by Customer by Item Detail - All Columns','','',8,2,1,'Balancika**@@123'),
('M002D011','Gross Profit by Employee','Account Receivable','Gross Profit by Employee Summary;Gross Profit by Employee Summary - All Columns;Gross Profit by Employee by Item Summary;Gross Profit by Employee by Item Summary - All Columns','Gross Profit by Employee by Invoice Summary;Gross Profit by Employee by Invoice Summary - All Columns;Gross Profit by Employee by Invoice Detail;Gross Profit by Employee by Invoice Detail - All Columns;Gross Profit by Employee by Item Detail;Gross Profit by Employee by Item Detail - All Columns','','',8,2,1,'Balancika**@@123'),
('M002D012','Gross Profit by Location','Account Receivable','Gross Profit by Location Summary;Gross Profit by Location Summary - All Columns','Gross Profit by Location Detail;Gross Profit by Location Detail - All Columns','','',8,2,1,'Balancika**@@123'),
('M002D013','Gross Profit by Item','Account Receivable','Gross Profit by Item Summary;Gross Profit by Item Summary - All Columns','Gross Profit by Item Detail;Gross Profit by Item Detail - All Columns','','',8,2,1,'Balancika**@@123'),
('M006D003','Monthly Sales','Point Of Sales','Monthly Sales By Location;Monthly Sales By Employee;Monthly Sales By Customer','Monthly Sales By Location;Monthly Sales By Employee;Monthly Sales By Customer',NULL,NULL,3,6,1,'Balancika**@@123'),
('M003D001','Inventory Movement','Inventory Control','Inventory Movement Summary by Location','Inventory Movement Detail by Location',NULL,NULL,1,3,1,'Balancika**@@123'),
('M003D002','Inventory Valuation','Inventory Control','Inventory Valuation Summary by Location','Stock By Location',NULL,NULL,2,3,1,'Balancika**@@123'),
('M005D008','Balance Sheet by Month','Financial Statements','Balance Sheet by Month Summary','Balance Sheet by Month Detail','Default,Account Number,Class ID,Vendor Name,Customer Name,Employee Name,Item Name','',8,5,1,'Balancika**@@123'),
('M005D007','Balance Sheet','Financial Statements','Balance Sheet Summary','Balance Sheet Detail','Default,Account Number,Class ID,Vendor Name,Customer Name,Employee Name,Item Name','',7,5,1,'Balancika**@@123'),
('M005D009','Balance Sheet by Class','Financial Statements','Balance Sheet by Class Summary','Balance Sheet by Class Detail','Default,Account Number,Class ID,Vendor Name,Customer Name,Employee Name,Item Name','',9,5,1,'Balancika**@@123'),
('M006D001','Sales Register','Point Of Sales','Invoice Register','Invoice Register',NULL,NULL,1,6,1,'Balancika**@@123'),
('M005D001','Trial Balance','Financial Statements','Trial Balance Summary','Trial Balance Detail','Default,Account Number,Class ID,Vendor Name,Customer Name,Employee Name,Item Name','',1,5,1,'Balancika**@@123'),
('M005D002','Trial Balance by Month','Financial Statements','Trial Balance by Month Summary','Trial Balance by Month Detail','Default,Account Number,Class ID,Vendor Name,Customer Name,Employee Name,Item Name','',2,5,1,'Balancika**@@123'),
('M005D003','Trial Balance by Class','Financial Statements','Trial Balance by Class Summary','Trial Balance by Class Detail','Default,Account Number,Class ID,Vendor Name,Customer Name,Employee Name,Item Name','',3,5,1,'Balancika**@@123'),
('M005D010','Statement of Cash Flows','Financial Statements','Statement of Cash Flows','Statement of Cash Flows','Default,Account Number,Class ID,Vendor Name,Customer Name,Employee Name,Item Name','',9,5,1,'Balancika**@@123'),
('M005D004','Income Statement','Financial Statements','Income Statement Summary','Income Statement Detail','Default,Account Number,Class ID,Vendor Name,Customer Name,Employee Name,Item Name','',4,5,1,'Balancika**@@123'),
('M005D005','Income Statement by Month','Financial Statements','Income Statement by Month Summary','Income Statement by Month Detail','Default,Account Number,Class ID,Vendor Name,Customer Name,Employee Name,Item Name','',5,5,1,'Balancika**@@123'),
('M005D006','Income Statement by Class','Financial Statements','Income Statement by Class Summary','Income Statement by Class Detail','Default,Account Number,Class ID,Vendor Name,Customer Name,Employee Name,Item Name','',6,5,1,'Balancika**@@123'),
('M006D002','Daily Sales','Point Of Sales','Daily Sales By Location;Daily Sales By Employee;Daily Sales By Customer','Daily Sales By Location;Daily Sales By Employee;Daily Sales By Customer',NULL,NULL,2,6,1,'Balancika**@@123'),
('M003D003','Inventory Stock','Inventory Control','Physical Inventory Worksheet;Physical Inventory Worksheet by Location;Inventory Stock Batch by Item;Inventory Stock by Batch by Location','',NULL,NULL,3,3,1,'Balancika**@@123'),
('M003D004','Inventory Balance','Inventory Control','Inventory Physical Count;Inventory Physical Count by Location;Inventory Balance;Inventory Balance by Location;Inventory Balance by Locaiton by Batch','Inventory Physical Count',NULL,NULL,4,3,1,'Balancika**@@123'),
('M003D005','Item Pricing','Inventory Control','Item Pricing by Price Code;Item Pricing History','Current Item Pricing',NULL,NULL,5,3,1,'Balancika**@@123'),
('M003D006','Item List','Inventory Control','Item List','Item List',NULL,NULL,6,3,1,'Balancika**@@123'),
('M003D007','Transfer Register','Inventory Control','Transfer Register;Trasfer By Item','Transfer Register;Trasfer By Item',NULL,NULL,7,3,1,'Balancika**@@123'),
('M003D008','Internal Usage Register','Inventory Control','Internal Usage Register;Internal Usage By Item','Internal Usage Register;Internal Usage By Item',NULL,NULL,8,3,1,'Balancika**@@123');

-- 
-- Definition of ame_sys_prefix
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_prefix` (
  `var_modid` varchar(100) NOT NULL,
  `var_id` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `int_length` int(11) DEFAULT NULL,
  `int_lastid` int(11) DEFAULT NULL,
  `int_line` int(11) DEFAULT '1',
  PRIMARY KEY (`var_modid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_prefix
-- 

INSERT INTO `ame_sys_prefix`(`var_modid`,`var_id`,`var_desc`,`int_length`,`int_lastid`,`int_line`) VALUES
('AP-CAC','CAC','Cash Advance Clearance',5,1,100),
('AP-CAR','CAR','Cash Advance Request',5,1,100),
('AP-DN','DN','Debit Note',5,1,4),
('AP-IN','IN','Purchase Inventory',5,1,2),
('AP-PO','PO','Purchase Order',5,1,1),
('AP-RET','RET','Purchase Return',5,1,3),
('AR-CN','CN','Credit Note',5,1,9),
('AR-IN','INV','Sales Invoicing',5,1,7),
('AR-IN-POS','POS','Sales POS Invoice',5,1,100),
('AR-IN-ODD','OD','Temporary Over Due Date',5,1,100),
('AR-QUO','QUO','Quotation',5,1,5),
('AR-RET','RET','Sales Return',5,1,8),
('AR-SO','SO','Sales Order',5,1,6),
('AR-IN-TC','TC','Temporary Credit',5,1,100),
('IC-IA','IA','Inventory Adjustment',5,1,100),
('IC-ER','ER','Expense Request',5,1,100),
('IC-IU','IU','Internal Usage',5,1,100),
('IC-MTR','M','Material Request',5,1,100),
('IC-ICUOM','ICUOM','Inventory Convert UOM',5,1,100),
('IC-IP','IP','Inventory Production',5,1,100),
('IC-TF','TF','Inventory Transfer',5,1,100),
('MT-CUS','C','Customer',5,1,100),
('MT-EMP','E','Employee',5,1,100),
('MT-ITE','P','Inventory',5,1,100),
('MT-PROM','PRO','Promotion',5,1,100),
('MT-VEN','V','Vendor',5,1,100),
('RP-CTF','CTF','Interco Cash Transfer',5,1,100),
('REFUND','RF','Rufund',5,1,100),
('AP-RF','RF','Refund Payable',5,1,5),
('AR-SM','SM','Shipment',5,1,10),
('POS-SHIFT','SH','POS Shift ID',5,1,1),
('AR-RF','RF','Refund Receivable',5,1,10),
('POS-SHIFT-HIST','SHH','POS Shift History',5,1,1),
('Card-Trans','CT','Card Transaction Customer',6,1,1);

-- 
-- Definition of ame_sys_prefix_custom
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_prefix_custom` (
  `var_modid` varchar(100) NOT NULL,
  `var_type` varchar(100) NOT NULL,
  `var_id` varchar(100) NOT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `int_length` int(11) DEFAULT NULL,
  `int_lastid` int(11) DEFAULT NULL,
  PRIMARY KEY (`var_modid`,`var_type`,`var_id`),
  KEY `moduleid` (`var_modid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_prefix_custom
-- 

INSERT INTO `ame_sys_prefix_custom`(`var_modid`,`var_type`,`var_id`,`var_desc`,`int_length`,`int_lastid`) VALUES
('DEFAULT','AR-IN','INV','Sales Invoice',5,1),
('DEFAULT','AP-PY','PY','Make Payment',5,1),
('DEFAULT','AR-PY','OR','Receive Payment',5,1),
('DEFAULT','GL-JE','JV','Journal Entry',5,1),
('DEFAULT','AR-POS','IN','POS Invoice',5,1),
('P1','AR-POS','P1-','POS Invoice Format 1',6,1);

-- 
-- Definition of ame_sys_pro_hie
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_pro_hie` (
  `int_id` int(11) NOT NULL,
  `var_name` varchar(250) DEFAULT '',
  `int_line` int(2) DEFAULT NULL,
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`int_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_pro_hie
-- 



-- 
-- Definition of ame_sys_rem
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_rem` (
  `var_modid` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `int_line` int(6) DEFAULT NULL,
  PRIMARY KEY (`var_modid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_rem
-- 

INSERT INTO `ame_sys_rem`(`var_modid`,`var_name`,`int_line`) VALUES
('SYS1','Almost due payment of purchase invoice',1),
('SYS2','Almost due payment of sale invoices',2),
('SYS3','Overdue purchase invoices',3),
('SYS4','Overdue sale invoices',4),
('SYS5','New Purchases Order',5),
('SYS6','New Quotation',6),
('SYS7','New Sales Order',7),
('SYS8','New Invoice for Shipment',8),
('SYS9','Inventory falling below re-order point',9);

-- 
-- Definition of ame_sys_role
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_role` (
  `int_id` int(10) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `var_create` varchar(100) DEFAULT NULL,
  `var_modify` varchar(100) DEFAULT NULL,
  `dat_create` datetime DEFAULT NULL,
  `dat_modify` datetime DEFAULT NULL,
  `tin_sys` tinyint(1) DEFAULT '0',
  `tin_inactive` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`int_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_role
-- 

INSERT INTO `ame_sys_role`(`int_id`,`var_name`,`var_desc`,`var_create`,`var_modify`,`dat_create`,`dat_modify`,`tin_sys`,`tin_inactive`) VALUES
(1,'Admin','Fully Access','','',NULL,NULL,1,0),
(2,'Accounts Receivable','Accounts Receivable',NULL,NULL,NULL,NULL,1,0),
(3,'Accounts Payable','Accounts Payable',NULL,NULL,NULL,NULL,1,0);

-- 
-- Definition of ame_sys_sign
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_sign` (
  `var_id` varchar(100) NOT NULL,
  `int_sortor` int(2) NOT NULL,
  `var_desc1` varchar(250) DEFAULT '',
  `var_desc2` varchar(250) DEFAULT '',
  `var_empid` varchar(100) DEFAULT NULL,
  `var_posid` varchar(100) DEFAULT NULL,
  `tin_display` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`var_id`,`int_sortor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_sign
-- 

INSERT INTO `ame_sys_sign`(`var_id`,`int_sortor`,`var_desc1`,`var_desc2`,`var_empid`,`var_posid`,`tin_display`) VALUES
('AP-IN',1,'រៀបចំដោយ','Prepared By','E00002','AME',1),
('AP-IN',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00002','AME',1),
('AP-IN',3,'អនុញ្ញាតិដោយ','Authorized By','E00002','AME',1),
('AP-IN',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00002','AME',1),
('AP-IN',5,'អ្នកផ្គត់ផ្គង់','Vendor','E00003','AME',0),
('AR-IN',1,'រៀបចំដោយ','Prepared By','E00001','',1),
('AR-IN',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00002','HRSS',0),
('AR-IN',3,'អនុញ្ញាតិដោយ','Authorized By','E00003','AME',1),
('AR-IN',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00004','AME',1),
('AR-IN',5,'អតិថិជន','Customer','E00004','AME',1),
('AR-RET',1,'រៀបចំដោយ','Prepared By','','',1),
('AR-RET',2,'ត្រួតពិនិត្យដោយ','Checkd By','sada','asdasss',1),
('AR-RET',3,'អនុញ្ញាតិដោយ','Authorized By','','',1),
('AR-RET',4,'ដឹកជញ្ជូនដោយ','Deliveried By','','',1),
('AR-RET',5,'អ្នកផ្គត់ផ្គង់','Vendor','','',0),
('AR-CN',1,'រៀបចំដោយ','Prepared By','','',1),
('AR-CN',2,'ត្រួតពិនិត្យដោយ','Checkd By','sada','asdasss',0),
('AR-CN',3,'អនុញ្ញាតិដោយ','Authorized By','','',0),
('AR-CN',4,'ដឹកជញ្ជូនដោយ','Deliveried By','','',1),
('AR-CN',5,'អ្នកផ្គត់ផ្គង់','Vendor','','',1),
('AR-QUO',1,'រៀបចំដោយ','Prepared By','','',0),
('AR-QUO',2,'ត្រួតពិនិត្យដោយ','Checkd By','','',1),
('AR-QUO',3,'អនុញ្ញាតិដោយ','Authorized By','','',1),
('AR-QUO',4,'ដឹកជញ្ជូនដោយ','Deliveried By','','',1),
('AR-QUO',5,'អតិថិជន','Customer','','',1),
('AR-SO',1,'រៀបចំដោយ','Prepared By','','',1),
('AR-SO',2,'ត្រួតពិនិត្យដោយ','Checkd By','sada','asdasss',1),
('AR-SO',3,'អនុញ្ញាតិដោយ','Authorized By','','',1),
('AR-SO',4,'ដឹកជញ្ជូនដោយ','Deliveried By','','',1),
('AR-SO',5,'អ្នកផ្គត់ផ្គង់','Vendor','','',1),
('AP-RET',1,'រៀបចំដោយ','Prepared By','E00004','AME',1),
('AP-RET',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00004','AME',1),
('AP-RET',3,'អនុញ្ញាតិដោយ','Authorized By','E00004','AME',1),
('AP-RET',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00004','AME',1),
('AP-RET',5,'អ្នកផ្គត់ផ្គង់','Vendor','E00004','AME',0),
('AP-DN',1,'រៀបចំដោយ','Prepared By','','',1),
('AP-DN',2,'ត្រួតពិនិត្យដោយ','Checkd By','','',1),
('AP-DN',3,'អនុញ្ញាតិដោយ','Authorized By','','',1),
('AP-DN',4,'ដឹកជញ្ជូនដោយ','Deliveried By','','',0),
('AP-DN',5,'អ្នកផ្គត់ផ្គង់','Vendor','','',1),
('AP-PO',1,'រៀបចំដោយ','Prepared By','','',1),
('AP-PO',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00001','',1),
('AP-PO',3,'អនុញ្ញាតិដោយ','Authorized By','','',1),
('AP-PO',4,'ដឹកជញ្ជូនដោយ','Deliveried By','','',1),
('AP-PO',5,'អ្នកផ្គត់ផ្គង់','Vendor','','',1),
('AP-PY',1,'រៀបចំដោយ','Prepared By','E00002','AME',1),
('AP-PY',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00004','AME',1),
('AP-PY',3,'អនុញ្ញាតិដោយ','Authorized By','E00002','AME',1),
('AP-PY',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00004','AME',1),
('AP-PY',5,'អ្នកផ្គត់ផ្គង់','Vendor','E00001','AME',0),
('AR-PY',1,'រៀបចំដោយ','Prepared By','E00001','',1),
('AR-PY',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00002','AME',0),
('AR-PY',3,'អនុញ្ញាតិដោយ','Authorized By','E00002','AME',1),
('AR-PY',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00002','AME',1),
('AR-PY',5,'អ្នកផ្គត់ផ្គង់','Vendor','E00002','AME',1),
('GL-JE',1,'រៀបចំដោយ','Prepared By','E00002','AME',1),
('GL-JE',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00002','AME',1),
('GL-JE',3,'អនុញ្ញាតិដោយ','Authorized By','E00004','AME',1),
('GL-JE',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00004','AME',1),
('GL-JE',5,'អ្នកផ្គត់ផ្គង់','Vendor','','',0),
('AR-SM',1,'រៀបចំដោយ','Prepared By','E00002','AME',1),
('AR-SM',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00003','AME',1),
('AR-SM',3,'អនុញ្ញាតិដោយ','Authorized By','E00004','AME',1),
('AR-SM',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00004','AME',1),
('AR-SM',5,'អ្នកផ្គត់ផ្គង់','Vendor','E00004','AME',0),
('IC-TF',1,'រៀបចំដោយ','Prepared By','E00002','AME',1),
('IC-TF',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00003','AME',1),
('IC-TF',3,'អនុញ្ញាតិដោយ','Authorized By','E00004','AME',1),
('IC-TF',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00004','AME',0),
('IC-TF',5,'អ្នកផ្គត់ផ្គង់','Vendor','E00004','AME',0),
('IC-IU',1,'រៀបចំដោយ','Prepared By','E00002','AME',1),
('IC-IU',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00003','AME',1),
('IC-IU',3,'អនុញ្ញាតិដោយ','Authorized By','E00004','AME',1),
('IC-IU',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00004','AME',1),
('IC-IU',5,'អ្នកផ្គត់ផ្គង់','Vendor','E00004','AME',0),
('IC-IP',1,'រៀបចំដោយ','Prepared By','E00002','AME',1),
('IC-ICUOM',1,'រៀបចំដោយ','Prepared By','E00002','AME',1),
('IC-ICUOM',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00003','AME',1),
('IC-ICUOM',3,'អនុញ្ញាតិដោយ','Authorized By','E00004','AME',1),
('IC-ICUOM',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00004','AME',1),
('IC-ICUOM',5,'អ្នកផ្គត់ផ្គង់','Vendor','E00004','AME',0),
('IC-IA',1,'រៀបចំដោយ','Prepared By','E00002','AME',1),
('IC-IA',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00003','AME',1),
('IC-IA',3,'អនុញ្ញាតិដោយ','Authorized By','E00004','AME',1),
('IC-IA',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00004','AME',1),
('IC-IA',5,'អ្នកផ្គត់ផ្គង់','Vendor','E00004','AME',0),
('IC-IP',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00003','AME',1),
('IC-IP',3,'អនុញ្ញាតិដោយ','Authorized By','E00004','AME',1),
('IC-IP',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00004','AME',1),
('IC-IP',5,'អ្នកផ្គត់ផ្គង់','Vendor','E00004','AME',0),
('AR-PY-SD',1,'រៀបចំដោយ','Prepared By','E00001','',0),
('AR-PY-SD',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00002','AME',0),
('AR-PY-SD',3,'អនុញ្ញាតិដោយ','Authorized By','E00003','AME',0),
('AR-PY-SD',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00004','AME',0),
('AR-PY-SD',5,'អតិថិជន','Customer','E00004','AME',0),
('AR-RF',1,'រៀបចំដោយ','Prepared By','E00001','',0),
('AR-RF',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00002','AME',1),
('AR-RF',3,'អនុញ្ញាតិដោយ','Authorized By','E00003','AME',1),
('AR-RF',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00004','AME',1),
('AR-RF',5,'អតិថិជន','Customer','E00004','AME',1),
('AP-RF',1,'រៀបចំដោយ','Prepared By','E00001','',1),
('AP-RF',2,'ត្រួតពិនិត្យដោយ','Checkd By','E00002','AME',1),
('AP-RF',3,'អនុញ្ញាតិដោយ','Authorized By','E00003','AME',0),
('AP-RF',4,'ដឹកជញ្ជូនដោយ','Deliveried By','E00004','AME',0),
('AP-RF',5,'អតិថិជន','Customer','E00004','AME',1);

-- 
-- Definition of ame_sys_tem_ap_dn
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_tem_ap_dn` (
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  PRIMARY KEY (`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_tem_ap_dn
-- 



-- 
-- Definition of ame_sys_tem_ap_in
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_tem_ap_in` (
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  `int_batchno` int(11) DEFAULT NULL,
  PRIMARY KEY (`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_tem_ap_in
-- 



-- 
-- Definition of ame_sys_tem_ap_ret
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_tem_ap_ret` (
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  PRIMARY KEY (`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_tem_ap_ret
-- 



-- 
-- Definition of ame_sys_tem_ar_cn
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_tem_ar_cn` (
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  PRIMARY KEY (`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_tem_ar_cn
-- 



-- 
-- Definition of ame_sys_tem_ar_in
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_tem_ar_in` (
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  PRIMARY KEY (`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_tem_ar_in
-- 



-- 
-- Definition of ame_sys_tem_ar_ret
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_tem_ar_ret` (
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  PRIMARY KEY (`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_tem_ar_ret
-- 



-- 
-- Definition of ame_sys_tem_ic
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_tem_ic` (
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_tolocid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  PRIMARY KEY (`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_tem_ic
-- 



-- 
-- Definition of ame_sys_tem_ic_ia
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_tem_ic_ia` (
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  PRIMARY KEY (`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_tem_ic_ia
-- 



-- 
-- Definition of ame_sys_tem_ic_icuom
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_tem_ic_icuom` (
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  PRIMARY KEY (`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_tem_ic_icuom
-- 



-- 
-- Definition of ame_sys_tem_ic_ip
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_tem_ic_ip` (
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  PRIMARY KEY (`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_tem_ic_ip
-- 



-- 
-- Definition of ame_sys_tem_ic_iu
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_tem_ic_iu` (
  `int_line` int(11) NOT NULL DEFAULT '0',
  `var_itemid` varchar(100) DEFAULT '',
  `var_locid` varchar(100) DEFAULT NULL,
  `var_uomid` varchar(100) DEFAULT NULL,
  `dou_qty` double DEFAULT '0',
  PRIMARY KEY (`int_line`),
  KEY `ind1` (`var_itemid`) USING BTREE,
  KEY `ind2` (`var_locid`) USING BTREE,
  KEY `ind3` (`var_uomid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_tem_ic_iu
-- 



-- 
-- Definition of ame_sys_tem_py
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_tem_py` (
  `var_id` varchar(100) DEFAULT NULL,
  `var_claid` varchar(100) DEFAULT NULL,
  `var_desc` varchar(2000) DEFAULT NULL,
  `dat_date` datetime DEFAULT NULL,
  `dou_dr` double DEFAULT '0',
  `dou_cr` double DEFAULT '0',
  `int_line` int(6) DEFAULT '1',
  KEY `var_id` (`var_id`) USING BTREE,
  KEY `var_claid` (`var_claid`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_tem_py
-- 

INSERT INTO `ame_sys_tem_py`(`var_id`,`var_claid`,`var_desc`,`dat_date`,`dou_dr`,`dou_cr`,`int_line`) VALUES
('402010','P00017','Apply to GL Account: Interest','2019-01-10 16:26:56',0,0.93,1),
('102000','P00017','','2019-01-10 16:26:56',0.93,0,2);

-- 
-- Definition of ame_sys_type
-- 

CREATE TABLE IF NOT EXISTS `ame_sys_type` (
  `var_id` varchar(100) DEFAULT NULL,
  `var_name` varchar(250) DEFAULT '',
  `int_sortor` int(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_sys_type
-- 

INSERT INTO `ame_sys_type`(`var_id`,`var_name`,`int_sortor`) VALUES
('AP_IN_TT','Purchase Inventory',1),
('AP_IN_TT','Apply to GL Account',3),
('AP_IN_TT','Additional Costing',2),
('TERM','COD',1),
('TERM','End of Month',2),
('TERM','Custom',3),
('AR_IN_TT','Apply to GL Account',2),
('AR_IN_TT','General Item Sale',1),
('POST_TT','AP-IN',10),
('POST_TT','AP-RET',20),
('POST_TT','AP-DN',30),
('POST_TT','AP-PY',40),
('POST_TT','AR-IN',60),
('POST_TT','AR-RET',70),
('POST_TT','AR-CN',80),
('POST_TT','AR-PY',90),
('POST_TT','IC-TF',110),
('POST_TT','IC-ICUOM',130),
('POST_TT','GL-JE',160),
('DATE_RANGE','All',1),
('DATE_RANGE','Range',2),
('DATE_RANGE','Today',3),
('DATE_RANGE','This Period',4),
('DATE_RANGE','This Year',5),
('POST_ST','All',1),
('POST_ST','Open',2),
('POST_ST','Deleted',4),
('POST_ST','Posted',3),
('AP_PY_TT','Apply to Purchase Invoice',1),
('AP_PY_TT','Apply to GL Account',3),
('AP_PY_TT','Prepayment',2),
('METHOD','Cash',1),
('METHOD','Cheque',2),
('METHOD','Other',3),
('AR_PY_TT','Apply to GL Account',3),
('AR_PY_TT','Prepayment',2),
('AR_PY_TT','Apply to Sale Invoice',1),
('POST_TT','AP-RF',50),
('POST_TT','AR-RF',100),
('IC_TYPE','Inventory Part',1),
('IC_TYPE','Inventory Assembly',2),
('IC_TYPE','Non-Inventory Part',3),
('IC_TYPE','Fixed Asset',4),
('AP_RF','AP-RET',1),
('AP_RF','AP-DN',2),
('AP_RF','AP-PY',3),
('AR_RF','AR-RET',4),
('AR_RF','AR-CN',5),
('AR_RF','AR-PY',6),
('POST_TT','IC-IU',120),
('POST_TT','IC-IP',140),
('POST_TT','IC-IA',150),
('AR_IN_POS_TT','Retails',1),
('AR_IN_POS_TT','Dine In',2),
('AR_IN_POS_TT','Take Away',3),
('POST_TT','POS-AR-IN',65);

-- 
-- Definition of ame_user
-- 

CREATE TABLE IF NOT EXISTS `ame_user` (
  `var_id` varchar(100) NOT NULL,
  `var_name` varchar(250) DEFAULT NULL,
  `var_pwd` varchar(500) DEFAULT NULL,
  `var_empid` varchar(100) DEFAULT '',
  `tin_inactive` tinyint(1) DEFAULT '0',
  `var_crm_role` varchar(50) DEFAULT NULL,
  `tin_crm_isonlyrole` tinyint(1) DEFAULT '0',
  `var_hrm_utype` varchar(100) DEFAULT NULL,
  `var_hrm_role` varchar(50) DEFAULT NULL,
  `var_ats_role` varchar(100) DEFAULT NULL,
  `tin_ats_isonlyrole` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_user
-- 

INSERT INTO `ame_user`(`var_id`,`var_name`,`var_pwd`,`var_empid`,`tin_inactive`,`var_crm_role`,`tin_crm_isonlyrole`,`var_hrm_utype`,`var_hrm_role`,`var_ats_role`,`tin_ats_isonlyrole`) VALUES
('Admin','Administrator','VU9UZ3lYY0hXMEZFVFVsT1hRPT05UFZjM3NRVA==','',0,NULL,0,'Administrator','ADMIN','R00030',NULL);

-- 
-- Definition of ame_user_app
-- 

CREATE TABLE IF NOT EXISTS `ame_user_app` (
  `var_id` varchar(100) NOT NULL DEFAULT '',
  `var_appid` varchar(100) NOT NULL DEFAULT '',
  PRIMARY KEY (`var_id`,`var_appid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_user_app
-- 



-- 
-- Definition of ame_user_emp
-- 

CREATE TABLE IF NOT EXISTS `ame_user_emp` (
  `var_id` varchar(100) NOT NULL DEFAULT '',
  `var_empid` varchar(100) NOT NULL DEFAULT '',
  PRIMARY KEY (`var_id`,`var_empid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_user_emp
-- 



-- 
-- Definition of ame_user_limit
-- 

CREATE TABLE IF NOT EXISTS `ame_user_limit` (
  `user_limit` text
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_user_limit
-- 

INSERT INTO `ame_user_limit`(`user_limit`) VALUES
('Balancika**@@123');

-- 
-- Definition of ame_user_log
-- 

CREATE TABLE IF NOT EXISTS `ame_user_log` (
  `int_line` int(11) NOT NULL AUTO_INCREMENT,
  `var_id` varchar(2000) DEFAULT NULL,
  `var_modid` varchar(100) DEFAULT NULL,
  `var_actiontype` varchar(100) DEFAULT NULL,
  `var_uid` varchar(100) DEFAULT NULL,
  `dat_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`int_line`)
) ENGINE=MyISAM AUTO_INCREMENT=3204 DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_user_log
-- 



-- 
-- Definition of ame_user_per_frm
-- 

CREATE TABLE IF NOT EXISTS `ame_user_per_frm` (
  `int_id` int(10) NOT NULL,
  `var_modid` varchar(100) NOT NULL,
  `tin_per1` tinyint(1) DEFAULT '0',
  `tin_per2` tinyint(1) DEFAULT '0',
  `tin_per3` tinyint(1) DEFAULT '0',
  `tin_per4` tinyint(1) DEFAULT '0',
  `tin_per5` tinyint(1) DEFAULT '0',
  `tin_per6` tinyint(1) DEFAULT '0',
  `tin_per7` tinyint(1) DEFAULT '0',
  `tin_per8` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`int_id`,`var_modid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_user_per_frm
-- 



-- 
-- Definition of ame_user_per_oth
-- 

CREATE TABLE IF NOT EXISTS `ame_user_per_oth` (
  `int_id` int(10) NOT NULL,
  `var_modid` varchar(100) NOT NULL DEFAULT '',
  `tin_per1` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`int_id`,`var_modid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_user_per_oth
-- 



-- 
-- Definition of ame_user_per_rep
-- 

CREATE TABLE IF NOT EXISTS `ame_user_per_rep` (
  `int_id` int(10) NOT NULL,
  `var_modid` varchar(100) NOT NULL,
  `tin_per1` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`int_id`,`var_modid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_user_per_rep
-- 



-- 
-- Definition of ame_user_pro_def_pre
-- 

CREATE TABLE IF NOT EXISTS `ame_user_pro_def_pre` (
  `var_id` varchar(100) NOT NULL DEFAULT '',
  `var_modid` varchar(100) NOT NULL DEFAULT '',
  `var_type` varchar(100) NOT NULL,
  PRIMARY KEY (`var_id`,`var_modid`,`var_type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_user_pro_def_pre
-- 



-- 
-- Definition of ame_user_pro_rem
-- 

CREATE TABLE IF NOT EXISTS `ame_user_pro_rem` (
  `var_id` varchar(100) NOT NULL DEFAULT '',
  `var_modid` varchar(100) NOT NULL DEFAULT '',
  `int_day` int(4) DEFAULT '0',
  `tin_pro1` tinyint(1) DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_user_pro_rem
-- 



-- 
-- Definition of ame_user_role
-- 

CREATE TABLE IF NOT EXISTS `ame_user_role` (
  `var_id` varchar(100) NOT NULL,
  `int_id` int(10) NOT NULL,
  PRIMARY KEY (`var_id`,`int_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ame_user_role
-- 



-- 
-- Definition of ats_activity
-- 

CREATE TABLE IF NOT EXISTS `ats_activity` (
  `AC_ID` int(11) NOT NULL AUTO_INCREMENT,
  `AC_Action` varchar(150) DEFAULT NULL,
  `AC_ModuleName` varchar(100) DEFAULT NULL,
  `AC_ModuleID` varchar(50) DEFAULT NULL,
  `AC_ByUser` varchar(50) NOT NULL,
  `AC_Date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`AC_ID`,`AC_ByUser`)
) ENGINE=MyISAM AUTO_INCREMENT=48 DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ats_activity
-- 

INSERT INTO `ats_activity`(`AC_ID`,`AC_Action`,`AC_ModuleName`,`AC_ModuleID`,`AC_ByUser`,`AC_Date`) VALUES
(9,'Update','Role','R0001','balancika','2018-03-27 16:46:27'),
(10,'Create','Issue Temporary Over Due','OD00162','balancika','2018-05-19 10:04:08'),
(11,'Create','Issue Temporary Credit','IN00094','balancika','2018-05-19 10:05:19'),
(12,'Create','Issue Budget Requisition','R_BG00059','balancika','2018-05-19 10:05:59'),
(13,'Create','Issue General Requisition','R_G00065','balancika','2018-05-19 10:06:26'),
(14,'Create','Material Request','M00045','balancika','2018-05-19 10:07:04'),
(15,'Delete','Role','R00029','balancika','2018-07-16 14:36:40'),
(16,'Create','User','ddddd','balancika','2018-07-16 15:09:38'),
(17,'Update','User','ddddd','balancika','2018-07-16 15:16:46'),
(18,'Update','User','ddddd','balancika','2018-07-16 15:21:32'),
(19,'Create','Issue Temporary Credit','TC00012','balancika','2018-07-17 09:52:18'),
(20,'Update','Issue Temporary Credit','TC00012','balancika','2018-07-17 10:07:32'),
(21,'Delete','Issue Temporary Credit','TC00012','balancika','2018-07-17 10:13:02'),
(22,'Create','Issue Temporary Credit','TC00013','balancika','2018-07-17 10:13:47'),
(23,'Delete','Issue Temporary Credit','TC00013','balancika','2018-07-17 10:13:55'),
(24,'Create','Issue Temporary Over Due','OD00007','balancika','2018-07-17 11:22:22'),
(25,'Update','Issue Temporary Over Due','OD00007','balancika','2018-07-17 11:25:05'),
(26,'Delete','Issue Temporary Over Due','OD00007','balancika','2018-07-17 11:26:21'),
(27,'Create','Issue Temporary Over Due','OD00008','balancika','2018-07-17 11:27:04'),
(28,'Delete','Issue Over Due Date','OD00008','balancika','2018-07-17 11:27:17'),
(29,'Create','Issue Budget Requisition','R_BG00070','balancika','2018-07-17 11:27:52'),
(30,'Create','Issue General Requisition','R_G00074','balancika','2018-07-17 11:29:01'),
(31,'Create','Issue Temporary Credit','TC00014','balancika','2018-07-17 11:48:22'),
(32,'Create','Issue Temporary Credit','TC00015','balancika','2018-07-17 14:00:46'),
(33,'Create','Issue Temporary Credit','TC00016','balancika','2018-07-17 14:24:03'),
(34,'Create','Issue Temporary Over Due','OD00009','balancika','2018-07-17 14:34:21'),
(35,'Create','Issue Budget Requisition','R_BG00071','balancika','2018-07-17 14:34:55'),
(36,'Create','Issue Temporary Over Due','OD00010','balancika','2018-07-17 14:36:28'),
(37,'Create','Issue Temporary Over Due','OD00011','balancika','2018-07-17 14:39:34'),
(38,'Create','Issue Temporary Over Due','OD00012','balancika','2018-07-17 14:48:22'),
(39,'Create','Issue General Requisition','R_G00075','balancika','2018-07-17 14:50:43'),
(40,'Create','Issue Budget Requisition','R_BG00072','balancika','2018-07-17 14:51:19'),
(41,'Create','Issue Temporary Credit','TC00017','balancika','2018-07-17 14:51:58'),
(42,'Create','Issue Temporary Over Due','OD00013','balancika','2018-07-17 14:52:12'),
(43,'Create','Issue Temporary Over Due','OD00014','balancika','2018-07-17 14:54:28'),
(44,'Create','Issue Temporary Credit','TC00018','balancika','2018-07-17 14:54:43'),
(45,'Create','Issue Temporary Over Due','OD00015','balancika','2018-07-17 14:56:13'),
(46,'Delete','Issue Temporary Credit','TC00023','balancika','2018-07-18 10:38:19'),
(47,'Create','Issue Temporary Credit','TC00025','balancika','2018-07-18 10:42:30');

-- 
-- Definition of ats_materialrequest
-- 

CREATE TABLE IF NOT EXISTS `ats_materialrequest` (
  `EntryNo` varchar(255) NOT NULL DEFAULT '',
  `Reference` varchar(255) DEFAULT NULL,
  `EntryDate` date DEFAULT NULL,
  `RequiredDate` date DEFAULT NULL,
  `Status` varchar(255) DEFAULT NULL,
  `RequestedBy` varchar(255) DEFAULT NULL,
  `Remark` varchar(255) DEFAULT NULL,
  `Generated` varchar(255) DEFAULT NULL,
  `CustID` varchar(255) DEFAULT NULL,
  `var_authId` varchar(255) DEFAULT NULL,
  `var_editable` tinyint(1) DEFAULT '1',
  `dat_approved` datetime DEFAULT NULL,
  `VI_ID` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`EntryNo`),
  KEY `TermID` (`EntryNo`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table ats_materialrequest
-- 

INSERT INTO `ats_materialrequest`(`EntryNo`,`Reference`,`EntryDate`,`RequiredDate`,`Status`,`RequestedBy`,`Remark`,`Generated`,`CustID`,`var_authId`,`var_editable`,`dat_approved`,`VI_ID`) VALUES
('M00011','go to pp','2017-12-15 00:00:00','2017-12-15 00:00:00','Deleted','01','wanna sleep',NULL,'2000001',NULL,0,NULL,NULL),
('M00012','','2017-12-15 00:00:00','2017-12-15 00:00:00','requested','E-00006','',NULL,'2000001',NULL,1,NULL,NULL),
('M00013','go to office','2017-12-15 00:00:00','2017-12-15 00:00:00','Deleted','E-00010','let go',NULL,'2000021',NULL,0,NULL,NULL),
('M00014','','2017-12-15 00:00:00','2017-12-15 00:00:00','requested','E-00011','',NULL,'2000001',NULL,1,NULL,NULL),
('M00015','','2017-12-16 00:00:00','2017-12-16 00:00:00','requested','01','',NULL,'C00004',NULL,1,NULL,'VI000003940'),
('M00016','','2017-12-16 00:00:00','2017-12-16 00:00:00','requested','01','',NULL,'C00014',NULL,1,NULL,'VI000001024'),
('M00017','hjj','2017-12-16 00:00:00','2017-12-16 00:00:00','requested','01','yuth',NULL,'2000001',NULL,1,NULL,NULL),
('M00018','','2017-12-16 00:00:00','2017-12-16 00:00:00','requested','01','',NULL,'C00004',NULL,1,NULL,NULL),
('M00019','','2017-12-19 00:00:00','2017-12-19 00:00:00','Approved','E00042','',NULL,'C00002',NULL,1,NULL,''),
('M00020','','2017-12-19 00:00:00','2017-12-19 00:00:00','requested','E00042','',NULL,'C00002','',1,NULL,''),
('M00021','asdasdasdasdasdasdasd','2017-12-19 00:00:00','2017-12-19 00:00:00','requested','E-00006','asdasdasdasdasasasdasasd',NULL,'1000003','',1,NULL,NULL),
('M00022','asdasdasdasdas','2017-12-19 00:00:00','2017-12-19 00:00:00','Approved','EMP00010','asdasdasdasdsadasdasdasdasd','Open','1000002','Auth-00237',1,NULL,NULL),
('M00023','','2018-01-03 00:00:00','2018-01-03 00:00:00','requested','E00042','',NULL,'C00002','',1,NULL,''),
('M00024','','2018-01-03 00:00:00','2018-01-03 00:00:00','requested','E00042','',NULL,'C00007','',1,NULL,'VI05352'),
('M00025','fskdfjsdf','2018-01-07 00:00:00','2018-01-08 00:00:00','requested','01','fsldfsldfsl',NULL,'C00003','',1,NULL,'VI05039'),
('M00026','ddd','2018-01-09 00:00:00','2018-01-09 00:00:00','requested','E00042','ffd',NULL,'C00004','',1,NULL,'VI05734'),
('M00027','hhhhb','2018-01-10 00:00:00','2018-01-17 00:00:00','requested','E00042','3ffnnb',NULL,'C00026','',1,NULL,''),
('M00028','','2018-01-10 00:00:00','2018-01-10 00:00:00','requested','E00042','',NULL,'C00025','',1,NULL,''),
('M00029','','2018-01-10 00:00:00','2018-01-10 00:00:00','requested','E00042','',NULL,'C00002','',1,NULL,''),
('M00030','','2018-01-10 00:00:00','2018-01-10 00:00:00','requested','E00042','',NULL,'C00002','',1,NULL,''),
('M00031','','2018-01-10 00:00:00','2018-01-10 00:00:00','requested','E00042','',NULL,'C00002','',1,NULL,''),
('M00032','','2018-01-10 00:00:00','2018-01-10 00:00:00','requested','E00042','',NULL,'C00010','',1,NULL,''),
('M00033','','2018-01-10 00:00:00','2018-01-10 00:00:00','requested','E00042','',NULL,'C00022','',1,NULL,''),
('M00034','','2018-01-10 00:00:00','2018-01-10 00:00:00','requested','E00042','',NULL,'C00021','',1,NULL,''),
('M00035','yuth','2018-01-10 00:00:00','2018-01-12 00:00:00','requested','E00042','yuth',NULL,'C00029','',1,NULL,NULL),
('M00036','','2018-01-29 00:00:00','2018-01-29 00:00:00','requested','01','',NULL,'1000010',NULL,1,NULL,NULL),
('M00037','','2018-01-29 00:00:00','2018-01-29 00:00:00','requested','01','',NULL,'1000005',NULL,1,NULL,NULL),
('M00038','','2018-01-29 00:00:00','2018-01-29 00:00:00','Cancelled','01','',NULL,'1000002',NULL,1,NULL,''),
('M00039','','2018-01-29 00:00:00','2018-01-29 00:00:00','approved','01','',NULL,'1000002',NULL,1,NULL,''),
('M00040','','2018-02-21 00:00:00','2018-02-21 00:00:00','approved','01','',NULL,'1000004',NULL,1,NULL,'VI05680'),
('M00041','','2018-05-10 00:00:00','2018-05-10 00:00:00','approved','01','',NULL,'1000002',NULL,1,NULL,''),
('M00042','','2018-05-11 00:00:00','2018-05-12 00:00:00','approved','01','',NULL,'1000002',NULL,1,NULL,''),
('M00043','','2018-05-13 00:00:00','2018-05-12 00:00:00','approved','01','',NULL,'1000002',NULL,1,NULL,''),
('M00044','','2018-05-13 00:00:00','2018-05-12 00:00:00','approved','01','',NULL,'1000002',NULL,1,NULL,''),
('M00045','100','2018-05-19 00:00:00','2018-05-19 00:00:00','approved','E-00009','',NULL,'1000003',NULL,1,NULL,NULL),
('M00046','','2018-05-21 00:00:00','2018-05-21 00:00:00','requested','E00042','',NULL,'C00021',NULL,1,NULL,'VI06171'),
('M00047','001','2018-05-22 00:00:00','2018-05-22 00:00:00','approved','E00001','Good',NULL,'C00001',NULL,1,NULL,''),
('M00048','gg','2018-05-26 00:00:00','2018-05-26 00:00:00','approved','E00042','ggg',NULL,'C00003',NULL,1,NULL,'VI06223'),
('M00049','001','2018-05-22 00:00:00','2018-05-22 00:00:00','approved','E00001','Good',NULL,'C00001',NULL,1,NULL,''),
('M00050','001','2018-05-22 00:00:00','2018-05-22 00:00:00','approved','E00001','Good',NULL,'C00001',NULL,1,NULL,''),
('M00051','001','2018-05-22 00:00:00','2018-05-22 00:00:00','approved','E00001','Good',NULL,'C00001',NULL,1,NULL,''),
('M00052','001','2018-05-22 00:00:00','2018-05-22 00:00:00','approved','E00001','Good',NULL,'C00001',NULL,1,NULL,''),
('M00053','001','2018-05-22 00:00:00','2018-05-22 00:00:00','approved','E00001','Good',NULL,'C00001',NULL,1,NULL,''),
('M00054','001','2018-05-22 00:00:00','2018-05-22 00:00:00','approved','E00001','Good',NULL,'C00001',NULL,1,NULL,''),
('M00055','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00056','','2018-05-28 00:00:00','2018-05-29 00:00:00','approved','01','',NULL,'1000002',NULL,1,NULL,''),
('M00057','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00058','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00059','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved','01','',NULL,'1000002',NULL,1,NULL,''),
('M00060','','2018-05-28 00:00:00','2018-05-29 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00061','','2018-05-28 00:00:00','2018-05-29 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00062','','2018-05-28 00:00:00','2018-05-29 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00063','','2018-05-28 00:00:00','2018-05-29 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00064','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00065','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00066','','2018-05-28 00:00:00','2018-05-29 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00067','','2018-05-28 00:00:00','2018-05-29 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00068','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00069','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00070','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00071','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00072','','2018-05-28 00:00:00','2018-05-29 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00073','','2018-05-28 00:00:00','2018-05-29 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00074','','2018-05-28 00:00:00','2018-05-30 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00075','','2018-05-28 00:00:00','2018-05-30 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00076','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00077','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00078','','2018-05-07 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00079','','2018-05-07 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00080','','2018-05-03 00:00:00','2018-05-03 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00081','','2018-05-03 00:00:00','2018-05-03 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00082','','2018-05-02 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00083','','2018-05-02 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00084','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00085','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00086','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00087','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00088','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00089','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00090','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00091','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00092','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00093','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00094','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00095','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00096','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00097','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00098','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00099','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00100','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00101','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00102','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00103','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00104','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00105','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00106','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00107','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'A',NULL,1,NULL,''),
('M00108','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'[1000002] Ta veng',NULL,1,NULL,''),
('M00109','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'',NULL,1,NULL,''),
('M00110','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'[1000002] Ta veng',NULL,1,NULL,''),
('M00111','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'[1000004] Srey mom',NULL,1,NULL,''),
('M00112','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'1000005',NULL,1,NULL,''),
('M00113','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'1000006',NULL,1,NULL,''),
('M00114','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'1000007',NULL,1,NULL,''),
('M00115','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'1000008',NULL,1,NULL,''),
('M00116','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'1000009',NULL,1,NULL,''),
('M00117','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'1000002',NULL,1,NULL,''),
('M00118','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'1000012',NULL,1,NULL,''),
('M00119','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'1000002',NULL,1,NULL,''),
('M00120','','2018-05-28 00:00:00','2018-05-28 00:00:00','approved',NULL,'',NULL,'1000005',NULL,1,NULL,''),
('M00121','','2018-05-29 00:00:00','2018-05-29 00:00:00','approved',NULL,'',NULL,'1000005',NULL,1,NULL,''),
('M00122','','2018-05-29 00:00:00','2018-05-29 00:00:00','approved',NULL,'',NULL,'1000002',NULL,1,NULL,''),
('M00123','','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00124','','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00125','','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00126','Material','2018-05-29 00:00:00','2018-05-29 00:00:00','requested','EMP00022','Material',NULL,'C00063','Auth-00247',1,NULL,NULL),
('M00127','Material','2018-05-29 00:00:00','2018-05-30 00:00:00','requested','EMP00022','Material',NULL,'C00063','Auth-00247',1,NULL,NULL),
('M00128','Material','2018-05-29 00:00:00','2018-05-29 00:00:00','requested','EMP00022','Material',NULL,'C00063','Auth-00247',1,NULL,NULL),
('M00129','','2018-05-29 00:00:00','2018-05-29 00:00:00','requested','EMP00022','',NULL,'C00063','Auth-00247',1,NULL,NULL),
('M00130','Sale','2018-05-29 00:00:00','2018-05-29 00:00:00','requested','EMP00022','Sale',NULL,'C00063','',1,NULL,NULL),
('M00131','001','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'Good',NULL,'1000005','',1,NULL,''),
('M00132','1','2018-05-30 00:00:00','2018-05-31 00:00:00','requested',NULL,'1',NULL,'1000005','',1,NULL,''),
('M00133','add','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'add',NULL,'1000002','',1,NULL,''),
('M00134','11','2018-05-29 00:00:00','2018-05-30 00:00:00','requested',NULL,'11',NULL,'1000012','',1,NULL,''),
('M00135','','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'',NULL,'1000003','',1,NULL,''),
('M00136','','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00137','','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'',NULL,'','',1,NULL,''),
('M00138','','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'',NULL,'1000006','',1,NULL,''),
('M00139','','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'',NULL,'1000008','',1,NULL,''),
('M00140','add','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'add',NULL,'1000002','',1,NULL,''),
('M00141','asfds','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'f',NULL,'1000002','',1,NULL,''),
('M00142','','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'',NULL,'1000004','',1,NULL,''),
('M00143','sf','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'sdf',NULL,'1000002','',1,NULL,''),
('M00144','','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00145','','2018-05-29 00:00:00','2018-05-29 00:00:00','requested',NULL,'',NULL,'1000003','',1,NULL,''),
('M00146','sdfssdf','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'sfdsdf',NULL,'1000002','',1,NULL,''),
('M00147','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00148','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000003','',1,NULL,''),
('M00149','','2019-05-09 00:00:00','2019-05-30 00:00:00','requested',NULL,'',NULL,'1000005','',1,NULL,''),
('M00150','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000006','',1,NULL,''),
('M00151','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested','01','',NULL,'1000003','',1,NULL,''),
('M00152','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000005','',1,NULL,''),
('M00153','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00154','','2018-05-01 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000007','',1,NULL,''),
('M00155','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000004','',1,NULL,''),
('M00156','add','2018-05-31 00:00:00','2018-05-31 00:00:00','requested',NULL,'add',NULL,'1000002','',1,NULL,''),
('M00157','qqq','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'qqq',NULL,'1000010','',1,NULL,''),
('M00158','did','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'add',NULL,'1000002','',1,NULL,''),
('M00159','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000004','',1,NULL,''),
('M00160','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00161','001','2018-05-22 00:00:00','2018-05-22 00:00:00','requested','E00001','Good',NULL,'C00001','',1,NULL,''),
('M00162','','2018-05-01 00:00:00','2018-05-01 00:00:00','requested',NULL,'',NULL,'1000011','',1,NULL,''),
('M00163','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00164','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00165','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested',NULL,'',NULL,'1000005','',1,NULL,''),
('M00166','we','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'add',NULL,'1000002','',1,NULL,''),
('M00167','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00168','add','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'add',NULL,'1000005','',1,NULL,''),
('M00169','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000005','',1,NULL,''),
('M00170','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000005','',1,NULL,''),
('M00171','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00172','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000003','',1,NULL,''),
('M00173','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00174','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000005','',1,NULL,''),
('M00175','sddf','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'add',NULL,'1000005','',1,NULL,''),
('M00176','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00177','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000003','',1,NULL,''),
('M00178','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00179','001','2018-05-22 00:00:00','2018-05-22 00:00:00','requested','E00002','Good',NULL,'C00001','',1,NULL,''),
('M00180','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00181','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000005','',1,NULL,''),
('M00182','001','2018-05-22 00:00:00','2018-05-22 00:00:00','requested','E00002','Good',NULL,'C00001','',1,NULL,''),
('M00183','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested',NULL,'',NULL,'1000002','',1,NULL,''),
('M00184','001','2018-05-22 00:00:00','2018-05-22 00:00:00','requested','EMP00010','Good',NULL,'C00001','',1,NULL,''),
('M00185','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested','E00003','',NULL,'1000002','',1,NULL,''),
('M00186','sdfsdf','2018-05-30 00:00:00','2018-05-30 00:00:00','requested','E00045','',NULL,'1000005','',1,NULL,''),
('M00187','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested','E00045','',NULL,'1000005','',1,NULL,''),
('M00188','safe','2018-05-30 00:00:00','2018-05-30 00:00:00','requested','EMP00019','add',NULL,'1000007','',1,NULL,''),
('M00189','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested','E00003','',NULL,'1000002','',1,NULL,''),
('M00190','001','2018-05-22 00:00:00','2018-05-22 00:00:00','requested','EMP00010','Good',NULL,'C00001','',1,NULL,''),
('M00191','001','2018-05-22 00:00:00','2018-05-22 00:00:00','requested','EMP00010','Good',NULL,'C00001','',1,NULL,''),
('M00192','','2018-05-30 00:00:00','2018-05-30 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00193','1','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00011','1',NULL,'1000011','',1,NULL,''),
('M00194','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00195','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00019','',NULL,'1000003','',1,NULL,''),
('M00196','aaa','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00002','aaa',NULL,'1000002','',1,NULL,''),
('M00197','ssss','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','E00045','ssss',NULL,'1000005','',1,NULL,''),
('M00198','002','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','E00045','Good',NULL,'1000005','',1,NULL,''),
('M00199','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','E00003','',NULL,'1000002','',1,NULL,''),
('M00200','bbb','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','E00045','bbb',NULL,'1000004','',1,NULL,''),
('M00201','aa','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','E00003','aa',NULL,'1000003','',1,NULL,''),
('M00202','ttt','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00002','to',NULL,'1000006','',1,NULL,''),
('M00203','qqqq','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00019','qqqq',NULL,'1000007','',1,NULL,''),
('M00204','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00205','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00206','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00207','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00208','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00209','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00210','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00211','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00212','003','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','E00045','Good',NULL,'1000005','',1,NULL,''),
('M00213','DDD','2018-05-22 00:00:00','2018-05-22 00:00:00','requested','EMP00010','DDD',NULL,'C00001','',1,NULL,''),
('M00214','YYY','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','','YYY',NULL,'','',1,NULL,''),
('M00215','AAA','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','E00045','AAA',NULL,'1000005','',1,NULL,''),
('M00216','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00217','','2018-05-31 00:00:00','2018-05-31 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00218','aaa','2018-06-02 00:00:00','2018-06-02 00:00:00','requested','EMP00002','aaa',NULL,'1000002','',1,NULL,''),
('M00219','s','2018-06-02 00:00:00','2018-06-02 00:00:00','requested','EMP00002','add',NULL,'1000002','',1,NULL,''),
('M00220','','2018-06-02 00:00:00','2018-06-02 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00221','','2018-06-02 00:00:00','2018-06-02 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00222','','2018-06-02 00:00:00','2018-06-02 00:00:00','requested','E00003','',NULL,'1000002','',1,NULL,''),
('M00223','','2018-06-02 00:00:00','2018-06-02 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00224','BBB','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','E00002','BBB',NULL,'1000003','',1,NULL,''),
('M00225','','2018-06-02 00:00:00','2018-06-02 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00226','aa','2018-06-02 00:00:00','2018-06-02 00:00:00','requested','EMP00002','aa',NULL,'1000003','',1,NULL,''),
('M00227','','2018-06-02 00:00:00','2018-06-02 00:00:00','requested','E00045','',NULL,'1000004','',1,NULL,''),
('M00228','','2018-06-02 00:00:00','2018-06-02 00:00:00','requested','EMP00011','',NULL,'1000003','',1,NULL,''),
('M00229','aaa','2018-06-02 00:00:00','2018-06-02 00:00:00','requested','EMP00002','aaa',NULL,'1000002','',1,NULL,''),
('M00230','007','2018-06-02 00:00:00','2018-06-02 00:00:00','requested','E00045','gpod',NULL,'1000005','',1,NULL,''),
('M00231','','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00232','aaa','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','EMP00002','add',NULL,'1000002','',1,NULL,''),
('M00233','','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00234','','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','E00045','',NULL,'1000005','',1,NULL,''),
('M00235','','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','EMP00002','',NULL,'1000006','',1,NULL,''),
('M00236','','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','EMP00010','',NULL,'1000007','',1,NULL,''),
('M00237','','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00238','','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','E00044','',NULL,'1000004','',1,NULL,''),
('M00239','','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00240','rr','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','EMP00002','rr',NULL,'1000002','',1,NULL,''),
('M00241','aa','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','EMP00002','aa',NULL,'1000002','',1,NULL,''),
('M00242','','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','E00045','',NULL,'1000004','',1,NULL,''),
('M00243','yay','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','E00045','yay',NULL,'1000005','',1,NULL,''),
('M00244','do','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','EMP00011','do',NULL,'1000003','',1,NULL,''),
('M00245','rr','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','E00003','rr',NULL,'1000006','',1,NULL,''),
('M00246','','2018-06-04 00:00:00','2018-06-05 00:00:00','requested','EMP00002','',NULL,'1000003','',1,NULL,''),
('M00247','e','2018-06-04 00:00:00','2018-06-05 00:00:00','requested','EMP00002','e',NULL,'1000002','',1,NULL,''),
('M00248','s','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','E00002','s',NULL,'','',1,NULL,''),
('M00249','','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','','',NULL,'1000004','',1,NULL,''),
('M00250','s','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','EMP00010','s',NULL,'1000002','',1,NULL,''),
('M00251','008','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','E00045','Good',NULL,'1000005','',1,NULL,''),
('M00252','sssttt','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','E00045','sssttt',NULL,'1000005','',1,NULL,''),
('M00253','011','2018-06-04 00:00:00','2018-06-05 00:00:00','requested','E00045','The Best',NULL,'1000005','',1,NULL,''),
('M00254','','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00255','028','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','E00045','Great',NULL,'1000005','',1,NULL,''),
('M00256','007777','2018-06-05 00:00:00','2018-06-06 00:00:00','requested','E00003','Good Boy !',NULL,'1000003','',1,NULL,''),
('M00257','or','2018-06-06 00:00:00','2018-06-07 00:00:00','requested','EMP00002','or',NULL,'1000002','',1,NULL,''),
('M00258','','2018-06-04 00:00:00','2018-06-04 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00259','','2018-06-06 00:00:00','2018-06-06 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00260','Update POSM-028','2018-06-06 00:00:00','2018-06-07 00:00:00','requested','E00045','Great',NULL,'1000005','',1,NULL,''),
('M00261','','2018-06-06 00:00:00','2018-06-06 00:00:00','requested','E00045','',NULL,'1000005','',1,NULL,''),
('M00262','','2018-06-06 00:00:00','2018-06-06 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00263','222','2018-06-07 00:00:00','2018-06-07 00:00:00','requested','EMP00002','222',NULL,'1000007','',1,NULL,''),
('M00264','','2018-06-08 00:00:00','2018-06-08 00:00:00','requested','E00045','',NULL,'1000005','',1,NULL,''),
('M00265','','2018-06-07 00:00:00','2018-06-07 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00266','a','2018-06-07 00:00:00','2018-06-07 00:00:00','requested','EMP00002','b',NULL,'1000002','',1,NULL,''),
('M00267','g','2018-06-08 00:00:00','2018-06-08 00:00:00','requested','01','v',NULL,'C00007','',1,NULL,''),
('M00268','','2018-06-08 00:00:00','2018-06-08 00:00:00','requested','EMP00002','',NULL,'1000003','',1,NULL,''),
('M00269','a','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','EMP00019','a',NULL,'1000003','',1,NULL,''),
('M00270','r','2018-06-09 00:00:00','2018-06-10 00:00:00','requested','EMP00014','r',NULL,'1000002','',1,NULL,''),
('M00271','w','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','EMP00002','w',NULL,'1000002','',1,NULL,''),
('M00272','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00273','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00274','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00275','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','EMP00012','',NULL,'1000002','',1,NULL,''),
('M00276','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','EMP00011','',NULL,'1000002','',1,NULL,''),
('M00277','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00278','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00279','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00280','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','EMP00002','',NULL,'1000003','',1,NULL,''),
('M00281','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','E00045','',NULL,'1000005','',1,NULL,''),
('M00282','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','E00002','',NULL,'1000006','',1,NULL,''),
('M00283','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','E00003','',NULL,'1000002','',1,NULL,''),
('M00284','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','E00045','',NULL,'1000004','',1,NULL,''),
('M00285','','2018-06-09 00:00:00','2018-06-09 00:00:00','requested','EMP00014','',NULL,'1000008','',1,NULL,''),
('M00286','222','2018-06-11 00:00:00','2018-06-11 00:00:00','requested','EMP00014','For wholesales customer',NULL,'1000011','',1,NULL,''),
('M00287','aaa','2018-06-11 00:00:00','2018-06-12 00:00:00','requested','EMP00002','aa',NULL,'1000002','',1,NULL,''),
('M00288','','2018-06-11 00:00:00','2018-06-11 00:00:00','requested','E00045','',NULL,'1000005','',1,NULL,''),
('M00289','','2018-06-11 00:00:00','2018-06-11 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00290','','2018-06-11 00:00:00','2018-06-11 00:00:00','requested','E00045','',NULL,'1000005','',1,NULL,''),
('M00291','','2018-06-11 00:00:00','2018-06-11 00:00:00','requested','E00044','',NULL,'1000004','',1,NULL,''),
('M00292','','2018-06-11 00:00:00','2018-06-11 00:00:00','requested','E00045','',NULL,'1000005','',1,NULL,''),
('M00293','','2018-06-11 00:00:00','2018-06-11 00:00:00','requested','E00045','',NULL,'1000005','',1,NULL,''),
('M00294','','2018-06-11 00:00:00','2018-06-11 00:00:00','requested','E00045','',NULL,'1000005','',1,NULL,''),
('M00295','','2018-06-11 00:00:00','2018-06-11 00:00:00','requested','E00044','',NULL,'1000004','',1,NULL,''),
('M00296','','2018-06-11 00:00:00','2018-06-11 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00297','007','2018-06-11 00:00:00','2018-06-12 00:00:00','requested','E00045','Good',NULL,'1000005','',1,NULL,''),
('M00298','','2018-06-11 00:00:00','2018-06-11 00:00:00','requested','EMP00002','',NULL,'1000003','',1,NULL,''),
('M00299','','2018-06-12 00:00:00','2018-06-12 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00300','002','2018-06-12 00:00:00','2018-06-13 00:00:00','requested','E00045','Good!',NULL,'1000005','',1,NULL,''),
('M00301','','2018-06-12 00:00:00','2018-06-12 00:00:00','requested','E00045','',NULL,'1000005','',1,NULL,''),
('M00302','','2018-06-12 00:00:00','2018-06-12 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00303','003','2018-06-12 00:00:00','2018-06-12 00:00:00','requested','E00044','Good',NULL,'1000004','',1,NULL,''),
('M00304','003','2018-06-12 00:00:00','2018-06-13 00:00:00','requested','E00044','Great',NULL,'1000004','',1,NULL,''),
('M00305','','2018-06-12 00:00:00','2018-06-12 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00306','','2018-06-12 00:00:00','2018-06-12 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00307','','2018-06-12 00:00:00','2018-06-12 00:00:00','requested','E00045','',NULL,'1000005','',1,NULL,''),
('M00308','','2018-06-12 00:00:00','2018-06-12 00:00:00','requested','E00003','',NULL,'1000006','',1,NULL,''),
('M00309','sdf','2018-06-13 00:00:00','2018-06-14 00:00:00','requested','E00002','sdf',NULL,'1000006','',1,NULL,''),
('M00310','009','2018-06-13 00:00:00','2018-06-14 00:00:00','requested','E00044','well done!!!',NULL,'1000004','',1,NULL,''),
('M00311','hj','2018-06-13 00:00:00','2018-06-14 00:00:00','requested','E00002','hj',NULL,'1000009','',1,NULL,''),
('M00312','','2018-06-13 00:00:00','2018-06-13 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00313','','2018-06-13 00:00:00','2018-06-13 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00314','','2018-06-13 00:00:00','2018-06-13 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00315','','2018-06-13 00:00:00','2018-06-13 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00316','','2018-06-13 00:00:00','2018-06-13 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,''),
('M00317','','2018-06-13 00:00:00','2018-06-13 00:00:00','requested','EMP00010','',NULL,'1000002','',1,NULL,''),
('M00318','','2018-06-13 00:00:00','2018-06-13 00:00:00','requested','EMP00010','',NULL,'1000003','',1,NULL,''),
('M00319','','2018-06-13 00:00:00','2018-06-13 00:00:00','requested','EMP00002','',NULL,'1000002','',1,NULL,'');

-- 
-- Definition of ats_materialrequestdetail
-- 

