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


--
-- Database: `rlis5`
--

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

--
-- Table structure for table `captcha`
--

CREATE TABLE IF NOT EXISTS `captcha` (
  `captcha_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `captcha_time` int(10) unsigned DEFAULT NULL,
  `ip_address` varchar(16) NOT NULL DEFAULT '0',
  `word` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`captcha_id`),
  KEY `word` (`word`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Data captcha' AUTO_INCREMENT=26 ;

--
-- Dumping data for table `captcha`
--

INSERT INTO `captcha` (`captcha_id`, `captcha_time`, `ip_address`, `word`) VALUES
(1, NULL, '157.56.94.167', NULL),
(2, NULL, '157.55.32.189', NULL),
(3, NULL, '157.55.36.37', NULL),
(4, NULL, '157.55.34.168', NULL),
(5, NULL, '157.55.34.168', NULL),
(6, NULL, '157.55.34.168', NULL),
(7, NULL, '222.165.222.139', NULL),
(8, NULL, '222.165.222.139', NULL),
(9, NULL, '222.165.222.139', NULL),
(10, NULL, '222.165.222.139', NULL),
(11, NULL, '222.165.222.139', NULL),
(12, NULL, '222.165.222.144', NULL),
(13, 1356589883, '222.165.222.139', '158026'),
(14, 1356589961, '222.165.222.139', '636513'),
(15, 1356594101, '222.165.222.139', '335776'),
(16, 1358262413, '157.55.34.168', '474777'),
(17, 1359950614, '127.0.0.1', '632090'),
(18, 1360115573, '127.0.0.1', '210859'),
(19, 1360115576, '127.0.0.1', '251641'),
(20, 1360115579, '127.0.0.1', '016014'),
(21, 1360115580, '127.0.0.1', '148853'),
(22, 1360115581, '127.0.0.1', '937923'),
(23, 1360115582, '127.0.0.1', '683611'),
(24, NULL, '222.165.222.139', NULL),
(25, 1366365412, '127.0.0.1', '563145');

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

--
-- Table structure for table `h_gl_cancel`
--

CREATE TABLE IF NOT EXISTS `h_gl_cancel` (
  `nocpvform` char(10) NOT NULL COMMENT 'No. CPV Format',
  `year` year(4) NOT NULL COMMENT 'Tahun',
  `glacc` char(10) NOT NULL COMMENT 'No. GL Acc',
  `glacc_cancel` char(10) NOT NULL COMMENT 'No. GL Acc cancel',
  `canby` varchar(10) NOT NULL COMMENT 'Cancel By',
  `candate` datetime NOT NULL COMMENT 'Cancel Date',
  PRIMARY KEY (`nocpvform`,`year`,`glacc`,`glacc_cancel`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Table History Cancel GL';

--
-- Dumping data for table `h_gl_cancel`
--


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

--
-- Table structure for table `h_miro_cancel`
--

CREATE TABLE IF NOT EXISTS `h_miro_cancel` (
  `ebeln` char(10) NOT NULL COMMENT 'No. PO',
  `year` year(4) NOT NULL COMMENT 'Tahun',
  `miro` char(10) NOT NULL COMMENT 'No. miro',
  `miro_cancel` char(10) NOT NULL COMMENT 'No. miro cancel',
  `canby` varchar(10) NOT NULL COMMENT 'Cancel By',
  `candate` datetime NOT NULL COMMENT 'Cancel Date',
  PRIMARY KEY (`ebeln`,`year`,`miro`,`miro_cancel`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Table History Cancel MIRO';

--
-- Dumping data for table `h_miro_cancel`
--


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

--
-- Table structure for table `h_pcop_trf`
--

CREATE TABLE IF NOT EXISTS `h_pcop_trf` (
  `idcab` int(11) NOT NULL DEFAULT '0' COMMENT 'ID Cabang',
  `sap_ref` varchar(100) NOT NULL DEFAULT '' COMMENT 'No. referensi transaksi SAP',
  `rlis_ref` varchar(100) NOT NULL COMMENT 'No. referensi transaksi RLIS',
  `amount` double DEFAULT NULL COMMENT 'Jumlah uang',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  PRIMARY KEY (`idcab`,`sap_ref`,`rlis_ref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table history transfer petty cash opr';

--
-- Dumping data for table `h_pcop_trf`
--

INSERT INTO `h_pcop_trf` (`idcab`, `sap_ref`, `rlis_ref`, `amount`, `adddate`, `addby`) VALUES
(3, '0100004480WGI12013', 'CPV/7/05/13/1', 5000000, '2013-05-14 15:20:27', 'imam');

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

--
-- Table structure for table `master_menu`
--

CREATE TABLE IF NOT EXISTS `master_menu` (
  `mid` int(4) NOT NULL AUTO_INCREMENT COMMENT 'Menu ID',
  `pid` int(4) NOT NULL COMMENT 'Menu parent ID',
  `mname` varchar(50) NOT NULL COMMENT 'Nama menu',
  `murl` varchar(150) NOT NULL COMMENT 'Menu URL',
  `crby` varchar(10) NOT NULL COMMENT 'Dibuat oleh',
  `crdate` date NOT NULL COMMENT 'Tgl buat',
  `crtime` time NOT NULL COMMENT 'Jam buat',
  `chby` varchar(10) NOT NULL COMMENT 'Diubah oleh',
  `chdate` date NOT NULL COMMENT 'Tgl ubah',
  `chtime` time NOT NULL COMMENT 'Jam ubah',
  PRIMARY KEY (`mid`,`pid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 COMMENT='Master menu' AUTO_INCREMENT=111 ;



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

--
-- Table structure for table `master_role`
--

CREATE TABLE IF NOT EXISTS `master_role` (
  `roleid` int(3) NOT NULL AUTO_INCREMENT COMMENT 'Role ID',
  `rolename` varchar(30) NOT NULL COMMENT 'Nama role',
  `roledesc` varchar(35) NOT NULL COMMENT 'Deskripsi',
  `view` int(1) NOT NULL COMMENT '0 = False, 1= True',
  `add` int(1) NOT NULL,
  `edit` int(1) NOT NULL COMMENT '0 = False, 1= True',
  `delete` int(1) NOT NULL COMMENT '0 = False, 1= True',
  `app` int(1) NOT NULL COMMENT '0 = False, 1= True',
  `cancel` int(1) NOT NULL COMMENT '0 = False, 1= True',
  `crby` varchar(20) NOT NULL COMMENT 'Dibuat oleh',
  `crdate` date NOT NULL COMMENT 'Tgl buat',
  `crtime` time NOT NULL COMMENT 'Jam buat',
  `chby` varchar(20) NOT NULL COMMENT 'Diubah oleh',
  `chdate` date NOT NULL COMMENT 'Tgl ubah',
  `chtime` time NOT NULL COMMENT 'Jam ubah',
  PRIMARY KEY (`roleid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 COMMENT='Data role' AUTO_INCREMENT=18 ;

--
-- Dumping data for table `master_role`
--

INSERT INTO `master_role` (`roleid`, `rolename`, `roledesc`, `view`, `add`, `edit`, `delete`, `app`, `cancel`, `crby`, `crdate`, `crtime`, `chby`, `chdate`, `chtime`) VALUES
(11, 'ADMIN', 'Super user role', 1, 1, 1, 1, 1, 0, 'Imam', '2012-08-14', '10:52:43', 'Imam', '2012-08-09', '23:32:10'),
(12, 'PIC CABANG', 'Role PIC Cabang', 1, 1, 1, 1, 1, 1, 'roberthus', '2013-05-13', '09:35:49', '', '0000-00-00', '00:00:00'),
(13, 'Finance Staff', 'Role Finance Staff', 1, 1, 1, 1, 0, 0, 'imam', '2013-05-13', '12:19:43', '', '0000-00-00', '00:00:00'),
(14, 'Finance Manager', 'Role Finance Manager', 1, 1, 1, 1, 1, 1, 'roberthus', '2013-05-13', '09:40:14', '', '0000-00-00', '00:00:00'),
(15, 'Accounting Staff', 'Role Accounting Staff', 1, 1, 1, 1, 0, 0, 'roberthus', '2013-05-13', '09:40:28', '', '0000-00-00', '00:00:00'),
(16, 'Manager Collecting', 'Manager Collecting', 1, 1, 1, 1, 1, 1, 'roberthus', '2013-05-13', '09:38:45', '', '0000-00-00', '00:00:00'),
(17, 'Branch Manager', 'Branch Manager', 1, 1, 1, 1, 1, 1, 'roberthus', '2013-05-13', '09:38:07', '', '0000-00-00', '00:00:00');

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

--
-- Table structure for table `m_cab`
--

CREATE TABLE IF NOT EXISTS `m_cab` (
  `idcab` int(11) NOT NULL COMMENT 'Kode cabang',
  `cabname` varchar(100) DEFAULT NULL COMMENT 'Nama cabang',
  `cabshorttxt` varchar(9) NOT NULL,
  `addr` text COMMENT 'Alamat cabang',
  `active` int(1) DEFAULT NULL COMMENT 'Status cabang: aktif = 0, non aktif = 1',
  `pic` varchar(12) DEFAULT NULL COMMENT 'ID User PIC cabang',
  `phone` char(20) DEFAULT NULL COMMENT 'No. telepon cabang',
  `city` varchar(50) DEFAULT NULL COMMENT 'Kota cabang',
  `fax` char(20) DEFAULT NULL COMMENT 'No. Fax cabang',
  `prov` varchar(50) DEFAULT NULL COMMENT 'Propinsi',
  `lifnr` char(10) DEFAULT NULL COMMENT 'SAP Vendor code',
  `werks` char(4) DEFAULT NULL COMMENT 'SAP Plant',
  `lgort` char(4) DEFAULT NULL COMMENT 'SAP Storage location',
  `pcglaccuo` char(10) NOT NULL COMMENT 'Petty cash G/L Acc Uo',
  `pcglaccop` char(10) NOT NULL COMMENT 'Petty cash G/L Acc Op',
  `pcbankglacc` char(10) NOT NULL COMMENT 'Petty cash G/L Acc bank',
  `costctr` char(10) NOT NULL COMMENT 'Cost Center',
  `max_stor` int(11) NOT NULL COMMENT 'Akum daya tampung maksimal tanki',
  `max_pcop_trf` double NOT NULL COMMENT 'Maximum PC OP',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `chby` varchar(10) DEFAULT NULL COMMENT 'Diubah oleh',
  `chdate` datetime DEFAULT NULL COMMENT 'Tanggal ganti',
  PRIMARY KEY (`idcab`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table master cabang';

--
-- Dumping data for table `m_cab`
--

INSERT INTO `m_cab` (`idcab`, `cabname`, `cabshorttxt`, `addr`, `active`, `pic`, `phone`, `city`, `fax`, `prov`, `lifnr`, `werks`, `lgort`, `pcglaccuo`, `pcglaccop`, `pcbankglacc`, `costctr`, `max_stor`, `max_pcop_trf`, `addby`, `adddate`, `chby`, `chdate`) VALUES
(1, 'PUSAT', 'Coll Cbt', 'Cibitung', 1, 'PUSAT', '0000000000', 'Bekasi', '0000000000', 'Jawa Barat', '00000', '1000', '0000', '0000000000', '', '0000000000', '', 16000, 0, 'imam', '2013-02-04 14:43:19', 'imam', '2013-03-04 16:20:45'),
(3, 'Refinery Logistic Bandung', 'Coll Bdg', 'Bandung', 1, 'Achmad', '-', 'Bandung', '-', 'Jawa Barat', '30200', '1000', 'BDG', '1111402', '1111407', '1112137', '123200', 32000, 5000000, 'imam', '2013-02-04 16:07:16', 'imam', '2013-05-13 13:33:09');

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

--
-- Table structure for table `m_gl_opr`
--

CREATE TABLE IF NOT EXISTS `m_gl_opr` (
  `glacc` char(10) NOT NULL COMMENT 'No. G/L',
  `desc` varchar(60) NOT NULL COMMENT 'Desc',
  `cashflow` char(10) NOT NULL COMMENT 'Cash flow',
  PRIMARY KEY (`glacc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Master data G/L Acc Petty Cash Opr';

--
-- Dumping data for table `m_gl_opr`
--

INSERT INTO `m_gl_opr` (`glacc`, `desc`, `cashflow`) VALUES
('5223001', 'ENTERTAINT', '3303'),
('5229004', 'BBM', '3309'),
('5229005', 'TOL/PARKIR', '3309'),
('5231204', 'PENG. DOKUMEN', '3310'),
('5271001', 'BIAYA LAIN LAIN', '3322'),
('5271003', 'KEB. RMH TANGGA', '3316'),
('5521099', 'PULSA HP', '3301');

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

--
-- Table structure for table `m_manifest`
--

CREATE TABLE IF NOT EXISTS `m_manifest` (
  `idmnfst` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID Manifest',
  `nomnfst` varchar(20) NOT NULL COMMENT 'No Manifest',
  `nosj` varchar(20) NOT NULL COMMENT 'No Surat Jalan',
  `idcab` int(11) NOT NULL COMMENT 'ID Cabang',
  `nmcab` varchar(20) NOT NULL COMMENT 'Nama Cabang',
  `addr` varchar(200) NOT NULL COMMENT 'Alamat Cabang',
  `telephone` int(15) NOT NULL COMMENT 'No Telp Cabang',
  `nmpengirim` varchar(15) NOT NULL COMMENT 'Nama Pengirim',
  `jabatanpngirim` varchar(15) NOT NULL COMMENT 'Jabatan Pengirim',
  `jmlkemasan` varchar(15) NOT NULL COMMENT 'Jumlah Kemasan',
  `nmteknik` varchar(15) NOT NULL COMMENT 'Nama Teknik',
  `krkterlimbah` varchar(15) NOT NULL COMMENT 'Karakter Limbah',
  `jnslimbah` varchar(15) NOT NULL COMMENT 'Jenis Limbah',
  `kdlimbah` varchar(15) NOT NULL COMMENT 'Kode Limbah',
  `voldikirim` int(15) NOT NULL COMMENT 'Volume Dikirim',
  `noisotank` varchar(15) NOT NULL COMMENT 'No. ISO TANK',
  `keterangan` varchar(100) NOT NULL COMMENT 'Keterangan',
  `nmsupir` varchar(20) NOT NULL COMMENT 'Nama Driver',
  `hpsupir` int(15) NOT NULL COMMENT 'HP Driver',
  `jabatansupir` varchar(15) NOT NULL COMMENT 'Jabatan Penerima',
  `nopolisi` varchar(15) NOT NULL COMMENT 'No Polisi',
  `typekendaraan` varchar(15) NOT NULL COMMENT 'Type Kendaraan',
  `penerima` varchar(30) NOT NULL COMMENT 'Nama Penerima / Perusahaan',
  `jabatanpenerima` varchar(15) NOT NULL COMMENT 'Jabatan Penerima',
  `nmpenerima` varchar(20) NOT NULL COMMENT 'Nama Penerima',
  `tlppenerima` int(15) NOT NULL COMMENT 'No Telephone Penerima',
  `faxpenerima` int(15) NOT NULL COMMENT 'No Fax Penerima',
  PRIMARY KEY (`idmnfst`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `m_manifest`
--


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

--
-- Table structure for table `m_notgrp`
--

CREATE TABLE IF NOT EXISTS `m_notgrp` (
  `idnotgrp` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Notification group ID',
  `desc` varchar(100) DEFAULT NULL,
  `subject` varchar(100) NOT NULL COMMENT 'Subject',
  `msg` text NOT NULL COMMENT 'Notification message',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `chdate` datetime DEFAULT NULL COMMENT 'Tanggal ganti',
  `chby` varchar(10) DEFAULT NULL COMMENT 'Diubah oleh',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  PRIMARY KEY (`idnotgrp`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Table master email notification group' AUTO_INCREMENT=12 ;

--
-- Dumping data for table `m_notgrp`
--

INSERT INTO `m_notgrp` (`idnotgrp`, `desc`, `subject`, `msg`, `adddate`, `chdate`, `chby`, `addby`) VALUES
(5, 'Test Notification', 'Test Notification (Do Not Reply)', 'Hi $1, this is just testing notification message.\r\n\r\nBy $2.', '2013-02-11 15:32:12', '2013-02-13 08:57:49', 'imam', 'imam'),
(6, 'Test Notification 2', 'This is just testing message', 'Hi $1,\r\n\r\n\r\n\r\nBy $2', '2013-02-12 16:26:50', NULL, NULL, 'imam'),
(7, 'CPV Notification Mgr', 'CPV Notification', 'CPV No. $1 has been created ​​by $2, please check the RLIS system for approval.\n\nTransfer To : $3\nAmount      : Rp. $4\nDescription : $5\n\nNote: Please do not reply this message.\n\nRegards,\n\n\nSystem Administrator', '2013-04-03 11:22:41', '2013-04-03 14:29:51', 'imam', 'imam'),
(8, 'CPV Notification Approved', 'CPV Approved Notification ', 'CPV No. $1 has been approved ​​by $2, please check the RLIS system.\n\nTransfer To : $3\nAmount      : Rp. $4\nDescription : $5\n\nNote: Please do not reply this message.\n\nRegards,\n\n\nSystem Administrator', '2013-04-03 14:29:14', '2013-04-03 14:29:57', 'imam', 'imam'),
(9, 'CPV Notification Rejected', 'CPV Rejected Notification', 'CPV No. $1 has been rejected ​​by $2, please check the RLIS system.\n\nTransfer To : $3\nAmount      : Rp. $4\nDescription : $5\nRejected reason : $6\n\nNote: Please do not reply this message.\n\nRegards,\n\n\nSystem Administrator', '2013-04-03 14:29:34', '2013-04-03 14:30:05', 'imam', 'imam'),
(10, 'CPV MIRO', 'CPV Ready To Create From MIRO', 'MIRO No. $1 has been created ​​by $2, please check the RLIS system.\r\n\r\nNo. PO       : $3\r\nQty          : $4 L\r\nRounding Disc: Rp. $6\r\nTotal Amount : Rp. $5\r\n\r\nNote: Please do not reply this message.\r\n\r\nRegards,\r\n\r\n\r\nSystem Administrator', '2013-04-03 15:23:03', '2013-05-15 10:43:38', 'imam', 'imam'),
(11, 'MIRO Accounting', 'MIGO Notification', 'MIGO No. $1 has been created ​​by $2, please check the RLIS system.\r\n\r\nNo. PO       : $3\r\nQty          : $4 L\r\nRounding Disc: Rp. $6\r\nPPN          : Rp. $7\r\nTotal Amount : Rp. $5\r\n\r\nNote: Please do not reply this message.\r\n\r\nRegards,\r\n\r\n\r\nSystem Administrator', '2013-04-04 10:58:05', '2013-05-15 16:00:39', 'imam', 'imam');

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

--
-- Table structure for table `m_op`
--

CREATE TABLE IF NOT EXISTS `m_op` (
  `idop` int(11) NOT NULL AUTO_INCREMENT,
  `c_amt_bapi` int(20) NOT NULL COMMENT 'Harga per liter saat transaksi',
  `opnumb` varchar(20) NOT NULL COMMENT 'No. OP',
  `prnumb` varchar(20) NOT NULL COMMENT 'No. PR',
  `type` varchar(15) NOT NULL COMMENT 'Type Penjual',
  `invoice` varchar(10) NOT NULL COMMENT 'no kwitansi',
  `idsupp` int(5) NOT NULL COMMENT 'ID Supplier',
  `idtrans` int(5) NOT NULL COMMENT 'ID Transporter',
  `vol` int(10) NOT NULL COMMENT 'Volume Pembelian',
  `vnumb` varchar(10) NOT NULL COMMENT 'No Polisi Kendaraan',
  `total` double NOT NULL COMMENT 'Total Biaya',
  `pur` int(30) NOT NULL,
  `fee` int(30) NOT NULL,
  `donumb` varchar(20) NOT NULL COMMENT 'No Surat Jalan',
  `mnfst` varchar(20) NOT NULL COMMENT 'No Manifest',
  `inf` varchar(200) NOT NULL COMMENT 'Keterangan',
  `ambil` int(1) NOT NULL COMMENT 'Ambil dari PC = 1 atau SALDO BANK = 2',
  `nocpvform` varchar(100) DEFAULT NULL COMMENT 'Jika ambil dari bank NO. CPV nya diinput',
  `tax` int(1) NOT NULL COMMENT '0 = Non PPN, 1 = PPN',
  `chdate` date NOT NULL COMMENT 'Tanggal Edit',
  `adddate` datetime NOT NULL COMMENT 'Tanggal Input',
  `addby` varchar(20) NOT NULL COMMENT 'Di input oleh',
  `chby` varchar(20) NOT NULL COMMENT 'Di Edit Oleh',
  `year` year(4) NOT NULL COMMENT 'Tahun',
  `idcab` int(10) NOT NULL COMMENT 'ID cabang',
  `quantity` int(10) NOT NULL COMMENT 'Quantity PR',
  `cancel` int(11) NOT NULL COMMENT 'Cancel = 1',
  `closed` int(11) NOT NULL COMMENT 'Closed 1, Available 0',
  PRIMARY KEY (`idop`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=20 ;

--
-- Dumping data for table `m_op`
--

INSERT INTO `m_op` (`idop`, `c_amt_bapi`, `opnumb`, `prnumb`, `type`, `invoice`, `idsupp`, `idtrans`, `vol`, `vnumb`, `total`, `pur`, `fee`, `donumb`, `mnfst`, `inf`, `ambil`, `nocpvform`, `tax`, `chdate`, `adddate`, `addby`, `chby`, `year`, `idcab`, `quantity`, `cancel`, `closed`) VALUES
(1, 3000, 'OP/18/05/13/3', '9800000011', 'Sumber', 'xxxxxxxxxx', 1, 1, 5000, 'B 1234 NN', 48000000, 10000000, 0, 'xxxxxxxxxx', 'xxxxxxxxxxx', 'xxxxx', 0, '', 0, '0000-00-00', '2013-05-14 15:22:34', 'dini', '0', 2013, 3, 16000, 0, 0),
(2, 3000, 'OP/19/05/13/3', '9800000011', 'Sumber', 'xxxxxxxxxx', 1, 2, 10000, 'B 7777 IT', 48000000, 11000000, 0, 'xxxxxxxxxxx', 'xxxxxxxxxxx', '', 0, '', 0, '0000-00-00', '2013-05-14 15:23:33', 'dini', '0', 2013, 3, 16000, 0, 0),
(3, 3000, 'OP/20/05/13/3', '9800000011', '0', 'xxxxxxxxxx', 0, 0, 0, '0', 48000000, 0, 475000, '0', '0', 'Biaya security', 0, '', 0, '0000-00-00', '2013-05-14 15:24:13', 'dini', '0', 2013, 3, 16000, 0, 0),
(4, 1000, 'OP/21/05/13/3', '9800000012', 'Sumber', 'xxxxxxxxxx', 1, 1, 5500, 'B 1234 NN', 16000000, 5000000, 0, 'xxxxxxxxxxx', 'xxxxxxxxx', '', 0, '', 0, '0000-00-00', '2013-05-14 15:40:48', 'dini', '0', 2013, 3, 16000, 0, 0),
(5, 1000, 'OP/23/05/13/3', '9800000012', '0', 'xxxxxxxxxx', 0, 0, 0, '0', 16000000, 0, 350000, '0', '0', 'xxxxxxx', 0, '', 0, '0000-00-00', '2013-05-14 15:41:43', 'dini', '0', 2013, 3, 16000, 0, 0),
(7, 3000, 'OP/26/05/13/3', '9800000013', 'Sumber', 'xxxxxxxxxx', 1, 1, 16000, 'B 1234 NN', 48000000, 10000000, 0, 'xxxxxxxxxxx', 'xxxxxxxxxx', 'Test', 1, NULL, 0, '0000-00-00', '2013-05-15 10:02:45', 'dini', '0', 2013, 3, 16000, 0, 0),
(8, 3000, 'OP/27/05/13/3', '9800000013', '0', 'xxxxxxxxx', 0, 0, 0, '0', 48000000, 0, 500000, '0', '0', 'Test', 0, NULL, 0, '0000-00-00', '2013-05-15 10:12:19', 'dini', '0', 2013, 3, 16000, 0, 0),
(9, 3000, 'OP/28/05/13/3', '9800000014', 'Sumber', 'xxxxxxxxxx', 1, 1, 5000, 'B 1234 NN', 48000000, 1000000, 0, 'xxxxxxxxx', 'xxxxxxxxxxxx', 'xxxxxxxx', 1, NULL, 0, '0000-00-00', '2013-05-15 10:41:14', 'dini', '0', 2013, 3, 16000, 0, 0),
(10, 3000, 'OP/29/05/13/3', '9800000015', 'Sumber', 'xxxxxxxx', 1, 2, 10000, 'B 7777 IT', 48000000, 10000000, 0, 'xxxxxx', 'xxxxxxxxxx', 'Test', 1, NULL, 0, '0000-00-00', '2013-05-15 12:43:13', 'dini', '0', 2013, 3, 16000, 0, 0),
(14, 3000, 'OP/33/05/13/3', '9800000016', 'Sumber', 'xxxxxxxxx', 30200, 1, 13500, 'B 1234 NN', 48000000, 11000000, 0, 'xxxxx', 'xxxxxx', 'Test', 1, NULL, 0, '0000-00-00', '2013-05-15 15:33:42', 'dini', '0', 2013, 3, 16000, 0, 0),
(15, 3000, 'OP/34/05/13/3', '9800000017', 'Sumber', 'xxxxxxxxxx', 30000, 2, 13500, 'B 7777 IT', 48000000, 11000000, 0, 'xxxxxxxxxx', 'xxxxxxxxxxx', 'xxxx', 1, NULL, 0, '0000-00-00', '2013-05-15 15:46:45', 'dini', '0', 2013, 3, 16000, 0, 0),
(16, 3200, 'OP/35/05/13/3', '9800000018', 'Sumber', 'xxxxxxxxxx', 30002, 1, 13500, 'B 1234 NN', 51200000, 11000000, 0, 'xxxxxxxxx', 'xxxxxxxxxxxx', 'xxxxx', 1, NULL, 0, '0000-00-00', '2013-05-15 16:06:49', 'dini', '0', 2013, 3, 16000, 0, 0),
(17, 3000, 'OP/36/05/13/3', '9800000019', 'Sumber', 'xxxxxxxxxx', 30200, 1, 13500, 'B 1234 NN', 48000000, 11000000, 0, 'xxxxxxxx', 'xxxxxxxx', 'Test', 1, NULL, 0, '0000-00-00', '2013-05-15 17:15:41', 'dini', '0', 2013, 3, 16000, 0, 0),
(18, 3000, 'OP/37/05/13/3', '9800000020', 'Sumber', 'xxxxxxxxxx', 30200, 1, 13500, 'B 1234 NN', 48000000, 11000000, 0, 'xxxxxx', 'xxxxxxxxxxx', 'Test', 1, NULL, 0, '0000-00-00', '2013-05-15 17:21:44', 'dini', '0', 2013, 3, 16000, 0, 0),
(19, 3000, 'OP/38/05/13/3', '9800000021', 'Sumber', 'xxxxxxxxxx', 30200, 1, 16000, 'B 1234 NN', 48000000, 11000000, 0, '11111111111111', '111111111111111', 'Test', 1, NULL, 0, '0000-00-00', '2013-05-15 17:23:59', 'dini', '0', 2013, 3, 16000, 0, 0);

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

--
-- Table structure for table `m_pc_trans`
--

CREATE TABLE IF NOT EXISTS `m_pc_trans` (
  `idpctrans` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID petty cash transaction',
  `desc` varchar(100) DEFAULT NULL,
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `chdate` datetime DEFAULT NULL COMMENT 'Tanggal ganti',
  `chby` varchar(10) DEFAULT NULL COMMENT 'Diubah oleh',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  PRIMARY KEY (`idpctrans`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Table master petty cash transaction type' AUTO_INCREMENT=4 ;

--
-- Dumping data for table `m_pc_trans`
--

INSERT INTO `m_pc_trans` (`idpctrans`, `desc`, `adddate`, `chdate`, `chby`, `addby`) VALUES
(1, 'Direct Transfer', '2013-02-25 09:11:29', NULL, NULL, 'imam'),
(2, 'Trans From MIRO', '2013-02-25 09:12:06', NULL, NULL, 'imam'),
(3, 'PC OP Rembuirsement', '2013-04-29 13:43:20', NULL, NULL, 'imam');

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

--
-- Table structure for table `m_pc_typ`
--

CREATE TABLE IF NOT EXISTS `m_pc_typ` (
  `idpctyp` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID Petty Cash Type',
  `max_trans_amt` double NOT NULL COMMENT 'Nilai maksimal yang ditransfer',
  `desc` varchar(100) DEFAULT NULL,
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `chdate` datetime DEFAULT NULL COMMENT 'Tanggal ganti',
  `chby` varchar(10) DEFAULT NULL COMMENT 'Diubah oleh',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  PRIMARY KEY (`idpctyp`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Table master petty cash type' AUTO_INCREMENT=3 ;

--
-- Dumping data for table `m_pc_typ`
--

INSERT INTO `m_pc_typ` (`idpctyp`, `max_trans_amt`, `desc`, `adddate`, `chdate`, `chby`, `addby`) VALUES
(0, 100000000000000, 'Petty Cash', '2013-04-26 08:55:58', NULL, NULL, 'imam'),
(1, 150000000, 'Petty Cash Used Oil', '2013-02-25 09:13:00', NULL, NULL, 'imam'),
(2, 5000000, 'Petty Cash Operational', '2013-04-10 10:25:15', NULL, NULL, 'Imam');

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

--
-- Table structure for table `m_supp`
--

CREATE TABLE IF NOT EXISTS `m_supp` (
  `idsupp` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID Supplier',
  `suppname` varchar(50) NOT NULL COMMENT 'Nama Supplier',
  `idcab` int(11) NOT NULL COMMENT 'ID Cabang',
  `addr` text COMMENT 'Alamat supplier',
  `city` varchar(50) DEFAULT NULL COMMENT 'Kota',
  `prov` varchar(50) DEFAULT NULL COMMENT 'Propinsi',
  `pic` varchar(50) DEFAULT NULL COMMENT 'PIC',
  `phone` char(20) DEFAULT NULL COMMENT 'No. telp',
  `fax` char(20) DEFAULT NULL COMMENT 'No. Fax',
  `noijin` varchar(50) DEFAULT NULL COMMENT 'No. ijin supplier',
  `status` int(11) DEFAULT NULL COMMENT 'Status aktive. 0 :Tidak aktive, 1: aktive',
  `idgroup` int(11) DEFAULT NULL COMMENT 'Kategori group supplier',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `chdate` datetime DEFAULT NULL COMMENT 'Tanggal ganti',
  `chby` varchar(10) DEFAULT NULL COMMENT 'Diubah oleh',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  `codevendor` varchar(20) NOT NULL COMMENT 'Kode Vendor di SAP',
  PRIMARY KEY (`idsupp`,`idcab`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Table supplier' AUTO_INCREMENT=4 ;

--
-- Dumping data for table `m_supp`
--

INSERT INTO `m_supp` (`idsupp`, `suppname`, `idcab`, `addr`, `city`, `prov`, `pic`, `phone`, `fax`, `noijin`, `status`, `idgroup`, `adddate`, `chdate`, `chby`, `addby`, `codevendor`) VALUES
(1, 'Supplier 1', 3, 'Jl Supplier 1 no 32', 'Jakarta', 'DKI Jakarta', 'Imam', '647364758', '94857603', 'Ijin 123456', 1, NULL, '2013-04-16 09:30:36', '0000-00-00 00:00:00', '0', 'test', 'SAP Vendor'),
(3, 'Supplier 2', 3, 'Jl. Rusak Bolong - Bolong no 3', 'Bekasi', 'Jawa Barat', 'Rony A', '23445', '34563546', '3456234', 1, NULL, '2013-04-26 10:18:18', '0000-00-00 00:00:00', '0', 'dini', 'SAP');

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

--
-- Table structure for table `m_suppgrp`
--

CREATE TABLE IF NOT EXISTS `m_suppgrp` (
  `idgroup` int(11) NOT NULL AUTO_INCREMENT,
  `desc` varchar(50) DEFAULT NULL,
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `chdate` datetime DEFAULT NULL COMMENT 'Tanggal ganti',
  `chby` varchar(10) DEFAULT NULL COMMENT 'Diubah oleh',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  PRIMARY KEY (`idgroup`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Table master group supplier' AUTO_INCREMENT=3 ;

--
-- Dumping data for table `m_suppgrp`
--

INSERT INTO `m_suppgrp` (`idgroup`, `desc`, `adddate`, `chdate`, `chby`, `addby`) VALUES
(2, 'SUPPLIER DGN IZIN', '2013-02-05 14:39:54', '2013-02-12 16:46:01', 'imam', 'imam');

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

--
-- Table structure for table `m_supptype`
--

CREATE TABLE IF NOT EXISTS `m_supptype` (
  `idtype` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID Type Supplier',
  `type` varchar(10) NOT NULL COMMENT 'Type Supplier',
  `info` varchar(200) NOT NULL COMMENT 'Info Type',
  `limit` int(20) NOT NULL COMMENT 'Limit Pembelian Oli',
  `active` int(11) NOT NULL COMMENT 'Status active / inactive',
  PRIMARY KEY (`idtype`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `m_supptype`
--

INSERT INTO `m_supptype` (`idtype`, `type`, `info`, `limit`, `active`) VALUES
(1, 'Corporate', 'Mempunyai Ijin', 0, 1),
(2, 'Collector', 'Tidak mempunyai ijin dan bisa menjual banyak', 0, 1),
(3, 'Other', 'Pengoser dan tidak mempunyai ijin', 3000, 1);

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

--
-- Table structure for table `m_transport`
--

CREATE TABLE IF NOT EXISTS `m_transport` (
  `idtrans` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID Transporter',
  `idcab` int(11) NOT NULL COMMENT 'ID Cabang',
  `name` varchar(100) DEFAULT NULL COMMENT 'Nama transporter',
  `addr` text COMMENT 'Alamat transporter',
  `vnumb` varchar(10) NOT NULL,
  `mbrekomklh` date NOT NULL,
  `mbijindarat` date NOT NULL,
  `mbstnk` date NOT NULL,
  `mbpajak` date NOT NULL,
  `mbkir` date NOT NULL,
  `fax` int(12) NOT NULL COMMENT 'Fax',
  `city` varchar(20) NOT NULL COMMENT 'Kota',
  `phone` char(20) DEFAULT NULL COMMENT 'No. telp transporter',
  `pic` varchar(50) DEFAULT NULL COMMENT 'PIC Transporter',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `chdate` datetime DEFAULT NULL COMMENT 'Tanggal ganti',
  `chby` varchar(10) DEFAULT NULL COMMENT 'Diubah oleh',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  `status` int(11) NOT NULL COMMENT 'Status wgi : 1, luar : 0',
  `prov` varchar(20) NOT NULL COMMENT 'Province',
  PRIMARY KEY (`idtrans`,`idcab`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Table master transpoter' AUTO_INCREMENT=3 ;

--
-- Dumping data for table `m_transport`
--

INSERT INTO `m_transport` (`idtrans`, `idcab`, `name`, `addr`, `vnumb`, `mbrekomklh`, `mbijindarat`, `mbstnk`, `mbpajak`, `mbkir`, `fax`, `city`, `phone`, `pic`, `adddate`, `chdate`, `chby`, `addby`, `status`, `prov`) VALUES
(1, 3, 'Transporter 1', 'Jl. Sedang Bingung 1 no 66', 'B 1234 NN', '2006-04-20', '2009-04-20', '2009-04-20', '2007-04-20', '2007-04-20', 2147483647, 'Jakarta', '923274954724', 'Willy FR', '2013-04-16 09:33:10', NULL, NULL, 'test', 1, 'DKI Jakarta'),
(2, 3, 'Transporter 2', 'Jl. Lemah Gemulai 1000 no 100', 'B 7777 IT', '2018-04-20', '2011-04-20', '2024-04-20', '2025-04-20', '2024-04-20', 4567634, 'Bekasi', '345665', 'Willy', '2013-04-26 15:43:36', NULL, NULL, 'dini', 1, 'Jawa Barat');

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

--
-- Table structure for table `notgrp_member`
--

CREATE TABLE IF NOT EXISTS `notgrp_member` (
  `idnotgrp` int(11) DEFAULT NULL COMMENT 'Notification group ID',
  `notgrp_uid` varchar(10) DEFAULT NULL COMMENT 'Notification group member',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table email notification group';

--
-- Dumping data for table `notgrp_member`
--

INSERT INTO `notgrp_member` (`idnotgrp`, `notgrp_uid`, `adddate`, `addby`) VALUES
(6, 'imam', '2013-02-12 16:26:50', 'imam'),
(6, 'roberthus', '2013-02-12 16:26:50', 'imam'),
(6, 'test', '2013-02-12 16:26:50', 'imam'),
(5, 'imam', '2013-02-13 08:57:49', 'imam'),
(7, 'imam', '2013-04-03 14:29:51', 'imam'),
(7, 'roberthus', '2013-04-03 14:29:51', 'imam'),
(8, 'imam', '2013-04-03 14:29:57', 'imam'),
(8, 'roberthus', '2013-04-03 14:29:57', 'imam'),
(9, 'imam', '2013-04-03 14:30:05', 'imam'),
(9, 'roberthus', '2013-04-03 14:30:05', 'imam'),
(10, 'imam', '2013-05-15 10:43:38', 'imam'),
(10, 'roberthus', '2013-05-15 10:43:38', 'imam'),
(11, 'imam', '2013-05-15 16:00:39', 'imam'),
(11, 'roberthus', '2013-05-15 16:00:39', 'imam');

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

--
-- Table structure for table `role_menu`
--

CREATE TABLE IF NOT EXISTS `role_menu` (
  `roleid` int(3) NOT NULL COMMENT 'Role ID',
  `mid` int(3) NOT NULL COMMENT 'Menu ID',
  `crby` varchar(10) NOT NULL COMMENT 'Dibuat oleh',
  `crdate` date NOT NULL COMMENT 'Tgl buat',
  `crtime` time NOT NULL COMMENT 'Jam buat',
  PRIMARY KEY (`roleid`,`mid`),
  KEY `mid` (`mid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Menu role';

--
-- Dumping data for table `role_menu`
--

INSERT INTO `role_menu` (`roleid`, `mid`, `crby`, `crdate`, `crtime`) VALUES
(12, 25, 'roberthus', '2013-05-13', '09:35:49'),
(12, 26, 'roberthus', '2013-05-13', '09:35:49'),
(12, 44, 'roberthus', '2013-05-13', '09:35:49'),
(12, 45, 'roberthus', '2013-05-13', '09:35:49'),
(12, 46, 'roberthus', '2013-05-13', '09:35:49'),
(12, 47, 'roberthus', '2013-05-13', '09:35:49'),
(12, 48, 'roberthus', '2013-05-13', '09:35:49'),
(12, 49, 'roberthus', '2013-05-13', '09:35:49'),
(12, 50, 'roberthus', '2013-05-13', '09:35:49'),
(12, 54, 'roberthus', '2013-05-13', '09:35:49'),
(12, 55, 'roberthus', '2013-05-13', '09:35:49'),
(12, 56, 'roberthus', '2013-05-13', '09:35:49'),
(12, 57, 'roberthus', '2013-05-13', '09:35:49'),
(12, 59, 'roberthus', '2013-05-13', '09:35:49'),
(12, 60, 'roberthus', '2013-05-13', '09:35:49'),
(12, 61, 'roberthus', '2013-05-13', '09:35:49'),
(12, 62, 'roberthus', '2013-05-13', '09:35:49'),
(12, 76, 'roberthus', '2013-05-13', '09:35:49'),
(12, 77, 'roberthus', '2013-05-13', '09:35:49'),
(12, 78, 'roberthus', '2013-05-13', '09:35:49'),
(12, 79, 'roberthus', '2013-05-13', '09:35:49'),
(12, 80, 'roberthus', '2013-05-13', '09:35:49'),
(12, 81, 'roberthus', '2013-05-13', '09:35:49'),
(12, 82, 'roberthus', '2013-05-13', '09:35:49'),
(12, 83, 'roberthus', '2013-05-13', '09:35:49'),
(12, 85, 'roberthus', '2013-05-13', '09:35:49'),
(12, 86, 'roberthus', '2013-05-13', '09:35:49'),
(12, 87, 'roberthus', '2013-05-13', '09:35:49'),
(12, 88, 'roberthus', '2013-05-13', '09:35:49'),
(12, 90, 'roberthus', '2013-05-13', '09:35:49'),
(12, 91, 'roberthus', '2013-05-13', '09:35:49'),
(12, 92, 'roberthus', '2013-05-13', '09:35:49'),
(12, 93, 'roberthus', '2013-05-13', '09:35:49'),
(12, 100, 'roberthus', '2013-05-13', '09:35:49'),
(12, 101, 'roberthus', '2013-05-13', '09:35:49'),
(12, 102, 'roberthus', '2013-05-13', '09:35:49'),
(12, 103, 'roberthus', '2013-05-13', '09:35:49'),
(12, 104, 'roberthus', '2013-05-13', '09:35:49'),
(12, 106, 'roberthus', '2013-05-13', '09:35:49'),
(12, 107, 'roberthus', '2013-05-13', '09:35:49'),
(12, 108, 'roberthus', '2013-05-13', '09:35:49'),
(12, 110, 'roberthus', '2013-05-13', '09:35:49'),
(13, 25, 'imam', '2013-05-13', '12:19:43'),
(13, 26, 'imam', '2013-05-13', '12:19:43'),
(13, 63, 'imam', '2013-05-13', '12:19:43'),
(13, 64, 'imam', '2013-05-13', '12:19:43'),
(13, 68, 'imam', '2013-05-13', '12:19:43'),
(13, 69, 'imam', '2013-05-13', '12:19:43'),
(13, 70, 'imam', '2013-05-13', '12:19:43'),
(13, 71, 'imam', '2013-05-13', '12:19:43'),
(13, 73, 'imam', '2013-05-13', '12:19:43'),
(13, 86, 'imam', '2013-05-13', '12:19:43'),
(13, 109, 'imam', '2013-05-13', '12:19:43'),
(14, 25, 'roberthus', '2013-05-13', '09:40:14'),
(14, 26, 'roberthus', '2013-05-13', '09:40:14'),
(14, 63, 'roberthus', '2013-05-13', '09:40:14'),
(14, 64, 'roberthus', '2013-05-13', '09:40:14'),
(14, 68, 'roberthus', '2013-05-13', '09:40:14'),
(14, 69, 'roberthus', '2013-05-13', '09:40:14'),
(14, 70, 'roberthus', '2013-05-13', '09:40:14'),
(14, 71, 'roberthus', '2013-05-13', '09:40:14'),
(14, 72, 'roberthus', '2013-05-13', '09:40:14'),
(14, 73, 'roberthus', '2013-05-13', '09:40:14'),
(14, 86, 'roberthus', '2013-05-13', '09:40:14'),
(14, 109, 'roberthus', '2013-05-13', '09:40:14'),
(15, 25, 'roberthus', '2013-05-13', '09:40:28'),
(15, 26, 'roberthus', '2013-05-13', '09:40:28'),
(15, 74, 'roberthus', '2013-05-13', '09:40:28'),
(15, 75, 'roberthus', '2013-05-13', '09:40:28'),
(15, 84, 'roberthus', '2013-05-13', '09:40:28'),
(15, 86, 'roberthus', '2013-05-13', '09:40:28'),
(15, 89, 'roberthus', '2013-05-13', '09:40:28'),
(16, 25, 'roberthus', '2013-05-13', '09:38:45'),
(16, 26, 'roberthus', '2013-05-13', '09:38:45'),
(16, 86, 'roberthus', '2013-05-13', '09:38:45'),
(16, 95, 'roberthus', '2013-05-13', '09:38:45'),
(16, 96, 'roberthus', '2013-05-13', '09:38:45'),
(16, 97, 'roberthus', '2013-05-13', '09:38:45'),
(16, 98, 'roberthus', '2013-05-13', '09:38:45'),
(16, 99, 'roberthus', '2013-05-13', '09:38:45'),
(16, 105, 'roberthus', '2013-05-13', '09:38:45'),
(17, 95, 'roberthus', '2013-05-13', '09:38:07'),
(17, 96, 'roberthus', '2013-05-13', '09:38:07'),
(17, 97, 'roberthus', '2013-05-13', '09:38:07'),
(17, 98, 'roberthus', '2013-05-13', '09:38:07'),
(17, 99, 'roberthus', '2013-05-13', '09:38:07'),
(17, 105, 'roberthus', '2013-05-13', '09:38:07');

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

--
-- Table structure for table `t_bankbal`
--

CREATE TABLE IF NOT EXISTS `t_bankbal` (
  `idcab` int(11) NOT NULL DEFAULT '0' COMMENT 'ID Cabang',
  `sap_ref` varchar(100) NOT NULL DEFAULT '' COMMENT 'No. referensi transaksi SAP',
  `rlis_ref` varchar(100) NOT NULL COMMENT 'No. referensi transaksi RLIS',
  `amount` double DEFAULT NULL COMMENT 'Jumlah uang',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  PRIMARY KEY (`idcab`,`sap_ref`,`rlis_ref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table saldo Bank';

--
-- Dumping data for table `t_bankbal`
--

INSERT INTO `t_bankbal` (`idcab`, `sap_ref`, `rlis_ref`, `amount`, `adddate`, `addby`) VALUES
(3, '0100004480WGI12013', 'CPV/7/05/13/1', 150000000, '2013-05-14 15:20:27', 'imam'),
(3, '0100004481WGI12013', 'CPV/13/05/13/3', -50000000, '2013-05-14 15:21:27', 'dini'),
(3, '0100004482WGI12013', 'CPV/14/05/13/3', -100000000, '2013-05-15 12:36:25', 'dini'),
(3, '1500001271', 'CPV/8/05/13/1', 5350000, '2013-05-14 17:06:47', 'imam');

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

--
-- Table structure for table `t_bpkk_detail`
--

CREATE TABLE IF NOT EXISTS `t_bpkk_detail` (
  `idcab` int(11) NOT NULL COMMENT 'ID Cabang',
  `nobpkk` int(11) NOT NULL COMMENT 'No BPKK',
  `year` year(4) NOT NULL COMMENT 'Tahun',
  `itemno` int(11) NOT NULL COMMENT 'No. Item',
  `uraian` varchar(100) NOT NULL COMMENT 'Uraian',
  `total_item` double NOT NULL COMMENT 'Total ITEM',
  `glacc` char(10) NOT NULL COMMENT 'G/L Account',
  PRIMARY KEY (`idcab`,`nobpkk`,`year`,`itemno`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Table BPKK (Petty Cash Operational) Detail';

--
-- Dumping data for table `t_bpkk_detail`
--


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

--
-- Table structure for table `t_bpkk_header`
--

CREATE TABLE IF NOT EXISTS `t_bpkk_header` (
  `idcab` int(11) NOT NULL COMMENT 'ID Cabang',
  `nobpkk` int(11) NOT NULL COMMENT 'No. BPKK',
  `nobpkkform` varchar(100) NOT NULL COMMENT 'No. Format BPKK',
  `total` double NOT NULL COMMENT 'Total',
  `status` int(1) NOT NULL COMMENT '1 = Cancel, 2=Post To Finance',
  `candesc` text NOT NULL,
  `canby` varchar(10) NOT NULL,
  `candate` datetime NOT NULL,
  `addby` varchar(10) NOT NULL COMMENT 'Dibuat oleh',
  `adddate` datetime NOT NULL COMMENT 'Tgl Buat',
  `chby` varchar(10) NOT NULL COMMENT 'Diubah oleh',
  `chdate` datetime NOT NULL COMMENT 'Tgl Ubah',
  `year` year(4) NOT NULL COMMENT 'Tahun',
  PRIMARY KEY (`idcab`,`nobpkk`,`year`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Table BPKK (Petty Cash Operational) Header';

--
-- Dumping data for table `t_bpkk_header`
--


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

--
-- Table structure for table `t_count`
--

CREATE TABLE IF NOT EXISTS `t_count` (
  `idcab` int(11) NOT NULL,
  `bpb_count` int(11) DEFAULT NULL COMMENT 'Counter BPB',
  `pc_count` int(11) DEFAULT NULL COMMENT 'Petty cash counter',
  `op_count` int(11) NOT NULL,
  `opc_count` int(11) NOT NULL,
  `ba_count` int(11) NOT NULL,
  `sj_count` int(11) NOT NULL,
  `bpkk_count` int(11) NOT NULL COMMENT 'Counter BPKK',
  `rmb_count` int(11) NOT NULL COMMENT 'Rembuirsement Count',
  `year` year(4) DEFAULT NULL,
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `chdate` datetime DEFAULT NULL COMMENT 'Tanggal ganti',
  `chby` varchar(10) DEFAULT NULL COMMENT 'Diubah oleh',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  PRIMARY KEY (`idcab`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table transaksi counter';

--
-- Dumping data for table `t_count`
--

INSERT INTO `t_count` (`idcab`, `bpb_count`, `pc_count`, `op_count`, `opc_count`, `ba_count`, `sj_count`, `bpkk_count`, `rmb_count`, `year`, `adddate`, `chdate`, `chby`, `addby`) VALUES
(1, 8, 0, 0, 0, 0, 0, 0, 0, 2013, '2013-04-19 15:26:55', '2013-05-14 16:55:44', 'novika', 'Imam'),
(3, 15, 15, 38, 0, 2, 3, 5, 2, 2013, NULL, '2013-05-15 17:23:59', 'dini', 'Imam');

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

--
-- Table structure for table `t_cpv`
--

CREATE TABLE IF NOT EXISTS `t_cpv` (
  `nocpv` int(11) NOT NULL COMMENT 'No. CPV',
  `idcab` int(11) NOT NULL COMMENT 'ID Cabang',
  `year` year(4) NOT NULL COMMENT 'Fiscal year',
  `nocpvform` varchar(100) NOT NULL COMMENT 'No. CPV Format',
  `nocpdu` varchar(100) NOT NULL,
  `miro` char(10) DEFAULT NULL COMMENT 'No. Miro',
  `amount_trf` double DEFAULT NULL COMMENT 'Jumlah yg ditransfer',
  `amount_req` double DEFAULT NULL COMMENT 'Jumlah transfer yang diminta',
  `desc` text COMMENT 'Keterangan',
  `status` int(1) DEFAULT NULL COMMENT 'Status doc. 0: pending, 1: approve, 2: cancel',
  `pctyp` int(1) NOT NULL COMMENT 'Petty cash type . 0: PC Uo, 1: PC Op',
  `descan` text COMMENT 'Keterangan cancel',
  `pctrans` int(1) NOT NULL COMMENT 'jenis BPB, 1: Direct, 2: Reference by MIRO',
  `bankrefno` varchar(20) NOT NULL COMMENT 'Bank Reference Number',
  `chdate` datetime DEFAULT NULL COMMENT 'Tanggal ganti',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  `chby` varchar(10) DEFAULT NULL COMMENT 'Diubah oleh',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `appby` varchar(10) DEFAULT NULL COMMENT 'Diapprove oleh',
  `appdate` datetime DEFAULT NULL COMMENT 'Tgl approve',
  `canby` varchar(10) DEFAULT NULL COMMENT 'Dicancel oleh',
  `candate` datetime DEFAULT NULL COMMENT 'Tgl cancel',
  `accglpost` int(1) NOT NULL COMMENT 'Status G/L account post by accounting. 0: No, 1: yes',
  `accglpostby` varchar(10) NOT NULL COMMENT 'G/L Post by',
  `accglpostdate` datetime NOT NULL COMMENT 'G/L Post date',
  `accglno` char(20) NOT NULL,
  PRIMARY KEY (`nocpv`,`idcab`,`year`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table CPV Finance';

--
-- Dumping data for table `t_cpv`
--

INSERT INTO `t_cpv` (`nocpv`, `idcab`, `year`, `nocpvform`, `nocpdu`, `miro`, `amount_trf`, `amount_req`, `desc`, `status`, `pctyp`, `descan`, `pctrans`, `bankrefno`, `chdate`, `addby`, `chby`, `adddate`, `appby`, `appdate`, `canby`, `candate`, `accglpost`, `accglpostby`, `accglpostdate`, `accglno`) VALUES
(7, 3, 2013, 'CPV/7/05/13/1', 'CPDU/XXX/XXX/XXX', NULL, 150000000, NULL, 'Test', 1, 0, NULL, 1, '1111111111111111', '2013-05-14 15:20:19', 'imam', 'imam', '2013-05-14 15:19:55', 'imam', '2013-05-14 15:20:05', NULL, NULL, 1, 'imam', '2013-05-14 15:20:27', '0100004480WGI12013'),
(8, 3, 2013, 'CPV/8/05/13/1', 'CP/XXXX/XXXX/XX', NULL, 5350000, NULL, 'Test', 1, 1, NULL, 2, '111111111111111', '2013-05-14 16:56:15', 'novika', 'imam', '2013-05-14 16:55:44', 'imam', '2013-05-14 16:56:01', NULL, NULL, 1, 'imam', '2013-05-14 17:06:47', '1500001271');

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

--
-- Table structure for table `t_dn`
--

CREATE TABLE IF NOT EXISTS `t_dn` (
  `iddn` int(11) NOT NULL AUTO_INCREMENT,
  `dnnumb` varchar(15) COLLATE latin1_general_ci NOT NULL,
  `mnfst` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
  `vnumb` varchar(10) COLLATE latin1_general_ci DEFAULT NULL,
  `noiso` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
  `vol` int(50) DEFAULT NULL,
  `quantity` int(50) DEFAULT NULL,
  `idtrans` int(10) DEFAULT NULL,
  `eta` date DEFAULT NULL,
  `seal1` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
  `seal2` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
  `seal3` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
  `seal4` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
  `seal5` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
  `seal6` varchar(20) COLLATE latin1_general_ci DEFAULT NULL,
  `driver` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
  `type` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
  `status` int(1) NOT NULL,
  `idcab` int(11) NOT NULL,
  `chby` varchar(20) COLLATE latin1_general_ci NOT NULL,
  `inf` varchar(50) COLLATE latin1_general_ci NOT NULL,
  `year` year(4) NOT NULL,
  `matdoc` varchar(10) COLLATE latin1_general_ci NOT NULL,
  `adddate` datetime NOT NULL,
  `addby` varchar(10) COLLATE latin1_general_ci NOT NULL,
  `chdate` datetime NOT NULL,
  PRIMARY KEY (`iddn`,`dnnumb`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=2 ;

--
-- Dumping data for table `t_dn`
--

INSERT INTO `t_dn` (`iddn`, `dnnumb`, `mnfst`, `vnumb`, `noiso`, `vol`, `quantity`, `idtrans`, `eta`, `seal1`, `seal2`, `seal3`, `seal4`, `seal5`, `seal6`, `driver`, `type`, `status`, `idcab`, `chby`, `inf`, `year`, `matdoc`, `adddate`, `addby`, `chdate`) VALUES
(1, 'SJ/3/05/13/3', 'xxxxxxxxxx', 'B 1234 NN', 'xxxxxx', 16000, 0, 1, '2014-05-20', 'xxxx', 'xxx', 'xxxx', 'xxxx', '0', '0', 'xxxx', 'Truck', 0, 3, '', 'test', 2013, '4900400497', '2013-05-14 17:12:34', 'dini', '0000-00-00 00:00:00');

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

--
-- Table structure for table `t_pcbal`
--

CREATE TABLE IF NOT EXISTS `t_pcbal` (
  `idcab` int(11) NOT NULL DEFAULT '0',
  `ref` varchar(100) NOT NULL DEFAULT '' COMMENT 'Referensi transaksi',
  `amount` double DEFAULT NULL COMMENT 'Jumlah uang',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  PRIMARY KEY (`idcab`,`ref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table saldo petty cash balance';

--
-- Dumping data for table `t_pcbal`
--

INSERT INTO `t_pcbal` (`idcab`, `ref`, `amount`, `adddate`, `addby`) VALUES
(3, 'CPV/13/05/13/3', 50000000, '2013-05-14 15:21:27', 'dini'),
(3, 'CPV/14/05/13/3', 100000000, '2013-05-15 12:36:25', 'dini'),
(3, 'OP/18/05/13/3', -10000000, '2013-05-14 15:22:34', 'dini'),
(3, 'OP/19/05/13/3', -11000000, '2013-05-14 15:23:33', 'dini'),
(3, 'OP/20/05/13/3', -475000, '2013-05-14 15:24:13', 'dini'),
(3, 'OP/21/05/13/3', -5000000, '2013-05-14 15:40:48', 'dini'),
(3, 'OP/23/05/13/3', -350000, '2013-05-14 15:41:43', 'dini'),
(3, 'OP/26/05/13/3', -10, '2013-05-15 10:02:45', 'dini'),
(3, 'OP/27/05/13/3', -500, '2013-05-15 10:12:19', 'dini'),
(3, 'OP/28/05/13/3', -1, '2013-05-15 10:41:14', 'dini'),
(3, 'OP/29/05/13/3', -10000000, '2013-05-15 12:43:13', 'dini'),
(3, 'OP/33/05/13/3', -11000000, '2013-05-15 15:33:41', 'dini'),
(3, 'OP/34/05/13/3', -11000000, '2013-05-15 15:46:45', 'dini'),
(3, 'OP/35/05/13/3', -11000000, '2013-05-15 16:06:49', 'dini'),
(3, 'OP/36/05/13/3', -11000000, '2013-05-15 17:15:41', 'dini'),
(3, 'OP/37/05/13/3', -11000000, '2013-05-15 17:21:44', 'dini'),
(3, 'OP/38/05/13/3', -11000000, '2013-05-15 17:23:59', 'dini');

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

--
-- Table structure for table `t_pcbal_op`
--

CREATE TABLE IF NOT EXISTS `t_pcbal_op` (
  `idcab` int(11) NOT NULL DEFAULT '0',
  `ref` varchar(100) NOT NULL DEFAULT '' COMMENT 'Referensi transaksi',
  `amount` double DEFAULT NULL COMMENT 'Jumlah uang',
  `status` int(1) NOT NULL COMMENT '1 =  Cancel',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  PRIMARY KEY (`idcab`,`ref`,`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table saldo petty cash balance OP';

--
-- Dumping data for table `t_pcbal_op`
--


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

--
-- Table structure for table `t_pc_cab`
--

CREATE TABLE IF NOT EXISTS `t_pc_cab` (
  `nopc` int(11) NOT NULL COMMENT 'No. PC',
  `idcab` int(11) NOT NULL COMMENT 'ID Cabang',
  `year` year(4) NOT NULL,
  `nopcform` varchar(100) NOT NULL COMMENT 'No. PC Format',
  `amount` double DEFAULT NULL COMMENT 'Jumlah yg ditransfer',
  `desc` text COMMENT 'Keterangan',
  `pctyp` int(1) NOT NULL COMMENT '1 = Used Oil, 2 = Operasional',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `accglno` char(20) NOT NULL COMMENT 'No. Journal ACC',
  PRIMARY KEY (`nopc`,`idcab`,`year`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table Petty Cash cabang Used Oil';

--
-- Dumping data for table `t_pc_cab`
--

INSERT INTO `t_pc_cab` (`nopc`, `idcab`, `year`, `nopcform`, `amount`, `desc`, `pctyp`, `addby`, `adddate`, `accglno`) VALUES
(13, 3, 2013, 'CPV/13/05/13/3', 50000000, 'Test', 1, 'dini', '2013-05-14 15:21:27', '0100004481WGI12013'),
(14, 3, 2013, 'CPV/14/05/13/3', 100000000, 'Ambil PC UO', 1, 'dini', '2013-05-15 12:36:25', '0100004482WGI12013'),
(15, 3, 2013, 'CPV/15/05/13/3', 5000000, 'Test', 1, 'dini', '2013-05-15 14:29:11', '0100004483WGI12013');

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

--
-- Table structure for table `t_po`
--

CREATE TABLE IF NOT EXISTS `t_po` (
  `ebeln` char(10) NOT NULL,
  `idcab` int(11) NOT NULL,
  `preq_no` char(10) NOT NULL,
  `mblnr` char(10) NOT NULL,
  `year` year(4) NOT NULL,
  `quantity` int(11) DEFAULT NULL,
  `net_price` double DEFAULT NULL,
  `disc` double NOT NULL COMMENT 'Potongan pembulatan',
  `tax` double NOT NULL COMMENT 'PPN',
  `vendor` char(16) NOT NULL COMMENT 'No. Vendor',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  `miro` char(10) NOT NULL COMMENT 'No. Miro',
  `miraddby` varchar(10) NOT NULL COMMENT 'Miro dibuat oleh',
  `miradddate` datetime NOT NULL COMMENT 'Miro tgl buat',
  `clearno` char(10) NOT NULL COMMENT 'Post Clearing Number',
  `clearaddby` varchar(10) NOT NULL COMMENT 'Clear By',
  `clearadddate` datetime NOT NULL COMMENT 'Clear Date',
  `nocpvform` varchar(100) NOT NULL COMMENT 'No. CPV',
  `cpvaddby` varchar(10) NOT NULL COMMENT 'CPV Dibuat',
  `cpvadddate` datetime NOT NULL COMMENT 'Tgl Buat CPV',
  PRIMARY KEY (`ebeln`,`idcab`,`preq_no`,`mblnr`,`year`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table transaksi PO';

--
-- Dumping data for table `t_po`
--

INSERT INTO `t_po` (`ebeln`, `idcab`, `preq_no`, `mblnr`, `year`, `quantity`, `net_price`, `disc`, `tax`, `vendor`, `adddate`, `addby`, `miro`, `miraddby`, `miradddate`, `clearno`, `clearaddby`, `clearadddate`, `nocpvform`, `cpvaddby`, `cpvadddate`) VALUES
('9900000004', 3, '9800000011', '5000155004', 2013, 15000, 1432, 5000, 0, '30200', '2013-05-14 15:27:12', 'dini', '', '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00'),
('9900000005', 3, '9800000012', '5000155005', 2013, 5500, 973, 1500, 0, '30200', '2013-05-14 15:42:14', 'dini', '5105670701', 'izza', '2013-05-14 16:32:15', '1500001271', 'imam', '2013-05-14 17:06:47', 'CPV/8/05/13/1', 'novika', '2013-05-14 16:55:44'),
('9900000006', 3, '9800000013', '5000155006', 2013, 16000, 657, 12000, 0, '30200', '2013-05-15 10:13:08', 'dini', '5105670703', 'imam', '2013-05-16 10:01:20', '', '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00'),
('9900000007', 3, '9800000014', '5000155007', 2013, 5000, 200, 0, 0, '30200', '2013-05-15 10:41:26', 'dini', '5105670702', 'izza', '2013-05-16 09:44:53', '', '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00'),
('9900000010', 3, '9800000018', '5000155008', 2013, 13500, 815, 2500, 1100000, '10283', '2013-05-15 16:06:57', 'dini', '', '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00'),
('9900000011', 3, '9800000019', '0', 2013, 13500, 815, 2500, 1100000, '30200', '2013-05-15 17:15:47', 'dini', '', '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00'),
('9900000012', 3, '9800000020', '0', 2013, 13500, 815, 2500, 1100000, '30200', '2013-05-15 17:21:47', 'dini', '', '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00'),
('9900000013', 3, '9800000021', '5000155009', 2013, 16000, 688, 8000, 1100000, '30200', '2013-05-15 17:24:04', 'dini', '', '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00');

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

--
-- Table structure for table `t_pr`
--

CREATE TABLE IF NOT EXISTS `t_pr` (
  `preq_no` char(10) NOT NULL COMMENT 'No. PP SAP',
  `idcab` int(11) NOT NULL COMMENT 'ID Cabang',
  `c_amt_bapi` double DEFAULT NULL COMMENT 'Valuation price',
  `quantity` int(11) DEFAULT NULL,
  `closed` int(1) DEFAULT NULL COMMENT 'Closed : 1, Open : 0',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  `chdate` datetime DEFAULT NULL COMMENT 'Tanggal ganti',
  `chby` varchar(10) DEFAULT NULL COMMENT 'Diubah oleh',
  `clby` varchar(10) DEFAULT NULL COMMENT 'Closed by',
  `cldate` datetime DEFAULT NULL COMMENT 'Closed date',
  `year` year(4) DEFAULT NULL COMMENT 'Tahun',
  PRIMARY KEY (`preq_no`,`idcab`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table transaksi PP';

--
-- Dumping data for table `t_pr`
--

INSERT INTO `t_pr` (`preq_no`, `idcab`, `c_amt_bapi`, `quantity`, `closed`, `adddate`, `addby`, `chdate`, `chby`, `clby`, `cldate`, `year`) VALUES
('9800000011', 3, 1432, 15000, 1, '2013-05-14 15:21:59', 'dini', NULL, NULL, 'dini', '2013-05-14 15:27:12', 2013),
('9800000012', 3, 973, 5500, 1, '2013-05-14 15:39:23', 'dini', NULL, NULL, 'dini', '2013-05-14 15:42:14', 2013),
('9800000013', 3, 657, 16000, 1, '2013-05-15 09:43:07', 'dini', NULL, NULL, 'dini', '2013-05-15 10:13:08', 2013),
('9800000014', 3, 200, 5000, 1, '2013-05-15 10:36:10', 'dini', NULL, NULL, 'dini', '2013-05-15 10:41:26', 2013),
('9800000015', 3, 3000, 16000, 0, '2013-05-15 12:36:47', 'dini', NULL, NULL, NULL, NULL, 2013),
('9800000016', 3, 3000, 16000, 0, '2013-05-15 12:36:57', 'dini', NULL, NULL, NULL, NULL, 2013),
('9800000017', 3, 3000, 16000, 0, '2013-05-15 15:46:08', 'dini', NULL, NULL, NULL, NULL, 2013),
('9800000018', 3, 815, 13500, 1, '2013-05-15 16:06:05', 'dini', NULL, NULL, 'dini', '2013-05-15 16:06:57', 2013),
('9800000019', 3, 815, 13500, 1, '2013-05-15 17:15:05', 'dini', NULL, NULL, 'dini', '2013-05-15 17:15:47', 2013),
('9800000020', 3, 815, 13500, 1, '2013-05-15 17:21:06', 'dini', NULL, NULL, 'dini', '2013-05-15 17:21:47', 2013),
('9800000021', 3, 688, 16000, 1, '2013-05-15 17:23:21', 'dini', NULL, NULL, 'dini', '2013-05-15 17:24:04', 2013);

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

--
-- Table structure for table `t_qa`
--

CREATE TABLE IF NOT EXISTS `t_qa` (
  `idqa` int(11) NOT NULL AUTO_INCREMENT,
  `idba` varchar(100) COLLATE latin1_general_ci NOT NULL,
  `sertifikat` varchar(50) COLLATE latin1_general_ci NOT NULL,
  `vol` int(10) NOT NULL,
  `scrap` int(10) NOT NULL,
  `adj` int(10) NOT NULL,
  `appdivheaddate` date NOT NULL,
  `appmngr2date` date NOT NULL,
  `appmngr1date` date NOT NULL,
  `appdivhead` int(1) NOT NULL,
  `appmngr2` int(1) NOT NULL,
  `appmngr1` int(1) NOT NULL,
  `qcair` varchar(10) COLLATE latin1_general_ci NOT NULL,
  `qcbakar` varchar(10) COLLATE latin1_general_ci NOT NULL,
  `qcresidu` varchar(10) COLLATE latin1_general_ci NOT NULL,
  `qct` varchar(10) COLLATE latin1_general_ci NOT NULL,
  `qctbk` varchar(10) COLLATE latin1_general_ci NOT NULL,
  `year` year(4) NOT NULL,
  `inf` varchar(200) COLLATE latin1_general_ci NOT NULL,
  `addby` varchar(20) COLLATE latin1_general_ci NOT NULL,
  `adddate` datetime NOT NULL,
  `idcab` int(11) NOT NULL,
  `appby` varchar(15) COLLATE latin1_general_ci NOT NULL,
  `nosap` char(10) COLLATE latin1_general_ci NOT NULL,
  PRIMARY KEY (`idqa`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;

--
-- Dumping data for table `t_qa`
--


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

--
-- Table structure for table `t_rmb_detail`
--

CREATE TABLE IF NOT EXISTS `t_rmb_detail` (
  `idcab` int(11) NOT NULL COMMENT 'ID Cabang',
  `normb` int(11) NOT NULL COMMENT 'No BPKK',
  `nobpkk` int(11) NOT NULL COMMENT 'No BPKK',
  `year` year(4) NOT NULL COMMENT 'Tahun',
  PRIMARY KEY (`idcab`,`normb`,`nobpkk`,`year`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Table reimbursement BPKK Detail';

--
-- Dumping data for table `t_rmb_detail`
--


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

--
-- Table structure for table `t_rmb_header`
--

CREATE TABLE IF NOT EXISTS `t_rmb_header` (
  `idcab` int(11) NOT NULL COMMENT 'ID Cabang',
  `normb` int(11) NOT NULL COMMENT 'No. Reimbursement',
  `normbform` varchar(100) NOT NULL COMMENT 'No. Format Reimbursement',
  `total` double NOT NULL COMMENT 'Total',
  `status` int(1) NOT NULL COMMENT '1 = Cancel, 2=CPV Created',
  `nocpvform` varchar(100) NOT NULL COMMENT 'No. CPV Format',
  `candesc` text NOT NULL,
  `canby` varchar(10) NOT NULL,
  `candate` datetime NOT NULL,
  `addby` varchar(10) NOT NULL COMMENT 'Dibuat oleh',
  `adddate` datetime NOT NULL COMMENT 'Tgl Buat',
  `year` year(4) NOT NULL COMMENT 'Tahun',
  PRIMARY KEY (`idcab`,`normb`,`year`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Table reimbursement BPKK Header';

--
-- Dumping data for table `t_rmb_header`
--


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

--
-- Table structure for table `t_stockbal`
--

CREATE TABLE IF NOT EXISTS `t_stockbal` (
  `idcab` int(11) NOT NULL DEFAULT '0',
  `ref` varchar(100) NOT NULL DEFAULT '' COMMENT 'Referensi transaksi',
  `year` int(4) NOT NULL,
  `qty` int(11) DEFAULT NULL COMMENT 'Jumlah stock',
  `adddate` datetime DEFAULT NULL COMMENT 'Tanggal buat',
  `addby` varchar(10) DEFAULT NULL COMMENT 'Dibuat oleh',
  PRIMARY KEY (`idcab`,`ref`,`year`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table saldo stock balance';

--
-- Dumping data for table `t_stockbal`
--

INSERT INTO `t_stockbal` (`idcab`, `ref`, `year`, `qty`, `adddate`, `addby`) VALUES
(3, '5000155004', 2013, 15000, '2013-05-14 15:27:12', 'dini'),
(3, '5000155005', 2013, 5500, '2013-05-14 15:42:14', 'dini'),
(3, '5000155006', 2013, 16000, '2013-05-15 10:13:08', 'dini'),
(3, '5000155007', 2013, 5000, '2013-05-15 10:41:26', 'dini'),
(3, '5000155008', 2013, 13500, '2013-05-15 16:06:57', 'dini'),
(3, '5000155009', 2013, 16000, '2013-05-15 17:24:04', 'dini'),
(3, 'SJ/3/05/13/3', 2013, -16000, '2013-05-14 17:12:34', 'dini');

--
-- Constraints for dumped tables
--

--
-- Constraints for table `role_menu`
--
ALTER TABLE `role_menu`
  ADD CONSTRAINT `role_menu_ibfk_1` FOREIGN KEY (`roleid`) REFERENCES `master_role` (`roleid`) ON DELETE CASCADE;
