-- Table structure for table `tm_cabang`
--

CREATE TABLE `tm_cabang` (
  `cabang_id` varchar(2) NOT NULL,
  `nama_cabang` varchar(30) default NULL,
  PRIMARY KEY  (`cabang_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_cabang`
--


--
-- Table structure for table `tm_custkirim`
--

CREATE TABLE `tm_custkirim` (
  `KodeCust` varchar(10) NOT NULL default '',
  `ItemCust` int(11) NOT NULL default '0',
  `NamaKirim` varchar(50) default NULL,
  `AlamatKirim` varchar(200) default NULL,
  `KotaKirim` varchar(50) default NULL,
  `Aktif` varchar(1) default NULL,
  PRIMARY KEY  (`KodeCust`,`ItemCust`),
  CONSTRAINT `fk_TM_CustKirim` FOREIGN KEY (`KodeCust`) REFERENCES `tm_customer` (`KodeCust`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_custkirim`
--


--
-- Table structure for table `tm_customer`
--

CREATE TABLE `tm_customer` (
  `KodeCust` varchar(10) NOT NULL default '',
  `NamaCust` varchar(100) default NULL,
  `Editnama` varchar(100) default NULL,
  `Alamat` varchar(50) default NULL,
  `Kota` varchar(30) default NULL,
  `Telp` varchar(30) default NULL,
  `Fax` varchar(30) default NULL,
  `email` varchar(50) default NULL,
  `webpage` varchar(50) default NULL,
  `CustType` varchar(10) default NULL,
  `CreditLimit` double default NULL,
  `Defvalas` varchar(10) default NULL,
  `SyaratByr` int(11) default NULL,
  `Keterangan` varchar(100) default NULL,
  `Aktif` varchar(1) default NULL,
  `Piutang` double default NULL,
  `PiutAw` double default NULL,
  `TglPiutAwal` datetime default NULL,
  `AccPiut` varchar(20) default NULL,
  `AccPiutBG` varchar(20) default NULL,
  `AccPiutDB` varchar(20) default NULL,
  `AccPiutCR` varchar(20) default NULL,
  `AccPiutTitip` varchar(20) default NULL,
  `DefD1` double default NULL,
  `DefD2` double default NULL,
  `DefD3` double default NULL,
  `DefD4` double default NULL,
  `DefTamb` double default NULL,
  `DefKetTamb` varchar(50) default NULL,
  `FieldCust1` varchar(100) default NULL,
  `FieldCust2` varchar(100) default NULL,
  `FieldCust3` varchar(100) default NULL,
  `FieldCust4` varchar(100) default NULL,
  `FieldCust5` varchar(100) default NULL,
  `Point` decimal(15,0) default '0',
  `PointNon` decimal(15,0) default '0',
  `PointAwal` decimal(15,0) default '0',
  `PointAmbil` decimal(15,0) default '0',
  `Updater` int(4) default NULL,
  PRIMARY KEY  (`KodeCust`),
  KEY `fk_MCustomer1` (`AccPiut`),
  KEY `fk_MCustomer2` (`AccPiutBG`),
  KEY `fk_MCustomer3` (`AccPiutDB`),
  KEY `fk_MCustomer4` (`AccPiutCR`),
  KEY `fk_MCustomer5` (`AccPiutTitip`),
  CONSTRAINT `fk_MCustomer1` FOREIGN KEY (`AccPiut`) REFERENCES `mperkiraan` (`Kode_perk`),
  CONSTRAINT `fk_MCustomer2` FOREIGN KEY (`AccPiutBG`) REFERENCES `mperkiraan` (`Kode_perk`),
  CONSTRAINT `fk_MCustomer3` FOREIGN KEY (`AccPiutDB`) REFERENCES `mperkiraan` (`Kode_perk`),
  CONSTRAINT `fk_MCustomer4` FOREIGN KEY (`AccPiutCR`) REFERENCES `mperkiraan` (`Kode_perk`),
  CONSTRAINT `fk_MCustomer5` FOREIGN KEY (`AccPiutTitip`) REFERENCES `mperkiraan` (`Kode_perk`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_customer`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `BeforeUpdatePiutang` BEFORE UPDATE ON `tm_customer` FOR EACH ROW BEGIN
set new.point=((select (ifnull(sum(a.PointG),0)) from tr_jual_m a where a.kodecust=new.kodecust) + (select (ifnull(sum(b.PointR),0)) from tr_jualr_m b where b.kodecustR=new.kodecust));
set new.pointNon=((select (ifnull(sum(c.PointGNon),0)) from  tr_jual_m c where c.kodecust=new.kodecust)+(select (ifnull(sum(d.PointRNon),0)) from tr_jualr_m d where d.kodecustR=new.kodecust)) ;
set new.pointAmbil=(select (ifnull(sum(e.TakePOint),0)) from tr_ambilpoint e where e.kodecust=new.kodecust) ;
if 1=2 then
begin
    IF IFNull(old.Updater,0) <> Ifnull(new.Updater,0) THEN
    SET new.Piutang = (SELECT SUM(IFNULL(Nilai,0)) - SUM(IFNULL(BayarTunai,0)) FROM tr_jual_m WHERE KodeCust= new.KodeCust) - 
    (SELECT SUM(IFNULL(a.Nilai,0)) FROM tr_scrbayarjual a LEFT JOIN tr_bayarjual_m b ON b.NoBayarJ=a.NoBayarJ WHERE b.KodeCust = new.KodeCust);
END IF;
end;
end if;
END */;;

DELIMITER ;

--
-- Table structure for table `tm_golongan`
--

CREATE TABLE `tm_golongan` (
  `KodeGol` varchar(10) NOT NULL default '',
  `NamaGol` varchar(50) default NULL,
  `Keterangan` varchar(100) default NULL,
  `Aktif` varchar(1) default NULL,
  `DefAccExp` varchar(20) default NULL,
  `DefAccInv` varchar(20) default NULL,
  `DefAccSales` varchar(20) default NULL,
  `DefAccRetSales` varchar(20) default NULL,
  `DefAccRetPurc` varchar(20) default NULL,
  `DefAccCOGS` varchar(20) default NULL,
  PRIMARY KEY  (`KodeGol`),
  KEY `fk_MGolongan1` (`DefAccExp`),
  KEY `fk_MGolongan2` (`DefAccInv`),
  KEY `fk_MGolongan3` (`DefAccSales`),
  KEY `fk_MGolongan4` (`DefAccRetSales`),
  KEY `fk_MGolongan5` (`DefAccRetPurc`),
  KEY `fk_MGolongan6` (`DefAccCOGS`),
  CONSTRAINT `fk_MGolongan1` FOREIGN KEY (`DefAccExp`) REFERENCES `mperkiraan` (`Kode_perk`),
  CONSTRAINT `fk_MGolongan2` FOREIGN KEY (`DefAccInv`) REFERENCES `mperkiraan` (`Kode_perk`),
  CONSTRAINT `fk_MGolongan3` FOREIGN KEY (`DefAccSales`) REFERENCES `mperkiraan` (`Kode_perk`),
  CONSTRAINT `fk_MGolongan4` FOREIGN KEY (`DefAccRetSales`) REFERENCES `mperkiraan` (`Kode_perk`),
  CONSTRAINT `fk_MGolongan5` FOREIGN KEY (`DefAccRetPurc`) REFERENCES `mperkiraan` (`Kode_perk`),
  CONSTRAINT `fk_MGolongan6` FOREIGN KEY (`DefAccCOGS`) REFERENCES `mperkiraan` (`Kode_perk`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_golongan`
--

INSERT INTO `tm_golongan` VALUES ('1001','KERAMIK','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1002','BATHUP','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1003','KRAN','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1004','GRENDEL','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1005','PINTU','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1006','KITCHEN SET','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1007','TEMPAT SABUN','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1008','GRANIT','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1009','KACA','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1010','LIST KERAMIK','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1011','BAK MANDI','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1012','WASTAFEL','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1013','GANTUNGAN BAJU','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1014','TANDON','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1015','TANG','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1016','OBENG','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1017','TEMPAT TISUE','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1018','CLOSET','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1019','KUNCI','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1020','WATER HEATHER ','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1021','SHOWER','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1022','RAK SABUN/SAMPO','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1023','HANDLE','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1024','SELANG','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1025','AVUR','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1026','ENGSEL','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1027','KUKU','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1028','PISAU GERINDA','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1029','TELTRIM','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1030','TEMPAT SAMPAH','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1031','GEMBOK','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1032','STEPNOSING','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1033','NUTKERAMIK','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1034','LOSTER','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1035','DINDING','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1036','GERBER','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1037','BODY PELOR','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('1038','ELBO','','Y',NULL,NULL,NULL,NULL,NULL,NULL),('2222','BAHAN BANGUNAN','','Y',NULL,NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `tm_gudang`
--

CREATE TABLE `tm_gudang` (
  `KodeGd` varchar(5) NOT NULL default '',
  `NamaGd` varchar(50) default NULL,
  `Keterangan` varchar(100) default NULL,
  `Aktif` varchar(1) default NULL,
  PRIMARY KEY  (`KodeGd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_gudang`
--

INSERT INTO `tm_gudang` VALUES ('GD','SAMIR 1','','Y'),('GD 2','SAMIR 2','','Y'),('GD 3','SAMIR 3','','Y');

--
-- Table structure for table `tm_mesin`
--

CREATE TABLE `tm_mesin` (
  `KodeMesin` varchar(15) NOT NULL,
  `NamaMesin` varchar(40) default NULL,
  `Tag` varchar(50) default NULL,
  `Keterangan` varchar(100) default NULL,
  PRIMARY KEY  (`KodeMesin`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_mesin`
--


--
-- Table structure for table `tm_produk`
--

CREATE TABLE `tm_produk` (
  `PRODUK_ID` varchar(3) NOT NULL,
  `JNS_PRODUK` varchar(5) default NULL,
  `NAMA` varchar(75) default NULL,
  `NO_AKUN` varchar(20) default NULL,
  `SALDO_MIN` double default NULL,
  `SETOR_MIN` double default NULL,
  `BIAYA_ADM` double default NULL,
  `BIAYA_ADM_NO_AKUN` varchar(20) default NULL,
  `DENDA` double default NULL,
  `DENDA_NO_AKUN` varchar(20) default NULL,
  `BLN_HR_MGGU` varchar(1) default NULL,
  `BUNGA` double default NULL,
  `ADM` double default NULL,
  `BUNGA_NO_AKUN` varchar(20) default NULL,
  `TITIP_BUNGA_NO_AKUN` varchar(20) default NULL,
  `SALDO_KENA_PAJAK` double default NULL,
  `PAJAK` double default NULL,
  `PAJAK_NO_AKUN` varchar(20) default NULL,
  `PINALTY` double default NULL,
  `PINALTY_NO_AKUN` varchar(20) default NULL,
  `JW` int(11) default NULL,
  `PENUTUPAN_NO_AKUN` varchar(20) default NULL,
  PRIMARY KEY  (`PRODUK_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_produk`
--


--
-- Table structure for table `tm_rakitan_d`
--

CREATE TABLE `tm_rakitan_d` (
  `KodeRakitan` varchar(20) NOT NULL,
  `ItemRakitan` int(11) NOT NULL,
  `KodeBrg` varchar(20) default NULL,
  `NamaBrg` varchar(50) default NULL,
  `Satuan` varchar(10) default NULL,
  `KodeGd` varchar(5) default NULL,
  `Jml` double default NULL,
  `Harga` double default NULL,
  `Disc` double default NULL,
  PRIMARY KEY  (`KodeRakitan`,`ItemRakitan`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_rakitan_d`
--


--
-- Table structure for table `tm_rakitan_m`
--

CREATE TABLE `tm_rakitan_m` (
  `KodeRakitan` varchar(20) NOT NULL default '',
  `NamaRakitan` varchar(50) default NULL,
  `TglRakitan` datetime default NULL,
  `Keterangan` varchar(100) default NULL,
  `Nilai` double default NULL,
  `Aktif` varchar(1) default NULL,
  PRIMARY KEY  (`KodeRakitan`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_rakitan_m`
--


--
-- Table structure for table `tm_saldo`
--

CREATE TABLE `tm_saldo` (
  `KodeGol` varchar(20) NOT NULL,
  `NamaGroup` varchar(40) default NULL,
  `SaldoAkhir` double default NULL,
  `Debuging` varchar(100) default NULL,
  PRIMARY KEY  (`KodeGol`),
  CONSTRAINT `tm_saldo_ibfk_1` FOREIGN KEY (`KodeGol`) REFERENCES `tm_golongan` (`KodeGol`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_saldo`
--


--
-- Table structure for table `tm_sales`
--

CREATE TABLE `tm_sales` (
  `KodeSales` varchar(10) NOT NULL default '',
  `NamaSales` varchar(50) default NULL,
  `Keterangan` varchar(100) default NULL,
  `Aktif` varchar(1) default NULL,
  PRIMARY KEY  (`KodeSales`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_sales`
--


--
-- Table structure for table `tm_satuan`
--

CREATE TABLE `tm_satuan` (
  `satuan` varchar(10) NOT NULL default '',
  PRIMARY KEY  (`satuan`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_satuan`
--

INSERT INTO `tm_satuan` VALUES ('biji'),('botol'),('box'),('cepok'),('dos'),('ecer'),('galon'),('kaleng'),('karton'),('Kg'),('kilo'),('kodi'),('lembar'),('Meter'),('mL'),('ons'),('pack'),('pasang'),('Pcs'),('press'),('roll'),('sachet'),('set'),('strip'),('tor'),('tube'),('unit'),('vial'),('zack');

--
-- Table structure for table `tm_setupall`
--

CREATE TABLE `tm_setupall` (
  `setupall_id` int(11) NOT NULL auto_increment,
  `groups` varchar(20) NOT NULL,
  `subgroups` varchar(20) NOT NULL default '',
  `nilainum` float default NULL,
  `nilaitgl` datetime default NULL,
  `nilaichar` varchar(100) default NULL,
  `ketnilai` varchar(255) default NULL,
  `visible` varchar(1) default 'Y',
  PRIMARY KEY  (`setupall_id`,`groups`,`subgroups`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_setupall`
--

INSERT INTO `tm_setupall` VALUES (1,'Masking','KodeBrg',0,'1899-12-30 00:00:00','','Masking kode Barang untuk input kode barang','Y'),(2,'Masking','KodeCust',0,'1899-12-30 00:00:00','','Masking kode Customer untuk input kode Customer','Y'),(3,'Masking','KodeGd',0,'1899-12-30 00:00:00','','Masking kode Gudang untuk input kode Gudang','Y'),(4,'Masking','KodeGol',0,'1899-12-30 00:00:00','','Masking kode Golongan untuk input kode Golongan','Y'),(5,'Masking','KodeSupp',0,'1899-12-30 00:00:00','','Masking kode Supplier untuk input kode Supplier','Y'),(6,'Satuan','Satuan01',0,'1899-12-30 00:00:00','Pcs','','Y'),(11,'Satuan','Satuan04',0,'1899-12-30 00:00:00','Pack','','Y'),(12,'Satuan','Satuan02',0,'1899-12-30 00:00:00','Mtr','','Y'),(13,'Satuan','Satuan03',0,'1899-12-30 00:00:00','Dus','','Y'),(25,'JenisBrg','JenisBrg1',0,'1899-12-30 00:00:00','Inventory','','Y'),(26,'JenisBrg','JenisBrg2',0,'1899-12-30 00:00:00','Non Inv','','Y'),(27,'JenisBrg','JenisBrg3',0,'1899-12-30 00:00:00','Service','','Y'),(35,'Trans Beli','TrBeli1',0,'1899-12-30 00:00:00','BT','No Bukti Pembelian','Y'),(37,'Trans Jual Retail','TrJualR1',0,NULL,'JR','No Bukti Penjualan Retail','Y'),(38,'Trans Jual Grosir','TrJual1',0,'1899-12-30 00:00:00','JT','No Bukti Penjualan Grosir','Y'),(39,'Trans Jual Rakitan','TrJualRakitan1',0,NULL,'JK','No Bukti Penjualan Rakitan','Y'),(42,'Trans Retur Beli','TrReturBeli1',0,NULL,'RB','No Bukti Retur Pembelian','Y'),(43,'Trans Retur Jual','TrReturJual1',0,NULL,'RJ','No Bukti Retur Penjualan Grosir','Y'),(44,'Trans Retur Jual R','TrReturJualR1',NULL,NULL,'RR','No Bukti Retur Penjualan Retail','Y'),(45,'Trans Retur Jual Rkt','TrReturJualRakitan1',NULL,NULL,'RK','No Bukti Retur Penjualan Rakitan','Y'),(46,'Trans Bayar Beli','TrBayarBeli1',0,NULL,'YB','No Bukti Pembayaran Pembelian','Y'),(47,'Trans Bayar Jual','TrBayarJual1',0,NULL,'YJ','No Bukti Pembayaran Penjualan Grosir','Y'),(48,'Trans Bayar Jual Rkt','TrBayarJualRakitan1',0,NULL,'YK','No Bukti Pembayaran Penjualan Rakitan','Y'),(49,'Trans SO','TrSO1',0,NULL,'PJ','No Bukti Sales Order','Y'),(50,'Trans SO Rakitan','TrSORakitan1',NULL,NULL,'PK','No Bukti Sales Order Rakitan','Y'),(51,'Trans PO','TrPo1',NULL,NULL,'PO','No Bukti Purchase Order','Y'),(54,'Valas','Valas1',1,'1899-12-30 00:00:00','IDR','Indonesian Rupiah','Y'),(55,'Valas','Valas2',3000,'1899-12-30 00:00:00','SGD','Singapore Dolar','Y'),(56,'Valas','Valas3',8000,'1899-12-30 00:00:00','USD','US Dolar','Y'),(60,'Nomor','BT',1,'1899-12-30 00:00:00','21000162','Nomor Transaksi Pembelian; Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(61,'Nomor','JT',3,'1899-12-30 00:00:00','2190313086','Nomor Transaksi Penjualan; Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(62,'Nomor','YB',1,'1899-12-30 00:00:00','21000026','Nomor Transaksi Pembayaran Pembelian; Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(63,'Nomor','YJ',1,'1899-12-30 00:00:00','19001083','Nomor Transaksi Pembayaran Penjualan; Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(64,'Nomor','RB',1,'1899-12-30 00:00:00','20000003','Nomor Transaksi Retur Pembelian; Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(65,'Nomor','RJ',1,'1899-12-30 00:00:00','16000001','Nomor Transaksi Retur Penjualan; Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(67,'Nomor','PJ',2,'1899-12-30 00:00:00','13010018','Nomor Transaksi PO Penjualan (Sales Order); Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(68,'Nomor','PK',2,'1899-12-30 00:00:00','07090005','Nomor Transaksi PO Penjualan Rakitan (Sales Order Rakitan); Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artin','Y'),(69,'Nomor','JR',1,'1899-12-30 00:00:00','19031642','Nomor Transaksi Penjualan Retail; Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(70,'Nomor','JK',3,'1899-12-30 00:00:00','071114002','Nomor Transaksi Penjualan Rakitan; Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(71,'Nomor','RK',3,'1899-12-30 00:00:00','070830005','Nomor Transaksi Retur Penjualan Rakitan; Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(72,'Nomor','PG',1,'1899-12-30 00:00:00','20000002','Nomor Transaksi Pindah Gudang; Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(73,'Nomor','BR',1,'1899-12-30 00:00:00','19000029','Nomor Transaksi Barang Rusak per Gudang; Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(74,'Nomor','CL',2,'1899-12-30 00:00:00','20100001','Nomor Transaksi Untuk Closing; Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(75,'Nomor','PO',2,'1899-12-30 00:00:00','11092606','Nomor Transaksi Untuk Purchase Order; Jika Nilai Num  0 atau 1 format no sbb : yyxxxxxxR01;  untuk 2  :  yymmxxxxR01;  untuk 3 : yymmddxxxR1 -->  Nilai Char Diisi Angka (xx artinya angka 0-9)  ','Y'),(80,'Kode Bayar Beli','KodeByr1',0,'1899-12-30 00:00:00','CASH','Tunai','Y'),(83,'Kode Bayar Beli','KodeByr3',0,'1899-12-30 00:00:00','TRANSFER','Transfer Via Bank','Y'),(85,'Default List Filter','ListBeli',0,'1899-12-30 00:00:00','Tahun','Diisi : Semua,Tahun,Bulan,Tanggal','Y'),(86,'Default List Filter','ListBayarBeli',0,'1899-12-30 00:00:00','Tahun','Diisi : Semua, Tahun, Bulan, Tanggal','Y'),(87,'Default List Filter','ListReturBeli',0,'1899-12-30 00:00:00','Tahun','Diisi : Semua, Tahun, Bulan, Tanggal','Y'),(88,'Default List Filter','ListSO',0,'1899-12-30 00:00:00','Tahun','Diisi : Semua, Tahun, Bulan, Tanggal','Y'),(89,'Default List Filter','ListSORakitan',0,'1899-12-30 00:00:00','Tahun','Diisi : Semua, Tahun, Bulan, Tanggal','Y'),(90,'Default List Filter','ListJualRetail',0,'1899-12-30 00:00:00','Tanggal','Diisi : Semua, Tahun, Bulan, Tanggal','Y'),(91,'Default List Filter','ListJualGrosir',0,'1899-12-30 00:00:00','Tahun','Diisi : Semua, Tahun, Bulan, Tanggal','Y'),(92,'Default List Filter','ListJualRakitan',0,'1899-12-30 00:00:00','Semua','Diisi : Semua, Tahun, Bulan, Tanggal','Y'),(93,'Default List Filter','ListMasterRakitan',0,'1899-12-30 00:00:00','Semua','Diisi : Semua, Tahun, Bulan, Tanggal','Y'),(94,'Default List Filter','ListBayarJual',0,'1899-12-30 00:00:00','Semua','Diisi : Semua, Tahun, Bulan, Tanggal','Y'),(95,'Default List Filter','ListMutasiGudang',0,'1899-12-30 00:00:00','Tahun','Diisi : Semua, Tahun, Bulan, Tanggal','Y'),(96,'Default List Filter','ListBarangRusak',0,'1899-12-30 00:00:00','Tahun','Diisi : Semua, Tahun, Bulan, Tanggal','Y'),(100,'Masking','KodeSales',0,'1899-12-30 00:00:00','','Masking Master Sales untuk input Kode Sales','Y'),(101,'Masking','KodeRakitan',0,'1899-12-30 00:00:00','','Masking Master Rakitan untuk input Kode Rakitan','Y'),(120,'Set Harga Penjualan','SalesOrder',0,'1899-12-30 00:00:00','HargaGrosir','Digunakan Untuk Set Radio Button;  Diisi : HargaGrosir, HargaRetail','Y'),(121,'Set Harga Penjualan','SalesOrderRakitan',0,NULL,'HargaGrosir','Digunakan Untuk Set Radio Button;  Diisi : HargaGrosir, HargaRetail','Y'),(122,'Set Harga Penjualan','PenjualanRetail',0,'1899-12-30 00:00:00','HargaRetail','Digunakan Untuk Set Radio Button;  Diisi : HargaRetail, HargaGrosir','Y'),(123,'Set Harga Penjualan','PenjualanGrosir',0,NULL,'HargaGrosir','Digunakan Untuk Set Radio Button;  Diisi : HargaGrosir, HargaRetail','Y'),(124,'Set Harga Penjualan','MasterRakitan',0,NULL,'HargaGrosir','Digunakan Untuk Set Radio Button;  Diisi : HargaGrosir, HargaRetail','Y'),(125,'Set Harga Penjualan','PenjualanRakitan',0,NULL,'HargaGrosir','Digunakan Untuk Set Radio Button;  Diisi : HargaGrosir, HargaRetail','Y'),(131,'Set Cetak Struk','MarginAtas',0,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Atas Kertas Ke Heder;  Diisi : 0 s/d 5\r\n','Y'),(132,'Set Cetak Struk','MarginKiri',0,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Kiri Kertas Ke Heder dan Detil;  Diisi :0 s/d 10','Y'),(133,'Set Cetak Struk','SpasiHederKeDetail',1,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Heder ke Detil;  Diisi : 0 s/d 5','Y'),(134,'Set Cetak Struk','MaxBaris',100,'1899-12-30 00:00:00','','Digunakan Untuk Set Max Baris Cetak Struk; Minimal = 11  + ColumnHeder(2) + nDetil Data (>= 1) +  MarginAtas + SpasiHederKeDetail (1)+ MarginBawah; Diisi : 15 s/d 50','Y'),(135,'Set Cetak Struk','KeteranganFooter1',0,'2009-02-27 00:00:00','* Barang Yang Sudah Dibeli Tidak Dapat            Ditukar/Dikembalikan*','Digunakan Untuk Set Catatan Footer;  Diisi : TERIMA KASIH','Y'),(136,'Set Cetak Struk','GantiKertas',0,'1899-12-30 00:00:00','N','Digunakan Untuk Set Ganti Kertas (Eject) atau Tidak  Bila Sudah Max Baris; Eject Merupakan Prioritas 1 bila diisi N baru digunakan MarginBawah dan CetakSampaiMaxBaris; Diisi : Y atau N','Y'),(137,'Set Cetak Struk','CetakSampaiMaxBaris',0,'1899-12-30 00:00:00','N','Digunakan Untuk Set Cetak Blank, Bila Belum Max Baris;  Aktif bila GantiKertas diisi N; Diisi : Y atau N','Y'),(138,'Set Cetak Struk','KeteranganFooter2',0,'1899-12-30 00:00:00','Telp : 08563450717','Digunakan Untuk Set Catatan Footer;  Diisi : Barang Yang Sudah Dibeli Tidak Dapat Ditukar/Dikembalikan','Y'),(139,'Set Cetak Struk','MarginBawah',6,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Bawah Kertas Ke Footer; Aktif bila GantiKertas diisi N;  Diisi : 0 s/d 3','Y'),(150,'Set Cetak Invoice','MarginBawah',2,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Bawah Kertas Ke Footer; Aktif bila GantiKertas diisi N;  Diisi : 0 s/d 3','Y'),(151,'Set Cetak Invoice','MarginAtas',-5,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Atas Kertas Ke Heder;  Diisi : 0 s/d 5\r\n','Y'),(152,'Set Cetak Invoice','MarginKiri',5,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Kiri Kertas Ke Heder dan Detil;  Diisi :0 s/d 10','Y'),(153,'Set Cetak Invoice','MaxBaris',32,'1899-12-30 00:00:00','','Digunakan Untuk Set Max Baris Cetak Invoice Unutk Penjualan Grosir; Minimal = 20  + ColumnHeder(2) + nDetil Data (>= 8) +  MarginAtas + SpasiHederKeDetail (1)+ MarginBawah(1); Diisi : 32 s/d 64','Y'),(154,'Set Cetak Invoice','MaxBarisRakitan',32,'1899-12-30 00:00:00','','Digunakan Untuk Set Max Baris Cetak Invoice untuk Penjualan Rakitan; Minimal = 18  + ColumnHeder(2) + nDetil Data (>= 1) +  MarginAtas + SpasiHederKeDetail (1)+ MarginBawah; Diisi : 22 s/d 50','Y'),(155,'Set Cetak Invoice','SpasiHederKeDetail',1,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Heder ke Detil;  Diisi : 0 s/d 5','Y'),(156,'Set Cetak Invoice','MarginBwhDipindahkan',0,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi Dipindahkan, Bawah kertas ke Detil data Untuk detil data yang banyak yang ngak cukup untuk 1 Lembar;  Diisi : 0 s/d 5','Y'),(157,'Set Cetak Invoice','MarginAtasPemindahan',0,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi Pemindahan, Atas Kertas ke Heder Untuk detil data yang banyak yang ngak cukup untuk 1 Lembar;  Diisi : 0 s/d 5','Y'),(175,'Set Cetak Invoice','GantiKertas',0,'1899-12-30 00:00:00','N','Digunakan Untuk Set Ganti Kertas (Eject) atau Tidak  Bila Sudah Max Baris; Prioritas 1 bila diisi N baru digunakan MarginBawah dan CetakSampaiMaxBaris; Diisi : Y atau N','Y'),(176,'Set Cetak Invoice','CetakSampaiMaxBaris',0,'1899-12-30 00:00:00','Y','Digunakan Untuk Set Cetak Blank, Bila Belum Max Baris;  Aktif bila GantiKertas diisi N; Diisi : Y atau N','Y'),(177,'Set Cetak Invoice','KeteranganFooter1',0,'1899-12-30 00:00:00','* Kami Doakan Semoga Lancar *','Digunakan Untuk Set Catatan Footer;  Diisi : * Kami Doakan Semoga Lancar *','Y'),(179,'Set Cetak Invoice','KeteranganFooter2',0,'1899-12-30 00:00:00','* Claim atas*','Digunakan Untuk Set Catatan Footer;  Diisi : * Barang yg dibeli tidak dapat ditukar kembali *','Y'),(180,'Set Cetak Invoice','NamaCustLunas',0,'1899-12-30 00:00:00','SAMIR 1','Digunakan Untuk Mengisi Nama Customer Di Format Cetak, Bila Pembayaran Sudah Lunas dan Namacust Blank, Diganti Dengan Default CASH','Y'),(190,'Set Cetak SalesOrder','MarginBawah',2,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Bawah Kertas Ke Footer; Aktif bila GantiKertas diisi N;  Diisi : 0 s/d 3','Y'),(191,'Set Cetak SalesOrder','MarginAtas',0,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Atas Kertas Ke Heder;  Diisi : 0 s/d 5\r\n','Y'),(192,'Set Cetak SalesOrder','MarginKiri',5,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Kiri Kertas Ke Heder dan Detil;  Diisi :0 s/d 10','Y'),(193,'Set Cetak SalesOrder','MaxBaris',32,'1899-12-30 00:00:00','','Digunakan Untuk Set Max Baris Cetak SalesOrder Unutk Penjualan Grosir; Minimal = 20  + ColumnHeder(2) + nDetil Data (>= 8) +  MarginAtas + SpasiHederKeDetail (1)+ MarginBawah(1); Diisi : 32 s/d 64','Y'),(194,'Set Cetak SalesOrder','MaxBarisRakitan',32,'1899-12-30 00:00:00','','Digunakan Untuk Set Max Baris Cetak SalesOrder untuk Penjualan Rakitan; Minimal = 18  + ColumnHeder(2) + nDetil Data (>= 1) +  MarginAtas + SpasiHederKeDetail (1)+ MarginBawah; Diisi : 22 s/d 50','Y'),(195,'Set Cetak SalesOrder','SpasiHederKeDetail',1,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Heder ke Detil;  Diisi : 0 s/d 5','Y'),(196,'Set Cetak SalesOrder','MarginBwhDipindahkan',0,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi Dipindahkan, Bawah kertas ke Detil data Untuk detil data yang banyak yang ngak cukup untuk 1 Lembar;  Diisi : 0 s/d 5','Y'),(197,'Set Cetak SalesOrder','MarginAtasPemindahan',0,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi Pemindahan, Atas Kertas ke Heder Untuk detil data yang banyak yang ngak cukup untuk 1 Lembar;  Diisi : 0 s/d 5','Y'),(200,'Set Cetak SalesOrder','GantiKertas',0,'1899-12-30 00:00:00','N','Digunakan Untuk Set Ganti Kertas (Eject) atau Tidak  Bila Sudah Max Baris; Prioritas 1 bila diisi N baru digunakan MarginBawah dan CetakSampaiMaxBaris; Diisi : Y atau N','Y'),(201,'Set Cetak SalesOrder','CetakSampaiMaxBaris',0,'1899-12-30 00:00:00','Y','Digunakan Untuk Set Cetak Blank, Bila Belum Max Baris;  Aktif bila GantiKertas diisi N; Diisi : Y atau N','Y'),(202,'Set Cetak SalesOrder','KeteranganFooter1',0,'1899-12-30 00:00:00','* Kami Tidak Menerima Pembayaran berupa Cheque/BG *','Digunakan Untuk Set Catatan Footer;  Diisi : * Terima Kasih Atas Kunjungan Anda *','Y'),(203,'Set Cetak SalesOrder','KeteranganFooter2',0,'1899-12-30 00:00:00','* Barang yg dibeli tidak dapat ditukar/dikembalikan tanpa ada perjanjian *','Digunakan Untuk Set Catatan Footer;  Diisi : * Barang yg dibeli tidak dapat ditukar kembali *','Y'),(204,'Set Cetak SalesOrder','NamaCustLunas',0,'1899-12-30 00:00:00','CASH','Digunakan Untuk Mengisi Nama Customer Di Format Cetak, Bila Pembayaran Sudah Lunas dan Namacust Blank, Diganti Dengan Default CASH','Y'),(210,'Set Cetak Closing','MarginAtas',0,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Atas Kertas Ke Heder;  Diisi : 0 s/d 5\r\n','Y'),(211,'Set Cetak Closing','MarginKiri',5,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Kiri Kertas Ke Heder dan Detil;  Diisi :0 s/d 10','Y'),(212,'Set Cetak Closing','SpasiHederKeDetail',1,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Heder ke Detil;  Diisi : 0 s/d 5','Y'),(213,'Set Cetak Closing','MaxBaris',24,'1899-12-30 00:00:00','','Digunakan Untuk Set Max Baris Cetak Struk; Minimal = 11  + ColumnHeder(2) + nDetil Data (>= 1) +  MarginAtas + SpasiHederKeDetail (1)+ MarginBawah; Diisi : 15 s/d 50','Y'),(214,'Set Cetak Closing','GantiKertas',0,'1899-12-30 00:00:00','N','Digunakan Untuk Set Ganti Kertas (Eject) atau Tidak  Bila Sudah Max Baris; Eject Merupakan Prioritas 1 bila diisi N baru digunakan MarginBawah dan CetakSampaiMaxBaris; Diisi : Y atau N','Y'),(215,'Set Cetak Closing','CetakSampaiMaxBaris',0,'1899-12-30 00:00:00','N','Digunakan Untuk Set Cetak Blank, Bila Belum Max Baris;  Aktif bila GantiKertas diisi N; Diisi : Y atau N','Y'),(216,'Set Cetak Closing','KeteranganFooter2',0,'1899-12-30 00:00:00','* Barang yg dibeli tidak dapat di kembalikan *','Digunakan Untuk Set Catatan Footer;  Diisi : * Barang yg dibeli tidak dapat ditukar kembali *','Y'),(217,'Set Cetak Closing','MarginBawah',10,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Bawah Kertas Ke Footer; Aktif bila GantiKertas diisi N;  Diisi : 0 s/d 3','Y'),(218,'Set Cetak Closing','MaxChar',42,'1899-12-30 00:00:00','','Digunakan Untuk Jumlah Karakter, Kiri ke kanan;  Diisi : 40 s/d 50','Y'),(219,'Set Cetak Closing','MarginKanan',0,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Kanan Kertas Ke Heder dan Detil;  Diisi :0 s/d 10','Y'),(245,'Penjualan Retail','FormatCetak',0,'1899-12-30 00:00:00','Struk','Digunakan Untuk Set Format Cetakan Penjualan Retail; Diisi: Struk, Invoice','Y'),(246,'Penjualan Retail','ModeCetak',0,'1899-12-30 00:00:00','Cetak','Digunakan Untuk Set Mode Cetak Penjualan Retail;  Diisi : Cetak, Lihat atau \'\' (bila tidak ingin dicetak atau dilihat)','Y'),(247,'Penjualan Grosir','FormatCetak',0,'1899-12-30 00:00:00','Invoice','Digunakan Untuk Set Format Cetakan Penjualan Grosir; Diisi: Struk, Invoice','Y'),(248,'Penjualan Grosir','ModeCetak',0,'1899-12-30 00:00:00','Cetak','Digunakan Untuk Set Mode Cetak Penjualan Grosir;  Diisi : Cetak, Lihat atau \'\' (bila tidak ingin dicetak atau dilihat)','Y'),(249,'Penjualan Rakitan','FormatCetak',0,'1899-12-30 00:00:00','Invoice','Digunakan Untuk Set Format Cetakan Penjualan Rakitan; Diisi: Struk, Invoice','Y'),(250,'Penjualan Rakitan','ModeCetak',0,'1899-12-30 00:00:00','Cetak','Digunakan Untuk Set Mode Cetak Penjualan Rakitan;  Diisi : Cetak, Lihat atau \'\' (bila tidak ingin dicetak atau dilihat)','Y'),(251,'Penjualan Retail','JmlBrsCetakGrafik',17,'1899-12-30 00:00:00','','Digunakan Untuk Set Jumlah Baris Cetak Invoce Mode Grafik; Diisi 17 untuk panjang kertas 5,5 Inch (Setengah Kertas Letter)','Y'),(252,'Penjualan Grosir','JmlBrsCetakGrafik',17,'1899-12-30 00:00:00','','Digunakan Untuk Set Jumlah Baris Cetak Invoce Mode Grafik; Diisi 17 untuk panjang kertas 5,5 Inch (Setengah Kertas Letter)','Y'),(253,'Penjualan Rakitan','JmlBrsCetakGrafik',17,NULL,'','Digunakan Untuk Set Jumlah Baris Cetak Invoce Mode Grafik; Diisi 17 untuk panjang kertas 5,5 Inch (Setengah Kertas Letter)','Y'),(255,'Sales Order Grosir','ModeCetak',NULL,NULL,'Lihat','Digunakan Untuk Set Mode Cetak Sales Order Grosir;  Diisi : Cetak, Lihat atau \'\' (bila tidak ingin dicetak atau dilihat)','Y'),(258,'Sales Order Rakitan','ModeCetak',0,'1899-12-30 00:00:00','Lihat','Digunakan Untuk Set Mode Cetak Sales Order Rakitan;  Diisi : Cetak, Lihat atau \'\' (bila tidak ingin dicetak atau dilihat)',NULL),(300,'Masking','NoPol',0,'1899-12-30 00:00:00','!!*4{1,2,3,4,5,6,7,8,9,0}','Masking No Polisi Kendaraan di input Penjualan Grosir; !!*4{1,2,3,4,5,6,7,8,9,0} contoh \'AE1234\'','Y'),(400,'Kode Bayar Jual','KodeByr1',0,'1899-12-30 00:00:00','CASH','Tunai','Y'),(402,'Kode Bayar Jual','KodeByr3',0,'1899-12-30 00:00:00','TRANSFER','Transfer Via Bank','Y'),(500,'Kota Customer','Kota1',0,'1899-12-30 00:00:00','MOJOKERTO','Digunakan Untuk Daftar Kota Pada Saat Input Master Customer','Y'),(501,'Kota Customer','Kota2',0,'1899-12-30 00:00:00','MOJOSARI','Digunakan Untuk Daftar Kota Pada Saat Input Master Customer','Y'),(502,'Kota Customer','Kota3',0,'1899-12-30 00:00:00','JOMBANG','Digunakan Untuk Daftar Kota Pada Saat Input Master Customer','Y'),(600,'Default List Order','ListJurnal',0,'1899-12-30 00:00:00','No_bukti','Diisi Tanggal,No_bukti,Keterangan','Y'),(601,'Default List Order','ListBarang',0,'1899-12-30 00:00:00','NamaBrg','Diisi KodeBrg,NamaBrg,NamaGol,NamaSupp','Y'),(602,'Default List Order','ListCustomer',0,'1899-12-30 00:00:00','NamaCust','Diisi KodeCust,NamaCust,Alamat,Kota','Y'),(603,'Default List Order','ListSupplier',NULL,NULL,'NamaSupp','Diisi KodeSupp,NamaSupp,Alamat,Kota','Y'),(604,'Default List Order','ListGroupBarang',NULL,NULL,'NamaGol','Diisi KodeGol,NamaGol,Keterangan','Y'),(605,'Default List Order','ListGudang',NULL,NULL,'NamaGd','Diisi KodeGd,NamaGd,Keterangan','Y'),(700,'SuppType','SuppType1',0,'1899-12-30 00:00:00','Lokal','','Y'),(701,'SuppType','SuppType2',0,'1899-12-30 00:00:00','Luar Kota','','Y'),(710,'CustType','CustType1',NULL,NULL,'Lokal',NULL,'Y'),(711,'CustType','CustType2',NULL,NULL,'Luar Kota',NULL,'Y'),(790,'Template','LapCustomer',0,NULL,'Report','LapCustomer.rtm','Y'),(791,'Template','LapCustomerSummary',0,NULL,'Report','LapCustomerSummary.rtm','Y'),(793,'Template','LapSupplier',0,NULL,'Report','LapSupplier.rtm','Y'),(794,'Template','LapSupplierSummary',0,NULL,'Report','LapSupplierSummary.rtm','Y'),(796,'Template','LapMutasiGudang',0,NULL,'Report','LapMutasiGudang.rtm','Y'),(800,'Template','LapPosisiHutang',0,NULL,'Report','LapPosisiHutang.rtm','Y'),(801,'Template','LapKartuHutang',0,NULL,'Report','LapKartuHutang.rtm','Y'),(802,'Template','LapUmurHutang',0,NULL,'Report','LapUmurHutang.rtm','Y'),(805,'Template','LapPosisiPiutang',0,NULL,'Report','LapPosisiPiutang.rtm','Y'),(806,'Template','LapKartuPiutang',0,NULL,'Report','LapKartuPiutang.rtm','Y'),(807,'Template','LapUmurPiutang',0,NULL,'Report','LapUmurPiutang.rtm','Y'),(810,'Template','LapPosisiStock',0,NULL,'Report','LapPosisiStock.rtm','Y'),(811,'Template','LapPosisiStockNilai',0,NULL,'Report','LapPosisiStockNilai.rtm','Y'),(812,'Template','LapMinMaxStock',0,NULL,'Report','LapMinMaxStock.rtm','Y'),(813,'Template','LapKartuStock',0,NULL,'Report','LapKartuStock.rtm','Y'),(820,'Template','LapPembelianSummary',0,NULL,'Report','LapPembelianSummary.rtm','Y'),(821,'Template','LapPembelianDetail',0,NULL,'Report','LapPembelianDetail.rtm','Y'),(823,'Template','LapReturBeliSummary',0,NULL,'Report','LapReturPembelianSummary.rtm','Y'),(824,'Template','LapReturBeliDetail',0,NULL,'Report','LapReturPembelianDetail.rtm','Y'),(826,'Template','LapBayarBeliNota',0,NULL,'Report','LapPembayaranPembelianNota.rtm','Y'),(827,'Template','LapBayarBeliBayar',0,NULL,'Report','LapPembayaranPembelianBayar.rtm','Y'),(840,'Template','LapPoJualSummary',0,NULL,'Report','LapPoJualSummary.rtm','Y'),(842,'Template','LapSODetail',0,NULL,'Report','LapSODetail.rtm','Y'),(865,'Template','LapAnalisaJualSum',0,NULL,'Report','LapAnalisaPenjualanSummary.rtm','Y'),(866,'Template','LapAnalisaJualDtl',0,NULL,'Report','LapAnalisaPenjualanDetail.rtm','Y'),(871,'Template','LapAnalisaPenjualan',0,NULL,'Report','LapAnalisaPenjualan.rtm','Y'),(872,'Template','LapInvoiceRetail',0,NULL,'Report','LapInvoiceRetail.rtm','Y'),(873,'Template','LapInvoiceGrosir',0,NULL,'Report','LapInvoiceGrosir.rtm','Y'),(874,'Template','LapInvoiceRakitan',0,NULL,'Report','LapInvoiceRakitan.rtm','Y'),(875,'Template','LapRetJualRetailDtl',0,NULL,'Report','LapReturPenjualanRetailDetail.rtm','Y'),(876,'Template','LapRetJualRetailSum',0,NULL,'Report','LapReturPenjualanRetailSummary.rtm','Y'),(877,'Template','LapRetJualGrosirDtl',0,NULL,'Report','LapReturPenjualanGrosirDetail.rtm','Y'),(878,'Template','LapRetJualGrosirSum',0,NULL,'Report','LapReturPenjualanGrosirSummary.rtm','Y'),(880,'Template','MasterBarang',0,NULL,'Report','MasterBarang.rtm','Y'),(881,'Template','MasterBarangPersen',0,NULL,'Report','MasterBarangPersen.rtm','Y'),(882,'Template','LapPenjRetailSummary',0,NULL,'Report','LapPenjualanRetailSummary.rtm','Y'),(883,'Template','LapPenjRetailDetail',0,NULL,'Report','LapPenjualanRetailDetail.rtm','Y'),(884,'Template','LapPenjGrosirSummary',0,NULL,'Report','LapPenjualanGrosirSummary.rtm','Y'),(885,'Template','LapPenjGrosirDetail',0,NULL,'Report','LapPenjualanGrosirDetail.rtm','Y'),(888,'Template','PersediaanAwal',0,NULL,'Report','PersediaanAwal.rtm','Y'),(889,'Template','OpnameAwal',0,NULL,'Report','OpnameAwal.rtm','Y'),(890,'Template','LapInvoiceHasilProd',0,NULL,'Report','LapInvoiceHasilProduksi.rtm','Y'),(950,'UmurHut','1',-14,NULL,NULL,NULL,NULL),(951,'UmurHut','2',-7,NULL,NULL,NULL,NULL),(952,'UmurHut','3',0,NULL,NULL,NULL,NULL),(953,'UmurHut','4',8,NULL,NULL,NULL,NULL),(954,'UmurHut','5',15,NULL,NULL,NULL,NULL),(956,'UmurPiut','1',-14,NULL,NULL,NULL,NULL),(957,'UmurPiut','2',-7,NULL,NULL,NULL,NULL),(958,'UmurPiut','3',0,NULL,NULL,NULL,NULL),(959,'UmurPiut','4',8,NULL,NULL,NULL,NULL),(960,'UmurPiut','5',15,NULL,NULL,NULL,NULL),(971,'AutoJurnal','Hpp',0,'1899-12-30 00:00:00','511001','Kode Perkiraan Jurnal Untuk Harga Pokok Penjualan','Y'),(972,'AutoJurnal','PendapatanPenjualan',0,'1899-12-30 00:00:00','411001','Kode Perkiraan Jurnal Untuk Pendapatan Penjualan','Y'),(973,'AutoJurnal','ReturPenjualan',0,'1899-12-30 00:00:00','411002\r\n411002\r\n411002','Kode Perkiraan Jurnal Untuk Retur Penjualan','Y'),(974,'AutoJurnal','MasterSupplier',0,'1899-12-30 00:00:00','211001','Kode Perkiraan Awal Untuk Master Supplier','Y'),(975,'AutoJurnal','MasterCustomer',0,'1899-12-30 00:00:00','112001','Kode Perkiraan Awal Untuk Master Customer','Y'),(976,'AutoJurnal','PendapatanDiskon',0,'1899-12-30 00:00:00','411003','Kode Perkiraan Jurnal Untuk Pendapatan Diskon','Y'),(977,'AutoJurnal','Kas',0,'1899-12-30 00:00:00','111001','Kode Perkiraan Jurnal Untuk Kas','Y'),(978,'AutoJurnal','PersediaanBarang',0,'1899-12-30 00:00:00','113001','Kode Perkiraan Jurnal Untuk Persediaan Barang','Y'),(979,'AutoJurnal','BebanBarangRusak',0,'1899-12-30 00:00:00','521009','Kode Perkiraan Jurnal Untuk Beban Atas Kerusakan Barang','Y'),(980,'Set Cetak Struk','MaxChar',40,'1899-12-30 00:00:00','','Digunakan Untuk Set Banyaknya Karakter, Kiri Kertas Ke Kanan;  Diisi :40 s/d 50','Y'),(982,'Set Cetak Struk','MarginKanan',0,'1899-12-30 00:00:00','','Digunakan Untuk Set Jarak Spasi, Kanan Kertas Ke Heder dan Detil;  Diisi :0 s/d 10','Y'),(987,'Satuan','Satuan05',0,'1899-12-30 00:00:00','Set','','Y'),(988,'Satuan','Satuan06',0,'1899-12-30 00:00:00','Lusin','','Y'),(991,'Satuan','Satuan07',0,'2008-12-30 00:00:00','KG','','Y'),(996,'Satuan','Satuan08',0,'2008-12-30 00:00:00','Lbr','','Y'),(1003,'Set Cetak Struk','KeteranganFooter3',0,'2008-06-02 00:00:00','','Digunakan Untuk Set Catatan Footer; Diisi : \"Customer Service (0321) 6110825','Y'),(1004,'Set Cetak Closing','KeteranganFooter3',0,'2008-06-02 00:00:00','\" Customer Service (0321) 6110825','Digunakan Untuk Set Catatan Footer, Diisi : \" Customer Service (0321) 6110825','Y'),(1010,'Satuan','Satuan09',0,'2008-12-30 00:00:00','Ltr','','Y'),(1024,'Point','Point1',300000,'2018-07-14 00:00:00','1','Rokok Retail','Y'),(1026,'Point','Point2',150000,'1899-12-30 00:00:00','2','Non Rokok Retail','Y'),(1038,'Point','Point3',900000,'1899-12-30 00:00:00','3','Rokok Grosir','Y'),(1039,'Point','Point4',450000,'1899-12-30 00:00:00','4','Non Rokok Grosir','Y'),(1050,'Kode Bayar Jual','KodeByr2',0,'1899-12-30 00:00:00','COD','BAYAR DI TEMPAT','Y'),(1052,'Satuan','Satuan11',0,'2020-04-14 00:00:00','Batang','','Y'),(1061,'Kota Supplier','KOTA01',1,'2020-04-14 00:00:00','MOJOKERTO','','Y'),(1069,'Kota Customer','Kota4',0,'2020-04-14 00:00:00','SIDOARJO','','Y'),(1072,'Kota Customer','Kota7',0,'2020-04-14 00:00:00','SURABAYA','','Y'),(1073,'Satuan','Satuan12',0,'2020-04-14 00:00:00','Peti','','Y'),(1074,'Merk','MERK001',0,'1899-12-30 00:00:00','EIFFEL','','Y'),(1075,'Merk','MERK002',0,'1899-12-30 00:00:00','WALRUS','','Y'),(1076,'Kode Bayar Jual','KodeByr4',0,'2020-04-14 00:00:00','MESIN EDC','PEMBAYARAN MELALUI MESIN EDC','Y'),(1077,'Sales Order Retail','ModeCetak',NULL,NULL,'Cetak','Digunakan Untuk Set Mode Cetak Sales Order Grosir;  Diisi : Cetak, Lihat atau \'\' (bila tidak ingin dicetak atau dilihat)','Y'),(1078,'Satuan','Satuan10',0,'2020-04-15 00:00:00','MLtr','','Y'),(1086,'Kota Supplier','KOTA02',1,'2020-04-15 00:00:00','KUDUS','','Y'),(1167,'Kota Supplier','KOTA03',0,'1899-12-30 00:00:00','SURABAYA','','Y'),(1168,'Merk','MERK003',0,'1899-12-30 00:00:00','ONDA','','Y'),(1169,'Merk','MERK004',0,'1899-12-30 00:00:00','WASSER','','Y'),(1170,'Merk','MERK005',0,'1899-12-30 00:00:00','WASSER PUMP','','Y'),(1171,'Merk','MERK006',0,'1899-12-30 00:00:00','PALOMA','','Y'),(1172,'Merk','MERK7',0,'1899-12-30 00:00:00','DOMO','','Y'),(1173,'Merk','MERK8',0,'1899-12-30 00:00:00','DOLPHIN','','Y'),(1174,'Merk','MERK9',0,'1899-12-30 00:00:00','ROYAL KITCEN','','Y'),(1175,'Merk','MERK010',0,'1899-12-30 00:00:00','ROYAL','','Y'),(1177,'Merk','MERK011',0,'1899-12-30 00:00:00','AQUAPROOF','','Y'),(1178,'Merk','MERK012',0,'1899-12-30 00:00:00','BELEZZA','','Y'),(1179,'Merk','MERK013',0,'1899-12-30 00:00:00','DEKKSON','','Y'),(1180,'Merk','MERK014',0,'1899-12-30 00:00:00','HEMTON','','Y'),(1181,'Merk','MERK105',0,'1899-12-30 00:00:00','BREMEN','','Y'),(1183,'Merk','MERK016',0,'1899-12-30 00:00:00','NO DROP TINTING','','Y'),(1184,'Merk','MERK017',0,'1899-12-30 00:00:00','LENKOTE','','Y'),(1185,'Merk','MERK018',0,'1899-12-30 00:00:00','JASMINE','','Y'),(1186,'Merk','MERK019',0,'1899-12-30 00:00:00','PARAGON','','Y'),(1187,'Merk','MERK020',0,'1899-12-30 00:00:00','AVITEX','','Y'),(1188,'Merk','MERK021',0,'1899-12-30 00:00:00','AVIAN','','Y'),(1191,'Merk','MERK50',0,'1899-12-30 00:00:00','ACCURA','','Y'),(1192,'Merk','MERK51',0,'1899-12-30 00:00:00','PLATINUM','','Y'),(1193,'Merk','MERK022',0,'1899-12-30 00:00:00','WIL TON','','Y'),(1195,'Merk','MERK52',0,'1899-12-30 00:00:00','AGATTE','','Y'),(1196,'Merk','MERK53',0,'1899-12-30 00:00:00','AKASIA','','Y'),(1197,'Merk','MERK023',0,'1899-12-30 00:00:00','WESTPEX','','Y'),(1198,'Merk','MERK024',0,'1899-12-30 00:00:00','CAB','','Y'),(1199,'Merk','MERK025',0,'1899-12-30 00:00:00','GOMEO','','Y'),(1200,'Merk','MERK026',0,'1899-12-30 00:00:00','IMOKITO','','Y'),(1201,'Merk','MERK027',0,'1899-12-30 00:00:00','WATER PLUS','','Y'),(1202,'Merk','MERK028',0,'1899-12-30 00:00:00','WATERTEC','','Y'),(1203,'Merk','MERK54',0,'1899-12-30 00:00:00','ANTARES','','Y'),(1204,'Merk','MERK029',0,'1899-12-30 00:00:00','NIKKEN','','Y'),(1205,'Merk','MERK030',0,'1899-12-30 00:00:00','TRILIUN WARE','','Y'),(1206,'Merk','MERK031',0,'1899-12-30 00:00:00','MJ','','Y'),(1207,'Merk','MERK032',0,'1899-12-30 00:00:00','ALINCO','','Y'),(1208,'Merk','MERK035',0,'1899-12-30 00:00:00','AMICO','','Y'),(1209,'Merk','MERK033',0,'1899-12-30 00:00:00','HUBEN','','Y'),(1210,'Merk','MERK034',0,'1899-12-30 00:00:00','KOSSAI','','Y'),(1211,'Merk','MERK036',0,'1899-12-30 00:00:00','TRISENK','','Y'),(1212,'Merk','MERK037',0,'1899-12-30 00:00:00','FALY','','Y'),(1213,'Merk','MERK038',0,'1899-12-30 00:00:00','PRESTILE','','Y'),(1214,'Merk','MERK039',0,'1899-12-30 00:00:00','GLOBAL TECH','','Y'),(1215,'Merk','MERK040',0,'1899-12-30 00:00:00','NIKO','','Y'),(1216,'Merk','MERK041',0,'1899-12-30 00:00:00','WIKA','','Y'),(1217,'Merk','MERK42',0,'1899-12-30 00:00:00','PENGUIN','','Y'),(1218,'Merk','MERK43',0,'1899-12-30 00:00:00','PROFIL TANK','','Y'),(1219,'Merk','MERK44',0,'1899-12-30 00:00:00','NEW STAR','','Y'),(1220,'Merk','MERK45',0,'1899-12-30 00:00:00','SKL','','Y'),(1221,'Merk','MERK46',0,'1899-12-30 00:00:00','DEVEN','','Y'),(1222,'Merk','MERK55',0,'1899-12-30 00:00:00','ARTCERAMIC','','Y'),(1223,'Merk','MERK56',0,'1899-12-30 00:00:00','ASIA TILE','','Y'),(1224,'Merk','MERK57',0,'1899-12-30 00:00:00','ATHENA','','Y'),(1225,'Merk','MERK58',0,'1899-12-30 00:00:00','BELGRANO','','Y'),(1226,'Merk','MERK47',0,'1899-12-30 00:00:00','KDK','','Y'),(1227,'Merk','MERK48',0,'1899-12-30 00:00:00','TRISENSA','','Y'),(1228,'Merk','MERK49',0,'1899-12-30 00:00:00','SMCO','','Y'),(1229,'Merk','MERK100',0,'1899-12-30 00:00:00','HOME CARE','','Y'),(1230,'Merk','MERK101',0,'1899-12-30 00:00:00','ANGKASA','','Y'),(1231,'Merk','MERK102',0,'1899-12-30 00:00:00','BANO','','Y'),(1232,'Kota Customer','KOTA5',0,'1899-12-30 00:00:00','LAMONGAN','','Y'),(1233,'Kota Customer','KOTA6',0,'1899-12-30 00:00:00','GRESIK','','Y'),(1234,'Kota Supplier','KOTA04',0,'1899-12-30 00:00:00','SEMARANG','','Y'),(1235,'Kota Supplier','KOTA05',0,'1899-12-30 00:00:00','SIDOARJO','','Y'),(1236,'Kota Supplier','KOTA06',0,'1899-12-30 00:00:00','JAKARTA','','Y'),(1237,'Kota Supplier','KOTA07',0,'1899-12-30 00:00:00','MALANG','','Y'),(1238,'Merk','MERK120',0,'1899-12-30 00:00:00','FUJIMI','','Y'),(1239,'Satuan','Satuan13',0,'1899-12-30 00:00:00','Galon','','Y'),(1240,'Satuan','Satuan14',0,'1899-12-30 00:00:00','Pill','','Y'),(1241,'Satuan','Satuan15',0,'1899-12-30 00:00:00','Kaleng','','Y'),(1242,'Merk','MERK133',0,'1899-12-30 00:00:00','FAVORITE','','Y'),(1243,'Merk','MERK135',0,'1899-12-30 00:00:00','MU','','Y'),(1244,'Kota Supplier','KOTA08',0,'1899-12-30 00:00:00','GRESIK','','Y'),(1245,'Kota Supplier','KOTA09',0,'1899-12-30 00:00:00','JOMBANG','','Y'),(1246,'Kota Supplier','KOTA10',0,'1899-12-30 00:00:00','MOJOSARI','','Y'),(1247,'Merk','MERK136',0,'1899-12-30 00:00:00','DIVA','','Y'),(1248,'Merk','MERK136',0,'1899-12-30 00:00:00','SIGNATURE','','Y'),(1249,'Merk','mERK137',0,'1899-12-30 00:00:00','TOTO','','Y'),(1250,'Kota Customer','KOTA8',0,'1899-12-30 00:00:00','KERTOSONO','','Y'),(1251,'Merk','MERK',0,'2020-07-03 00:00:00','WREN-CH','','Y'),(1252,'Merk','MERK10',0,'1899-12-30 00:00:00',' PLATINUM','','Y'),(1256,'Merk','MERK 456',0,'1899-12-30 00:00:00','ONGKIR 4','','Y'),(1257,'Merk','',0,'1899-12-30 00:00:00','','','Y'),(1258,'Merk','MERK 77',0,'2020-07-12 00:00:00','RED HOUSE','','Y'),(1260,'Merk','MERK  1234',0,'2020-08-04 00:00:00','DIAMOND','','Y'),(1261,'Merk','MERK 124',0,'2020-08-04 00:00:00','ARWANA','','Y'),(1262,'Merk','MERK125',0,'2020-08-04 00:00:00','ESTILLO','','Y'),(1263,'Merk','MERK 777',0,'2020-08-20 00:00:00','BAHAN BANGUNAN','','Y'),(1264,'Satuan','SATUAN 16',0,'2020-10-27 00:00:00','RET','','Y'),(1265,'Merk','MERK ',0,'2021-08-24 00:00:00','RED LINE','','Y'),(1266,'Pajak','PPN',11,NULL,NULL,NULL,'Y');

--
-- Table structure for table `tm_shift`
--

CREATE TABLE `tm_shift` (
  `KodeShift` varchar(15) NOT NULL,
  `NamaShift` varchar(25) default NULL,
  `JamStart` datetime NOT NULL,
  `JamEnd` datetime NOT NULL,
  PRIMARY KEY  (`KodeShift`,`JamStart`,`JamEnd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_shift`
--

INSERT INTO `tm_shift` VALUES ('001','PAGI','2013-01-30 08:00:00','2013-01-30 16:00:00'),('002','Sore','2013-01-30 16:00:00','2013-01-30 21:00:00');

--
-- Table structure for table `tm_sj`
--

CREATE TABLE `tm_sj` (
  `KodeSJ` int(12) NOT NULL auto_increment,
  `NamaSJ` varchar(100) default NULL,
  `AlamatSJ` varchar(200) default NULL,
  PRIMARY KEY  (`KodeSJ`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_sj`
--


--
-- Table structure for table `tm_stockbrg`
--

CREATE TABLE `tm_stockbrg` (
  `KodeBrg` varchar(20) NOT NULL default '',
  `NamaBrg` varchar(50) default NULL,
  `KodeGd` varchar(5) NOT NULL default '',
  `StockAwal` double(10,2) default NULL,
  `StockAkhir` double(10,2) default NULL,
  `NilaiAwal` double default NULL,
  `TglAwal` date default NULL,
  `Stock` double default NULL,
  `Stock0` double default NULL,
  `Stock1` double default NULL,
  `Stock2` double default NULL,
  `Stock3` double default NULL,
  `SatuanStok1` varchar(30) default NULL,
  `SatuanStok2` varchar(30) default NULL,
  `SatuanStok3` varchar(30) default NULL,
  PRIMARY KEY  (`KodeBrg`,`KodeGd`),
  KEY `fk_MStockBrg2` (`KodeGd`),
  CONSTRAINT `fk_MStockBrg1` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_MStockBrg2` FOREIGN KEY (`KodeGd`) REFERENCES `tm_gudang` (`KodeGd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_stockbrg`
--

INSERT INTO `tm_stockbrg` VALUES ('B00000070','CLOSED JONGKOK  AMSTAD SQUAD RAPI EX AMBONE','GD',0.00,10.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000104','GRANIT EFATA LUMINOUS BROWN 60X60 KW 1','GD',0.00,148.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000106','CLOSET DUDUK SIRAM TRYLIYUN MARON','GD',0.00,20.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000126','DUPONT GOLD 50x50 KW 1','GD',0.00,438.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000215','AMAYA BEIGE 25X25 KW 1','GD',0.00,191.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000286','GRANIT RIXO DOUBLE LODING  KW 1 LOKAL','GD',0.00,187.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000291','IKAD DT 7178A DO BUNGA 30X60 KW 2','GD',0.00,143.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000294','DOVER BROWN 50X50 KW 1','GD',0.00,264.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000298','NAVARE BEIGE 40X40 KW 1','GD',0.00,-5.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000305','BEATRIX BASIC 25X40 KW 1','GD',0.00,250.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000307','UNO CREMA CREAM 50X50 KW 1','GD',0.00,473.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000309','MURANO 40X40 KW 1 PROMO','GD',0.00,498.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000315','JASMINE CREAM 25X40 KW 1','GD',0.00,590.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000318','MALIBU GREY 25X40 KW 1','GD',0.00,299.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000319','WINA GREY 25X40 KW 1','GD',0.00,396.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000323','TULIP BEIGE 25071 25X40 KW 1','GD',0.00,299.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000331','ACACIA BEIGE 25X40 KW 1','GD',0.00,299.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000333','GRANIT EFATA LUMINOS WHITE 60X60 KW 1','GD',0.00,546.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000352','GENOVA CREAM 50X50 KW 1','GD',0.00,400.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000360','BOTTEGA BEIGE 25X50 KW 1','GD',0.00,284.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000367','OREGON GREY 40X40 KW 1','GD',0.00,240.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000373','AR 9999 CREAM 40X40 KW 1','GD',0.00,497.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000378','MURANO 30X30 KW 1','GD',0.00,718.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000384','ILLUSION BEIGE 25X40 KW 1','GD',0.00,-3.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000397','KALIMANJARO BROWN 50X50 KW 1','GD',0.00,300.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000399','ALICANTE BROWN 50X50 KW 1','GD',0.00,438.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000409','PADOVA GREEN 25X50 KW 1','GD',0.00,288.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000411','JASMINE BEIGE 25X40 KW 1','GD',0.00,299.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000412','ACACIA GREEN 25X40 KW 1','GD',0.00,495.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000439','GRANIT GRENIC KMG SPT CAIPSO NATURAL 60X60 KW 1','GD',0.00,198.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000445','HOLDEN BASIC 25X40 KW 1','GD',0.00,301.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000446','DALLAS GREY 50X50 KW 1','GD',0.00,140.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000458','LEXUS CREAM 50X50 KW 1 ','GD',0.00,950.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000460','LEXUS GREY 50X50 KW 1','GD',0.00,945.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000461','IKAD GARIS CREAM SZ 12578 50X50 KW 1','GD',0.00,400.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000469','CANOWOOD GREYS 50X50 KW 1','GD',0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000482','BOTTEGA GREY 25X50 KW 1','GD',0.00,285.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000499','OPAL GREEN 25X40 KW 1 ','GD',0.00,396.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000500','MALDIVES CREAM 25X50 KW 1','GD',0.00,296.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000501','ACACIA BLUE 25X40 KW 1','GD',0.00,496.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000509','GRANIT EFATA BLACK 60X60 KW 1 SUPER BLACK','GD',0.00,100.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000515','WINA BLUE 25X40 KW 1','GD',0.00,297.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000519','AMAYA GREEN 25X25 KW 1','GD',0.00,192.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000520','BEATRIX BLUE 25X40 KW 1','GD',0.00,420.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000534','ACACIA GREY 25X40 KW 1','GD',0.00,794.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000594','DAVOSA BROWN 50X50 KW 1','GD',0.00,437.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000636','LIST RM 120G BROWN','GD',0.00,-4.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000650','CLOSET DUDUK SIRAM TRILIYUN BIRU','GD',0.00,20.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000651','CLOSET DUDUK SIRAM TRILIYUN HIJAU','GD',0.00,30.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000653','CLOSET DUDUK SIRAM TRILIYUN PINK','GD',0.00,10.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000654','CLOSET DUDUK SIRAM TRILIYUN PUTIH','GD',0.00,13.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000658','CLOSET MONO BLOCK TRILIYUN JASPER PUTIH','GD',0.00,15.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000660','CLOSET MONO BLOCK TRILIYUN JASPER IVORY','GD',0.00,7.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000663','CLOSET MONO BLOCK TRILIYUN SHAPIRRA IVORY','GD',0.00,4.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000667','CLOSET MONO BLOCK TRILIYUN SHAPIRRA MARON','GD',0.00,3.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000706','TUSCANY GREY REC 30X60 KW 3','GD',0.00,100.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000710','DUPONT GREY 50X50 KW 1 PLATINUM','GD',0.00,-21.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000721','OTTO GREY 40X40 KW 1','GD',0.00,500.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000738','IKAD GARIS GREY  SZ 14578 50X50 KW 1','GD',0.00,768.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000742','IKAD SL 27046 25X25 KW 3 BLACK','GD',0.00,128.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000744','IKAD GARIS CREAM SZ 12578 DO 50X50 KW 3','GD',0.00,397.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000751','CLOSED JONGKOK  AMSTAD SQUAD RAPI EX WHITE','GD',0.00,10.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000759','NOBU BLUE 25X25 KW 1','GD',0.00,199.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000763','DETROID BROWN 50X50 KW 1','GD',0.00,264.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000766','MALDIVES BLUE 25X50 KW 1','GD',0.00,298.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000767','MALDIVES GREY 25X50 KW 1','GD',0.00,296.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000768','DALLAS BROWN 50X50 KW 1','GD',0.00,330.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000769','DUOMO GREY 50X50 KW 1','GD',0.00,250.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000774','OPAL BLUE 25X40 KW 1','GD',0.00,394.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000778','RUBY GREY 50X50 KW 1','GD',0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000794','CLOSET JONGKOK TRILIYUN PUTIH','GD',0.00,50.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000795','CLOSET JONGKOK TRILIYUN MARON','GD',0.00,50.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000804','DALILA GREEN 25X40 KW 1','GD',0.00,495.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000817','IKAD MAWAR PINK DX 3839 DO 25X40 KW 1','GD',0.00,199.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000822','AMORE DARK GREY 25X40 KW 1','GD',0.00,297.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000830','BEATRIX GREY 25X40 KW 1','GD',0.00,539.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000834','DUPONT SILVER 50X50 KW 1','GD',0.00,471.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000836','DAVOSA BROWN 40X40 KW 1','GD',0.00,416.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000863','UNO MOTO BOYO 25835 GREY 25X40 KW 1','GD',0.00,388.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000865','ZERMAT BLUE 25X40 KW 1','GD',0.00,198.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000869','DUOMO BROWN 50X50 KW 1','GD',0.00,250.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000883','LOTUS BLUE 25X40 KW 1','GD',0.00,296.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000902','ZERMAT GREEN 25X40 KW 1','GD',0.00,197.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000909','KUCAN PERMEN GREY','GD',0.00,8698.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000923','MALIBU BEIGE 25X40 KW 1','GD',0.00,294.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000926','RIO GREY 40X40 KW 1','GD',0.00,-1.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00000937','OSCAR BROWN 40X40 KW 3','GD',0.00,-3.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001060','IKAD MARMER GREY 14588 DO 50 X 50 KW 1','GD',0.00,1144.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001069','MAKARA BROWN KW 1','GD',0.00,199.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001074','ALTHEA GREY 25X40 KW 1','GD',0.00,398.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001075','ZURICH BROWN 40X40 KW 1 ','GD',0.00,1015.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001090','NAT MU408 SMART CREAM','GD',0.00,330.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001095','NAT MU408 MAGIC RED','GD',0.00,60.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001100','NAT MU408 GRANITE GREY','GD',0.00,100.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001102','NAT MU408 MILKY BROWN','GD',0.00,50.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001105','NAT MU408 DARK BLACK ','GD',0.00,300.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001138','LIST KEVIN/ZIGZAG GREEN','GD',0.00,-6.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001274','CLOSET JONGKOK TRILIYUN IVORY','GD',0.00,58.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001346','OSLO BROWN 40X40 KW 1','GD',0.00,250.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001382','OSLO GREY 40X40 KW 1','GD',0.00,239.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001397','SALVATORE BROWN 50X50 KW 1','GD',0.00,176.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001424','ZIGMA CREAM 40X40 KW 1 ISI 6 PCS','GD',0.00,1000.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001440','WASTAFEL VOLK P01 KOMPLIT','GD',0.00,60.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001469','SALVATORE BROWN 60X60 KW 1','GD',0.00,33.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001472','WASTAFEL AMSTAD KECIL  PUTIH STUDIO 45','GD',0.00,12.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001473','WASTAFEL AMSTAD BESAR STUDIO 50 KOSONGAN','GD',0.00,12.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001476','OTAWA BROWN 50X50 KW 1','GD',0.00,439.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001506','GRANIT CERANOSA CR POLOS 60X60 KW 1  CHINA','GD',0.00,4743.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001521','FIRENZE GREY 25X50 KW 1','GD',0.00,300.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001522','FIRENZE BEIGE 25X50 KW 1','GD',0.00,671.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001533','CLOSET MONOBLOCK TRYLIYUN SHAPIRA PUTIH','GD',0.00,5.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001559','PIANO CREAM 60X60 KW 3 ','GD',0.00,-1.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001560','MAKARA GREY 40X40 KW 1','GD',0.00,120.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001579','IKAD CRYSTAL GREY 5OX5O IKAD KW 1','GD',0.00,1198.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001583','TELTRIM GOLD TIPIS','GD',0.00,-1.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001589','EDEN BEIGE 25X50 KW 1','GD',0.00,299.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001590','EDEN GREY 25X50 KW 1','GD',0.00,297.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001591','AMAYA BLUE 25X25 KW 1','GD',0.00,192.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001644','GRANIT GARUDA POLOS CREAM 60X60 KW 1 INDO','GD',0.00,552.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001693','RICHWOOD  BEIGE 25X40 KA 1','GD',0.00,297.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001766','GRANIT GRENIC KMG SPT ZODIAK NATURAL 60X60 KW 1','GD',0.00,298.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001787','GLASBOX KACA OCEAN VIEW 95005','GD',0.00,180.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001788','INTERLAKEN WHITE 25X50 KW 1 ','GD',0.00,860.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001881','GRANIT ARNA ARCADIA BEIGE TERRAZO 60X60 KW 2 ','GD',0.00,175.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001887','OKLAHOMA GREY 50X50 KW 1','GD',0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001925','GRANIT EFATA PORTOLO GOLD 60X60 KW 1','GD',0.00,307.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001927','IKAD CRYSTAL BEIGE 50X50 KW 1','GD',0.00,798.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001932','WOODSTONE BROWN 40X40 KW 1','GD',0.00,299.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001933','WOODSTONE GREY 40X40 KW 1','GD',0.00,150.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001939','GRANIT EFATA CITRIN GREY 60X60 KW 1','GD',0.00,100.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001940','GRANIT EFATA LORENSO  BLACK 60X60 KW 1 PGP   EX-8','GD',0.00,100.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001951','GRANIT GOLF 6189  60X60 KW 1','GD',0.00,198.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001954','PADOVA CREAM 25X50 KW 1','GD',0.00,380.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001966','KUNCI BREMEN B120502    BESAR','GD',0.00,12.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001997','ROSETTA BEIGE 25X50 KW 1','GD',0.00,382.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001998','ROSETTA GREY 25X50 KW 1','GD',0.00,384.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00001999','ROSETTA BLUE 25X50 KW 1','GD',0.00,383.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002000','ROSETTA GREEN 25X50 KW 1','GD',0.00,300.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002016','HAVANA CREAM 50X50 KW 1','GD',0.00,500.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002019','TRIFECTA BROWN 25X40 KW 1','GD',0.00,297.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002020','TRIFECTA GREY 25X40 KW 1','GD',0.00,296.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002027','IKAD SL 25046 25X25 KW 2 BROWN','GD',0.00,150.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002047','REVO GREEN 25X25 KW 1','GD',0.00,250.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002048','REVO GREY 25X25 KW 1','GD',0.00,249.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002049','REVO BROWN 25X25 KW 1','GD',0.00,250.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002050','REVO BLUE 25X25 KW 1','GD',0.00,250.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002063','KUCAN BOTT WHITE','GD',0.00,-20.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002091','ROLEX BROWN 50X50 KW 1','GD',0.00,439.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002099','DENALI GREY 25X50 KW 1','GD',0.00,381.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002121','IKAD DT 61110 DO 30X60 KW 2','GD',0.00,238.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002122','IKAD DT 71780 DO 30X60 KW 2','GD',0.00,144.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002129','RICHWOOD GREY 25X40 KW 1','GD',0.00,297.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002141','PADOVA GREY 25X50 KW 1','GD',0.00,148.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002146','RUMAH KUNCI DEKSON ESCN Z01 SN=+NP','GD',0.00,50.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002150','OPAL GREY 25X40 KW 1','GD',0.00,296.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002157','SILICONE BATHROOM CLEAR/PUTIH','GD',0.00,12.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002159','SILICONE GLAAS CLEAR/PUTIH ','GD',0.00,12.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002167','GRANIT ARNA KIANO WHITE 60X60 KW 2','GD',0.00,240.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002169','GRANIT EFATA LUMINOUS /CRYSTAL GREY 60X60 KW 1','GD',0.00,250.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002194','OSLO BROWN 30X30 KW 1','GD',0.00,250.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002195','OSLO GREY 30X30 KW 1','GD',0.00,239.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002197','OREGON BROWN 30X30 KW 1','GD',0.00,250.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002217','GLASBOX AYANA','GD',0.00,180.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002236','KUCAN MONZA GREEN  W-30 ULIR   RRT','GD',0.00,-25.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002242','GRANIT EFATA SOLID GREY 60X60 KW 1','GD',0.00,100.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002243','LIST FANI SILVER BLACK 10X60 KW 1','GD',0.00,720.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002256','LIST SAVANA GREEN 8X40 KW 1','GD',0.00,-10.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002268','ENGSEL DEKSON ES ECO LINE 3X2.5X2.5MM 2BB','GD',0.00,60.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002272','MORTISE LOCK  DEKSON MTS IL DL 8485 SSS','GD',0.00,12.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002273','MORTISE LOCK DEKSON MTS RL DL 8485  SSS','GD',0.00,48.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002274','MORTISE LOCK DEKSON MTS SLD DL 84100','GD',0.00,24.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002275','CILYNDER DEKSON  CYL  DC DL60MM SN','GD',0.00,84.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002283','DEKSON FLUSH BOLT FB 040 12\'\'  SSS','GD',0.00,24.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002284','DEKSON FLUSH BOLD FB 040 18\'\'  SSS','GD',0.00,24.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002289','HAMPTON SPRING KNIFE SK SQ 110  SN','GD',0.00,72.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002290','HAMPTON MAGNETIC DOOR STOPER MDS 2229 SN','GD',0.00,48.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002291','HAMPTON MAGNETIC DOOR STOPER MDS 2231 SN','GD',0.00,48.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002305','GENOVA BROWN 50X50 KW 1','GD',0.00,939.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002306','IKAD MAWAR VIOLET DX 3939 DO 25X40 KW 2','GD',0.00,191.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002317','HAMPTON MORTISE LOCK  MTS RL HP 4O X 85 SN','GD',0.00,24.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002320','CYLINDER KUNCI HAMPTON CYL DC BR DL 60 MM SN','GD',0.00,24.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002329','HANDLE DEKSON TPH 981  38X630X600MM PSS+SSS','GD',0.00,6.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002334','DEKSON FLUSH BOLT FB 040 8 INC SSS','GD',0.00,48.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002345','ENGSEL DEKSON ES SL 9\'\'  CP','GD',0.00,72.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002350','MALDIVES GREEN 25X50 KW 1','GD',0.00,298.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002351','IKAD ONYX GREY SZ 14143 50X50 KW 1','GD',0.00,480.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002364','OPAL BEIGE 25X40 KW 1','GD',0.00,297.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002372','KLOSET VOLK KODOK 056','GD',0.00,10.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002373','OMNIA GREEN 25X25 KW 1','GD',0.00,108.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002383','IKAD DX 7469A 25X40 KW  1','GD',0.00,175.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002399','IKAD KOTAK BLACK 25X25 KW 3','GD',0.00,302.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002406','HANDLE DEKSON  ECOLINE PH 269 30X15X400X250 PSS+S','GD',0.00,6.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002411','ALMARIA GREY 40X40 KW 1','GD',0.00,398.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002414','MALPENSA GREY 25X50 KW 1','GD',0.00,663.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002415','MALPENSA BROWN 25X50 KW 1','GD',0.00,381.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002424','VISCONTI 60X60 KW 3','GD',0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002433','MOSCOW GREEN 40X40 KW 1 ','GD',0.00,500.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002436','KING STONE GREY 50X50 KW 1','GD',0.00,511.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002437','KING STONE BROWN 50X50 KW 1','GD',0.00,314.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002455','KLOSET AMSTAD MY SINGLE FLUSH BONUS JET SHOWER','GD',0.00,20.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002458','MOSCOW CREAM 40X40 KW 1','GD',0.00,1540.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002466','ARIA BLUE 25X25 KW 1','GD',0.00,199.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002468','CLOSET DUDUK SIRAM VOLK PUTIH','GD',0.00,92.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002469','ROXETE BEIGE 25X40 KW 1','GD',0.00,502.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002480','MOSCOW GREY 40X40 KW 1','GD',0.00,949.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002481','IKAD 11165 D 3 50X50 KW 1 MOTIF GRANIT','GD',0.00,940.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002495','GRANIT ARNA DAIVA WHITE 60X60 KW 2','GD',0.00,207.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002512','CLOSED VOLK 663 KOSONGAN','GD',0.00,117.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002516','QUEBEC BLUE UNO 25X40 KW 1','GD',0.00,396.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002518','QUEBEC GREY UNO 25X40 KW 1','GD',0.00,394.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002519','ALAMANDA CREAM 25X40 KW 1','GD',0.00,297.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002525','SHOWER EINER FS-HSW-01','GD',0.00,34.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002526','BAK MANDI  SUDUT WALRUS 120 L BEIGE + GAYUNG','GD',0.00,8.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002551','SILICONE BATHROOM TRANSPARAN','GD',0.00,12.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002566','KUNCI TANGGUNG AFOS  60172-M SN/CP','GD',0.00,24.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002567','KUNCI TANGGUNG AFOS 60108-M SN/CP','GD',0.00,24.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002568','KUNCI TANGGUNG AFOS 60221-M SN/CP','GD',0.00,24.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002569','KUNCI TANGGUNG AFOS 60167-M SN/CP','GD',0.00,24.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002570','KUNCI BESAR AFOS 9001 SN/CP','GD',0.00,24.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002571','KUNCI BESAR AFOS 9002 SN/CP','GD',0.00,24.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002572','KUNCI BESAR AFOS 9003 SN/CP','GD',0.00,24.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002573','KUNCI BESAR AFOS 9004 SN/CP','GD',0.00,24.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002574','BCP PRESTILE 1 METER TEBAL','GD',0.00,12.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002575','BCP ASICS 830X440X200 MM  TEBAL','GD',0.00,12.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002585','TELTRIM SOF MASJID TEBAL PJNG 2,5','GD',0.00,100.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002591','KRAN AFOS E803','GD',0.00,50.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002620','DAVOSA ANTRACITE 40X40 KW 1','GD',0.00,555.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002637','LIST RM 366 BROWN 8X25','GD',0.00,1400.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002640','DAYTONA BROWN 50X50 KW 3','GD',0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002663','IKAD PUTIH PETIR SZ 11125 D3 50X50 KW 1','GD',0.00,1595.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002677','DAVOSA GREY / ANTRACITE 50x50 kw 1','GD',0.00,410.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('B00002693','AMAYA GREY 25X25 KW 1','GD',0.00,192.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `groupstock` BEFORE UPDATE ON `tm_stockbrg` FOR EACH ROW BEGIN
		DECLARE K1, K2, K3 DECIMAL (10,2);
    DECLARE Sat1, Sat2, Sat3 VARCHAR(30);
		DECLARE Urut VARCHAR(6);
		DECLARE Proses VARCHAR(2);
		DECLARE Stc DECIMAL (10,2);
IF 1=2 THEN
		SET Stc= IFNULL(new.StockAkhir,0);
		SELECT Konv1, Konv2, Konv3, Satuan1, Satuan2, Satuan3 INTO K1, K2, K3, Sat1, Sat2, Sat3 FROM tm_barang WHERE KodeBrg=new.KodeBrg;
		SET Urut = "000000";
		SET new.Stock0=0;
		SET new.Stock1=0;
		SET new.Stock2=0;
		SET new.Stock3=0;
 
		  
		IF (IFNULL(K1,0) > IFNULL(K2,0)) AND (IFNULL(K1,0) > IFNULL(K3,0)) THEN
		 SET Urut= INSERT(Urut, 1,2, "K1");
		END IF;
		IF (IFNULL(K2,0) > IFNULL(K1,0)) AND (IFNULL(K2,0) > IFNULL(K3,0)) THEN
		 SET Urut= INSERT(Urut, 1,2, "K2");
		END IF;
		IF (IFNULL(K3,0) > IFNULL(K1,0)) AND (IFNULL(K3,0) > IFNULL(K2,0)) THEN
		 SET Urut= INSERT(Urut, 1,2, "K3");
		END IF;
		IF (IFNULL(K1,0) < IFNULL(K2,0)) AND (IFNULL(K1,0) < IFNULL(K3,0)) THEN
		  SET Urut= INSERT(Urut, 5,2, "K1");
		END IF;
		IF (IFNULL(K2,0) < IFNULL(K1,0)) AND (IFNULL(K2,0) < IFNULL(K3,0)) THEN
		  SET Urut= INSERT(Urut, 5,2, "K2");
		END IF;
		IF (IFNULL(K3,0) < IFNULL(K1,0)) AND (IFNULL(K3,0) < IFNULL(K2,0)) THEN
		 SET Urut= INSERT(Urut, 5,2, "K3");
		END IF;
		IF (POSITION(1 IN Urut) = 0)  THEN
		 SET Urut= INSERT(Urut, 3, 2, "K1");
		END IF; 
		IF (POSITION(2 IN Urut) = 0)   THEN
		 SET Urut= INSERT(Urut, 3, 2, "K2");
		END IF;
		IF (POSITION(3 IN Urut)= 0)  THEN
		 SET Urut= INSERT(Urut, 3, 2, "K3");
		END IF;
		
		IF IFNULL(K1,0) = 0 THEN
		   SET Urut= REPLACE(Urut, "K1", "00");
		END IF;
                                     IF IFNULL(K2,0) = 0 THEN
		   SET Urut= REPLACE(Urut, "K2", "00");
		END IF;
		IF IFNULL(K3,0) = 0 THEN
		   SET Urut= REPLACE(Urut, "K3", "00");
		END IF;		
    SET new.NamaBrg=Urut;
		SET Proses= Left(Urut, 2);
		SET Urut = Right(Urut, Length(Urut)-2);
		IF Proses="K1" THEN
			SET new.Stock1= Stc DIV K1;
			SET Stc = Stc - (new.Stock1 * K1);
      SET new.SatuanStok1= Sat1;
				
		END IF; 
		IF Proses="K2" THEN
			SET new.Stock1= Stc DIV K2;
			SET Stc = Stc - (new.Stock1 * K2);
      SET new.SatuanStok1=Sat2;
				
		END IF; 
		IF Proses="K3" THEN
			SET new.Stock1= Stc DIV K3;
			SET Stc = Stc - (new.Stock1 * K3);
      SET new.SatuanStok1=Sat3;
				
		END IF; 
		SET Proses= Left(Urut, 2);
		SET Urut = Right(Urut, Length(Urut)-2);
		IF Proses="K1" THEN
			SET new.Stock2= Stc DIV K1;
			SET Stc = Stc - (new.Stock2 * K1);
		  SET new.SatuanStok2=Sat1;
		END IF; 
		IF Proses="K2" THEN
			SET new.Stock2= Stc DIV K2;
			SET Stc = Stc - (new.Stock2 * K2);
			SET new.SatuanStok2=Sat2;	
		END IF; 
		IF Proses="K3" THEN
			SET new.Stock2= Stc DIV K3;
			SET Stc = Stc - (new.Stock2 * K3);
			SET new.SatuanStok2=Sat3;	
		END IF; 
		SET Proses= Left(Urut, 2);
		SET Urut = Right(Urut, Length(Urut)-2);
		IF Proses="K1" THEN
			SET new.Stock3= Stc DIV K1;
			SET Stc = Stc - (new.Stock3 * K1);
				SET new.SatuanStok3=Sat1;
		END IF; 
		IF Proses="K2" THEN
			SET new.Stock3= Stc DIV K2;
			SET Stc = Stc - (new.Stock3 * K2);
				SET new.SatuanStok3=Sat2;
		END IF; 
		IF Proses="K3" THEN
			SET new.Stock3= Stc DIV K3;
			SET Stc = Stc - (new.Stock3 * K3);
				SET new.SatuanStok3=Sat3;
		END IF; 
                                     
                                   SET new.Stock0=Stc;
                                     IF New.Stock0 IS NULL THEN 
                                         SET new.Stock0 = 0;
                                     END IF;
                                     IF New.Stock1 IS NULL THEN 
                                         SET new.Stock1 = 0;
                                     END IF;
                                     IF New.Stock2 IS NULL THEN 
                                         SET new.Stock2 = 0;
                                     END IF;
                                     IF New.Stock3 IS NULL THEN 
                                         SET new.Stock3 = 0;
                                     END IF;
END IF;
END */;;

DELIMITER ;

--
-- Table structure for table `tm_supplier`
--

CREATE TABLE `tm_supplier` (
  `KodeSupp` varchar(10) NOT NULL default '',
  `NamaSupp` varchar(50) default NULL,
  `Editnama` varchar(1) default NULL,
  `Alamat` varchar(50) default NULL,
  `Kota` varchar(30) default NULL,
  `Telp` varchar(30) default NULL,
  `Fax` varchar(30) default NULL,
  `email` varchar(50) default NULL,
  `webpage` varchar(50) default NULL,
  `SuppType` varchar(10) default NULL,
  `CreditLimit` double default NULL,
  `Defvalas` varchar(10) default NULL,
  `SyaratByr` int(11) default NULL,
  `Keterangan` varchar(100) default NULL,
  `Aktif` varchar(1) default 'Y',
  `Hutang` double default NULL,
  `HTAwal` double default NULL,
  `TglHtAwal` datetime default NULL,
  `AccHt` varchar(20) default NULL,
  `AccHtBG` varchar(20) default NULL,
  `AccHtDB` varchar(20) default NULL,
  `AccHtCR` varchar(20) default NULL,
  `AccHtTitip` varchar(20) default NULL,
  `DefD1` double default NULL,
  `DefD2` double default NULL,
  `DefD3` double default NULL,
  `DefD4` double default NULL,
  `DefTamb` double default NULL,
  `DefKetTamb` varchar(50) default NULL,
  `FieldSupp1` varchar(100) default NULL,
  `FieldSupp2` varchar(100) default NULL,
  `FieldSupp3` varchar(100) default NULL,
  `FieldSupp4` varchar(100) default NULL,
  `FieldSupp5` varchar(100) default NULL,
  `TotPoint` double default NULL,
  `updater` int(3) default NULL,
  PRIMARY KEY  (`KodeSupp`),
  KEY `fk_MSupplier1` (`AccHt`),
  KEY `fk_MSupplier2` (`AccHtBG`),
  KEY `fk_MSupplier3` (`AccHtDB`),
  KEY `fk_MSupplier4` (`AccHtCR`),
  KEY `fk_MSupplier5` (`AccHtTitip`),
  CONSTRAINT `fk_MSupplier1` FOREIGN KEY (`AccHt`) REFERENCES `mperkiraan` (`Kode_perk`),
  CONSTRAINT `fk_MSupplier2` FOREIGN KEY (`AccHtBG`) REFERENCES `mperkiraan` (`Kode_perk`),
  CONSTRAINT `fk_MSupplier3` FOREIGN KEY (`AccHtDB`) REFERENCES `mperkiraan` (`Kode_perk`),
  CONSTRAINT `fk_MSupplier4` FOREIGN KEY (`AccHtCR`) REFERENCES `mperkiraan` (`Kode_perk`),
  CONSTRAINT `fk_MSupplier5` FOREIGN KEY (`AccHtTitip`) REFERENCES `mperkiraan` (`Kode_perk`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_supplier`
--

INSERT INTO `tm_supplier` VALUES ('01','ANJAR MILAN','','','','','','','','',NULL,NULL,NULL,'','Y',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('02','IMAM KOBIN','','','','','','','','',NULL,NULL,NULL,'','Y',187568000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('04','JAMES PINGUIN / PT PENGUIN TRADING','','','','','','','','',NULL,NULL,NULL,'','Y',61900000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('05','ADIVA','','','','','','','','',NULL,NULL,NULL,'','Y',26575000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','','','','','','','',NULL,NULL,NULL,'','Y',1666910208,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('09','MBAK SUSI','','','','','','','','',NULL,NULL,NULL,'','Y',114897000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','SURABAYA','SURABAYA','082141116195','082141116195','','','Luar Kota',NULL,NULL,NULL,'','Y',298246720,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('14','PAK RIDHO MAKMUR NGUDO','','','','','','','','',NULL,NULL,NULL,'','Y',50895905,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('15','PAK EDI AFOS','','','','','','','','',NULL,NULL,NULL,'','Y',54738000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('16','AGUS PRIMA JAYA/MITRA USAHA SUKSES','','','','','','','','',NULL,NULL,NULL,'','Y',46907800,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('18','RICHARD / PT FAJARLESTARI SEJATI','','','','','','','','',NULL,NULL,NULL,'','Y',41694450,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('23','ANTON LIST','','','','','','','','',NULL,NULL,NULL,'','Y',17280000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('25','NURIL GRANIT GARUDA/ PT GARUDA GRAHA INDAH','','','','','','','','',NULL,NULL,NULL,'','Y',74321280,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('30','ANDIK /  PT MODERN KERAMIK JAYA','','','','','','','','',NULL,NULL,NULL,'','Y',142741800,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `BeforeUpdateHutang` BEFORE UPDATE ON `tm_supplier` FOR EACH ROW BEGIN
    IF IFNull(old.Updater,0) <> Ifnull(new.Updater,0) THEN
    SET new.Hutang = (SELECT SUM(IFNULL(Nilai,0)) FROM tr_beli_m WHERE KodeSupp= new.KodeSupp) -  
    (SELECT SUM(IFNULL(a.Nilai,0)) FROM tr_scrbayarbeli a LEFT JOIN tr_bayarbeli_m b ON b.NoBayarB=a.NoBayarB WHERE b.KodeSupp = new.KodeSupp);
END IF;
END */;;

DELIMITER ;

--
-- Table structure for table `tm_teknisi`
--

CREATE TABLE `tm_teknisi` (
  `KodeTeknisi` varchar(20) NOT NULL default '',
  `NamaTeknisi` varchar(30) default NULL,
  PRIMARY KEY  (`KodeTeknisi`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tm_teknisi`
--


--
-- Table structure for table `tmenu`
--

CREATE TABLE `tmenu` (
  `menu_id` varchar(6) NOT NULL default '1',
  `menu` varchar(30) default NULL,
  `keterangan` varchar(50) default NULL,
  `Status_aktive` varchar(1) default NULL,
  PRIMARY KEY  (`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tmenu`
--

INSERT INTO `tmenu` VALUES ('010000','file1','File','1'),('010100','login1','Login','1'),('010200','logout1','Logout','1'),('010300','rubahpassword1','Rubah Password','1'),('010400','settinguser1','Setting User','1'),('010500','settingleveluser1','Setting Level User','1'),('010600','formatrugilaba1','Format Laporan Rugi Laba','1'),('010700','konfigurasi1','Setting Konfigurasi','1'),('010800','konfigurasiproduk1','Konfigurasi Produk','0'),('010900','setup1','Setup','1'),('020000','master1','Master','1'),('020100','perkiraan1','Master Perkiraan','1'),('020200','supplier1','Master Supplier','1'),('020300','customer1','Master Customer','1'),('020400','barang1','Master Barang','1'),('020500','gudang1','Master Gudang','1'),('020600','groupbarang1','Master Grup Barang','1'),('020700','sales1','Master Sales','1'),('020800','persedianawal1','Persediaan Awal','1'),('020900','opnameawal1','Opname Awal','1'),('021000','barangswalayan1','Master Barang Swalayan','0'),('030000','akuntansi1','Akuntansi','1'),('030100','jurnalumum1','Transaksi Jurnal Umum','1'),('030101','bkm1','Bukti Kas Masuk','1'),('030102','bkk1','Bukti Kas Keluar','1'),('030103','bbm1','Bukti Bank Masuk','1'),('030104','bbk1','Bukti Bank Keluar','1'),('040000','pembelian1','Pembelian','1'),('040100','pembelian2','Transaksi Pembelian','1'),('040101','pembelianbuat1','Transaksi Pembelian Pembuatan','1'),('040102','pembelianedit1','Transaksi Pembelian Edit','1'),('040200','pembelianbayar1','Transaksi Pembayaran','1'),('040201','pembelianbayarbuat1','Transaksi Pembayaran Pembuatan','1'),('040202','pembelianbayaredit1','Transaksi Pembayaran Edit','1'),('040300','returbeli1','Transaksi Retur Beli','1'),('040301','returbelibuat1','Transaksi Retur Beli Pembuatan','1'),('040302','returbeliedit1','Transaksi Retur Beli Edit','1'),('040400','diganti1','Transaksi Replace Returan','1'),('040401','gantipembuatan1','Transaksi Replace Returan Pembuatan','1'),('040402','gantiedit1','Transaksi Replace Returan Edit','1'),('040500','purchaseorder1','Transaksi Purchase Order','1'),('040501','purchaseorderbuat1','Transaksi Purchase Order Pembuatan','1'),('040502','purchaseorderedit1','Transaksi Purchase Order Edit','1'),('040800','produksi1','Transaksi Produksi','1'),('040801','produksibuat1','Transaksi Produksi Pembuatan','1'),('040802','produksiedit1','Transaksi Produksi Edit','1'),('050000','penjualan1','Penjualan','1'),('050100','PenjualanRetail1','Transaksi Penjualan Retail Swalayan','1'),('050101','PenjualanRetailBuat1','Transaksi Penjualan Retail Swalayan Pembuatan','1'),('050102','PenjualanRetailEdit1','Transaksi Penjualan Retail Swalayan Edit','1'),('050110','SalesOrderRetail1','Transaksi Sales Order Retail','1'),('050111','SalesOrderRetailBuat1','Transaksi Sales Order Retail Buat','1'),('050112','SalesOrderRetailEdit1','Transaksi Sales Order Retail Edit','1'),('050120','PembayaranRetail1','Transaksi Pembayaran Retail','1'),('050121','PembayaranRetailBuat1','Transaksi Pembayaran Retail Buat','1'),('050122','PembayaranRetailEdit1','Transaksi Pembayaran Retail Edit','1'),('050200','ReturJualRetail1','Transaksi Retur Jual Retail','1'),('050201','ReturJualRetailBuat1','Transaksi Retur Jual Retail Pembuatan','1'),('050202','ReturJualRetailEdit1','Transaksi Retur Jual Retail Edit','1'),('050300','SalesOrderGrosir1','Transaksi Sales Order','0'),('050301','SalesOrderGrosirBuat1','Transaksi Sales Order Pembuatan','1'),('050302','SalesOrderGrosirEdit1','Transaksi Sales Order Edit','1'),('050400','PenjualanGrosir1','Transaksi Penjualan Grosir','1'),('050401','PenjualanGrosirBuat1','Transaksi Penjualan Grosir Pembuatan','1'),('050402','PenjualanGrosirEdit1','Transaksi Penjualan Grosir Edit','1'),('050500','ReturJualGrosir1','Transaksi Retur Jual Grosir','1'),('050501','ReturJualGrosirBuat1','Transaksi Retur Jual Grosir Pembuatan','1'),('050502','ReturJualGrosirEdit1','Transaksi Retur Jual Grosir Edit','1'),('050600','PenjualanGrosirBayar1','Transaksi Pembayaran Penjualan Grosir','1'),('050601','PenjualanGrosirBayarBuat1','Transaksi Pembayaran Penjualan Grosir Pembuatan','1'),('050602','PenjualanGrosirBayarEdit1','Transaksi Pembayaran Penjualan Grosir Edit','1'),('050700','SalesOrderRakitan1','Transaksi Sales Order Rakitan','1'),('050701','SalesOrderRakitanBuat1','Transaksi Sales Order Rakitan Pembuatan','1'),('050702','SalesOrderRakitanEdit1','Transaksi Sales Order Rakitan Edit','1'),('050800','PenjualanRakitan1','Transaksi Penjualan Rakitan','1'),('050801','PenjualanRakitanMaster1','Transaksi Penjualan Rakitan Master','1'),('050802','PenjualanRakitanBuat1','Transaksi Penjualan Rakitan Buat','1'),('050803','PenjualanRakitanEdit1','Transaksi Penjualan Rakitan Edit','1'),('050900','ReturJualRakitan1','Transaksi Retur Jual Rakitan','1'),('050901','ReturJualRakitanBuat1','Transaksi Retur Jual Rakitan Pembuatan','1'),('050902','ReturJualRakitanEdit1','Transaksi Retur Jual Rakitan Edit','1'),('051000','PenjualanRakitanBayar1','Transaksi Pembayaran Penjualan Rakitan','1'),('051001','PenjualanRakitanBayarBuat1','Transaksi Pembayaran Penjualan Rakitan Pembuatan','1'),('051002','PenjualanRakitanBayarEdit1','Transaksi Pembayaran Penjualan Rakitan Edit','1'),('052000','PembayaranToko1','Transaksi Pembayaran Toko','1'),('052001','PembayaranTokoBuat1','Transaksi Pembayaran Toko Buat','1'),('052002','PembayaranTokoEdit1','Transaksi Pembayaran Toko Edit','1'),('060000','laporan1','Laporan','1'),('060100','lapakuntansi1','Akuntansi','1'),('060101','perkiraan2','Laporan Perkiraan','1'),('060102','laporanjurnal1','Laporan Jurnal Umum','1'),('060103','bukubesarpembantu1','Laporan Buku Besar Pembantu','1'),('060104','bukubesar1','Laporan Buku Besar','1'),('060105','neraca1','Laporan Neraca','1'),('060106','rincianneraca1','Laporan Rincian Neraca','1'),('060107','rugilaba1','Laporan Rugi Laba','1'),('060108','rincianrugilaba1','Laporan Rincian Rugi Laba','1'),('060109','rugilabaperiode1','Laporan Rugi Laba Periode','1'),('060200','lapcustomer1','Laporan Customer','1'),('060300','lapsupplier1','Laporan Supplier','1'),('060400','lapbarang1','Laporan Barang','1'),('060401','lapkartustock1','Laporan Kartu Stock','1'),('060402','lapposisistock1','Laporan Posisi Stock','1'),('060403','stockminim1','Laporan Stock Minim','1'),('060404','laporankoreksistock1','Laporan Koreksi Stock','1'),('060500','laphutang1','Laporan Hutang','1'),('060501','lapkartuhutang1','Laporan Kartu Hutang','1'),('060502','lapposisihutang1','Laporan Posisi Hutang','1'),('060503','lapumurhutang1','Laporan Umur Hutang','1'),('060504','lapposisihutangperiode1','Laporan Posisi Hutang Periode','1'),('060600','lappiutang1','Laporan Piutang','1'),('060601','lapkartupiutang1','Laporan Kartu Piutang','1'),('060602','lapposisipiutang1','Laporan Posisi Piutang','1'),('060603','lapumurpiutang1','Laporan Umur Piutang','1'),('060604','lapposisipiutangperiode1','Laporan Posisi Piutang Periode','1'),('060611','piutangtoko1','Laporan Piutang Toko','1'),('060612','posisipiutangtoko1','Laporan Posisi Piutang Toko','1'),('060613','kartupiutangtoko1','Laporan Kartu Piutang Toko','1'),('060700','lappembelian1','Laporan Pembelian','1'),('060701','lappembelianbeli1','Laporan Pembelian beli','1'),('060702','lappembelianretur1','Laporan Pembelian retur','1'),('060703','lappembelianbayar1','Laporan Pembelian bayar','1'),('060800','lappenjualanretail1','Laporan Penjualan Retail','1'),('060801','lappenjualanretailjual1','Laporan Penjualan Retail Jual','1'),('060802','lappenjualanretailretur1','Laporan Penjualan Retail Retur','1'),('060803','lappenjualanretailbayar1','Laporan Penjualan Retal Bayar','1'),('060804','lappembayarantoko1','Laporan Pembayaran Toko','1'),('060900','lappenjualangrosir1','Laporan Penjualan Grosir','1'),('060901','lappenjualangrosirso1','Laporan Penjualan Grosir Sales Order','1'),('060902','lappenjualangrosirjual1','Laporan Penjualan Grosir Jual','1'),('060903','lappenjualangrosirretur1','Laporan Penjualan Grosir Retur','1'),('060904','lappenjualangrosirbayar1','Laporan Penjualan Grosir Bayar','1'),('061000','lappenjualanrakitan1','Laporan Penjualan Rakitan','1'),('061001','lappenjualanrakitanso1','Laporan Penjualan Rakitan Sales Order','1'),('061002','lappenjualanrakitanjual1','Laporan Penjualan Rakitan Jual','1'),('061003','lappenjualanrakitanretur1','Laporan Penjualan Rakitan Retur','1'),('061004','lappenjualanrakitanbayar1','Laporan Penjualan Rakitan Bayar','1'),('061100','lapanalisapenjualan1','Laporan Analisa Penjualan','1'),('061101','lapanalisapenjualanrugilaba1','Laporan Analisa Penjualan Rugi Laba Detail','1'),('061102','lapanalisarlsummary1','Laporan Analisa Penj. Rugi Laba Summary','1'),('061103','lapanalisapenjualanjual1','Laporan Analisa Penjualan Jual','0'),('061104','lapmutasigudang1','Laporan Mutasi Gudang','1'),('070000','proses1','Proses','1'),('070100','postingharian1','Proses Posting Harian','1'),('070200','akhirtahun1','Proses Akhir Tahun','1'),('070300','tutupbuku1','Proses Tutup Buku','0'),('070400','ValidasiJurnal1','Proses Valiasi Jurnal','1'),('070500','koreksivalidasijurnal1','Proses Koreksi Validasi Jurnal','1'),('070600','pemindahbukuan1','Proses Pemindah Bukuan Simp Berjangka','1'),('070700','penyesuaian1','Proses Penyesuaian','0'),('080000','utility1','Utility','1'),('080100','repairdatabase1','Utility Repair Database','1'),('080200','backup1','Utility BackUp Database','1'),('080300','restore1','Utility Restore Database','1'),('090000','lainlain1','Lain-Lain','1'),('090100','mutasigudang1','Mutasi Gudang','1'),('090101','mutasigudangbuat1','Mutasi Gudang Pembuatan','1'),('090102','mutasigudangedit1','Mutasi Gudang Edit','1'),('090200','barangrusak1','Barang Rusak','0'),('090201','barangrusakbuat1','Barang Rusak Pembuatan','0'),('090202','barangrusakedit1','Barang Rusak Edit','0'),('090203','log1','Log Transaksi','1'),('090300','koreksistock1','Transaksi Koreksi Stock','1'),('090301','koreksistockbuat1','Transaksi Koreksi Stock Pembuatan','1'),('090302','koreksistockedit1','Transaksi Edit Koreksi Stock','1'),('090303','point1','Laporan Point','1'),('090304','penukaranpoint','Tukar Point','1'),('090305','KartuPoint1','Kartu Point','1'),('090400','pindahdata1','Transaksi Pindah Data','1'),('100000','pembayaran1','Pembayaran','1'),('110000','keluar1','Keluar Program','1');

--
-- Table structure for table `totoritas`
--

CREATE TABLE `totoritas` (
  `Trans` varchar(3) NOT NULL,
  `NoBukti` varchar(11) NOT NULL,
  `TglTrans` datetime default NULL,
  `Acc1` varchar(30) default NULL,
  `Acc2` varchar(30) default NULL,
  `Acc3` varchar(30) default NULL,
  `Acc4` varchar(30) default NULL,
  `Acc5` varchar(30) default NULL,
  `Acc6` varchar(30) default NULL,
  `Acc7` varchar(30) default NULL,
  `Acc8` varchar(30) default NULL,
  `Acc9` varchar(30) default NULL,
  `TglAcc1` datetime default NULL,
  `TglAcc2` datetime default NULL,
  `TglAcc3` datetime default NULL,
  `TglAcc4` datetime default NULL,
  `TglAcc5` datetime default NULL,
  `TglAcc6` datetime default NULL,
  `TglAcc7` datetime default NULL,
  `TglAcc8` datetime default NULL,
  `TglAcc9` datetime default NULL,
  PRIMARY KEY  (`Trans`,`NoBukti`),
  KEY `NoBukti` (`NoBukti`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `totoritas`
--


--
-- Table structure for table `tr_ambilpoint`
--

CREATE TABLE `tr_ambilpoint` (
  `NoAmbil` varchar(15) NOT NULL,
  `KodeCust` varchar(25) default NULL,
  `Namacust` varchar(100) default NULL,
  `AlamatCust` varchar(200) default NULL,
  `TakePoint` double default NULL,
  `tglTukar` datetime default NULL,
  PRIMARY KEY  (`NoAmbil`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_ambilpoint`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `addAmbilPoint` AFTER INSERT ON `tr_ambilpoint` FOR EACH ROW Begin
Update tm_customer set PointAmbil = ifnull(PointAmbil,0)+(new.TakePoint) where kodecust = new.kodecust;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `UpdAmbilPoint` AFTER UPDATE ON `tr_ambilpoint` FOR EACH ROW Begin
Update tm_customer set PointAmbil = ifnull(PointAmbil,0)-(old.TakePoint) where kodecust = old.kodecust;
Update tm_customer set PointAmbil = ifnull(PointAmbil,0)+(new.TakePoint) where kodecust = new.kodecust;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DelAmbilPoint` AFTER DELETE ON `tr_ambilpoint` FOR EACH ROW Begin
Update tm_customer set PointAmbil = ifnull(PointAmbil,0)-(old.TakePoint) where kodecust = old.kodecust;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_barangrusak_d`
--

CREATE TABLE `tr_barangrusak_d` (
  `NoBarangRusak` varchar(11) NOT NULL default '',
  `ItemDet` int(11) NOT NULL default '0',
  `KodeBrg` varchar(20) NOT NULL,
  `KodeGdAsal` varchar(5) NOT NULL,
  `Jumlah` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Hpp` double default NULL,
  `Konv` double default NULL,
  PRIMARY KEY  (`NoBarangRusak`,`ItemDet`),
  KEY `fk_BarangRusak_d2` (`KodeBrg`),
  KEY `fk_BarangRusak_d3` (`KodeGdAsal`),
  CONSTRAINT `fk_BarangRusak_d1` FOREIGN KEY (`NoBarangRusak`) REFERENCES `tr_barangrusak_m` (`NoBarangRusak`) ON DELETE CASCADE,
  CONSTRAINT `fk_BarangRusak_d2` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`),
  CONSTRAINT `fk_BarangRusak_d3` FOREIGN KEY (`KodeGdAsal`) REFERENCES `tm_gudang` (`KodeGd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_barangrusak_d`
--


--
-- Table structure for table `tr_barangrusak_m`
--

CREATE TABLE `tr_barangrusak_m` (
  `NoBarangRusak` varchar(11) NOT NULL default '',
  `TglBarangRusak` datetime default NULL,
  `Keterangan` varchar(200) default NULL,
  `TglBatal` datetime default NULL,
  PRIMARY KEY  (`NoBarangRusak`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_barangrusak_m`
--


--
-- Table structure for table `tr_bayarbeli_d`
--

CREATE TABLE `tr_bayarbeli_d` (
  `NoBayarB` varchar(11) NOT NULL default '',
  `ItemDBayarB` int(11) NOT NULL default '0',
  `KodeByr` varchar(10) default NULL,
  `NoBG` varchar(20) default NULL,
  `Bank` varchar(20) default NULL,
  `Trans` varchar(2) default NULL,
  `NoBukti` varchar(11) default NULL,
  `TglJT` datetime default NULL,
  `Nilai` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `TglLunas` datetime default NULL,
  `UID` char(36) default NULL,
  PRIMARY KEY  (`NoBayarB`,`ItemDBayarB`),
  KEY `fk_Tr_BayarBeli_D1` (`NoBayarB`),
  CONSTRAINT `fk_Tr_BayarBeli_D1` FOREIGN KEY (`NoBayarB`) REFERENCES `tr_bayarbeli_m` (`NoBayarB`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_bayarbeli_d`
--

INSERT INTO `tr_bayarbeli_d` VALUES ('210700001',1,'CASH','','','','',NULL,18750000,'',1,NULL,'c549f57d-659a-103a-ba01-d11e22512ef6'),('210900001',1,'CASH','','','','',NULL,15500000,'',1,NULL,'c55049f3-659a-103a-ba01-d11e22512ef6'),('210900002',1,'CASH','','','','',NULL,19500000,'',1,NULL,'c550493e-659a-103a-ba01-d11e22512ef6'),('210900003',1,'CASH','','','','',NULL,33346080,'',1,NULL,'c5504a49-659a-103a-ba01-d11e22512ef6'),('210900004',1,'CASH','','','','',NULL,3550000,'',1,NULL,NULL),('210900005',1,'CASH','','','','',NULL,7200000,'',1,NULL,NULL),('210900006',1,'CASH','','','','',NULL,18750000,'',1,NULL,NULL),('210900007',1,'CASH','','','','',NULL,18750000,'',1,NULL,NULL),('210900008',1,'CASH','','','','',NULL,33346080,'',1,NULL,NULL),('210900009',1,'CASH','','','','',NULL,21256500,'',1,NULL,NULL),('210900010',1,'CASH','','','','',NULL,19104000,'',1,NULL,NULL),('210900011',1,'CASH','','','','',NULL,9092064,'',1,NULL,NULL),('210900012',1,'CASH','','','','',NULL,19048000,'',1,NULL,NULL),('210900013',1,'CASH','','','','',NULL,23900000,'',1,NULL,NULL),('211000001',1,'CASH','','','','',NULL,27183765,'',1,NULL,NULL),('211000002',1,'CASH','','','','',NULL,25328520,'',1,NULL,NULL),('211000003',1,'CASH','','','','',NULL,23763600,'',1,NULL,NULL),('211000004',1,'CASH','','','','',NULL,25279170,'',1,NULL,NULL),('211000005',1,'CASH','','','','',NULL,24129000,'',1,NULL,NULL),('211000006',1,'CASH','','','','',NULL,27500000,'',1,NULL,NULL),('211000007',1,'CASH','','','','',NULL,17110000,'',1,NULL,NULL),('211000008',1,'CASH','','','','',NULL,33107040,'',1,NULL,NULL),('211000009',1,'CASH','','','','',NULL,48643200,'',1,NULL,NULL),('211000010',1,'CASH','','','','',NULL,20696000,'',1,NULL,NULL),('211000011',1,'CASH','','','','',NULL,27782000,'',1,NULL,NULL),('211000012',1,'CASH','','','','',NULL,32140800,'',1,NULL,NULL),('211000013',1,'CASH','','','','',NULL,4455000,'',1,NULL,NULL),('211000014',1,'CASH','','','','',NULL,20800000,'',1,NULL,NULL),('211000015',1,'CASH','','','','',NULL,10620000,'',1,NULL,NULL),('211000016',1,'CASH','','','','',NULL,17841600,'',1,NULL,NULL),('211000017',1,'CASH','','','','',NULL,10080000,'',1,NULL,NULL),('211000018',1,'CASH','','','','',NULL,69868000,'',1,NULL,NULL),('211000019',1,'CASH','','','','',NULL,18271500,'',1,NULL,NULL),('211000020',1,'CASH','','','','',NULL,69593000,'',1,NULL,NULL),('211000021',1,'CASH','','','','',NULL,17575000,'',1,NULL,NULL),('211000022',1,'CASH','','','','',NULL,23400000,'',1,NULL,NULL),('211000023',1,'CASH','','','','',NULL,18712500,'',1,NULL,NULL),('211000024',1,'CASH','','','','',NULL,32140800,'',1,NULL,NULL),('211000025',1,'CASH','','','','',NULL,1014120,'',1,NULL,NULL),('211000026',1,'CASH','','','','',NULL,32140800,'',1,NULL,NULL),('211000027',1,'CASH','','','','',NULL,7918000,'',1,NULL,NULL),('211000028',1,'CASH','','','','',NULL,32140800,'',1,NULL,NULL),('211000029',1,'CASH','','','','',NULL,14053000,'',1,NULL,NULL),('211000030',1,'CASH','','','','',NULL,14750458,'',1,NULL,NULL),('211000031',1,'CASH','','','','',NULL,21373000,'',1,NULL,NULL),('211000032',1,'CASH','','','','',NULL,29696900,'',1,NULL,NULL),('211000033',1,'CASH','','','','',NULL,47905500,'',1,NULL,NULL),('211000034',1,'CASH','','','','',NULL,48703500,'',1,NULL,NULL),('211000035',1,'CASH','','','','',NULL,70250250,'',1,NULL,NULL),('211100001',1,'CASH','','','','',NULL,22729518,'',1,NULL,NULL),('211100002',1,'CASH','','','','',NULL,25336885,'',1,NULL,NULL),('211100003',1,'CASH','','','','',NULL,20400000,'',1,NULL,NULL),('211100004',1,'CASH','','','','',NULL,49008960,'',1,NULL,NULL),('211100005',1,'CASH','','','','',NULL,42831360,'',1,NULL,NULL),('211100006',1,'CASH','','','','',NULL,10400000,'',1,NULL,NULL),('211100007',1,'CASH','','','','',NULL,37785600,'',1,NULL,NULL),('211100008',1,'CASH','','','','',NULL,1250000,'',1,NULL,NULL),('211100009',1,'CASH','','','','',NULL,17712000,'',1,NULL,NULL),('211100010',1,'CASH','','','','',NULL,20696000,'',1,NULL,NULL),('211100011',1,'CASH','','','','',NULL,23140000,'',1,NULL,NULL),('211100012',1,'CASH','','','','',NULL,20247000,'',1,NULL,NULL),('211100013',1,'CASH','','','','',NULL,5950000,'',1,NULL,NULL),('211100014',1,'CASH','','','','',NULL,23427360,'',1,NULL,NULL),('211100015',1,'CASH','','','','',NULL,2120000,'',1,NULL,NULL),('211100016',1,'CASH','','','','',NULL,5435000,'',1,NULL,NULL),('211100017',1,'CASH','','','','',NULL,49193280,'',1,NULL,NULL),('211100018',1,'CASH','','','','',NULL,16280000,'',1,NULL,NULL),('211100019',1,'CASH','','','','',NULL,18750000,'',1,NULL,NULL),('211100020',1,'CASH','','','','',NULL,20800000,'',1,NULL,NULL),('211100021',1,'CASH','','','','',NULL,18720000,'',1,NULL,NULL),('211100022',1,'CASH','','','','',NULL,18750000,'',1,NULL,NULL),('211100023',1,'CASH','','','','',NULL,40176000,'',1,NULL,NULL),('211100024',1,'CASH','','','','',NULL,4087500,'',1,NULL,NULL),('211100025',1,'CASH','','','','',NULL,15024750,'',1,NULL,NULL),('211100026',1,'CASH','','','','',NULL,23108000,'',1,NULL,NULL),('211100027',1,'CASH','','','','',NULL,25807820,'',1,NULL,NULL),('211100028',1,'CASH','','','','',NULL,10712000,'',1,NULL,NULL),('211100029',1,'CASH','','','','',NULL,1056000,'',1,NULL,NULL),('211100030',1,'CASH','','','','',NULL,20800000,'',1,NULL,NULL),('211100031',1,'CASH','','','','',NULL,3300000,'',1,NULL,NULL),('211100032',1,'CASH','','','','',NULL,25088085,'',1,NULL,NULL),('211100033',1,'CASH','','','','',NULL,9321000,'',1,NULL,NULL),('211100034',1,'CASH','','','','',NULL,4235000,'',1,NULL,NULL),('211100035',1,'CASH','','','','',NULL,24012000,'',1,NULL,NULL),('211100036',1,'CASH','','','','',NULL,19916000,'',1,NULL,NULL),('211100037',1,'CASH','','','','',NULL,94132500,'',1,NULL,NULL),('211100038',1,'CASH','','','','',NULL,10340000,'',1,NULL,NULL),('211100039',1,'CASH','','','','',NULL,13500000,'',1,NULL,NULL),('211100040',1,'CASH','','','','',NULL,21012500,'',1,NULL,NULL),('211200001',1,'CASH','','','','',NULL,32826240,'',1,NULL,NULL),('211200002',1,'CASH','','','','',NULL,16350000,'',1,NULL,NULL),('211200003',1,'CASH','','','','',NULL,33062400,'',1,NULL,NULL),('211200004',1,'CASH','','','','',NULL,28704000,'',1,NULL,NULL),('211200005',1,'CASH','','','','',NULL,25740000,'',1,NULL,NULL),('211200006',1,'CASH','','','','',NULL,7810000,'',1,NULL,NULL),('211200007',1,'CASH','','','','',NULL,20748000,'',1,NULL,NULL),('211200008',1,'CASH','','','','',NULL,20250000,'',1,NULL,NULL),('211200009',1,'CASH','','','','',NULL,21200000,'',1,NULL,NULL),('211200010',1,'CASH','','','','',NULL,17468000,'',1,NULL,NULL),('211200011',1,'CASH','','','','',NULL,23074000,'',1,NULL,NULL),('211200012',1,'CASH','','','','',NULL,16875000,'',1,NULL,NULL),('211200013',1,'CASH','','','','',NULL,11000000,'',1,NULL,NULL),('211200014',1,'CASH','','','','',NULL,3373920,'',1,NULL,NULL),('211200015',1,'CASH','','','','',NULL,25500000,'',1,NULL,NULL),('211200016',1,'CASH','','','','',NULL,24156000,'',1,NULL,NULL),('211200017',1,'CASH','','','','',NULL,35717760,'',1,NULL,NULL),('211200018',1,'CASH','','','','',NULL,23400000,'',1,NULL,NULL),('211200019',1,'CASH','','','','',NULL,16350000,'',1,NULL,NULL),('211200020',1,'CASH','','','','',NULL,30185000,'',1,NULL,NULL),('211200021',1,'CASH','','','','',NULL,18389000,'',1,NULL,NULL),('211200022',1,'CASH','','','','',NULL,37785600,'',1,NULL,NULL),('211200023',1,'CASH','','','','',NULL,9120000,'',1,NULL,NULL),('211200024',1,'CASH','','','','',NULL,20790000,'',1,NULL,NULL),('211200025',1,'CASH','','','','',NULL,30091000,'',1,NULL,NULL),('211200026',1,'CASH','','','','',NULL,20000000,'',1,NULL,NULL),('211200027',1,'CASH','','','','',NULL,5005000,'',1,NULL,NULL),('211200028',1,'CASH','','','','',NULL,28211250,'',1,NULL,NULL),('211200029',1,'CASH','','','','',NULL,20696000,'',1,NULL,NULL),('211200030',1,'CASH','','','','',NULL,4983560,'',1,NULL,NULL),('211200031',1,'CASH','','','','',NULL,48500000,'',1,NULL,NULL),('211200032',1,'CASH','','','','',NULL,26000000,'',1,NULL,NULL),('211200033',1,'CASH','','','','',NULL,26000000,'',1,NULL,NULL),('211200034',1,'CASH','','','','',NULL,13455000,'',1,NULL,NULL),('211200035',1,'CASH','','','','',NULL,32536500,'',1,NULL,NULL),('211200036',1,'CASH','','','','',NULL,21800000,'',1,NULL,NULL),('211200037',1,'CASH','','','','',NULL,32482000,'',1,NULL,NULL),('211200038',1,'CASH','','','','',NULL,20696000,'',1,NULL,NULL),('211200039',1,'CASH','','','','',NULL,5440000,'',1,NULL,NULL),('211200040',1,'CASH','','','','',NULL,16295500,'',1,NULL,NULL),('211200041',1,'CASH','','','','',NULL,11500000,'',1,NULL,NULL);

--
-- Table structure for table `tr_bayarbeli_m`
--

CREATE TABLE `tr_bayarbeli_m` (
  `NoBayarB` varchar(11) NOT NULL default '',
  `TglBayarB` datetime default NULL,
  `KodeSupp` varchar(10) default NULL,
  `Keterangan` varchar(200) default NULL,
  `TglBatal` datetime default NULL,
  `NoIDJurnal` varchar(10) default NULL,
  `NoIDJurnalB` varchar(10) default NULL,
  `GDBayar` varchar(10) default NULL,
  `isPindah` smallint(6) NOT NULL default '0',
  `UID` char(36) default NULL,
  PRIMARY KEY  (`NoBayarB`),
  KEY `fk_BayarBeli` (`KodeSupp`),
  CONSTRAINT `fk_BayarBeli` FOREIGN KEY (`KodeSupp`) REFERENCES `tm_supplier` (`KodeSupp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_bayarbeli_m`
--

INSERT INTO `tr_bayarbeli_m` VALUES ('210700001','2021-07-19 00:00:00','04','',NULL,NULL,NULL,'GD',0,'c5348819-659a-103a-ba01-d11e22512ef6'),('210900001','2021-09-08 00:00:00','09','',NULL,NULL,NULL,'GD',0,'c53826c3-659a-103a-ba01-d11e22512ef6'),('210900002','2021-09-04 00:00:00','09','',NULL,NULL,NULL,'GD',0,'c53825cd-659a-103a-ba01-d11e22512ef6'),('210900003','2021-09-10 00:00:00','07','',NULL,NULL,NULL,'GD',0,'c538273d-659a-103a-ba01-d11e22512ef6'),('210900004','2021-09-17 00:00:00','05','',NULL,NULL,NULL,'GD',0,'094ec779-68bd-103a-ba01-d11e22512ef6'),('210900005','2021-09-17 00:00:00','07','',NULL,NULL,NULL,'GD',0,'517e8856-68b8-103a-ba01-d11e22512ef6'),('210900006','2021-09-20 00:00:00','09','',NULL,NULL,NULL,'GD',0,'7656b1fd-6b33-103a-ba01-d11e22512ef6'),('210900007','2021-09-20 00:00:00','09','',NULL,NULL,NULL,'GD',0,'52fee53d-6b33-103a-ba01-d11e22512ef6'),('210900008','2021-09-24 00:00:00','07','',NULL,NULL,NULL,'GD',0,'5d3e9ba5-6e3c-103a-8058-c946033d2811'),('210900009','2021-09-24 00:00:00','07','',NULL,NULL,NULL,'GD',0,'1893485e-6e3c-103a-8058-c946033d2811'),('210900010','2021-09-24 00:00:00','07','',NULL,NULL,NULL,'GD',0,'39e2202e-6e3c-103a-8058-c946033d2811'),('210900011','2021-09-24 00:00:00','07','',NULL,NULL,NULL,'GD',0,'236a3745-6e3c-103a-8058-c946033d2811'),('210900012','2021-09-27 00:00:00','09','',NULL,NULL,NULL,'GD',0,'1489509e-709b-103a-915c-0ee556fef7d8'),('210900013','2021-09-27 00:00:00','09','',NULL,NULL,NULL,'GD',0,'0b154869-709b-103a-915c-0ee556fef7d8'),('211000001','2021-10-04 00:00:00','14','',NULL,NULL,NULL,'GD',0,'60f0f699-7623-103a-9681-22bb4424e71b'),('211000002','2021-10-11 00:00:00','14','',NULL,NULL,NULL,'GD',0,'1de1d3af-7b98-103a-a8f7-6b7403b37a48'),('211000003','2021-10-11 00:00:00','14','',NULL,NULL,NULL,'GD',0,'23f915d8-7b98-103a-a8f7-6b7403b37a48'),('211000004','2021-10-18 00:00:00','14','',NULL,NULL,NULL,'GD',0,'c951ffc5-8116-103a-b723-a3e284ef20d0'),('211000005','2021-10-25 00:00:00','14','',NULL,NULL,NULL,'GD',0,'2a5719f8-8697-103a-b723-a3e284ef20d0'),('211000006','2021-10-27 00:00:00','09','',NULL,NULL,NULL,'GD',0,'c956c550-8827-103a-afd3-856465ccd1b2'),('211000007','2021-10-01 00:00:00','07','',NULL,NULL,NULL,'GD',0,'251b602d-73bb-103a-81bd-cf9ca151b185'),('211000008','2021-10-01 00:00:00','07','',NULL,NULL,NULL,'GD',0,'350ff221-73bb-103a-81bd-cf9ca151b185'),('211000009','2021-10-04 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'c87afb4c-7625-103a-9681-22bb4424e71b'),('211000010','2021-10-04 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'788c22e5-7625-103a-9681-22bb4424e71b'),('211000011','2021-10-08 00:00:00','05','',NULL,NULL,NULL,'GD',0,'0875056c-7938-103a-87c0-e6408d0264ef'),('211000012','2021-10-08 00:00:00','07','',NULL,NULL,NULL,'GD',0,'19a50840-793b-103a-87c0-e6408d0264ef'),('211000013','2021-10-08 00:00:00','07','',NULL,NULL,NULL,'GD',0,'0daf1c8e-793b-103a-87c0-e6408d0264ef'),('211000014','2021-10-09 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'ee5d0937-79fb-103a-87c0-e6408d0264ef'),('211000015','2021-10-09 00:00:00','16','',NULL,NULL,NULL,'GD',0,'acb418f8-7a10-103a-87c0-e6408d0264ef'),('211000016','2021-10-11 00:00:00','18','',NULL,NULL,NULL,'GD',0,'07f2b09b-7b92-103a-a8f7-6b7403b37a48'),('211000017','2021-10-13 00:00:00','23','',NULL,NULL,NULL,'GD',0,'0bc0e8aa-7d27-103a-b981-aed008b67a3f'),('211000018','2021-10-15 00:00:00','07','',NULL,NULL,NULL,'GD',0,'402ef35d-7ebb-103a-a265-507f8e4cce28'),('211000019','2021-10-15 00:00:00','05','',NULL,NULL,NULL,'GD',0,'03c26b73-7ebc-103a-a265-507f8e4cce28'),('211000020','2021-10-15 00:00:00','07','',NULL,NULL,NULL,'GD',0,'534fd0fd-7ebb-103a-a265-507f8e4cce28'),('211000021','2021-10-18 00:00:00','09','',NULL,NULL,NULL,'GD',0,'4b3eace7-8136-103a-b723-a3e284ef20d0'),('211000022','2021-10-18 00:00:00','09','',NULL,NULL,NULL,'GD',0,'445331ee-8136-103a-b723-a3e284ef20d0'),('211000023','2021-10-18 00:00:00','09','',NULL,NULL,NULL,'GD',0,'5236638f-8136-103a-b723-a3e284ef20d0'),('211000024','2021-10-22 00:00:00','07','',NULL,NULL,NULL,'GD',0,'b1846fad-843b-103a-b723-a3e284ef20d0'),('211000025','2021-10-22 00:00:00','07','',NULL,NULL,NULL,'GD',0,'82d31d9a-843b-103a-b723-a3e284ef20d0'),('211000026','2021-10-22 00:00:00','07','',NULL,NULL,NULL,'GD',0,'a3b82796-843b-103a-b723-a3e284ef20d0'),('211000027','2021-10-22 00:00:00','07','',NULL,NULL,NULL,'GD',0,'77419ae6-843b-103a-b723-a3e284ef20d0'),('211000028','2021-10-22 00:00:00','07','',NULL,NULL,NULL,'GD',0,'c6f05a5b-843b-103a-b723-a3e284ef20d0'),('211000029','2021-10-22 00:00:00','07','',NULL,NULL,NULL,'GD',0,'972df5ba-843b-103a-b723-a3e284ef20d0'),('211000030','2021-10-23 00:00:00','16','',NULL,NULL,NULL,'GD',0,'73a2e7c9-8511-103a-b723-a3e284ef20d0'),('211000031','2021-10-27 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'25ca1eba-8828-103a-afd3-856465ccd1b2'),('211000032','2021-10-30 00:00:00','02','',NULL,NULL,NULL,'GD',0,'37ea6a7c-8a85-103a-8d76-fb1c97a46d36'),('211000033','2021-10-29 00:00:00','07','',NULL,NULL,NULL,'GD',0,'e66143a3-89b6-103a-afd3-856465ccd1b2'),('211000034','2021-10-29 00:00:00','07','',NULL,NULL,NULL,'GD',0,'ecc1f4b6-89b6-103a-afd3-856465ccd1b2'),('211000035','2021-10-29 00:00:00','07','',NULL,NULL,NULL,'GD',0,'16085364-89b7-103a-afd3-856465ccd1b2'),('211100001','2021-11-01 00:00:00','14','',NULL,NULL,NULL,'GD',0,'273d3d71-8c1a-103a-8d76-fb1c97a46d36'),('211100002','2021-11-01 00:00:00','14','',NULL,NULL,NULL,'GD',0,'2d0ca74c-8c1a-103a-8d76-fb1c97a46d36'),('211100003','2021-11-01 00:00:00','30','',NULL,NULL,NULL,'GD',0,'233e2458-8c06-103a-8d76-fb1c97a46d36'),('211100004','2021-11-15 00:00:00','30','',NULL,NULL,NULL,'GD',0,'6f4ee016-9717-103a-a744-624e61fccb07'),('211100005','2021-11-15 00:00:00','30','',NULL,NULL,NULL,'GD',0,'a3667015-9717-103a-a744-624e61fccb07'),('211100006','2021-11-12 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'3f53bd41-94ac-103a-a744-624e61fccb07'),('211100007','2021-11-12 00:00:00','07','',NULL,NULL,NULL,'GD',0,'883830ea-94ba-103a-a744-624e61fccb07'),('211100008','2021-11-10 00:00:00','15','',NULL,NULL,NULL,'GD',0,'0fb98162-932c-103a-aa74-708754125b93'),('211100009','2021-11-10 00:00:00','15','',NULL,NULL,NULL,'GD',0,'048e27fa-932c-103a-aa74-708754125b93'),('211100010','2021-11-09 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'394bf55a-9289-103a-aa74-708754125b93'),('211100011','2021-11-08 00:00:00','09','',NULL,NULL,NULL,'GD',0,'aacb7a52-91bf-103a-aa74-708754125b93'),('211100012','2021-11-08 00:00:00','30','',NULL,NULL,NULL,'GD',0,'1b592a53-9198-103a-aa74-708754125b93'),('211100013','2021-11-08 00:00:00','30','',NULL,NULL,NULL,'GD',0,'687d6131-9198-103a-aa74-708754125b93'),('211100014','2021-11-05 00:00:00','07','',NULL,NULL,NULL,'GD',0,'dda2d6ad-8f50-103a-aa74-708754125b93'),('211100015','2021-11-05 00:00:00','05','',NULL,NULL,NULL,'GD',0,'7e201696-8f4e-103a-aa74-708754125b93'),('211100016','2021-11-05 00:00:00','05','',NULL,NULL,NULL,'GD',0,'c44bbb4e-8f4e-103a-aa74-708754125b93'),('211100017','2021-11-01 00:00:00','30','',NULL,NULL,NULL,'GD',0,'29b41af7-8c06-103a-8d76-fb1c97a46d36'),('211100018','2021-11-01 00:00:00','05','',NULL,NULL,NULL,'GD',0,'ec29deea-8c02-103a-8d76-fb1c97a46d36'),('211100019','2021-11-29 00:00:00','09','',NULL,NULL,NULL,'GD',0,'7b026937-a233-103a-bc93-b87c43dc8609'),('211100020','2021-11-29 00:00:00','30','',NULL,NULL,NULL,'GD',0,'9bbab784-a22b-103a-bc93-b87c43dc8609'),('211100021','2021-11-29 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'6669209b-a23e-103a-bc93-b87c43dc8609'),('211100022','2021-11-29 00:00:00','09','',NULL,NULL,NULL,'GD',0,'747fe2b0-a233-103a-bc93-b87c43dc8609'),('211100023','2021-11-26 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'8b052726-9fb1-103a-8fb7-03f9d648e190'),('211100024','2021-11-26 00:00:00','07','',NULL,NULL,NULL,'GD',0,'d5f1003c-9fbb-103a-8fb7-03f9d648e190'),('211100025','2021-11-26 00:00:00','07','',NULL,NULL,NULL,'GD',0,'ca0cf6e8-9fbb-103a-8fb7-03f9d648e190'),('211100026','2021-11-26 00:00:00','07','',NULL,NULL,NULL,'GD',0,'cffcbfa3-9fbb-103a-8fb7-03f9d648e190'),('211100027','2021-11-22 00:00:00','14','',NULL,NULL,NULL,'GD',0,'c5405c2a-9c97-103a-9f42-42448efe4d88'),('211100028','2021-11-22 00:00:00','09','',NULL,NULL,NULL,'GD',0,'904d813a-9ca5-103a-9f42-42448efe4d88'),('211100029','2021-11-22 00:00:00','18','',NULL,NULL,NULL,'GD',0,'c40762a9-9c8b-103a-9f42-42448efe4d88'),('211100030','2021-11-22 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'c91ec47b-9c98-103a-9f42-42448efe4d88'),('211100031','2021-11-22 00:00:00','09','',NULL,NULL,NULL,'GD',0,'995b3608-9ca5-103a-9f42-42448efe4d88'),('211100032','2021-11-22 00:00:00','14','',NULL,NULL,NULL,'GD',0,'bf62b0e3-9c97-103a-9f42-42448efe4d88'),('211100033','2021-11-22 00:00:00','09','',NULL,NULL,NULL,'GD',0,'89bc1410-9ca5-103a-9f42-42448efe4d88'),('211100034','2021-11-19 00:00:00','05','',NULL,NULL,NULL,'GD',0,'ab037352-9a53-103a-b45d-96ebd877ca8f'),('211100035','2021-11-19 00:00:00','07','',NULL,NULL,NULL,'GD',0,'1da3b6de-9a56-103a-b45d-96ebd877ca8f'),('211100036','2021-11-19 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'c216e3d3-9a2c-103a-b45d-96ebd877ca8f'),('211100037','2021-11-19 00:00:00','07','',NULL,NULL,NULL,'GD',0,'fbb577d4-9a55-103a-b45d-96ebd877ca8f'),('211100038','2021-11-19 00:00:00','05','',NULL,NULL,NULL,'GD',0,'a49523a0-9a53-103a-b45d-96ebd877ca8f'),('211100039','2021-11-19 00:00:00','07','',NULL,NULL,NULL,'GD',0,'0f1ebb58-9a56-103a-b45d-96ebd877ca8f'),('211100040','2021-11-15 00:00:00','30','',NULL,NULL,NULL,'GD',0,'aa306666-9717-103a-a744-624e61fccb07'),('211200001','2021-12-03 00:00:00','07','',NULL,NULL,NULL,'GD',0,'a6f65339-a538-103a-a679-5e3c12a8146a'),('211200002','2021-12-03 00:00:00','07','',NULL,NULL,NULL,'GD',0,'8e0014ae-a538-103a-a679-5e3c12a8146a'),('211200003','2021-12-03 00:00:00','07','',NULL,NULL,NULL,'GD',0,'aef2ec9d-a538-103a-a679-5e3c12a8146a'),('211200004','2021-12-03 00:00:00','07','',NULL,NULL,NULL,'GD',0,'9a51fd84-a538-103a-a679-5e3c12a8146a'),('211200005','2021-12-02 00:00:00','09','',NULL,NULL,NULL,'GD',0,'fa657c52-a45b-103a-a679-5e3c12a8146a'),('211200006','2021-12-29 00:00:00','30','',NULL,NULL,NULL,'GD',0,'80f47597-b9a4-103a-904c-05403444b9d4'),('211200007','2021-12-29 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'062fdbe8-b9c2-103a-904c-05403444b9d4'),('211200008','2021-12-29 00:00:00','09','',NULL,NULL,NULL,'GD',0,'04710980-b99a-103a-904c-05403444b9d4'),('211200009','2021-12-29 00:00:00','30','',NULL,NULL,NULL,'GD',0,'8a39fcd6-b9a4-103a-904c-05403444b9d4'),('211200010','2021-12-29 00:00:00','30','',NULL,NULL,NULL,'GD',0,'92ebba46-b9a4-103a-904c-05403444b9d4'),('211200011','2021-12-29 00:00:00','30','',NULL,NULL,NULL,'GD',0,'793e10c1-b9a4-103a-904c-05403444b9d4'),('211200012','2021-12-28 00:00:00','09','',NULL,NULL,NULL,'GD',0,'47d765cb-b8e1-103a-904c-05403444b9d4'),('211200013','2021-12-28 00:00:00','09','',NULL,NULL,NULL,'GD',0,'4d3f6487-b8e1-103a-904c-05403444b9d4'),('211200014','2021-12-27 00:00:00','09','',NULL,NULL,NULL,'GD',0,'05c10d62-b824-103a-904c-05403444b9d4'),('211200015','2021-12-27 00:00:00','09','',NULL,NULL,NULL,'GD',0,'f458abac-b823-103a-904c-05403444b9d4'),('211200016','2021-12-27 00:00:00','09','',NULL,NULL,NULL,'GD',0,'ffc516e1-b823-103a-904c-05403444b9d4'),('211200017','2021-12-25 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'716c586e-b68c-103a-8c26-f47a873573a4'),('211200018','2021-12-24 00:00:00','07','',NULL,NULL,NULL,'GD',0,'15fc017b-b5bc-103a-8c26-f47a873573a4'),('211200019','2021-12-24 00:00:00','07','',NULL,NULL,NULL,'GD',0,'25df6608-b5bc-103a-8c26-f47a873573a4'),('211200020','2021-12-24 00:00:00','07','',NULL,NULL,NULL,'GD',0,'1b238ab5-b5bc-103a-8c26-f47a873573a4'),('211200021','2021-12-24 00:00:00','07','',NULL,NULL,NULL,'GD',0,'3c26f551-b5bc-103a-8c26-f47a873573a4'),('211200022','2021-12-24 00:00:00','07','',NULL,NULL,NULL,'GD',0,'0ef95db5-b5bc-103a-8c26-f47a873573a4'),('211200023','2021-12-24 00:00:00','07','',NULL,NULL,NULL,'GD',0,'20d5ffaf-b5bc-103a-8c26-f47a873573a4'),('211200024','2021-12-18 00:00:00','09','',NULL,NULL,NULL,'GD',0,'28ef35c2-b11c-103a-a2b7-4e372a2f6b8d'),('211200025','2021-12-17 00:00:00','07','',NULL,NULL,NULL,'GD',0,'47c1398d-b053-103a-a2b7-4e372a2f6b8d'),('211200026','2021-12-17 00:00:00','07','',NULL,NULL,NULL,'GD',0,'59d6847c-b053-103a-a2b7-4e372a2f6b8d'),('211200027','2021-12-17 00:00:00','05','',NULL,NULL,NULL,'GD',0,'40482738-b03d-103a-a2b7-4e372a2f6b8d'),('211200028','2021-12-17 00:00:00','07','',NULL,NULL,NULL,'GD',0,'4e7bcfd2-b053-103a-a2b7-4e372a2f6b8d'),('211200029','2021-12-17 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'c20e3dd1-b03d-103a-a2b7-4e372a2f6b8d'),('211200030','2021-12-17 00:00:00','07','',NULL,NULL,NULL,'GD',0,'54794f2d-b053-103a-a2b7-4e372a2f6b8d'),('211200031','2021-12-15 00:00:00','123456','',NULL,NULL,NULL,'GD',0,'0a11d66c-aed1-103a-96f4-2073e10ea306'),('211200032','2021-12-13 00:00:00','09','',NULL,NULL,NULL,'GD',0,'1fdb1b71-ad2d-103a-9534-19141b4c2af1'),('211200033','2021-12-13 00:00:00','09','',NULL,NULL,NULL,'GD',0,'256aa518-ad2d-103a-9534-19141b4c2af1'),('211200034','2021-12-10 00:00:00','07','',NULL,NULL,NULL,'GD',0,'0935d47d-aabd-103a-9534-19141b4c2af1'),('211200035','2021-12-10 00:00:00','07','',NULL,NULL,NULL,'GD',0,'10b121f0-aabd-103a-9534-19141b4c2af1'),('211200036','2021-12-10 00:00:00','07','',NULL,NULL,NULL,'GD',0,'037d26c5-aabd-103a-9534-19141b4c2af1'),('211200037','2021-12-10 00:00:00','07','',NULL,NULL,NULL,'GD',0,'18c0f767-aabd-103a-9534-19141b4c2af1'),('211200038','2021-12-08 00:00:00','30','',NULL,NULL,NULL,'GD',0,'d820a69b-a924-103a-a2be-50c1d8f64883'),('211200039','2021-12-08 00:00:00','30','',NULL,NULL,NULL,'GD',0,'ddbc4940-a924-103a-a2be-50c1d8f64883'),('211200040','2021-12-03 00:00:00','07','',NULL,NULL,NULL,'GD',0,'85158240-a538-103a-a679-5e3c12a8146a'),('211200041','2021-12-29 00:00:00','09','',NULL,NULL,NULL,'GD',0,'f937dcc1-b999-103a-904c-05403444b9d4');

--
-- Table structure for table `tr_bayarjual_d`
--

CREATE TABLE `tr_bayarjual_d` (
  `NoBayarJ` varchar(11) NOT NULL default '',
  `ItemDBayarJ` int(11) NOT NULL default '0',
  `KodeByr` varchar(10) default NULL,
  `KodeRek` varchar(20) default NULL,
  `NoBG` varchar(20) default NULL,
  `Bank` varchar(20) default NULL,
  `Trans` varchar(2) default NULL,
  `NoBukti` varchar(11) default NULL,
  `TglJT` datetime default NULL,
  `Nilai` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `TglLunas` datetime default NULL,
  PRIMARY KEY  (`NoBayarJ`,`ItemDBayarJ`),
  KEY `fk_Tr_BayarJual_D1` (`NoBayarJ`),
  CONSTRAINT `fk_Tr_BayarJual_D2` FOREIGN KEY (`NoBayarJ`) REFERENCES `tr_bayarjual_m` (`NoBayarJ`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_bayarjual_d`
--


--
-- Table structure for table `tr_bayarjual_m`
--

CREATE TABLE `tr_bayarjual_m` (
  `NoBayarJ` varchar(11) NOT NULL default '',
  `TglBayarJ` datetime default NULL,
  `KodeCust` varchar(10) default NULL,
  `Keterangan` varchar(200) default NULL,
  `TglBatal` datetime default NULL,
  `NOiDJurnal` varchar(10) default NULL,
  `NoIDJurnalB` varchar(10) default NULL,
  PRIMARY KEY  (`NoBayarJ`),
  KEY `fk_Tr_BayarJual_M1` (`KodeCust`),
  CONSTRAINT `fk_Tr_BayarJual_M2` FOREIGN KEY (`KodeCust`) REFERENCES `tm_customer` (`KodeCust`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_bayarjual_m`
--


--
-- Table structure for table `tr_bayarjualr_d`
--

CREATE TABLE `tr_bayarjualr_d` (
  `NoBayarJ` varchar(11) NOT NULL default '',
  `ItemDBayarJ` int(11) NOT NULL default '0',
  `KodeByr` varchar(10) default NULL,
  `KodeRek` varchar(20) default NULL,
  `NoBG` varchar(20) default NULL,
  `Bank` varchar(20) default NULL,
  `Trans` varchar(2) default NULL,
  `NoBukti` varchar(11) default NULL,
  `TglJT` datetime default NULL,
  `Nilai` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `TglLunas` datetime default NULL,
  `UID` char(36) default NULL,
  PRIMARY KEY  (`NoBayarJ`,`ItemDBayarJ`),
  KEY `fk_Tr_BayarJualR_D1` (`NoBayarJ`),
  CONSTRAINT `fk_Tr_BayarJualR_D2` FOREIGN KEY (`NoBayarJ`) REFERENCES `tr_bayarjualr_m` (`NoBayarJ`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_bayarjualr_d`
--


--
-- Table structure for table `tr_bayarjualr_m`
--

CREATE TABLE `tr_bayarjualr_m` (
  `NoBayarJ` varchar(11) NOT NULL default '',
  `TglBayarJ` datetime default NULL,
  `KodeCust` varchar(10) default NULL,
  `Keterangan` varchar(200) default NULL,
  `TglBatal` datetime default NULL,
  `NOiDJurnal` varchar(10) default NULL,
  `NoIDJurnalB` varchar(10) default NULL,
  `GDBayar` varchar(10) default NULL,
  `isPindah` smallint(6) NOT NULL default '0',
  `UID` char(36) default NULL,
  PRIMARY KEY  (`NoBayarJ`),
  KEY `fk_Tr_BayarJualR_M1` (`KodeCust`),
  CONSTRAINT `fk_Tr_BayarJualR_M2` FOREIGN KEY (`KodeCust`) REFERENCES `tm_customer` (`KodeCust`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_bayarjualr_m`
--


--
-- Table structure for table `tr_bayarjualrakitan_d`
--

CREATE TABLE `tr_bayarjualrakitan_d` (
  `NoBayarJ` varchar(11) NOT NULL default '',
  `ItemDBayarJ` int(11) NOT NULL default '0',
  `KodeByr` varchar(10) default NULL,
  `KodeRek` varchar(20) default NULL,
  `NoBG` varchar(20) default NULL,
  `Bank` varchar(20) default NULL,
  `Trans` varchar(2) default NULL,
  `NoBukti` varchar(11) default NULL,
  `TglJT` datetime default NULL,
  `Nilai` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `TglLunas` datetime default NULL,
  PRIMARY KEY  (`NoBayarJ`,`ItemDBayarJ`),
  KEY `fk_Tr_BayarJual_D1` (`NoBayarJ`),
  CONSTRAINT `fk_Tr_BayarJualrakitan_D2` FOREIGN KEY (`NoBayarJ`) REFERENCES `tr_bayarjualrakitan_m` (`NoBayarJ`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_bayarjualrakitan_d`
--


--
-- Table structure for table `tr_bayarjualrakitan_m`
--

CREATE TABLE `tr_bayarjualrakitan_m` (
  `NoBayarJ` varchar(11) NOT NULL default '',
  `TglBayarJ` datetime default NULL,
  `KodeCust` varchar(10) default NULL,
  `Keterangan` varchar(200) default NULL,
  `TglBatal` datetime default NULL,
  `NOiDJurnal` varchar(10) default NULL,
  `NoIDJurnalB` varchar(10) default NULL,
  PRIMARY KEY  (`NoBayarJ`),
  KEY `fk_Tr_BayarJualrakitan_M1` (`KodeCust`),
  CONSTRAINT `fk_Tr_BayarJualRakitan_M2` FOREIGN KEY (`KodeCust`) REFERENCES `tm_customer` (`KodeCust`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_bayarjualrakitan_m`
--


--
-- Table structure for table `tr_bayartoko_d`
--

CREATE TABLE `tr_bayartoko_d` (
  `NoBayarT` varchar(11) NOT NULL default '',
  `ItemDBayarT` int(11) NOT NULL default '0',
  `KodeByr` varchar(10) default NULL,
  `KodeRek` varchar(20) default NULL,
  `NoBG` varchar(20) default NULL,
  `Bank` varchar(20) default NULL,
  `Trans` varchar(2) default NULL,
  `NoBukti` varchar(11) default NULL,
  `TglJT` datetime default NULL,
  `Nilai` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `TglLunas` datetime default NULL,
  PRIMARY KEY  (`NoBayarT`,`ItemDBayarT`),
  KEY `fk_Tr_BayarToko_D1` (`NoBayarT`),
  CONSTRAINT `fk_Tr_BayarToko_D2` FOREIGN KEY (`NoBayarT`) REFERENCES `tr_bayartoko_m` (`NoBayarT`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_bayartoko_d`
--


--
-- Table structure for table `tr_bayartoko_m`
--

CREATE TABLE `tr_bayartoko_m` (
  `NoBayarT` varchar(11) NOT NULL default '',
  `TglBayarT` datetime default NULL,
  `KodeCust` varchar(10) default NULL,
  `Keterangan` varchar(200) default NULL,
  `TglBatal` datetime default NULL,
  `NOiDJurnal` varchar(10) default NULL,
  `NoIDJurnalB` varchar(10) default NULL,
  `GDBayar` varchar(10) default NULL,
  PRIMARY KEY  (`NoBayarT`),
  KEY `fk_Tr_BayarToko_M1` (`KodeCust`),
  CONSTRAINT `fk_Tr_BayarToko_M2` FOREIGN KEY (`KodeCust`) REFERENCES `tm_gudang` (`KodeGd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_bayartoko_m`
--


--
-- Table structure for table `tr_beli_d`
--

CREATE TABLE `tr_beli_d` (
  `TransBeli` varchar(2) NOT NULL default '',
  `NoBeli` varchar(11) NOT NULL default '',
  `ItemBeli` int(11) NOT NULL default '0',
  `NoPO` varchar(11) default NULL,
  `ItemPO` int(11) default NULL,
  `KodeBrg` varchar(20) NOT NULL,
  `KodeGd` varchar(5) NOT NULL,
  `NamaBrg` varchar(50) default NULL,
  `Harga` double default NULL,
  `Disc` double default NULL,
  `Jml` double default NULL,
  `JmlTitip` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  `Diretur` double default NULL,
  `total` double default NULL,
  `hargajual` double default NULL,
  `UID` char(36) default NULL,
  PRIMARY KEY  (`TransBeli`,`NoBeli`,`ItemBeli`),
  KEY `idx_tr_Beli_d1` (`KodeGd`),
  KEY `idx_tr_Beli_d2` (`KodeGd`),
  KEY `idx_tr_Beli_d3` (`KodeBrg`),
  CONSTRAINT `fk_tr_Beli_d1` FOREIGN KEY (`TransBeli`, `NoBeli`) REFERENCES `tr_beli_m` (`TransBeli`, `NoBeli`) ON DELETE CASCADE,
  CONSTRAINT `fk_tr_Beli_d2` FOREIGN KEY (`KodeGd`) REFERENCES `tm_gudang` (`KodeGd`),
  CONSTRAINT `fk_tr_Beli_d3` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_beli_d`
--

INSERT INTO `tr_beli_d` VALUES ('BT','210700001',1,NULL,NULL,'B00000795','GD','CLOSET JONGKOK TRILIYUN MARON',144500,0,20,NULL,'Pcs',1,NULL,2890000,NULL,'c46c0673-659a-103a-ba01-d11e22512ef6'),('BT','210700001',2,NULL,NULL,'B00000794','GD','CLOSET JONGKOK TRILIYUN PUTIH',137500,0,50,NULL,'Pcs',1,NULL,6875000,NULL,'c46db4db-659a-103a-ba01-d11e22512ef6'),('BT','210700001',3,NULL,NULL,'B00000667','GD','CLOSET MONO BLOCK TRILIYUN SHAPIRRA MARON',932000,0,2,NULL,'Pcs',1,NULL,1864000,NULL,'c46dc06d-659a-103a-ba01-d11e22512ef6'),('BT','210700001',4,NULL,NULL,'B00001533','GD','CLOSET MONOBLOCK TRYLIYUN SHAPIRA PUTIH',887500,0,5,NULL,'Set',1,NULL,4437500,NULL,'c46dd2d8-659a-103a-ba01-d11e22512ef6'),('BT','210700001',5,NULL,NULL,'B00002525','GD','WASTAFEL TRYLIYUN BIRU KOSONGAN',157500,0,14,NULL,'Pcs',1,NULL,2205000,NULL,'c46dd99f-659a-103a-ba01-d11e22512ef6'),('BT','210700002',1,NULL,NULL,'B00000663','GD','CLOSET MONO BLOCK TRILIYUN SHAPIRRA IVORY',887500,0,4,NULL,'Pcs',1,NULL,3550000,NULL,'c46de136-659a-103a-ba01-d11e22512ef6'),('BT','210700003',1,NULL,NULL,'B00002526','GD','BAK MANDI  SUDUT WALRUS 120 L BEIGE + GAYUNG',265000,0,8,NULL,'Set',1,NULL,2120000,NULL,'c46de770-659a-103a-ba01-d11e22512ef6'),('BT','210700004',1,NULL,NULL,'B00002525','GD','WASTAFEL TRYLIYUN BIRU KOSONGAN',157500,0,20,NULL,'Pcs',1,NULL,3150000,NULL,'c46e0398-659a-103a-ba01-d11e22512ef6'),('BT','210700004',2,NULL,NULL,'B00000667','GD','CLOSET MONO BLOCK TRILIYUN SHAPIRRA MARON',932000,0,1,NULL,'Pcs',1,NULL,932000,NULL,'c46e0b61-659a-103a-ba01-d11e22512ef6'),('BT','210700004',3,NULL,NULL,'B00000653','GD','CLOSET DUDUK SIRAM TRILIYUN PINK',385000,0,10,NULL,'Pcs',1,NULL,3850000,NULL,'c46e150d-659a-103a-ba01-d11e22512ef6'),('BT','210700004',4,NULL,NULL,'B00000106','GD','CLOSET DUDUK SIRAM TRYLIYUN MARON',415000,0,20,NULL,'Dus',1,NULL,8300000,NULL,'c46e1ff9-659a-103a-ba01-d11e22512ef6'),('BT','210700004',5,NULL,NULL,'B00000651','GD','CLOSET DUDUK SIRAM TRILIYUN HIJAU',385000,0,30,NULL,'Pcs',1,NULL,11550000,NULL,'c46e36a3-659a-103a-ba01-d11e22512ef6'),('BT','210700005',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1 LOKAL',119520,0,279,NULL,'Dus',1,NULL,33346080,NULL,'c4a7df60-659a-103a-ba01-d11e22512ef6'),('BT','210700006',1,NULL,NULL,'B00000319','GD','WINA GREY 25X40 KW 1',49750,0,396,NULL,'Dus',1,NULL,19701000,NULL,'c4a8032b-659a-103a-ba01-d11e22512ef6'),('BT','210700006',2,NULL,NULL,'B00000865','GD','ZERMAT BLUE 25X40 KW 1',47750,0,198,NULL,'Dus',1,NULL,9454500,NULL,'c4a81090-659a-103a-ba01-d11e22512ef6'),('BT','210700006',3,NULL,NULL,'B00000315','GD','JASMINE CREAM 25X40 KW 1',47000,0,392,NULL,'Dus',1,NULL,18424000,NULL,'c4a81bc6-659a-103a-ba01-d11e22512ef6'),('BT','210700006',4,NULL,NULL,'B00002099','GD','DENALI GREY 25X50 KW 1',58500,0,381,NULL,'Dus',1,NULL,22288500,NULL,'c4ba2ede-659a-103a-ba01-d11e22512ef6'),('BT','210700007',1,NULL,NULL,'B00002141','GD','PADOVA GREY 25X50 KW 1',53500,0,148,NULL,'Dus',1,NULL,7918000,NULL,'c46df3a6-659a-103a-ba01-d11e22512ef6'),('BT','210700008',1,NULL,NULL,'B00002159','GD','SILICONE GLAAS CLEAR/PUTIH ',25650,0,12,NULL,'Pcs',1,NULL,307800,NULL,'c4a1477c-659a-103a-ba01-d11e22512ef6'),('BT','210700008',2,NULL,NULL,'B00002157','GD','SILICONE BATHROOM CLEAR/PUTIH',29430,0,12,NULL,'Pcs',1,NULL,353160,NULL,'c4a1502c-659a-103a-ba01-d11e22512ef6'),('BT','210700008',3,NULL,NULL,'B00002551','GD','SILICONE BATHROOM TRANSPARAN',29430,0,12,NULL,'Pcs',1,NULL,353160,NULL,'c4a15b07-659a-103a-ba01-d11e22512ef6'),('BT','210700009',1,NULL,NULL,'B00002305','GD','GENOVA BROWN 50X50 KW 1',54500,0,440,NULL,'Dus',1,NULL,23980000,NULL,'c4a23eaf-659a-103a-ba01-d11e22512ef6'),('BT','210700009',2,NULL,NULL,'B00001476','GD','OTAWA BROWN 50X50 KW 1',54500,0,439,NULL,'Dus',1,NULL,23925500,NULL,'c4a256ca-659a-103a-ba01-d11e22512ef6'),('BT','210700010',1,NULL,NULL,'B00000520','GD','BEATRIX BLUE 25X40 KW 1',51000,0,420,NULL,'Dus',1,NULL,21420000,NULL,'c4a412d6-659a-103a-ba01-d11e22512ef6'),('BT','210700010',2,NULL,NULL,'B00000378','GD','MURANO 30X30 KW 1',31000,0,80,NULL,'Dus',1,NULL,2480000,NULL,'c4a72536-659a-103a-ba01-d11e22512ef6'),('BT','210700011',1,NULL,NULL,'B00002458','GD','MOSCOW CREAM 40X40 KW 1',37500,0,500,NULL,'Dus',1,NULL,18750000,NULL,'c50d3d3b-659a-103a-ba01-d11e22512ef6'),('BT','210700012',1,NULL,NULL,'B00002458','GD','MOSCOW CREAM 40X40 KW 1',37500,0,500,NULL,'Dus',1,NULL,18750000,NULL,'c46a8cc1-659a-103a-ba01-d11e22512ef6'),('BT','210800001',1,NULL,NULL,'B00001274','GD','CLOSET JONGKOK TRILIYUN IVORY',137500,0,8,NULL,'Pcs',1,NULL,1100000,NULL,'c50d5cb7-659a-103a-ba01-d11e22512ef6'),('BT','210800001',2,NULL,NULL,'B00000795','GD','CLOSET JONGKOK TRILIYUN MARON',144500,0,30,NULL,'Pcs',1,NULL,4335000,NULL,'c50d6b35-659a-103a-ba01-d11e22512ef6'),('BT','210800002',1,NULL,NULL,'B00000658','GD','CLOSET MONO BLOCK TRILIYUN JASPER PUTIH',740000,0,15,NULL,'Pcs',1,NULL,11100000,NULL,'c4e0bbde-659a-103a-ba01-d11e22512ef6'),('BT','210800002',2,NULL,NULL,'B00000660','GD','CLOSET MONO BLOCK TRILIYUN JASPER IVORY',740000,0,7,NULL,'Pcs',1,NULL,5180000,NULL,'c4e0c5e9-659a-103a-ba01-d11e22512ef6'),('BT','210800003',1,NULL,NULL,'B00002566','GD','KUNCI TANGGUNG AFOS  60172-M SN/CP',65000,0,24,NULL,'Set',1,NULL,1560000,NULL,'c4ba4ae4-659a-103a-ba01-d11e22512ef6'),('BT','210800003',2,NULL,NULL,'B00002567','GD','KUNCI TANGGUNG AFOS 60108-M SN/CP',65000,0,24,NULL,'Set',1,NULL,1560000,NULL,'c4ba51fe-659a-103a-ba01-d11e22512ef6'),('BT','210800003',3,NULL,NULL,'B00002568','GD','KUNCI TANGGUNG AFOS 60221-M SN/CP',65000,0,24,NULL,'Set',1,NULL,1560000,NULL,'c4ba5cbd-659a-103a-ba01-d11e22512ef6'),('BT','210800003',4,NULL,NULL,'B00002569','GD','KUNCI TANGGUNG AFOS 60167-M SN/CP',65000,0,24,NULL,'Set',1,NULL,1560000,NULL,'c4ba634f-659a-103a-ba01-d11e22512ef6'),('BT','210800003',5,NULL,NULL,'B00002570','GD','KUNCI BESAR AFOS 9001 SN/CP',119500,0,24,NULL,'Set',1,NULL,2868000,NULL,'c4ba6b27-659a-103a-ba01-d11e22512ef6'),('BT','210800003',6,NULL,NULL,'B00002571','GD','KUNCI BESAR AFOS 9002 SN/CP',119500,0,24,NULL,'Set',1,NULL,2868000,NULL,'c4ba7338-659a-103a-ba01-d11e22512ef6'),('BT','210800003',7,NULL,NULL,'B00002572','GD','KUNCI BESAR AFOS 9003 SN/CP',119500,0,24,NULL,'Set',1,NULL,2868000,NULL,'c4ba7e3c-659a-103a-ba01-d11e22512ef6'),('BT','210800003',8,NULL,NULL,'B00002573','GD','KUNCI BESAR AFOS 9004 SN/CP',119500,0,24,NULL,'Set',1,NULL,2868000,NULL,'c4ba91ab-659a-103a-ba01-d11e22512ef6'),('BT','210800004',1,NULL,NULL,'B00002574','GD','BCP PRESTILE 1 METER TEBAL',450000,0,12,NULL,'Set',1,NULL,5400000,NULL,'c4bab751-659a-103a-ba01-d11e22512ef6'),('BT','210800004',2,NULL,NULL,'B00002575','GD','BCP ASICS 830X440X200 MM  TEBAL',435000,0,12,NULL,'Set',1,NULL,5220000,NULL,'c4bac27d-659a-103a-ba01-d11e22512ef6'),('BT','210800005',1,NULL,NULL,'B00002591','GD','KRAN AFOS E803',25000,0,50,NULL,'Pcs',1,NULL,1250000,NULL,'c4e14a4c-659a-103a-ba01-d11e22512ef6'),('BT','210800006',1,NULL,NULL,'B00002243','GD','LIST FANI SILVER BLACK 10X60 KW 1',14000,0,720,NULL,'Pcs',1,NULL,10080000,NULL,'c4e0a5c0-659a-103a-ba01-d11e22512ef6'),('BT','210800007',1,NULL,NULL,'B00000909','GD','KUCAN PERMEN GREY',1121,0,8698,NULL,'Pcs',1,NULL,9750458,NULL,'c4e167c4-659a-103a-ba01-d11e22512ef6'),('BT','210800007',2,NULL,NULL,'B00002585','GD','TELTRIM SOF MASJID TEBAL PJNG 2,5',50000,0,100,NULL,'Pcs',1,NULL,5000000,NULL,'c4e17144-659a-103a-ba01-d11e22512ef6'),('BT','210800008',1,NULL,NULL,'B00001932','GD','WOODSTONE BROWN 40X40 KW 1',53500,0,299,NULL,'Dus',1,NULL,15996500,NULL,'c4e2469f-659a-103a-ba01-d11e22512ef6'),('BT','210800008',2,NULL,NULL,'B00001933','GD','WOODSTONE GREY 40X40 KW 1',53500,0,150,NULL,'Dus',1,NULL,8025000,NULL,'c4e25084-659a-103a-ba01-d11e22512ef6'),('BT','210800008',3,NULL,NULL,'B00002373','GD','OMNIA GREEN 25X25 KW 1',52550,0,108,NULL,'Dus',1,NULL,5675400,NULL,'c4e25a05-659a-103a-ba01-d11e22512ef6'),('BT','210800009',1,NULL,NULL,'B00000331','GD','ACACIA BEIGE 25X40 KW 1',47000,0,299,NULL,'Dus',1,NULL,14053000,NULL,'c50bd964-659a-103a-ba01-d11e22512ef6'),('BT','210800010',1,NULL,NULL,'B00000883','GD','LOTUS BLUE 25X40 KW 1',47000,0,296,NULL,'Dus',1,NULL,13912000,NULL,'c4e17a93-659a-103a-ba01-d11e22512ef6'),('BT','210800010',2,NULL,NULL,'B00000923','GD','MALIBU BEIGE 25X40 KW 1',50000,0,294,NULL,'Dus',1,NULL,14700000,NULL,'c4e18500-659a-103a-ba01-d11e22512ef6'),('BT','210800010',3,NULL,NULL,'B00001999','GD','ROSETTA BLUE 25X50 KW 1',53500,0,383,NULL,'Dus',1,NULL,20490500,NULL,'c4e18e71-659a-103a-ba01-d11e22512ef6'),('BT','210800010',4,NULL,NULL,'B00001522','GD','FIRENZE BEIGE 25X50 KW 1',53500,0,383,NULL,'Dus',1,NULL,20490500,NULL,'c4e19885-659a-103a-ba01-d11e22512ef6'),('BT','210800011',1,NULL,NULL,'B00000399','GD','ALICANTE BROWN 50X50 KW 1',54500,0,438,NULL,'Dus',1,NULL,23871000,NULL,'c4e00037-659a-103a-ba01-d11e22512ef6'),('BT','210800011',2,NULL,NULL,'B00000307','GD','UNO CREMA CREAM 50X50 KW 1',52500,0,473,NULL,'Dus',1,NULL,24832500,NULL,'c4e00c9b-659a-103a-ba01-d11e22512ef6'),('BT','210800012',1,NULL,NULL,'B00002414','GD','MALPENSA GREY 25X50 KW 1',55500,0,383,NULL,'Dus',1,NULL,21256500,NULL,'c4bcf064-659a-103a-ba01-d11e22512ef6'),('BT','210800013',1,NULL,NULL,'B00001787','GD','GLASBOX KACA OCEAN VIEW 95005',20000,0,180,NULL,'Pcs',1,NULL,3600000,NULL,'c4e0614c-659a-103a-ba01-d11e22512ef6'),('BT','210800013',2,NULL,NULL,'B00002217','GD','GLASBOX AYANA',20000,0,180,NULL,'Pcs',1,NULL,3600000,NULL,'c4e06da2-659a-103a-ba01-d11e22512ef6'),('BT','210800014',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1 LOKAL',119520,0,279,NULL,'Dus',1,NULL,33346080,NULL,'c4e07a90-659a-103a-ba01-d11e22512ef6'),('BT','210800015',1,NULL,NULL,'B00002466','GD','ARIA BLUE 25X25 KW 1',48000,0,199,NULL,'Dus',1,NULL,9552000,NULL,'c4e104bf-659a-103a-ba01-d11e22512ef6'),('BT','210800015',2,NULL,NULL,'B00000759','GD','NOBU BLUE 25X25 KW 1',48000,0,199,NULL,'Dus',1,NULL,9552000,NULL,'c4e10e66-659a-103a-ba01-d11e22512ef6'),('BT','210800016',1,NULL,NULL,'B00001472','GD','WASTAFEL AMSTAD KECIL  PUTIH STUDIO 45',309985,0,12,NULL,'Pcs',1,NULL,3719820,NULL,'c4e1181f-659a-103a-ba01-d11e22512ef6'),('BT','210800016',2,NULL,NULL,'B00001473','GD','WASTAFEL AMSTAD BESAR STUDIO 50',447687,0,12,NULL,'Pcs',1,NULL,5372244,NULL,'c4e12271-659a-103a-ba01-d11e22512ef6'),('BT','210800017',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1 LOKAL',119520,0,277,NULL,'Dus',1,NULL,33107040,NULL,'c4e13634-659a-103a-ba01-d11e22512ef6'),('BT','210800018',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1 LOKAL',115200,0,279,NULL,'Dus',1,NULL,32140800,NULL,'c50b59b0-659a-103a-ba01-d11e22512ef6'),('BT','210800019',1,NULL,NULL,'B00002512','GD','CLOSED VOLK 633',590000,0,29,NULL,'Pcs',1,NULL,17110000,NULL,'c4e1dbf2-659a-103a-ba01-d11e22512ef6'),('BT','210800020',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1 LOKAL',115200,0,279,NULL,'Dus',1,NULL,32140800,NULL,'c4f7c6b4-659a-103a-ba01-d11e22512ef6'),('BT','210800021',1,NULL,NULL,'B00002364','GD','OPAL BEIGE 25X40 KW 1',48250,0,297,NULL,'Dus',1,NULL,14330250,NULL,'c4f7d4d1-659a-103a-ba01-d11e22512ef6'),('BT','210800021',2,NULL,NULL,'B00002150','GD','OPAL GREY 25X40 KW 1',48250,0,296,NULL,'Dus',1,NULL,14282000,NULL,'c4f7dae2-659a-103a-ba01-d11e22512ef6'),('BT','210800021',3,NULL,NULL,'B00001998','GD','ROSETTA GREY 25X50 KW 1',54500,0,384,NULL,'Dus',1,NULL,20928000,NULL,'c4f7e35d-659a-103a-ba01-d11e22512ef6'),('BT','210800021',4,NULL,NULL,'B00001954','GD','PADOVA BEIGE 25X50 KW 1',54500,0,380,NULL,'Dus',1,NULL,20710000,NULL,'c4f7eb55-659a-103a-ba01-d11e22512ef6'),('BT','210800022',1,NULL,NULL,'B00002411','GD','ALMARIA GREY 40X40 KW 1',45000,0,99,NULL,'Dus',1,NULL,4455000,NULL,'c4f81a1a-659a-103a-ba01-d11e22512ef6'),('BT','210800023',1,NULL,NULL,'B00002289','GD','HAMPTON SPRING KNIFE SK SQ 110  SN',28500,0,72,NULL,'Pcs',1,NULL,2052000,NULL,'c4bb13a2-659a-103a-ba01-d11e22512ef6'),('BT','210800023',2,NULL,NULL,'B00002273','GD','MORTISE LOCK DEKSON MTS RL DL 8485  SSS',144500,0,48,NULL,'Set',1,NULL,6936000,NULL,'c4bb19e6-659a-103a-ba01-d11e22512ef6'),('BT','210800023',3,NULL,NULL,'B00002275','GD','CILYNDER DEKSON  CYL  DC DL60MM SN',85850,0,48,NULL,'Set',1,NULL,4120800,NULL,'c4bcbaa1-659a-103a-ba01-d11e22512ef6'),('BT','210800023',4,NULL,NULL,'B00002290','GD','HAMPTON MAGNETIC DOOR STOPER MDS 2229 SN',16150,0,48,NULL,'Pcs',1,NULL,775200,NULL,'c4bcc632-659a-103a-ba01-d11e22512ef6'),('BT','210800023',5,NULL,NULL,'B00002291','GD','HAMPTON MAGNETIC DOOR STOPER MDS 2231 SN',16150,0,48,NULL,'Pcs',1,NULL,775200,NULL,'c4bccff3-659a-103a-ba01-d11e22512ef6'),('BT','210800023',6,NULL,NULL,'B00002345','GD','ENGSEL DEKSON ES SL 9\'\'  CP',44200,0,72,NULL,'Set',1,NULL,3182400,NULL,'c4bcdc05-659a-103a-ba01-d11e22512ef6'),('BT','210800024',1,NULL,NULL,'B00002194','GD','OSLO BROWN 30X30 KW 1',39000,0,250,NULL,'Dus',1,NULL,9750000,NULL,'c4f826c2-659a-103a-ba01-d11e22512ef6'),('BT','210800024',2,NULL,NULL,'B00002197','GD','OREGON BROWN 30X30 KW 1',39000,0,250,NULL,'Dus',1,NULL,9750000,NULL,'c4f82d2f-659a-103a-ba01-d11e22512ef6'),('BT','210800025',1,NULL,NULL,'B00001075','GD','ZURICH BROWN 40X40 KW 1 ',37000,0,475,NULL,'Dus',1,NULL,17575000,NULL,'c4e26d47-659a-103a-ba01-d11e22512ef6'),('BT','210800026',1,NULL,NULL,'B00000458','GD','LEXUS CREAM 50X50 KW 1 ',52000,0,450,NULL,'Dus',1,NULL,23400000,NULL,'c4e1e577-659a-103a-ba01-d11e22512ef6'),('BT','210800027',1,NULL,NULL,'B00000378','GD','MURANO 30X30 KW 1',31000,0,139,NULL,'Dus',1,NULL,4309000,NULL,'c4bace82-659a-103a-ba01-d11e22512ef6'),('BT','210800027',2,NULL,NULL,'B00000830','GD','BEATRIX GREY 25X40 KW 1',51000,0,289,NULL,'Dus',1,NULL,14739000,NULL,'c4bad62d-659a-103a-ba01-d11e22512ef6'),('BT','210800028',1,NULL,NULL,'B00002480','GD','MOSCOW GREY 40X40 KW 1',37500,0,499,NULL,'Dus',1,NULL,18712500,NULL,'c50b91d9-659a-103a-ba01-d11e22512ef6'),('BT','210800029',1,NULL,NULL,'B00001927','GD','IKAD CRYSTAL BEIGE 50X50 KW 1',52000,0,400,NULL,'Dus',1,NULL,20800000,NULL,'c4e12c56-659a-103a-ba01-d11e22512ef6'),('BT','210800030',1,NULL,NULL,'B00001069','GD','MAKARA BROWN KW 1',67000,0,199,NULL,'Dus',1,NULL,13333000,NULL,'c50be019-659a-103a-ba01-d11e22512ef6'),('BT','210800030',2,NULL,NULL,'B00001560','GD','MAKARA GREY 40X40 KW 1',67000,0,120,NULL,'Dus',1,NULL,8040000,NULL,'c50be72c-659a-103a-ba01-d11e22512ef6'),('BT','210800031',1,NULL,NULL,'B00001060','GD','IKAD MARMER GREY 14588 DO 50 X 50 KW 1',52000,0,398,NULL,'Dus',1,NULL,20696000,NULL,'c4bb0c3e-659a-103a-ba01-d11e22512ef6'),('BT','210800032',1,NULL,NULL,'B00002242','GD','GRANIT EFATA SOLID GREY 60X60 KW 1',198720,0,100,NULL,'Dus',1,NULL,19872000,NULL,'c4dfd430-659a-103a-ba01-d11e22512ef6'),('BT','210800032',2,NULL,NULL,'B00000104','GD','GRANIT EFFATA LUMINOUS BROWN 60X60 KW 1',194400,0,148,NULL,'Dus',1,NULL,28771200,NULL,'c4dfe4e1-659a-103a-ba01-d11e22512ef6'),('BT','210800033',1,NULL,NULL,'B00002637','GD','LIST RM 366 BROWN 8X25',4250,0,1400,NULL,'Pcs',1,NULL,5950000,NULL,'c50bc221-659a-103a-ba01-d11e22512ef6'),('BT','210800034',1,NULL,NULL,'B00002481','GD','IKAD 11165 D 3 50X50 KW 1 MOTIF GRANIT',51000,0,397,NULL,'Dus',1,NULL,20247000,NULL,'c50bb968-659a-103a-ba01-d11e22512ef6'),('BT','210800035',1,NULL,NULL,'B00001766','GD','GRANIT GRINIK KMG SPT SODIAK NATURAL 60X60 KW 1',184320,0,199,NULL,'Dus',1,NULL,36679680,NULL,'c4f80793-659a-103a-ba01-d11e22512ef6'),('BT','210800035',2,NULL,NULL,'B00001951','GD','GRANIT GOLF 6189  60X60 KW 1',158400,0,79,NULL,'Dus',1,NULL,12513600,NULL,'c4f80eb4-659a-103a-ba01-d11e22512ef6'),('BT','210800036',1,NULL,NULL,'B00002481','GD','IKAD 11165 D 3 50X50 KW 1 MOTIF GRANIT',51000,0,400,NULL,'Dus',1,NULL,20400000,NULL,'c4f7ce13-659a-103a-ba01-d11e22512ef6'),('BT','210900001',1,NULL,NULL,'B00000654','GD','CLOSET DUDUK SIRAM TRILIYUN PUTIH',385000,0,13,NULL,'Pcs',1,NULL,5005000,NULL,NULL),('BT','210900002',1,NULL,NULL,'B00000650','GD','CLOSET DUDUK SIRAM TRILIYUN BIRU',385000,0,11,NULL,'Pcs',1,NULL,4235000,NULL,NULL),('BT','210900003',1,NULL,NULL,'B00000650','GD','CLOSET DUDUK SIRAM TRILIYUN BIRU',385000,0,9,NULL,'Pcs',1,NULL,3465000,NULL,'c50fe206-659a-103a-ba01-d11e22512ef6'),('BT','210900003',2,NULL,NULL,'B00001274','GD','CLOSET JONGKOK TRILIYUN IVORY',137500,0,50,NULL,'Pcs',1,NULL,6875000,NULL,'c50fedb6-659a-103a-ba01-d11e22512ef6'),('BT','210900004',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1 LOKAL',118080,0,320,NULL,'Dus',1,NULL,37785600,NULL,NULL),('BT','210900005',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1 LOKAL',115200,0,279,NULL,'Dus',1,NULL,32140800,NULL,'c50edbda-659a-103a-ba01-d11e22512ef6'),('BT','210900006',1,NULL,NULL,'B00000822','GD','AMORE DARK GREY 25X40 KW 1',49500,0,297,NULL,'Dus',1,NULL,14701500,NULL,'c50f83a7-659a-103a-ba01-d11e22512ef6'),('BT','210900006',2,NULL,NULL,'B00001788','GD','INTERLAKEN WHITE 25X50 KW 1 ',56500,0,476,NULL,'Dus',1,NULL,26894000,NULL,'c50f8d8d-659a-103a-ba01-d11e22512ef6'),('BT','210900006',3,NULL,NULL,'B00002415','GD','MALPENSA BROWN 25X50 KW 1',56500,0,381,NULL,'Dus',1,NULL,21526500,NULL,'c50fbc24-659a-103a-ba01-d11e22512ef6'),('BT','210900006',4,NULL,NULL,'B00000360','GD','BOTTEGA BEIGE 25X50 KW 1',54500,0,284,NULL,'Dus',1,NULL,15478000,NULL,'c50fc803-659a-103a-ba01-d11e22512ef6'),('BT','210900006',5,NULL,NULL,'B00000482','GD','BOTTEGA GREY 25X50 KW 1',54500,0,285,NULL,'Dus',1,NULL,15532500,NULL,'c50fd690-659a-103a-ba01-d11e22512ef6'),('BT','210900007',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1 LOKAL',115200,0,279,NULL,'Dus',1,NULL,32140800,NULL,'c511184f-659a-103a-ba01-d11e22512ef6'),('BT','210900008',1,NULL,NULL,'B00000286','GD','GRANIT RIXO DOUBLE LODING  KW 1 LOKAL',125280,0,187,NULL,'Dus',1,NULL,23427360,NULL,NULL),('BT','210900009',1,NULL,NULL,'B00001966','GD','KUNCI BREMEN B120502    BESAR',88000,0,12,NULL,'Set',1,NULL,1056000,NULL,NULL),('BT','210900010',1,NULL,NULL,'B00002329','GD','HANDLE DEKSON TPH 981  38X630X600MM PSS+SSS',339575,0,6,NULL,'Set',1,NULL,2037450,NULL,NULL),('BT','210900011',1,NULL,NULL,'B00000333','GD','GRANIT EFFATA LUMINOS WHITE 60X60 KW 1',141120,0,150,NULL,'Dus',1,NULL,21168000,NULL,NULL),('BT','210900011',2,NULL,NULL,'B00001940','GD','GRANIT EFATA LORENSO  BLACK 60X60 KW 1 PGP   EX-8',190080,0,100,NULL,'Dus',1,NULL,19008000,NULL,NULL),('BT','210900012',1,NULL,NULL,'B00000446','GD','DALLAS GREY 50X50 KW 1',52000,0,140,NULL,'Dus',1,NULL,7280000,NULL,NULL),('BT','210900012',2,NULL,NULL,'B00000768','GD','DALLAS BROWN 50X50 KW 1',52000,0,66,NULL,'Dus',1,NULL,3432000,NULL,NULL),('BT','210900013',1,NULL,NULL,'B00002195','GD','OSLO GREY 30X30 KW 1',39000,0,239,NULL,'Dus',1,NULL,9321000,NULL,NULL),('BT','210900014',1,NULL,NULL,'B00000309','GD','MURANO 40X40 KW 1 PROMO',37500,0,500,NULL,'Dus',1,NULL,18750000,NULL,NULL),('BT','210900015',1,NULL,NULL,'B00000378','GD','MURANO 30X30 KW 1',31000,0,500,NULL,'Dus',1,NULL,15500000,NULL,'c50f7992-659a-103a-ba01-d11e22512ef6'),('BT','210900016',1,NULL,NULL,'B00000460','GD','LEXUS GREY 50X50 KW 1',52000,0,445,NULL,'Dus',1,NULL,23140000,NULL,'c50f2871-659a-103a-ba01-d11e22512ef6'),('BT','210900017',1,NULL,NULL,'B00002433','GD','MOSCOW GREEN 40X40 KW 1 ',37500,0,500,NULL,'Dus',1,NULL,18750000,NULL,NULL),('BT','210900018',1,NULL,NULL,'B00000461','GD','IKAD GARIS CREAM SZ 12578 50X50 KW 1',52000,0,400,NULL,'Dus',1,NULL,20800000,NULL,NULL),('BT','210900019',1,NULL,NULL,'B00000738','GD','IKAD GARIS GREY  SZ 14578 50X50 KW 1',52000,0,320,NULL,'Dus',1,NULL,16640000,NULL,NULL),('BT','210900019',2,NULL,NULL,'B00002481','GD','IKAD 11165 D 3 50X50 KW 1 MOTIF GRANIT',52000,0,63,NULL,'Dus',1,NULL,3276000,NULL,NULL),('BT','210900020',1,NULL,NULL,'B00001579','GD','IKAD CRYSTAL GREY 5OX5O IKAD KW 1',52000,0,200,NULL,'Dus',1,NULL,10400000,NULL,NULL),('BT','210900021',1,NULL,NULL,'B00001927','GD','IKAD CRYSTAL BEIGE 50X50 KW 1',52000,0,398,NULL,'Dus',1,NULL,20696000,NULL,NULL),('BT','210900022',1,NULL,NULL,'B00002306','GD','MAWAR VIOLET 25X40 KW 2',47500,0,191,NULL,'Dus',1,NULL,9072500,NULL,'c5100fc1-659a-103a-ba01-d11e22512ef6'),('BT','210900022',2,NULL,NULL,'B00000817','GD','MAWAR PINK IKAD 25X40 KW 1',60000,0,199,NULL,'Dus',1,NULL,11940000,NULL,'c5101b51-659a-103a-ba01-d11e22512ef6'),('BT','210900023',1,NULL,NULL,'B00000439','GD','GRANIT GRENIC KMG SPT CAIPSO NATURAL 60X60 KW 1',184320,0,198,NULL,'Dus',1,NULL,36495360,NULL,'c50ff8e9-659a-103a-ba01-d11e22512ef6'),('BT','210900023',2,NULL,NULL,'B00001951','GD','GRANIT GOLF 6189  60X60 KW 1',158400,0,40,NULL,'Dus',1,NULL,6336000,NULL,'c51003cb-659a-103a-ba01-d11e22512ef6'),('BT','210900024',1,NULL,NULL,'B00001925','GD','GRANIT GRENIC KMG SPT ROYAL PORTOLO 60X60 KW 1',184320,0,198,NULL,'Dus',1,NULL,36495360,NULL,'c50f12a5-659a-103a-ba01-d11e22512ef6'),('BT','210900024',2,NULL,NULL,'B00001951','GD','GRANIT GOLF 6189  60X60 KW 1',158400,0,79,NULL,'Dus',1,NULL,12513600,NULL,'c50f1d90-659a-103a-ba01-d11e22512ef6'),('BT','210900025',1,NULL,NULL,'B00002663','GD','IKAD PUTIH PETIR SZ 11125 D3 50X50 KW 1',52000,0,398,NULL,'Dus',1,NULL,20696000,NULL,NULL),('BT','210900026',1,NULL,NULL,'B00002663','GD','IKAD PUTIH PETIR SZ 11125 D3 50X50 KW 1',52000,0,400,NULL,'Dus',1,NULL,20800000,NULL,NULL),('BT','211000001',1,NULL,NULL,'B00000126','GD','DUPONT GOLD 50x50 KW 1',57715,0,438,NULL,'Dus',1,NULL,25279170,NULL,NULL),('BT','211000002',1,NULL,NULL,'B00002091','GD','ROLEX BROWN 50X50 KW 1',57715,0,439,NULL,'Dus',1,NULL,25336885,NULL,NULL),('BT','211000003',1,NULL,NULL,'B00000594','GD','DAVOSA BROWN 50X50 KW 1',57960,0,437,NULL,'Dus',1,NULL,25328520,NULL,NULL),('BT','211000004',1,NULL,NULL,'B00002677','GD','DAVOSA GREY / ANTRACITE',57960,0,410,NULL,'Dus',1,NULL,23763600,NULL,NULL),('BT','211000005',1,NULL,NULL,'B00000834','GD','DUPONT SILVER 50X50 KW 1',57715,0,471,NULL,'Dus',1,NULL,27183765,NULL,NULL),('BT','211000006',1,NULL,NULL,'B00002620','GD','DAVOSA ANTRACITE 40X40 KW 1',48258,0,500,NULL,'Dus',1,NULL,24129000,NULL,NULL),('BT','211000007',1,NULL,NULL,'B00000836','GD','DAVOSA BROWN 40X40 KW 1',48258,0,416,NULL,'Dus',1,NULL,20075328,NULL,NULL),('BT','211000007',2,NULL,NULL,'B00002620','GD','DAVOSA ANTRACITE 40X40 KW 1',48258,0,55,NULL,'Dus',1,NULL,2654190,NULL,NULL),('BT','211000008',1,NULL,NULL,'B00000769','GD','DUOMO GREY 50X50 KW 1',55000,0,250,NULL,'Dus',1,NULL,13750000,NULL,NULL),('BT','211000008',2,NULL,NULL,'B00000869','GD','DUOMO BROWN 50X50 KW 1',55000,0,250,NULL,'Dus',1,NULL,13750000,NULL,NULL),('BT','211000009',1,NULL,NULL,'B00000458','GD','LEXUS CREAM 50X50 KW 1 ',52000,0,500,NULL,'Dus',1,NULL,26000000,NULL,NULL),('BT','211000010',1,NULL,NULL,'B00002016','GD','HAVANA CREAM 50X50 KW 1',52000,0,500,NULL,'Dus',1,NULL,26000000,NULL,NULL),('BT','211000011',1,NULL,NULL,'B00002049','GD','REVO BROWN 25X25 KW 1',44000,0,250,NULL,'Dus',1,NULL,11000000,NULL,NULL),('BT','211000012',1,NULL,NULL,'B00001346','GD','OSLO BROWN 40X40 KW 1',46000,0,250,NULL,'Dus',1,NULL,11500000,NULL,NULL),('BT','211000013',1,NULL,NULL,'B00001424','GD','ZIGMA CREAM 40X40 KW 1 ISI 6 PCS',37500,0,500,NULL,'Dus',1,NULL,18750000,NULL,NULL),('BT','211000014',1,NULL,NULL,'B00002048','GD','REVO GREY 25X25 KW 1',44000,0,249,NULL,'Dus',1,NULL,10956000,NULL,NULL),('BT','211000014',2,NULL,NULL,'B00002050','GD','REVO BLUE 25X25 KW 1',44000,0,250,NULL,'Dus',1,NULL,11000000,NULL,NULL),('BT','211000014',3,NULL,NULL,'B00002047','GD','REVO GREEN 25X25 KW 1',44000,0,50,NULL,'Dus',1,NULL,2200000,NULL,NULL),('BT','211000015',1,NULL,NULL,'B00000721','GD','OTTO GREY 40X40 KW 1',37500,0,450,NULL,'Dus',1,NULL,16875000,NULL,NULL),('BT','211000016',1,NULL,NULL,'B00001469','GD','SALVATORE BROWN 60X60 KW 1',102240,0,33,NULL,'Dus',1,NULL,3373920,NULL,NULL),('BT','211000017',1,NULL,NULL,'B00000902','GD','ZERMAT GREEN 25X40 KW 1',48250,0,197,NULL,'Dus',1,NULL,9505250,NULL,NULL),('BT','211000017',2,NULL,NULL,'B00001074','GD','ALTHEA GREY 25X40 KW 1',47000,0,398,NULL,'Dus',1,NULL,18706000,NULL,NULL),('BT','211000018',1,NULL,NULL,'B00000070','GD','CLOSED AMSTAD SQUAD RAPI EX AMBONE',249178,0,10,NULL,'Pcs',1,NULL,2491780,NULL,NULL),('BT','211000018',2,NULL,NULL,'B00000751','GD','CLOSET AMSTAD JONGKOK PUTIH',249178,0,10,NULL,'Pcs',1,NULL,2491780,NULL,NULL),('BT','211000019',1,NULL,NULL,'B00002468','GD','CLOSET DUDUK SIRAM VOLK PUTIH',261000,0,92,NULL,'Set',1,NULL,24012000,NULL,NULL),('BT','211000020',1,NULL,NULL,'B00002512','GD','CLOSED VOLK 663 KOSONGAN',590000,0,20,NULL,'Pcs',1,NULL,11800000,NULL,NULL),('BT','211000020',2,NULL,NULL,'B00002372','GD','KLOSET VOLK KODOK 056',820000,0,10,NULL,'Set',1,NULL,8200000,NULL,NULL),('BT','211000021',1,NULL,NULL,'B00000318','GD','MALIBU GREY 25X40 KW 1',50250,0,299,NULL,'Dus',1,NULL,15024750,NULL,NULL),('BT','211000022',1,NULL,NULL,'B00001440','GD','WASTAFEL VOLK P01 KOMPLIT',225000,0,60,NULL,'Pcs',1,NULL,13500000,NULL,NULL),('BT','211000023',1,NULL,NULL,'B00002305','GD','GENOVA BROWN 50X50 KW 1',54500,0,424,NULL,'Dus',1,NULL,23108000,NULL,NULL),('BT','211000024',1,NULL,NULL,'B00002305','GD','GENOVA BROWN 50X50 KW 1',54500,0,75,NULL,'Dus',1,NULL,4087500,NULL,NULL),('BT','211000025',1,NULL,NULL,'B00001589','GD','EDEN BEIGE 25X50 KW 1',54500,0,299,NULL,'Dus',1,NULL,16295500,NULL,NULL),('BT','211000026',1,NULL,NULL,'B00000397','GD','KALIMANJARO BROWN 50X50 KW 1',54500,0,300,NULL,'Dus',1,NULL,16350000,NULL,NULL),('BT','211000027',1,NULL,NULL,'B00000323','GD','TULIP BEIGE 25071 25X40 KW 1',49000,0,299,NULL,'Dus',1,NULL,14651000,NULL,NULL),('BT','211000027',2,NULL,NULL,'B00000534','GD','ACACIA GREY 25X40 KW 1',47000,0,299,NULL,'Dus',1,NULL,14053000,NULL,NULL),('BT','211000028',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1  CHINA',118080,0,278,NULL,'Dus',1,NULL,32826240,NULL,NULL),('BT','211000029',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1  CHINA',118080,0,280,NULL,'Dus',1,NULL,33062400,NULL,NULL),('BT','211000030',1,NULL,NULL,'B00000352','GD','GENOVA CREAM 50X50 KW 1',54500,0,400,NULL,'Dus',1,NULL,21800000,NULL,NULL),('BT','211000031',1,NULL,NULL,'B00002411','GD','ALMARIA GREY 40X40 KW 1',45000,0,299,NULL,'Dus',1,NULL,13455000,NULL,NULL),('BT','211000032',1,NULL,NULL,'B00001521','GD','FIRENZE GREY 25X50 KW 1',54500,0,300,NULL,'Dus',1,NULL,16350000,NULL,NULL),('BT','211000032',2,NULL,NULL,'B00001590','GD','EDEN GREY 25X50 KW 1',54500,0,297,NULL,'Dus',1,NULL,16186500,NULL,NULL),('BT','211000033',1,NULL,NULL,'B00000766','GD','MALDIVES BLUE 25X50 KW 1',54500,0,298,NULL,'Dus',1,NULL,16241000,NULL,NULL),('BT','211000033',2,NULL,NULL,'B00002350','GD','MALDIVES GREEN 25X50 KW 1',54500,0,298,NULL,'Dus',1,NULL,16241000,NULL,NULL),('BT','211000034',1,NULL,NULL,'B00000767','GD','MALDIVES GREY 25X50 KW 1',54500,0,296,NULL,'Dus',1,NULL,16132000,NULL,NULL),('BT','211000034',2,NULL,NULL,'B00002519','GD','ALAMANDA CREAM 25X40 KW 1',47000,0,297,NULL,'Dus',1,NULL,13959000,NULL,NULL),('BT','211000035',1,NULL,NULL,'B00002169','GD','GRANIT EFFATA LUMINOUS /CRYSTAL GREY 60X60 KW 1',194000,0,250,NULL,'Dus',1,NULL,48500000,NULL,NULL),('BT','211000036',1,NULL,NULL,'B00000509','GD','GRANIT EFFATA BLACK 60X60 KW 1 SUPER BLACK',148320,0,100,NULL,'Dus',1,NULL,14832000,NULL,NULL),('BT','211000036',2,NULL,NULL,'B00000333','GD','GRANIT EFFATA LUMINOS WHITE 60X60 KW 1',141120,0,148,NULL,'Dus',1,NULL,20885760,NULL,NULL),('BT','211000037',1,NULL,NULL,'B00001060','GD','IKAD MARMER GREY 14588 DO 50 X 50 KW 1',52000,0,348,NULL,'Dus',1,NULL,18096000,NULL,NULL),('BT','211000037',2,NULL,NULL,'B00000738','GD','IKAD GARIS GREY  SZ 14578 50X50 KW 1',52000,0,50,NULL,'Dus',1,NULL,2600000,NULL,NULL),('BT','211000038',1,NULL,NULL,'B00001579','GD','IKAD CRYSTAL GREY 5OX5O IKAD KW 1',52000,0,399,NULL,'Dus',1,NULL,20748000,NULL,NULL),('BT','211000039',1,NULL,NULL,'B00001579','GD','IKAD CRYSTAL GREY 5OX5O IKAD KW 1',52000,0,200,NULL,'Dus',1,NULL,10400000,NULL,NULL),('BT','211000039',2,NULL,NULL,'B00002351','GD','IKAD ONYX GREY SZ 14143 50X50 KW 1',52000,0,80,NULL,'Dus',1,NULL,4160000,NULL,NULL),('BT','211000039',3,NULL,NULL,'B00002481','GD','IKAD 11165 D 3 50X50 KW 1 MOTIF GRANIT',52000,0,80,NULL,'Dus',1,NULL,4160000,NULL,NULL),('BT','211000040',1,NULL,NULL,'B00002399','GD','IKAD KOTAK BLACK 25X25 KW 3',44000,0,302,NULL,'Dus',1,NULL,13288000,NULL,NULL),('BT','211000041',1,NULL,NULL,'B00000742','GD','IKAD SL 27046 25X25 KW 3',42500,0,128,NULL,'Dus',1,NULL,5440000,NULL,NULL),('BT','211000042',1,NULL,NULL,'B00002121','GD','IKAD DT 61110 DO 30X60 KW 2',55000,0,142,NULL,'Dus',1,NULL,7810000,NULL,NULL),('BT','211000043',1,NULL,NULL,'B00002121','GD','IKAD DT 61110 DO 30X60 KW 2',55000,0,96,NULL,'Dus',1,NULL,5280000,NULL,NULL),('BT','211000043',2,NULL,NULL,'B00000291','GD','IKAD DT 7178A DO',62000,0,143,NULL,'Dus',1,NULL,8866000,NULL,NULL),('BT','211000043',3,NULL,NULL,'B00002122','GD','IKAD DT 71780 DO 30X60 KW 2',62000,0,144,NULL,'Dus',1,NULL,8928000,NULL,NULL),('BT','211000044',1,NULL,NULL,'B00002383','GD','IKAD DX 7469A 25X40 KW ',61000,0,175,NULL,'Dus',1,NULL,10675000,NULL,NULL),('BT','211100001',1,NULL,NULL,'B00000804','GD','DALILA GREEN 25X40 KW 1',50683,0,495,NULL,'Dus',1,NULL,25088085,NULL,NULL),('BT','211100002',1,NULL,NULL,'B00002469','GD','ROXETE BEIGE 25X40 KW 1',51410,0,502,NULL,'Dus',1,NULL,25807820,NULL,NULL),('BT','211100003',1,NULL,NULL,'B00002047','GD','REVO GREEN 25X25 KW 1',44000,0,200,NULL,'Dus',1,NULL,8800000,NULL,NULL),('BT','211100003',2,NULL,NULL,'B00000721','GD','OTTO GREY 40X40 KW 1',37500,0,50,NULL,'Dus',1,NULL,1875000,NULL,NULL),('BT','211100004',1,NULL,NULL,'B00000763','GD','DETROID BROWN 50X50 KW 1',55000,0,60,NULL,'Dus',1,NULL,3300000,NULL,NULL),('BT','211100005',1,NULL,NULL,'B00001382','GD','OSLO GREY 40X40 KW 1',46000,0,239,NULL,'Dus',1,NULL,10994000,NULL,NULL),('BT','211100006',1,NULL,NULL,'B00000460','GD','LEXUS GREY 50X50 KW 1',53000,0,500,NULL,'Dus',1,NULL,26500000,NULL,NULL),('BT','211100007',1,NULL,NULL,'B00002458','GD','MOSCOW CREAM 40X40 KW 1',37500,0,540,NULL,'Dus',1,NULL,20250000,NULL,NULL),('BT','211100008',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1  CHINA',118080,0,320,NULL,'Dus',1,NULL,37785600,NULL,NULL),('BT','211100009',1,NULL,NULL,'B00002512','GD','CLOSED VOLK 663 KOSONGAN',600000,0,39,NULL,'Pcs',1,NULL,23400000,NULL,NULL),('BT','211100010',1,NULL,NULL,'B00000500','GD','MALDIVES CREAM 25X50 KW 1',54500,0,296,NULL,'Dus',1,NULL,16132000,NULL,NULL),('BT','211100010',2,NULL,NULL,'B00000411','GD','JASMINE BEIGE 25X40 KW 1',47000,0,299,NULL,'Dus',1,NULL,14053000,NULL,NULL),('BT','211100011',1,NULL,NULL,'B00002693','GD','AMAYA GREY 25X25 KW 1',47500,0,192,NULL,'Dus',1,NULL,9120000,NULL,NULL),('BT','211100012',1,NULL,NULL,'B00002000','GD','ROSETTA GREEN 25X50 KW 1',54500,0,300,NULL,'Dus',1,NULL,16350000,NULL,NULL),('BT','211100013',1,NULL,NULL,'B00000373','GD','AR 9999 CREAM 40X40 KW 1',37000,0,497,NULL,'Dus',1,NULL,18389000,NULL,NULL),('BT','211100014',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1  CHINA',122400,0,318,NULL,'Dus',1,NULL,38923200,NULL,NULL),('BT','211100015',1,NULL,NULL,'B00000501','GD','ACACIA BLUE 25X40 KW 1',47000,0,496,NULL,'Dus',1,NULL,23312000,NULL,NULL),('BT','211100016',1,NULL,NULL,'B00002495','GD','GRANIT ARNA DAIVA WHITE 60X60 KW 2',116192,0,207,NULL,'Dus',1,NULL,24051744,NULL,NULL),('BT','211100016',2,NULL,NULL,'B00002167','GD','GRANIT ARNA KIANO WHITE 60X60 KW 2',116192,0,240,NULL,'Dus',1,NULL,27886080,NULL,NULL),('BT','211100016',3,NULL,NULL,'B00001881','GD','GRANIT ARNA ARCADIA BEIGE TERRAZO 60X60 KW 2 ',132032,0,175,NULL,'Dus',1,NULL,23105600,NULL,NULL),('BT','211100017',1,NULL,NULL,'B00001997','GD','ROSETTA BEIGE 25X50 KW 1',54500,0,382,NULL,'Dus',1,NULL,20819000,NULL,NULL),('BT','211100017',2,NULL,NULL,'B00001788','GD','INTERLAKEN WHITE 25X50 KW 1 ',56500,0,384,NULL,'Dus',1,NULL,21696000,NULL,NULL),('BT','211100018',1,NULL,NULL,'B00000215','GD','AMAYA BEIGE 25X25 KW 1',47500,0,191,NULL,'Dus',1,NULL,9072500,NULL,NULL),('BT','211100018',2,NULL,NULL,'B00000519','GD','AMAYA GREEN 25X25 KW 1',47500,0,192,NULL,'Dus',1,NULL,9120000,NULL,NULL),('BT','211100018',3,NULL,NULL,'B00001591','GD','AMAYA BLUE 25X25 KW 1',47500,0,192,NULL,'Dus',1,NULL,9120000,NULL,NULL),('BT','211100019',1,NULL,NULL,'B00001090','GD','NAT MU408 SMART CREAM',9200,0,230,NULL,'Pcs',1,NULL,2116000,NULL,NULL),('BT','211100020',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1  CHINA',122400,0,319,NULL,'Dus',1,NULL,39045600,NULL,NULL),('BT','211100021',1,NULL,NULL,'B00002334','GD','DEKSON FLUSH BOLT FB 040 8 INC SSS',39500,0,48,NULL,'Set',1,NULL,1896000,NULL,NULL),('BT','211100021',2,NULL,NULL,'B00002283','GD','DEKSON FLUSH BOLT FB 040 12\'\'  SSS',56000,0,24,NULL,'Dus',1,NULL,1344000,NULL,NULL),('BT','211100021',3,NULL,NULL,'B00002284','GD','DEKSON FLUSH BOLD FB 040 18\'\'  SSS',88000,0,24,NULL,'Pcs',1,NULL,2112000,NULL,NULL),('BT','211100021',4,NULL,NULL,'B00002274','GD','MORTISE LOCK DEKSON MTS SLD DL 84100',82500,0,24,NULL,'Set',1,NULL,1980000,NULL,NULL),('BT','211100021',5,NULL,NULL,'B00002275','GD','CILYNDER DEKSON  CYL  DC DL60MM SN',80500,0,36,NULL,'Set',1,NULL,2898000,NULL,NULL),('BT','211100021',6,NULL,NULL,'B00002146','GD','RUMAH KUNCI DEKSON ESCN Z01 SN=+NP',40500,0,50,NULL,'Set',1,NULL,2025000,NULL,NULL),('BT','211100021',7,NULL,NULL,'B00002406','GD','HANDLE DEKSON  ECOLINE PH 269 30X15X400X250 PSS+S',198000,0,6,NULL,'Set',1,NULL,1188000,NULL,NULL),('BT','211100021',8,NULL,NULL,'B00002272','GD','MORTISE LOCK  DEKSON MTS IL DL 8485 SSS',132500,0,12,NULL,'Set',1,NULL,1590000,NULL,NULL),('BT','211100022',1,NULL,NULL,'B00000294','GD','DOVER BROWN 50X50 KW 1',55000,0,264,NULL,'Dus',1,NULL,14520000,NULL,NULL),('BT','211100022',2,NULL,NULL,'B00000763','GD','DETROID BROWN 50X50 KW 1',55000,0,204,NULL,'Dus',1,NULL,11220000,NULL,NULL),('BT','211100023',1,NULL,NULL,'B00001579','GD','IKAD CRYSTAL GREY 5OX5O IKAD KW 1',52000,0,399,NULL,'Dus',1,NULL,20748000,NULL,NULL),('BT','211100024',1,NULL,NULL,'B00000738','GD','IKAD GARIS GREY  SZ 14578 50X50 KW 1',52000,0,398,NULL,'Dus',1,NULL,20696000,NULL,NULL),('BT','211100025',1,NULL,NULL,'B00001060','GD','IKAD MARMER GREY 14588 DO 50 X 50 KW 1',52000,0,398,NULL,'Dus',1,NULL,20696000,NULL,NULL),('BT','211100026',1,NULL,NULL,'B00001766','GD','GRANIT GRENIC KMG SPT ZODIAK NATURAL 60X60 KW 1',187200,0,99,NULL,'Dus',1,NULL,18532800,NULL,NULL),('BT','211100027',1,NULL,NULL,'B00002027','GD','IKAD SL 25046 25X25 KW 2',48000,0,150,NULL,'Dus',1,NULL,7200000,NULL,NULL),('BT','211100028',1,NULL,NULL,'B00000706','GD','GRANIT IKAD TORONTO GREY 60X60 KW 3',126000,0,100,NULL,'Dus',1,NULL,12600000,NULL,NULL),('BT','211200001',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1  CHINA',130000,0,319,NULL,'Dus',1,NULL,41470000,NULL,NULL),('BT','211200002',1,NULL,NULL,'B00001100','GD','NAT MU408 GRANITE GREY',9200,0,100,NULL,'Pcs',1,NULL,920000,NULL,NULL),('BT','211200002',2,NULL,NULL,'B00001090','GD','NAT MU408 SMART CREAM',9200,0,100,NULL,'Pcs',1,NULL,920000,NULL,NULL),('BT','211200003',1,NULL,NULL,'B00002512','GD','CLOSED VOLK 663 KOSONGAN',587000,0,29,NULL,'Pcs',1,NULL,17023000,NULL,NULL),('BT','211200004',1,NULL,NULL,'B00000863','GD','UNO MOTO BOYO 25835 GREY 25X40 KW 1',58750,0,388,NULL,'Dus',1,NULL,22795000,NULL,NULL),('BT','211200004',2,NULL,NULL,'B00000499','GD','OPAL GREEN 25X40 KW 1 ',47750,0,396,NULL,'Dus',1,NULL,18909000,NULL,NULL),('BT','211200004',3,NULL,NULL,'B00000515','GD','WINA BLUE 25X40 KW 1',49750,0,297,NULL,'Dus',1,NULL,14775750,NULL,NULL),('BT','211200004',4,NULL,NULL,'B00001693','GD','RICHWOOD  BEIGE 25X40 KA 1',49750,0,297,NULL,'Dus',1,NULL,14775750,NULL,NULL),('BT','211200004',5,NULL,NULL,'B00002129','GD','RICHWOOD GREY 25X40 KW 1',40750,0,297,NULL,'Dus',1,NULL,12102750,NULL,NULL),('BT','211200004',6,NULL,NULL,'B00002019','GD','TRIFECTA BROWN 25X40 KW 1',49750,0,297,NULL,'Dus',1,NULL,14775750,NULL,NULL),('BT','211200004',7,NULL,NULL,'B00002020','GD','TRIFECTA GREY 25X40 KW 1',49750,0,296,NULL,'Dus',1,NULL,14726000,NULL,NULL),('BT','211200004',8,NULL,NULL,'B00002518','GD','QUEBEC GREY UNO 25X40 KW 1',47750,0,394,NULL,'Dus',1,NULL,18813500,NULL,NULL),('BT','211200005',1,NULL,NULL,'B00000774','GD','OPAL BLUE 25X40 KW 1',47500,0,394,NULL,'Dus',1,NULL,18715000,NULL,NULL),('BT','211200005',2,NULL,NULL,'B00002516','GD','QUEBEC BLUE UNO 25X40 KW 1',48500,0,396,NULL,'Dus',1,NULL,19206000,NULL,NULL),('BT','211200005',3,NULL,NULL,'B00000534','GD','ACACIA GREY 25X40 KW 1',47000,0,495,NULL,'Dus',1,NULL,23265000,NULL,NULL),('BT','211200005',4,NULL,NULL,'B00000409','GD','PADOVA GREEN 25X50 KW 1',54500,0,288,NULL,'Dus',1,NULL,15696000,NULL,NULL),('BT','211200005',5,NULL,NULL,'B00001522','GD','FIRENZE BEIGE 25X50 KW 1',53500,0,288,NULL,'Dus',1,NULL,15408000,NULL,NULL),('BT','211200005',6,NULL,NULL,'B00002414','GD','MALPENSA GREY 25X50 KW 1',56500,0,280,NULL,'Dus',1,NULL,15820000,NULL,NULL),('BT','211200005',7,NULL,NULL,'B00000412','GD','ACACIA GREEN 25X40 KW 1',47000,0,495,NULL,'Dus',1,NULL,23265000,NULL,NULL),('BT','211200006',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1  CHINA',122400,0,319,NULL,'Dus',1,NULL,39045600,NULL,NULL),('BT','211200007',1,NULL,NULL,'B00000315','GD','JASMINE CREAM 25X40 KW 1',47000,0,198,NULL,'Dus',1,NULL,9306000,NULL,NULL),('BT','211200008',1,NULL,NULL,'B00002455','GD','KLOSET AMSTAD MY SINGLE FLUSH BONUS JET SHOWER',1150688,0,20,NULL,'Set',1,NULL,23013760,NULL,NULL),('BT','211200009',1,NULL,NULL,'B00001105','GD','NAT MU408 DARK BLACK ',14100,0,300,NULL,'Pcs',1,NULL,4230000,NULL,NULL),('BT','211200009',2,NULL,NULL,'B00001102','GD','NAT MU408 MILKY BROWN',9200,0,50,NULL,'Pcs',1,NULL,460000,NULL,NULL),('BT','211200009',3,NULL,NULL,'B00001095','GD','NAT MU408 MAGIC RED',14100,0,60,NULL,'Pcs',1,NULL,846000,NULL,NULL),('BT','211200010',1,NULL,NULL,'B00001506','GD','GRANIT CERANOSA CR POLOS 60X60 KW 1  CHINA',122400,0,319,NULL,'Dus',1,NULL,39045600,NULL,NULL),('BT','211200011',1,NULL,NULL,'B00002436','GD','KING STONE GREY 50X50 KW 1',54500,0,511,NULL,'Dus',1,NULL,27849500,NULL,NULL),('BT','211200011',2,NULL,NULL,'B00002437','GD','KING STONE BROWN 50X50 KW 1',54500,0,314,NULL,'Dus',1,NULL,17113000,NULL,NULL),('BT','211200012',1,NULL,NULL,'B00002317','GD','HAMPTON MORTISE LOCK  MTS RL HP 485 SN',84000,0,24,NULL,'Pcs',1,NULL,2016000,NULL,NULL),('BT','211200012',2,NULL,NULL,'B00002320','GD','CYLINDER KUNCI HAMPTON CYL DC BR DL 60 MM SN',65500,0,24,NULL,'Set',1,NULL,1572000,NULL,NULL),('BT','211200013',1,NULL,NULL,'B00002268','GD','ENGSEL DEKSON ES IR 3X2.5X2.5MM 2BB SN',43500,0,60,NULL,'Set',1,NULL,2610000,NULL,NULL),('BT','211200014',1,NULL,NULL,'B00002480','GD','MOSCOW GREY 40X40 KW 1',38500,0,450,NULL,'Dus',1,NULL,17325000,NULL,NULL),('BT','211200015',1,NULL,NULL,'B00001397','GD','SALVATORE BROWN 50X50 KW 1',52000,0,176,NULL,'Dus',1,NULL,9152000,NULL,NULL),('BT','211200015',2,NULL,NULL,'B00000768','GD','DALLAS BROWN 50X50 KW 1',52500,0,264,NULL,'Dus',1,NULL,13860000,NULL,NULL),('BT','211200016',1,NULL,NULL,'B00001075','GD','ZURICH BROWN 40X40 KW 1 ',38500,0,540,NULL,'Dus',1,NULL,20790000,NULL,NULL),('BT','211200017',1,NULL,NULL,'B00000305','GD','BEATRIX BASIC 25X40 KW 1',51000,0,250,NULL,'Dus',1,NULL,12750000,NULL,NULL),('BT','211200017',2,NULL,NULL,'B00000830','GD','BEATRIX GREY 25X40 KW 1',51000,0,250,NULL,'Dus',1,NULL,12750000,NULL,NULL),('BT','211200018',1,NULL,NULL,'B00000367','GD','OREGON GREY 40X40 KW 1',46000,0,240,NULL,'Dus',1,NULL,11040000,NULL,NULL),('BT','211200019',1,NULL,NULL,'B00000445','GD','HOLDEN BASIC 25X40 KW 1',51000,0,301,NULL,'Dus',1,NULL,15351000,NULL,NULL),('BT','211200020',1,NULL,NULL,'B00001925','GD','GRANIT EFATA PORTOLO GOLD 60X60 KW 1',198720,0,109,NULL,'Dus',1,NULL,21660480,NULL,NULL),('BT','211200020',2,NULL,NULL,'B00001939','GD','GRANIT EFATA CITRIN GREY 60X60 KW 1',198720,0,100,NULL,'Dus',1,NULL,19872000,NULL,NULL),('BT','211200021',1,NULL,NULL,'B00002663','GD','IKAD PUTIH PETIR SZ 11125 D3 50X50 KW 1',54000,0,397,NULL,'Dus',1,NULL,21438000,NULL,NULL),('BT','211200022',1,NULL,NULL,'B00000333','GD','GRANIT EFFATA LUMINOS WHITE 60X60 KW 1',148320,0,248,NULL,'Dus',1,NULL,36783360,NULL,NULL),('BT','211200023',1,NULL,NULL,'B00002663','GD','IKAD PUTIH PETIR SZ 11125 D3 50X50 KW 1',54000,0,400,NULL,'Dus',1,NULL,21600000,NULL,NULL),('BT','211200024',1,NULL,NULL,'B00002351','GD','IKAD ONYX GREY SZ 14143 50X50 KW 1',53000,0,400,NULL,'Dus',1,NULL,21200000,NULL,NULL),('BT','211200025',1,NULL,NULL,'B00000744','GD','IKAD GARIS CREAM SZ 12578 DO 50X50 KW 3',44000,0,397,NULL,'Dus',1,NULL,17468000,NULL,NULL),('BT','211200026',1,NULL,NULL,'B00001644','GD','GRANIT GARUDA POLOS CREAM 60X60 KW 1 INDO',134640,0,150,NULL,'Dus',1,NULL,20196000,NULL,NULL),('BT','211200027',1,NULL,NULL,'B00001644','GD','GRANIT GARUDA POLOS CREAM 60X60 KW 1 INDO',134640,0,149,NULL,'Dus',1,NULL,20061360,NULL,NULL),('BT','211200028',1,NULL,NULL,'B00001644','GD','GRANIT GARUDA POLOS CREAM 60X60 KW 1 INDO',134640,0,253,NULL,'Dus',1,NULL,34063920,NULL,NULL);

DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetBeliAdd` AFTER INSERT ON `tr_beli_d` FOR EACH ROW BEGIN
DECLARE HargaLama DOUBLE;
DECLARE StockLama DOUBLE;
DECLARE HitungLama DOUBLE;
DECLARE HargaBaru DOUBLE;
DECLARE JumlahBaru DOUBLE;
DECLARE HitungBaru DOUBLE;
DECLARE StockHasil DOUBLE;
DECLARE HitungHasil DOUBLE;
DECLARE HargaHasil DOUBLE;
DECLARE vTemp DOUBLE;
SET HargaLama=(SELECT ifnull(HargaAvg,0) FROM tm_barang WHERE KodeBrg=new.KodeBrg);
IF HargaLama is NULL THEN 
   SET HargaLama=0;
END IF;
SET StockLama=(SELECT ifnull(StockAkhir,0) FROM tm_StockBrg WHERE KodeBrg=new.KodeBrg and KodeGD=new.KodeGD);
IF StockLama is NULL THEN 
   SET StockLama=0;
END IF;
SET HitungLama=HargaLama * StockLama;
SET HargaBaru=ifnull(new.Harga,0)/ifnull(new.konv,1);
SET JumlahBaru=ifnull(new.Jml,0) *ifnull( new.Konv,1);
SET HitungBaru=HargaBaru * JumlahBaru;
SET StockHasil=StockLama + JumlahBaru;
SET HitungHasil=HitungLama + HitungBaru;
SET HargaHasil= HitungHasil / StockHasil;
UPDATE tm_barang SET HargaAvg=Hargabaru WHERE KodeBrg=new.KodeBrg;
SELECT COUNT(*) into vTemp FROM tm_stockbrg WHERE kodebrg=new.kodebrg and kodeGd=new.KodeGD;
IF vTemp>0 THEN
     UPDATE tm_stockbrg SET stockakhir=ifnull(stockakhir,0) + JumlahBaru WHERE kodebrg=new.kodebrg and kodegd=new.kodegd;
END IF;
IF vTemp <=0 THEN
    INSERT INTO tm_stockbrg(kodebrg, kodegd, stockakhir) VALUES(new.kodebrg,new.kodegd,JumlahBaru);
END IF;
END */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetBeliUpdate` AFTER UPDATE ON `tr_beli_d` FOR EACH ROW BEGIN
DECLARE HargaLama DOUBLE;
DECLARE StockLama DOUBLE;
DECLARE HitungLama DOUBLE;
DECLARE HargaBaru DOUBLE;
DECLARE JumlahBaru DOUBLE;
DECLARE HitungBaru DOUBLE;
DECLARE StockHasil DOUBLE;
DECLARE HitungHasil DOUBLE;
DECLARE HargaHasil DOUBLE;
SET HargaHasil=(SELECT HargaAvg FROM tm_barang WHERE KodeBrg=old.KodeBrg);
SET StockHasil=(SELECT StockAkhir FROM tm_StockBrg WHERE KodeBrg=old.KodeBrg and KodeGD=old.KodeGD);
SET HitungHasil=HargaHasil*StockHasil;
SET HargaBaru=old.Harga/old.konv;
SET JumlahBaru=old.jml * old.konv;
SET HitungBaru=HargaBaru * JumlahBaru;
SET HitungLama=HitungHasil-HitungBaru;
SET StockLama=StockHasil-JumlahBaru;
SET HargaLama=HitungLama/StockLama;
UPDATE tm_stockbrg SET StockAkhir=ifnull(StockAkhir,0) - JumlahBaru WHERE KodeBrg=old.KodeBrg and KodeGD=old.KodeGD;
SET HargaLama=(SELECT HargaAvg FROM tm_barang WHERE KodeBrg=new.KodeBrg);
SET StockLama=(SELECT StockAkhir FROM tm_StockBrg WHERE KodeBrg=new.KodeBrg and KodeGD=new.KodeGD);
SET HitungLama=HargaLama * StockLama;
SET HargaBaru=new.Harga/new.konv;
SET JumlahBaru=new.Jml * new.Konv;
SET HitungBaru=HargaBaru * JumlahBaru;
SET StockHasil=StockLama + JumlahBaru;
SET HitungHasil=HitungLama + HitungBaru;
SET HargaHasil= HitungHasil / StockHasil;
UPDATE tm_barang SET HargaAvg=hargabaru WHERE KodeBrg=new.KodeBrg;
UPDATE tm_stockbrg SET StockAkhir=ifnull(stockakhir,0) + JumlahBaru WHERE KodeBrg=new.KodeBrg and KodeGD=new.KodeGD;
END */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetBeliDelete` AFTER DELETE ON `tr_beli_d` FOR EACH ROW BEGIN
DECLARE HargaLama DOUBLE;
DECLARE StockLama DOUBLE;
DECLARE HitungLama DOUBLE;
DECLARE HargaBaru DOUBLE;
DECLARE JumlahBaru DOUBLE;
DECLARE HitungBaru DOUBLE;
DECLARE StockHasil DOUBLE;
DECLARE HitungHasil DOUBLE;
DECLARE HargaHasil DOUBLE;
SET HargaHasil=(SELECT HargaAvg FROM tm_barang WHERE KodeBrg=old.KodeBrg);
SET StockHasil=(SELECT StockAkhir FROM tm_StockBrg WHERE KodeBrg=old.KodeBrg and KodeGD=old.KodeGD);
SET HitungHasil=HargaHasil*StockHasil;
SET HargaBaru=old.Harga/old.konv;
SET JumlahBaru=old.jml * old.konv;
SET HitungBaru=HargaBaru * JumlahBaru;
SET HitungLama=HitungHasil-HitungBaru;
SET StockLama=StockHasil-JumlahBaru;
SET HargaLama=HitungLama/StockLama;
UPDATE tm_barang SET HargaAvg=old.harga WHERE KodeBrg=old.KodeBrg;
UPDATE tm_stockbrg SET StockAkhir=ifnull(StockAkhir,0) - JumlahBaru WHERE KodeBrg=old.KodeBrg and KodeGD=old.KodeGD;
END */;;

DELIMITER ;

--
-- Table structure for table `tr_beli_m`
--

CREATE TABLE `tr_beli_m` (
  `TransBeli` varchar(2) NOT NULL default '',
  `NoBeli` varchar(11) NOT NULL default '',
  `TglBeli` datetime default NULL,
  `TglBatal` datetime default NULL,
  `KodeSupp` varchar(10) default NULL,
  `NamaSupp` varchar(50) default NULL,
  `Keterangan` varchar(100) default NULL,
  `NoSJ` varchar(30) default NULL,
  `TglJT` datetime default NULL,
  `DiscRp` double default NULL,
  `Tambahan` double default NULL,
  `KetTambahan` varchar(50) default NULL,
  `PPN` double default NULL,
  `Nilai` double default NULL,
  `Sisa` double default NULL,
  `NPWP` varchar(20) default NULL,
  `NoTitip` varchar(11) default NULL,
  `NilaiTitip` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `PPNRps` double default NULL,
  `TipePPN` varchar(3) default NULL,
  `NoFPajak` varchar(20) default NULL,
  `TglFPajak` datetime default NULL,
  `BayarTunai` double default NULL,
  `GDBeli` varchar(10) default NULL,
  `isPindah` smallint(6) NOT NULL default '0',
  `UID` char(36) default NULL,
  PRIMARY KEY  (`TransBeli`,`NoBeli`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_beli_m`
--

INSERT INTO `tr_beli_m` VALUES ('BT','210700001','2021-07-19 00:00:00',NULL,'05','ADIVA','','19072021','2021-07-19 00:00:00',0,0,NULL,0,18271500,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3972d02-659a-103a-ba01-d11e22512ef6'),('BT','210700002','2021-07-19 00:00:00',NULL,'05','ADIVA','','19072021','2021-09-19 00:00:00',0,0,NULL,0,3550000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3973024-659a-103a-ba01-d11e22512ef6'),('BT','210700003','2021-07-21 00:00:00',NULL,'05','ADIVA','','21072021','2021-07-21 00:00:00',0,0,NULL,0,2120000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c39733e0-659a-103a-ba01-d11e22512ef6'),('BT','210700004','2021-07-23 00:00:00',NULL,'05','ADIVA','','22072021','2021-07-23 00:00:00',0,0,NULL,0,27782000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3973fd4-659a-103a-ba01-d11e22512ef6'),('BT','210700005','2021-07-29 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD00001842455','2021-09-19 00:00:00',0,0,NULL,0,33346080,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3977b32-659a-103a-ba01-d11e22512ef6'),('BT','210700006','2021-07-30 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BJK-R21002999','2021-09-30 00:00:00',0,0,NULL,0,69868000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c39782e5-659a-103a-ba01-d11e22512ef6'),('BT','210700007','2021-07-23 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','23072021','2021-07-23 00:00:00',0,0,NULL,0,7918000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3973ca0-659a-103a-ba01-d11e22512ef6'),('BT','210700008','2021-07-26 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','26072021','2021-07-26 00:00:00',0,0,NULL,0,1014120,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3975c49-659a-103a-ba01-d11e22512ef6'),('BT','210700009','2021-07-27 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BJK-K21005829','2021-09-27 00:00:00',0,0,NULL,0,47905500,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c39761c2-659a-103a-ba01-d11e22512ef6'),('BT','210700010','2021-07-28 00:00:00',NULL,'09','MBAK SUSI','','18072021','2021-07-29 00:00:00',0,0,NULL,0,23900000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3976a22-659a-103a-ba01-d11e22512ef6'),('BT','210700011','2021-07-15 00:00:00',NULL,'09','MBAK SUSI','','15072021','2021-09-15 00:00:00',0,0,NULL,0,18750000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3986ac3-659a-103a-ba01-d11e22512ef6'),('BT','210700012','2021-07-18 00:00:00',NULL,'04','JAMES PINGUIN / PT PENGUIN TRADING','','8000006125','1899-12-30 00:00:00',0,0,NULL,0,18750000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c38fd6a3-659a-103a-ba01-d11e22512ef6'),('BT','210800001','2021-08-31 00:00:00',NULL,'05','ADIVA','','J082021003344','2021-10-30 00:00:00',0,0,NULL,0,5435000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3986ffc-659a-103a-ba01-d11e22512ef6'),('BT','210800002','2021-08-12 00:00:00',NULL,'05','ADIVA','','CV ADV 2214','2021-10-12 00:00:00',0,0,NULL,0,16280000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397c6c8-659a-103a-ba01-d11e22512ef6'),('BT','210800003','2021-08-03 00:00:00',NULL,'15','PAK EDI AFOS','','1688/JL/UTM/0821','2021-11-03 00:00:00',0,0,NULL,0,17712000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c39788a6-659a-103a-ba01-d11e22512ef6'),('BT','210800004','2021-08-04 00:00:00',NULL,'16','AGUS PRIMA JAYA/MITRA USAHA SUKSES','','SH.SBY.08210002','2021-10-04 00:00:00',0,0,NULL,0,10620000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3979215-659a-103a-ba01-d11e22512ef6'),('BT','210800005','2021-08-14 00:00:00',NULL,'15','PAK EDI AFOS','','1749/JL/UTM/0821','2021-11-14 00:00:00',0,0,NULL,0,1250000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397de99-659a-103a-ba01-d11e22512ef6'),('BT','210800006','2021-08-10 00:00:00',NULL,'23','ANTON LIST','','00821012','2021-11-10 00:00:00',0,0,NULL,0,10080000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397c3ab-659a-103a-ba01-d11e22512ef6'),('BT','210800007','2021-08-15 00:00:00',NULL,'16','AGUS PRIMA JAYA/MITRA USAHA SUKSES','','SH.SBY.0821.0045','2021-08-15 00:00:00',0,0,NULL,0,14750458,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397e1cb-659a-103a-ba01-d11e22512ef6'),('BT','210800008','2021-08-20 00:00:00',NULL,'02','IMAM KOBIN','','BT21SH19002','2021-10-30 00:00:00',0,0,NULL,0,29696900,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397ff0d-659a-103a-ba01-d11e22512ef6'),('BT','210800009','2021-08-28 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD 0001846993','2021-10-13 00:00:00',0,0,NULL,0,14053000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3986560-659a-103a-ba01-d11e22512ef6'),('BT','210800010','2021-08-15 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BJKR21003213','2021-10-16 00:00:00',0,0,NULL,0,69593000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397e900-659a-103a-ba01-d11e22512ef6'),('BT','210800011','2021-08-08 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BJK-K21006202','2021-08-08 00:00:00',0,0,NULL,0,48703500,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397b95f-659a-103a-ba01-d11e22512ef6'),('BT','210800012','2021-08-06 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','06082021','2021-10-06 00:00:00',0,0,NULL,0,21256500,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397aa42-659a-103a-ba01-d11e22512ef6'),('BT','210800013','2021-08-10 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001844650','2021-09-24 00:00:00',0,0,NULL,0,7200000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397bd0b-659a-103a-ba01-d11e22512ef6'),('BT','210800014','2021-08-10 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001844335','2021-09-24 00:00:00',0,0,NULL,0,33346080,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397bee7-659a-103a-ba01-d11e22512ef6'),('BT','210800015','2021-08-13 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD00001845030','2021-09-28 00:00:00',0,0,NULL,0,19104000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397d45c-659a-103a-ba01-d11e22512ef6'),('BT','210800016','2021-08-13 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001845141','2021-09-28 00:00:00',0,0,NULL,0,9092064,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397d602-659a-103a-ba01-d11e22512ef6'),('BT','210800017','2021-08-14 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001845031','2021-09-29 00:00:00',0,0,NULL,0,33107040,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397d96f-659a-103a-ba01-d11e22512ef6'),('BT','210800018','2021-08-27 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','DB0001846756','2021-10-12 00:00:00',0,0,NULL,0,32140800,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c39850e4-659a-103a-ba01-d11e22512ef6'),('BT','210800019','2021-08-18 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD00001845155','2021-10-03 00:00:00',0,0,NULL,0,17110000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397f15e-659a-103a-ba01-d11e22512ef6'),('BT','210800020','2021-08-21 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD00001846209','2021-10-06 00:00:00',0,0,NULL,0,32140800,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3981589-659a-103a-ba01-d11e22512ef6'),('BT','210800021','2021-08-23 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BJK-R21003327','2021-10-23 00:00:00',0,0,NULL,0,70250250,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3981dca-659a-103a-ba01-d11e22512ef6'),('BT','210800022','2021-08-24 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD00001846313','2021-10-09 00:00:00',0,0,NULL,0,4455000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3982bc6-659a-103a-ba01-d11e22512ef6'),('BT','210800023','2021-08-06 00:00:00',NULL,'18','RICHARD / PT FAJARLESTARI SEJATI','','21081200122','2021-10-06 00:00:00',0,0,NULL,0,17841600,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397a49d-659a-103a-ba01-d11e22512ef6'),('BT','210800024','2021-08-25 00:00:00',NULL,'09','MBAK SUSI','','S0000006545','2021-10-25 00:00:00',0,0,NULL,0,19500000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3983181-659a-103a-ba01-d11e22512ef6'),('BT','210800025','2021-08-20 00:00:00',NULL,'09','MBAK SUSI','','BK000008454','2021-10-20 00:00:00',0,0,NULL,0,17575000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c398023e-659a-103a-ba01-d11e22512ef6'),('BT','210800026','2021-08-18 00:00:00',NULL,'09','MBAK SUSI','','8000006383','2021-10-18 00:00:00',0,0,NULL,0,23400000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397f330-659a-103a-ba01-d11e22512ef6'),('BT','210800027','2021-08-04 00:00:00',NULL,'09','MBAK SUSI','','04082021','2021-08-04 00:00:00',0,0,NULL,0,19048000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3979b2a-659a-103a-ba01-d11e22512ef6'),('BT','210800028','2021-08-27 00:00:00',NULL,'09','MBAK SUSI','','BK00008581','2021-10-27 00:00:00',0,0,NULL,0,18712500,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c398582b-659a-103a-ba01-d11e22512ef6'),('BT','210800029','2021-08-13 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','IK-020/10/08/21','2021-10-13 00:00:00',0,0,NULL,0,20800000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397d7d9-659a-103a-ba01-d11e22512ef6'),('BT','210800030','2021-08-28 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','IK-014/23/08/21','2021-10-28 00:00:00',0,0,NULL,0,21373000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c398672b-659a-103a-ba01-d11e22512ef6'),('BT','210800031','2021-08-06 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','JK-012/03/08/21','2021-10-06 00:00:00',0,0,NULL,0,20696000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397a0cc-659a-103a-ba01-d11e22512ef6'),('BT','210800032','2021-08-07 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','EG-003/06/08/21','1899-12-30 00:00:00',0,0,NULL,0,48643200,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c397adc2-659a-103a-ba01-d11e22512ef6'),('BT','210800033','2021-08-28 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-07-0475','2021-11-08 00:00:00',0,0,NULL,0,5950000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3985da4-659a-103a-ba01-d11e22512ef6'),('BT','210800034','2021-08-28 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-08-0443','2021-11-08 00:00:00',0,0,NULL,0,20247000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3985bd0-659a-103a-ba01-d11e22512ef6'),('BT','210800035','2021-08-24 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SO-1-2021-08-0307/R1','2021-08-24 00:00:00',0,0,NULL,0,49193280,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3982a2c-659a-103a-ba01-d11e22512ef6'),('BT','210800036','2021-08-21 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-12021-08-0317','2021-11-01 00:00:00',0,0,NULL,0,20400000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3981c12-659a-103a-ba01-d11e22512ef6'),('BT','210900001','2021-09-22 00:00:00',NULL,'05','ADIVA','','CV ADV 920','2021-11-22 00:00:00',0,0,NULL,0,5005000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'f46b5e24-6c99-103a-8058-c946033d2811'),('BT','210900002','2021-09-18 00:00:00',NULL,'05','ADIVA','','CV.ADV.765','2021-11-15 00:00:00',0,0,NULL,0,4235000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'3d0a29b7-6971-103a-ba01-d11e22512ef6'),('BT','210900003','2021-09-07 00:00:00',NULL,'05','ADIVA','','CV ADIVA 0267','2021-11-07 00:00:00',0,0,NULL,0,10340000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c398940d-659a-103a-ba01-d11e22512ef6'),('BT','210900004','2021-09-29 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001852687','2021-11-19 00:00:00',0,0,NULL,0,37785600,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'973ed277-7251-103a-81bd-cf9ca151b185'),('BT','210900005','2021-09-02 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001848063','2021-11-17 00:00:00',0,0,NULL,0,32140800,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c39881b6-659a-103a-ba01-d11e22512ef6'),('BT','210900006','2021-09-07 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BJK-R21003472','2021-11-07 00:00:00',0,0,NULL,0,94132500,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3989273-659a-103a-ba01-d11e22512ef6'),('BT','210900007','2021-09-10 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD00001848895','2021-10-25 00:00:00',0,0,NULL,0,32140800,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c398a821-659a-103a-ba01-d11e22512ef6'),('BT','210900008','2021-09-23 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001851345','2021-11-08 00:00:00',0,0,NULL,0,23427360,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'8cd7eb9a-6d82-103a-8058-c946033d2811'),('BT','210900009','2021-09-22 00:00:00',NULL,'18','RICHARD / PT FAJARLESTARI SEJATI','','2109.12.012B3','2021-11-22 00:00:00',0,0,NULL,0,1056000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'4379a00d-6ca1-103a-8058-c946033d2811'),('BT','210900010','2021-09-15 00:00:00',NULL,'18','RICHARD / PT FAJARLESTARI SEJATI','','2109 12 00719','2021-11-15 00:00:00',0,0,NULL,0,2037450,2037450,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'9fcd10f9-6758-103a-ba01-d11e22512ef6'),('BT','210900011','2021-09-28 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','EG-002/27/09/21','2021-11-28 00:00:00',0,0,NULL,0,40176000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'59218cfe-717f-103a-81bd-cf9ca151b185'),('BT','210900012','2021-09-25 00:00:00',NULL,'09','MBAK SUSI','','SO00007021','2021-11-25 00:00:00',0,0,NULL,0,10712000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'15c22cb5-6f19-103a-915c-0ee556fef7d8'),('BT','210900013','2021-09-25 00:00:00',NULL,'09','MBAK SUSI','','SO00006650','2021-11-25 00:00:00',0,0,NULL,0,9321000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'e90a2251-6f18-103a-915c-0ee556fef7d8'),('BT','210900014','2021-09-17 00:00:00',NULL,'09','MBAK SUSI','','80000006844','2021-09-24 00:00:00',0,0,NULL,0,18750000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'e0c860a0-68e2-103a-ba01-d11e22512ef6'),('BT','210900015','2021-09-06 00:00:00',NULL,'09','MBAK SUSI','','S000006649','2021-09-13 00:00:00',0,0,NULL,0,15500000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3988cf9-659a-103a-ba01-d11e22512ef6'),('BT','210900016','2021-09-03 00:00:00',NULL,'09','MBAK SUSI','','BK 000008697','2021-11-03 00:00:00',0,0,NULL,0,23140000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3988838-659a-103a-ba01-d11e22512ef6'),('BT','210900017','2021-09-30 00:00:00',NULL,'09','MBAK SUSI','','BK 000009030','2021-11-30 00:00:00',0,0,NULL,0,18750000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'1cec1f26-7300-103a-81bd-cf9ca151b185'),('BT','210900018','2021-09-24 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','IL-007/09/09/21','2021-11-24 00:00:00',0,0,NULL,0,20800000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'73667765-6e58-103a-8058-c946033d2811'),('BT','210900019','2021-09-22 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','LK-007/21/09/21','2021-11-22 00:00:00',0,0,NULL,0,19916000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'a9ffc461-6cbc-103a-8058-c946033d2811'),('BT','210900020','2021-09-16 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','IL-008/15/09/21','2021-11-16 00:00:00',0,0,NULL,0,10400000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'8c7bdda9-6809-103a-ba01-d11e22512ef6'),('BT','210900021','2021-09-14 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','IK-014/30/08/21','2021-11-14 00:00:00',0,0,NULL,0,20696000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'6a60c867-6684-103a-ba01-d11e22512ef6'),('BT','210900022','2021-09-07 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-08-0528','2021-11-17 00:00:00',0,0,NULL,0,21012500,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c39897a1-659a-103a-ba01-d11e22512ef6'),('BT','210900023','2021-09-07 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-12021-08-0527','2021-11-17 00:00:00',0,0,NULL,0,42831360,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c3989606-659a-103a-ba01-d11e22512ef6'),('BT','210900024','2021-09-04 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-08-0485','2021-11-14 00:00:00',0,0,NULL,0,49008960,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c398853e-659a-103a-ba01-d11e22512ef6'),('BT','210900025','2021-09-28 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-09-0485','2021-12-08 00:00:00',0,0,NULL,0,20696000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'f03a9228-7163-103a-81bd-cf9ca151b185'),('BT','210900026','2021-09-21 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-09-0317','2021-12-01 00:00:00',0,0,NULL,0,20800000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'f7980091-6bfa-103a-ba01-d11e22512ef6'),('BT','211000001','2021-10-13 00:00:00',NULL,'14','PAK RIDHO MAKMUR NGUDO','','211-DRJ-0821[M]','2021-10-20 00:00:00',0,0,NULL,0,25279170,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'e267fc30-7d4b-103a-b981-aed008b67a3f'),('BT','211000002','2021-10-27 00:00:00',NULL,'14','PAK RIDHO MAKMUR NGUDO','','132-DRJ-1021','2021-11-03 00:00:00',0,0,NULL,0,25336885,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'885cdb9c-8855-103a-afd3-856465ccd1b2'),('BT','211000003','2021-10-06 00:00:00',NULL,'14','PAK RIDHO MAKMUR NGUDO','','245-DRJ-0921 [B]','2021-10-13 00:00:00',0,0,NULL,0,25328520,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'5d6cee5b-77b9-103a-9681-22bb4424e71b'),('BT','211000004','2021-10-09 00:00:00',NULL,'14','PAK RIDHO MAKMUR NGUDO','','245-DRJ-0921 [C]','2021-10-11 00:00:00',0,0,NULL,0,23763600,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'8bc91425-7a04-103a-87c0-e6408d0264ef'),('BT','211000005','2021-10-01 00:00:00',NULL,'14','PAK RIDHO MAKMUR NGUDO','','INV/21/09/580','2021-10-01 00:00:00',0,0,NULL,0,27183765,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'49c54d4f-73bc-103a-81bd-cf9ca151b185'),('BT','211000006','2021-10-22 00:00:00',NULL,'14','PAK RIDHO MAKMUR NGUDO','','100-DRJ-1021','2021-10-28 00:00:00',0,0,NULL,0,24129000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'258c3681-842f-103a-b723-a3e284ef20d0'),('BT','211000007','2021-10-23 00:00:00',NULL,'14','PAK RIDHO MAKMUR NGUDO','','109-DRJ-1021','2021-10-30 00:00:00',0,0,NULL,0,22729518,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'61048562-84fc-103a-b723-a3e284ef20d0'),('BT','211000008','2021-10-18 00:00:00',NULL,'09','MBAK SUSI','','BK00009288','2021-10-25 00:00:00',0,0,NULL,0,27500000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'28620479-812b-103a-b723-a3e284ef20d0'),('BT','211000009','2021-10-13 00:00:00',NULL,'09','MBAK SUSI','','SO00007052','2021-12-13 00:00:00',0,0,NULL,0,26000000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'13a4bae8-7d4c-103a-b981-aed008b67a3f'),('BT','211000010','2021-10-15 00:00:00',NULL,'09','MBAK SUSI','','BK00009252','2021-12-15 00:00:00',0,0,NULL,0,26000000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'6543388e-7ee5-103a-a265-507f8e4cce28'),('BT','211000011','2021-10-29 00:00:00',NULL,'09','MBAK SUSI','','BK00009428','2021-12-29 00:00:00',0,0,NULL,0,11000000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'cd259b9d-89e5-103a-afd3-856465ccd1b2'),('BT','211000012','2021-10-29 00:00:00',NULL,'09','MBAK SUSI','','SO00007362','2021-12-29 00:00:00',0,0,NULL,0,11500000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'21e2677d-89e6-103a-afd3-856465ccd1b2'),('BT','211000013','2021-10-02 00:00:00',NULL,'09','MBAK SUSI','','8000007006','2021-12-02 00:00:00',0,0,NULL,0,18750000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'4d67c7a4-749c-103a-8737-e4f729e70b81'),('BT','211000014','2021-10-25 00:00:00',NULL,'09','MBAK SUSI','','BK 00009376','2021-12-25 00:00:00',0,0,NULL,0,24156000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'35a097d2-86a8-103a-b723-a3e284ef20d0'),('BT','211000015','2021-10-26 00:00:00',NULL,'09','MBAK SUSI','','BK00009390','2021-12-26 00:00:00',0,0,NULL,0,16875000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'5e05ec27-8779-103a-b723-a3e284ef20d0'),('BT','211000016','2021-10-26 00:00:00',NULL,'09','MBAK SUSI','','BK00009389','2021-12-26 00:00:00',0,0,NULL,0,3373920,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'049843fb-877a-103a-b723-a3e284ef20d0'),('BT','211000017','2021-10-29 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001856935','2021-12-19 00:00:00',0,0,NULL,0,28211250,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'52432601-89e4-103a-afd3-856465ccd1b2'),('BT','211000018','2021-10-29 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001857715','2021-12-19 00:00:00',0,0,NULL,0,4983560,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'ba973dc9-89e4-103a-afd3-856465ccd1b2'),('BT','211000019','2021-10-02 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD00001853415','2021-11-17 00:00:00',0,0,NULL,0,24012000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c0e29ffa-748d-103a-8737-e4f729e70b81'),('BT','211000020','2021-10-26 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001856936','2021-12-10 00:00:00',0,0,NULL,0,20000000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'bfd45363-8c23-103a-8d76-fb1c97a46d36'),('BT','211000021','2021-10-06 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD00001853414','2021-11-26 00:00:00',0,0,NULL,0,15024750,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'bc361dd5-77cb-103a-9681-22bb4424e71b'),('BT','211000022','2021-10-06 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001854008','2021-11-26 00:00:00',0,0,NULL,0,13500000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'dd74a920-77cb-103a-9681-22bb4424e71b'),('BT','211000023','2021-10-13 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001855304','2021-11-28 00:00:00',0,0,NULL,0,23108000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'fe974c3a-7d4a-103a-b981-aed008b67a3f'),('BT','211000024','2021-10-16 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001855305','2021-12-06 00:00:00',0,0,NULL,0,4087500,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'04b1b0ee-7fa8-103a-a265-507f8e4cce28'),('BT','211000025','2021-10-16 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001855058','2021-12-06 00:00:00',0,0,NULL,0,16295500,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'51d70f2b-7fa8-103a-a265-507f8e4cce28'),('BT','211000026','2021-10-18 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001855054','2021-12-08 00:00:00',0,0,NULL,0,16350000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'afb26aaf-8138-103a-b723-a3e284ef20d0'),('BT','211000027','2021-10-18 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001855056','2021-12-08 00:00:00',0,0,NULL,0,28704000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'335a83e4-8139-103a-b723-a3e284ef20d0'),('BT','211000028','2021-10-19 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001856037','2021-11-09 00:00:00',0,0,NULL,0,32826240,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'1c9b4d43-8212-103a-b723-a3e284ef20d0'),('BT','211000029','2021-10-19 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001856037','2021-12-09 00:00:00',0,0,NULL,0,33062400,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'38f0ca4c-8212-103a-b723-a3e284ef20d0'),('BT','211000030','2021-10-21 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001856075','2021-12-01 00:00:00',0,0,NULL,0,21800000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'b7e24943-8390-103a-b723-a3e284ef20d0'),('BT','211000031','2021-10-23 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001856426','2021-12-08 00:00:00',0,0,NULL,0,13455000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'0cd52260-8517-103a-b723-a3e284ef20d0'),('BT','211000032','2021-10-25 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001855057','2021-12-10 00:00:00',0,0,NULL,0,32536500,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'9f0293af-86b9-103a-b723-a3e284ef20d0'),('BT','211000033','2021-10-26 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BDOOO1855055','2021-12-11 00:00:00',0,0,NULL,0,32482000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'f834199a-8789-103a-b723-a3e284ef20d0'),('BT','211000034','2021-10-28 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001855712','2021-12-18 00:00:00',0,0,NULL,0,30091000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'32a4596f-891b-103a-afd3-856465ccd1b2'),('BT','211000035','2021-10-19 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','EG-004/12/10/21','2021-12-19 00:00:00',0,0,NULL,0,48500000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'b89998b5-81e9-103a-b723-a3e284ef20d0'),('BT','211000036','2021-10-27 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','EG-005/12/10/21','2021-12-27 00:00:00',0,0,NULL,0,35717760,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'9c125089-8828-103a-afd3-856465ccd1b2'),('BT','211000037','2021-10-22 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','IK-013/13/10/21','2021-12-22 00:00:00',0,0,NULL,0,20696000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'63caa347-8460-103a-b723-a3e284ef20d0'),('BT','211000038','2021-10-30 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','LK-094/28/10/21','2021-12-30 00:00:00',0,0,NULL,0,20748000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'b676e160-8a8d-103a-8d76-fb1c97a46d36'),('BT','211000039','2021-10-02 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','IL/008/01/10/21','2021-12-02 00:00:00',0,0,NULL,0,18720000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'4fc60d87-7496-103a-8737-e4f729e70b81'),('BT','211000040','2021-10-30 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-12021-100592','2022-01-10 00:00:00',0,0,NULL,0,13288000,13288000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'3f25efd9-8a7e-103a-8d76-fb1c97a46d36'),('BT','211000041','2021-10-09 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-10-0129','2021-12-19 00:00:00',0,0,NULL,0,5440000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'4462e7ef-7a03-103a-87c0-e6408d0264ef'),('BT','211000042','2021-10-25 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-10-0461','2022-01-05 00:00:00',0,0,NULL,0,7810000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'ddd98cc2-86b9-103a-b723-a3e284ef20d0'),('BT','211000043','2021-10-19 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-10-0331/RI','2021-12-29 00:00:00',0,0,NULL,0,23074000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'311fa90d-81e0-103a-b723-a3e284ef20d0'),('BT','211000044','2021-10-30 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-10-0591','2022-01-10 00:00:00',0,0,NULL,0,10675000,10675000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'6be6846d-8a7e-103a-8d76-fb1c97a46d36'),('BT','211100001','2021-11-10 00:00:00',NULL,'14','PAK RIDHO MAKMUR NGUDO','','167-DRJ-1021[E]','2021-11-17 00:00:00',0,0,NULL,0,25088085,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'0d563bb4-9342-103a-aa74-708754125b93'),('BT','211100002','2021-11-16 00:00:00',NULL,'14','PAK RIDHO MAKMUR NGUDO','','063-DRJ-1121','2021-11-23 00:00:00',0,0,NULL,0,25807820,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'be32416d-97ff-103a-aa37-829253eba060'),('BT','211100003','2021-11-12 00:00:00',NULL,'09','MBAK SUSI','','BK 00009591','2022-01-12 00:00:00',0,0,NULL,0,10675000,10675000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'8664ed09-94ef-103a-a744-624e61fccb07'),('BT','211100004','2021-11-12 00:00:00',NULL,'09','MBAK SUSI','','BK 00009589','2022-01-12 00:00:00',0,0,NULL,0,3300000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'acfea224-94ef-103a-a744-624e61fccb07'),('BT','211100005','2021-11-12 00:00:00',NULL,'09','MBAK SUSI','','BK 00009590','2022-01-12 00:00:00',0,0,NULL,0,10994000,10994000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'d1f91654-94ef-103a-a744-624e61fccb07'),('BT','211100006','2021-11-15 00:00:00',NULL,'09','MBAK SUSI','','BK 00009615','2022-01-15 00:00:00',0,0,NULL,0,26500000,26500000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'b22b7b93-9725-103a-a744-624e61fccb07'),('BT','211100007','2021-11-03 00:00:00',NULL,'09','MBAK SUSI','','SQ00007464','2022-01-03 00:00:00',0,0,NULL,0,20250000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'dfa53f70-8dd0-103a-bb13-b3e5644221dc'),('BT','211100008','2021-11-09 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BDOOO1859138','2021-12-29 00:00:00',0,0,NULL,0,37785600,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'94df8f82-9251-103a-aa74-708754125b93'),('BT','211100009','2021-11-11 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001859868','2022-01-31 00:00:00',0,0,NULL,0,23400000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'4169a3f2-9411-103a-aa74-708754125b93'),('BT','211100010','2021-11-13 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001860079','2021-12-28 00:00:00',0,0,NULL,0,30185000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'beaaf445-9572-103a-a744-624e61fccb07'),('BT','211100011','2021-11-15 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001860078','2022-01-05 00:00:00',0,0,NULL,0,9120000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'1f5d2c9c-9731-103a-a744-624e61fccb07'),('BT','211100012','2021-11-15 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001860080','2022-01-05 00:00:00',0,0,NULL,0,16350000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'4db15559-9731-103a-a744-624e61fccb07'),('BT','211100013','2021-11-16 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001860076','2022-01-06 00:00:00',0,0,NULL,0,18389000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'2605875f-97fe-103a-aa37-829253eba060'),('BT','211100014','2021-11-30 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001862806','2022-01-20 00:00:00',0,0,NULL,0,38923200,38923200,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'f5c40bf7-a30c-103a-a679-5e3c12a8146a'),('BT','211100015','2021-11-29 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001862301','2022-01-19 00:00:00',0,0,NULL,0,23312000,23312000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'b377db76-a246-103a-bc93-b87c43dc8609'),('BT','211100016','2021-11-29 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BJK-W21001029','2022-02-28 00:00:00',0,0,NULL,0,75043424,75043424,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'5fbd964f-a237-103a-bc93-b87c43dc8609'),('BT','211100017','2021-11-29 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BJK-R21004894','2022-02-28 00:00:00',0,0,NULL,0,42515000,42515000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'a9462a61-a237-103a-bc93-b87c43dc8609'),('BT','211100018','2021-11-18 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001860077','2022-01-03 00:00:00',0,0,NULL,0,27312500,27312500,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'82774972-9991-103a-aa8d-2e7eed2c13da'),('BT','211100019','2021-11-18 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001860613','2022-01-03 00:00:00',0,0,NULL,0,2116000,2116000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c54c27eb-9991-103a-aa8d-2e7eed2c13da'),('BT','211100020','2021-11-19 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001861083','2022-01-04 00:00:00',0,0,NULL,0,39045600,39045600,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c228e1fb-9a66-103a-b45d-96ebd877ca8f'),('BT','211100021','2021-11-09 00:00:00',NULL,'18','RICHARD / PT FAJARLESTARI SEJATI','','2111.12.00335','2022-01-09 00:00:00',0,0,NULL,0,15033000,15033000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c1b77982-9254-103a-aa74-708754125b93'),('BT','211100022','2021-11-25 00:00:00',NULL,'09','MBAK SUSI','','BK 00009731','2021-12-02 00:00:00',0,0,NULL,0,25740000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'36792f6e-9f0f-103a-a242-4db5a4167f3b'),('BT','211100023','2021-11-24 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','LK-003/17/11/21','2022-01-24 00:00:00',0,0,NULL,0,20748000,20748000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'74046a74-9e17-103a-9f42-42448efe4d88'),('BT','211100024','2021-11-06 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','IK-018/02/11/21','2022-01-06 00:00:00',0,0,NULL,0,20696000,20696000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'94a8c9df-9023-103a-aa74-708754125b93'),('BT','211100025','2021-11-11 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','IL-014/13/10/21','2022-01-11 00:00:00',0,0,NULL,0,20696000,20696000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'664e8b29-9411-103a-aa74-708754125b93'),('BT','211100026','2021-11-30 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-11-0377-[19737]','2022-02-10 00:00:00',0,0,NULL,0,18532800,18532800,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'d3e08d0f-a311-103a-a679-5e3c12a8146a'),('BT','211100027','2021-11-10 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-12021-11-0124','2022-01-17 00:00:00',0,0,NULL,0,7200000,7200000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'28a8ea35-9347-103a-aa74-708754125b93'),('BT','211100028','2021-11-10 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-11-0125','2022-01-17 00:00:00',0,0,NULL,0,12600000,12600000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'f8576407-9346-103a-aa74-708754125b93'),('BT','211200001','2021-12-31 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001867633','2022-02-15 00:00:00',0,0,NULL,0,41470000,41470000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'69f8aed4-bb6a-103a-879c-e028274afd19'),('BT','211200002','2021-12-27 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001867158','2022-02-17 00:00:00',0,0,NULL,0,1840000,1840000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'865f0881-b8cc-103a-904c-05403444b9d4'),('BT','211200003','2021-12-27 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001867133','2022-02-17 00:00:00',0,0,NULL,0,17023000,17023000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'4936c4b2-b8cc-103a-904c-05403444b9d4'),('BT','211200004','2021-12-22 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BLK 21005208','2022-03-22 00:00:00',0,0,NULL,0,131673500,131673500,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'24ae333e-b449-103a-a5ff-5c732b7ffb6d'),('BT','211200005','2021-12-29 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BJK-R21005348','2022-02-28 00:00:00',0,0,NULL,0,131375000,131375000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'54997afc-b998-103a-904c-05403444b9d4'),('BT','211200006','2021-12-16 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001863534','2022-02-06 00:00:00',0,0,NULL,0,39045600,39045600,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'88477440-af9a-103a-a2b7-4e372a2f6b8d'),('BT','211200007','2021-12-16 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001864339','2022-02-06 00:00:00',0,0,NULL,0,9306000,9306000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'30f657fd-af62-103a-bba1-b15ec4bb5c9b'),('BT','211200008','2021-12-16 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001864860','2022-02-06 00:00:00',0,0,NULL,0,23013760,23013760,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'fddffda4-af61-103a-bba1-b15ec4bb5c9b'),('BT','211200009','2021-12-14 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001863428','2022-01-29 00:00:00',0,0,NULL,0,5536000,5536000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c1fdd5c6-ae09-103a-9534-19141b4c2af1'),('BT','211200010','2021-12-14 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BD0001863533','2022-01-29 00:00:00',0,0,NULL,0,39045600,39045600,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'33ee7ca2-ae09-103a-9534-19141b4c2af1'),('BT','211200011','2021-12-12 00:00:00',NULL,'07','CSA UNO/ PT CATUR SENTOSA ADIPRANA','','BJK-K21009620','2022-02-13 00:00:00',0,0,NULL,0,44962500,44962500,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'1aa95998-acfd-103a-9534-19141b4c2af1'),('BT','211200012','2021-12-18 00:00:00',NULL,'18','RICHARD / PT FAJARLESTARI SEJATI','','2112.12.00374','2022-02-18 00:00:00',0,0,NULL,0,3588000,3588000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'518d93c8-b133-103a-a2b7-4e372a2f6b8d'),('BT','211200013','2021-12-09 00:00:00',NULL,'18','RICHARD / PT FAJARLESTARI SEJATI','','2112.12.00282','2022-02-09 00:00:00',0,0,NULL,0,2610000,2610000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'a2857b47-a9e8-103a-9534-19141b4c2af1'),('BT','211200014','2021-12-23 00:00:00',NULL,'09','MBAK SUSI','','BK 00010071','2021-12-30 00:00:00',0,0,NULL,0,17325000,17325000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'c6ad932b-b51a-103a-a5ff-5c732b7ffb6d'),('BT','211200015','2021-12-28 00:00:00',NULL,'09','MBAK SUSI','','BK00010109','2022-01-04 00:00:00',0,0,NULL,0,23012000,23012000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'f99c9603-b8f3-103a-904c-05403444b9d4'),('BT','211200016','2021-12-13 00:00:00',NULL,'09','MBAK SUSI','','BK00009950','2021-12-20 00:00:00',0,0,NULL,0,20790000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'5fac50af-ad3e-103a-9534-19141b4c2af1'),('BT','211200017','2021-12-21 00:00:00',NULL,'09','MBAK SUSI','','BK 00010051','2021-12-28 00:00:00',0,0,NULL,0,25500000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'389480ab-b381-103a-a61c-5b701e491280'),('BT','211200018','2021-12-03 00:00:00',NULL,'09','MBAK SUSI','','DO-2021-12-0005','2022-02-02 00:00:00',0,0,NULL,0,11040000,11040000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'3269606c-a524-103a-a679-5e3c12a8146a'),('BT','211200019','2021-12-03 00:00:00',NULL,'09','MBAK SUSI','','DO-2021-12-00006','2022-02-02 00:00:00',0,0,NULL,0,15351000,15351000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'e221ede6-a523-103a-a679-5e3c12a8146a'),('BT','211200020','2021-12-28 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','EG-001/17/12/21','2022-02-28 00:00:00',0,0,NULL,0,41532480,41532480,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'07f69889-b916-103a-904c-05403444b9d4'),('BT','211200021','2021-12-15 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','LK-014/23/11/21','2022-02-15 00:00:00',0,0,NULL,0,21438000,21438000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'89c6e503-aed0-103a-96f4-2073e10ea306'),('BT','211200022','2021-12-09 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','EG-010/08/12/21','2022-02-09 00:00:00',0,0,NULL,0,36783360,36783360,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'824a509a-aa24-103a-9534-19141b4c2af1'),('BT','211200023','2021-12-05 00:00:00',NULL,'123456','GUNAWAN / HADI / PT INCOMINDO MURNI JAYA','','04-12-20021','2022-02-04 00:00:00',0,0,NULL,0,21600000,21600000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'7b7f3e5a-a6d3-103a-a679-5e3c12a8146a'),('BT','211200024','2021-12-17 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-12-0284','2021-12-27 00:00:00',0,0,NULL,0,21200000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'34b3dbfd-b055-103a-a2b7-4e372a2f6b8d'),('BT','211200025','2021-12-24 00:00:00',NULL,'30','ANDIK /  PT MODERN KERAMIK JAYA','','SJ-1-2021-12-0428','2021-12-31 00:00:00',0,0,NULL,0,17468000,0,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'fe946e1f-b5d2-103a-8c26-f47a873573a4'),('BT','211200026','2021-12-28 00:00:00',NULL,'25','NURIL GRANIT GARUDA/ PT GARUDA GRAHA INDAH','','GSBY21120071','2022-01-04 00:00:00',0,0,NULL,0,20196000,20196000,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'b0db1d9e-b8fc-103a-904c-05403444b9d4'),('BT','211200027','2021-12-29 00:00:00',NULL,'25','NURIL GRANIT GARUDA/ PT GARUDA GRAHA INDAH','','GSBY 21120076','2022-01-05 00:00:00',0,0,NULL,0,20061360,20061360,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'7b2ca2b5-b9b0-103a-904c-05403444b9d4'),('BT','211200028','2021-12-30 00:00:00',NULL,'25','NURIL GRANIT GARUDA/ PT GARUDA GRAHA INDAH','','GSBY 21120081','2022-01-06 00:00:00',0,0,NULL,0,34063920,34063920,NULL,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,'GD',0,'a578ad3a-ba85-103a-904c-05403444b9d4');

DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `Beli_BeforeAdd` BEFORE INSERT ON `tr_beli_m` FOR EACH ROW SET new.NamaSupp=(SELECT NamaSupp FROM tm_supplier WHERE KodeSupp=New.KodeSupp) */;;

/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrBeliAdd` AFTER INSERT ON `tr_beli_m` FOR EACH ROW BEGIN

  Update tm_Supplier set Hutang =  ifnull(hutang,0) + (new.nilai * new.exrate) 

  where kodesupp = new.kodesupp;



end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrBeliUpdate` AFTER UPDATE ON `tr_beli_m` FOR EACH ROW BEGIN
  Update tm_Supplier set Hutang =  ifnull(hutang,0) + (new.nilai * new.exrate)
  where kodesupp = new.kodesupp;
  Update tm_Supplier set Hutang =  ifnull(hutang,0) - (old.nilai * old.exrate)
  where kodesupp = old.kodesupp;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrBeliDelete` AFTER DELETE ON `tr_beli_m` FOR EACH ROW BEGIN
  Update tm_Supplier set Hutang =  ifnull(hutang,0) - (Old.nilai * Old.exrate) 
  where kodesupp = Old.kodesupp;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_buanggd_d`
--

CREATE TABLE `tr_buanggd_d` (
  `NoBuangGd` varchar(11) NOT NULL default '',
  `ItemDet` int(11) NOT NULL default '0',
  `KodeBrg` varchar(20) NOT NULL,
  `KodeGdAsal` varchar(5) NOT NULL,
  `Jumlah` double default NULL,
  `Harga` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Hpp` double default NULL,
  `Konv` double default NULL,
  PRIMARY KEY  (`NoBuangGd`,`ItemDet`),
  KEY `fk_Tr_BuangGd_d2` (`KodeBrg`),
  KEY `fk_Tr_BuangGd_d3` (`KodeGdAsal`),
  CONSTRAINT `fk_Tr_BuangGd_d1` FOREIGN KEY (`NoBuangGd`) REFERENCES `tr_buanggd_m` (`NoBuangGd`) ON DELETE CASCADE,
  CONSTRAINT `fk_Tr_BuangGd_d2` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`),
  CONSTRAINT `fk_Tr_BuangGd_d3` FOREIGN KEY (`KodeGdAsal`) REFERENCES `tm_gudang` (`KodeGd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_buanggd_d`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetBuangGdAdd` AFTER INSERT ON `tr_buanggd_d` FOR EACH ROW BEGIN
  Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)-new.jumlah*new.konv where kodeGd= new.KodeGDAsal and kodebrg=new.kodebrg;
END */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetBuangGdUpdate` AFTER UPDATE ON `tr_buanggd_d` FOR EACH ROW BEGIN
  Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)+old.Jumlah*old.konv where kodeGd= old.KodeGDasal and kodebrg=old.kodebrg;
  Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)-new.Jumlah*new.konv where kodeGd= new.KodeGDasal and kodebrg=new.kodebrg;
END */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetBuangGdDelete` AFTER DELETE ON `tr_buanggd_d` FOR EACH ROW BEGIN
  Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)+old.Jumlah*old.konv where kodeGd= old.KodeGDAsal and kodebrg=old.kodebrg;
END */;;

DELIMITER ;

--
-- Table structure for table `tr_buanggd_m`
--

CREATE TABLE `tr_buanggd_m` (
  `NoBuangGd` varchar(11) NOT NULL default '',
  `TglBuangGd` datetime default NULL,
  `Keterangan` varchar(200) default NULL,
  `TglBatal` datetime default NULL,
  PRIMARY KEY  (`NoBuangGd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_buanggd_m`
--


--
-- Table structure for table `tr_data`
--

CREATE TABLE `tr_data` (
  `Notrans` varchar(20) NOT NULL,
  `KodeCust` varchar(10) default NULL,
  `Kodebrg` varchar(10) default NULL,
  `NoSeriBrg` varchar(50) default NULL,
  `TglMasuk` date default NULL,
  `TglKeluar` date default NULL,
  `SparePart` varchar(50) default NULL,
  `Kerusakan` varchar(200) default NULL,
  `Teknisi` varchar(50) default NULL,
  `Spesifikasi` text,
  PRIMARY KEY  (`Notrans`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_data`
--


--
-- Table structure for table `tr_destmodx`
--

CREATE TABLE `tr_destmodx` (
  `NoModx` varchar(11) NOT NULL default '',
  `ItemModX` int(11) NOT NULL default '0',
  `Kodebrg` varchar(20) NOT NULL,
  `KodeGd` varchar(5) NOT NULL,
  `Jumlah` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  `BagHarga` double default NULL,
  PRIMARY KEY  (`NoModx`,`ItemModX`),
  KEY `fk_DestModX2` (`Kodebrg`),
  KEY `fk_DestModX3` (`KodeGd`),
  CONSTRAINT `fk_DestModX1` FOREIGN KEY (`NoModx`) REFERENCES `tr_modx` (`NoModX`) ON DELETE CASCADE,
  CONSTRAINT `fk_DestModX2` FOREIGN KEY (`Kodebrg`) REFERENCES `tm_barang` (`KodeBrg`),
  CONSTRAINT `fk_DestModX3` FOREIGN KEY (`KodeGd`) REFERENCES `tm_gudang` (`KodeGd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_destmodx`
--


--
-- Table structure for table `tr_hasilproduksi_d`
--

CREATE TABLE `tr_hasilproduksi_d` (
  `TransProd` varchar(5) default NULL,
  `NoProduksi` varchar(20) default NULL,
  `KodeProduk` varchar(15) default NULL,
  `itembrg` int(11) default NULL,
  `kodebrg` varchar(20) default NULL,
  `namabrg` varchar(50) default NULL,
  `satuan` varchar(10) default NULL,
  `kodegd` varchar(10) default NULL,
  `JmlSebelum` double default NULL,
  `jml` double default NULL,
  `Konv` double default NULL,
  `harga` double default NULL,
  `total` double default NULL,
  `disc` double default NULL,
  `discpersen` double default NULL,
  `HargaJual` double default NULL,
  `TotalJual` double default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_hasilproduksi_d`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetHasilProduksiAdd` AFTER INSERT ON `tr_hasilproduksi_d` FOR EACH ROW BEGIN
  DECLARE vtemp double;
  Update tm_stockbrg set Stockakhir =  stockakhir-(new.jml*ifnull(new.konv,1))
  where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetHasilProduksiUpdate` AFTER UPDATE ON `tr_hasilproduksi_d` FOR EACH ROW BEGIN
 
   Update tm_stockbrg set Stockakhir =  stockakhir+(Old.jml*ifnull(Old.konv,1))
   where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;
 
   Update tm_stockbrg set Stockakhir =  stockakhir-(new.jml*ifnull(new.konv,1))
   where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetHasilProduksiDelete` AFTER DELETE ON `tr_hasilproduksi_d` FOR EACH ROW BEGIN
 
   Update tm_stockbrg set Stockakhir =  stockakhir+(Old.jml*ifnull(Old.konv,1))
   where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_hasilproduksi_m`
--

CREATE TABLE `tr_hasilproduksi_m` (
  `TransProd` varchar(5) default NULL,
  `NoProduksi` varchar(25) NOT NULL default '',
  `TglProduksi` date default NULL,
  `KodeMaster` varchar(15) default NULL,
  `KodeProduk` varchar(15) default NULL,
  `NamaProduk` varchar(40) default NULL,
  `KodeGD` varchar(15) default NULL,
  `Nilai` double default NULL,
  `Keterangan` varchar(100) default NULL,
  `JmlProduksi` double default NULL,
  `tukang` varchar(40) default NULL,
  `JenisProduksi` varchar(20) default NULL,
  `kodegol` varchar(15) default NULL,
  `hslproduksi` double default NULL,
  `nilaiselisih` double default NULL,
  `Satuan` varchar(20) default NULL,
  `NilaiJual` double default NULL,
  PRIMARY KEY  (`NoProduksi`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_hasilproduksi_m`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TRHasilProduksiAdd` AFTER INSERT ON `tr_hasilproduksi_m` FOR EACH ROW BEGIN
DECLARE HargaLama DOUBLE;
DECLARE StockLama DOUBLE;
DECLARE HitungLama DOUBLE;
DECLARE HargaBaru DOUBLE;
DECLARE HargaJualBaru DOUBLE;
DECLARE JumlahBaru DOUBLE;
DECLARE HitungBaru DOUBLE;
DECLARE StockHasil DOUBLE;
DECLARE HitungHasil DOUBLE;
DECLARE HargaHasil DOUBLE;
SET StockLama=(SELECT ifnull(StockAkhir,0) FROM tm_StockBrg WHERE KodeBrg=new.KodeProduk and KodeGD=new.KodeGD );
IF StockLama is NULL THEN 
   SET StockLama=0;
END IF;
IF StockLama < 0 THEN 
   SET StockLama=0;
END IF;
SET HargaLama=(SELECT ifnull(HargaAvg,0) FROM tm_barang WHERE KodeBrg=new.KodeProduk);
IF HargaLama is NULL THEN 
   SET HargaLama=0;
END IF;
SET HitungLama=HargaLama * StockLama;
SET HargaBaru=ifnull((new.nilai / new.jmlproduksi),0) ;
SET HargaJualBaru=ifnull((new.nilaiJual / new.jmlproduksi),0) ;
SET JumlahBaru=ifnull(new.Jmlproduksi,0);
SET HitungBaru=HargaBaru * JumlahBaru;
SET StockHasil=StockLama + JumlahBaru;
SET HitungHasil=HitungLama + HitungBaru;
SET HargaHasil= HitungHasil / StockHasil;
UPDATE tm_barang SET HargaAvg= HargaBaru, HargaRetail=HargaJualBaru WHERE KodeBrg=new.KodeProduk;
   Update tm_stockbrg set Stockakhir =  stockakhir+new.jmlproduksi
   where kodebrg=new.kodeProduk and kodegd=new.KodeGD;
   
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TRHasilProduksiUpdate` AFTER UPDATE ON `tr_hasilproduksi_m` FOR EACH ROW BEGIN
   Update tm_stockbrg set Stockakhir =  stockakhir-Old.jmlproduksi where kodebrg=Old.kodeProduk and kodegd=old.KodeGD;
   Update tm_stockbrg set Stockakhir =  stockakhir+new.jmlproduksi where kodebrg=new.kodeProduk and kodegd=new.KodeGD;
  
      update tm_barang set hargaavg = ( new.nilai / new.jmlproduksi )
      where kodebrg = new.kodeproduk;
 
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TRHasilProduksiDelete` AFTER DELETE ON `tr_hasilproduksi_m` FOR EACH ROW BEGIN
   Update tm_stockbrg set Stockakhir =  stockakhir-Old.jmlproduksi where kodebrg=Old.kodeProduk and kodegd=old.KodeGD;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_jual_d`
--

CREATE TABLE `tr_jual_d` (
  `TransJual` varchar(2) NOT NULL default '',
  `NoJual` varchar(11) NOT NULL default '',
  `ItemJual` int(11) NOT NULL default '0',
  `NOPO` varchar(11) default NULL,
  `ItemPO` int(11) default NULL,
  `KodeBrg` varchar(20) NOT NULL,
  `KodeGd` varchar(5) NOT NULL,
  `NamaBrg` varchar(50) default NULL,
  `Harga` double default NULL,
  `Disc` double default NULL,
  `DiscPersen` double default NULL,
  `Jml` double default NULL,
  `JmlTitip` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  `HargaAvg` double default NULL,
  `Diretur` double default NULL,
  `HPP` double default NULL,
  `HargaPeny` double default NULL,
  `JmlPeny` double default NULL,
  `Sales` varchar(50) default NULL,
  `Teknisi` varchar(50) default NULL,
  PRIMARY KEY  (`TransJual`,`NoJual`,`ItemJual`),
  KEY `fk_tr_Jual_d1` (`KodeBrg`),
  KEY `fk_tr_Jual_d2` (`KodeGd`),
  KEY `fk_tr_Jual_d4` (`NOPO`,`ItemPO`),
  KEY `tr_jual_d_idx1` (`NoJual`),
  CONSTRAINT `fk_tr_Jual_d1` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`),
  CONSTRAINT `fk_tr_Jual_d2` FOREIGN KEY (`KodeGd`) REFERENCES `tm_gudang` (`KodeGd`),
  CONSTRAINT `fk_tr_Jual_d3` FOREIGN KEY (`TransJual`, `NoJual`) REFERENCES `tr_jual_m` (`TransJual`, `NoJual`) ON DELETE CASCADE,
  CONSTRAINT `fk_tr_Jual_d4` FOREIGN KEY (`NOPO`, `ItemPO`) REFERENCES `tr_pojual_d` (`NoPO`, `ItemPO`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_jual_d`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetJualAdd` AFTER INSERT ON `tr_jual_d` FOR EACH ROW BEGIN
 DECLARE vtemp double;
 select stockakhir-new.jml into vtemp from tm_stockbrg where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
if (select jenisbrg from tm_barang where kodebrg=new.KodeBrg)="Inventory" then
    Update tm_stockbrg set Stockakhir =  stockakhir-(new.jml*ifnull(new.konv,1))
    where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
end if;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetJualUpdate` AFTER UPDATE ON `tr_jual_d` FOR EACH ROW BEGIN
 DECLARE vtemp double;
 select stockakhir-(new.jml-old.jml) into vtemp from tm_stockbrg where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
if (select jenisbrg from tm_barang where kodebrg=old.Kodebrg)="Inventory" then
    Update tm_stockbrg set Stockakhir =  stockakhir+(old.jml*ifnull(old.konv,1))
    where kodebrg=old.kodebrg and kodeGd= old.KodeGD;
end if;
if (select jenisbrg from tm_barang where kodebrg=new.Kodebrg)="Inventory" then
    Update tm_stockbrg set Stockakhir =  stockakhir-(new.jml*ifnull(new.konv,1))
    where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
end if;
 
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetJualDelete` AFTER DELETE ON `tr_jual_d` FOR EACH ROW BEGIN
if (select jenisbrg from tm_barang where kodebrg=old.Kodebrg)="Inventory" then
  Update tm_stockbrg set Stockakhir =  stockakhir+(old.jml*ifnull(old.konv,1)) 
  where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;
end if;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_jual_m`
--

CREATE TABLE `tr_jual_m` (
  `TransJual` varchar(2) NOT NULL default '',
  `NoJual` varchar(11) NOT NULL default '',
  `TglJual` datetime default NULL,
  `KodeCust` varchar(10) default NULL,
  `NamaCust` varchar(50) default NULL,
  `Alamat` varchar(50) default NULL,
  `Kota` varchar(30) default NULL,
  `TglBatal` datetime default NULL,
  `DiscRp` double default NULL,
  `PPN` double default NULL,
  `Tambahan` double default NULL,
  `Sisa` double default NULL,
  `KetTambahan` varchar(50) default NULL,
  `Nilai` double default NULL,
  `KodeSales` varchar(10) default NULL,
  `TglJT` datetime default NULL,
  `NPWP` varchar(20) default NULL,
  `NoTitip` varchar(11) default NULL,
  `NilaiTitip` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `PPNRps` double default NULL,
  `TipePPN` varchar(3) default NULL,
  `NoFPajak` varchar(20) default NULL,
  `TglFPajak` datetime default NULL,
  `Keterangan` varchar(100) default NULL,
  `ItemKirim` int(11) default NULL,
  `Kendaraan` varchar(50) default NULL,
  `NoPol` varchar(15) default NULL,
  `BayarCard` double default NULL,
  `TipeCard` varchar(20) default NULL,
  `NoCard` varchar(20) default NULL,
  `BankCard` varchar(20) default NULL,
  `NamaCard` varchar(30) default NULL,
  `BayarVoucher` double default NULL,
  `BayarTunai` double default NULL,
  `NilaiPeny` double default NULL,
  `SisaPeny` double default NULL,
  `BayarCardPeny` double default NULL,
  `BayarVoucherPeny` double default NULL,
  `BayarTunaiPeny` double default NULL,
  `Sales` varchar(50) default NULL,
  `Teknisi` varchar(50) default NULL,
  `BankPerkiraan` varchar(10) default NULL,
  `PointG` decimal(15,0) default NULL,
  `PointGNon` decimal(15,0) default NULL,
  `PointNon` decimal(15,0) default NULL,
  `Kasir` varchar(15) default NULL,
  `TglEntry` datetime default NULL,
  `NoKomputer` varchar(1) default NULL,
  `Updater` varchar(1) default NULL,
  PRIMARY KEY  (`TransJual`,`NoJual`),
  KEY `fk_TR_Jual_m2` (`KodeSales`),
  KEY `fk_TR_Jual_m3` (`KodeCust`,`ItemKirim`),
  CONSTRAINT `fk_TR_Jual_m1` FOREIGN KEY (`KodeCust`) REFERENCES `tm_customer` (`KodeCust`),
  CONSTRAINT `fk_TR_Jual_m3` FOREIGN KEY (`KodeCust`, `ItemKirim`) REFERENCES `tm_custkirim` (`KodeCust`, `ItemCust`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_jual_m`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrJualAdd` AFTER INSERT ON `tr_jual_m` FOR EACH ROW BEGIN
  Update tm_Customer set  Point =  ifnull(Point,0) + (new.PointG), PointNon = (ifnull(PointNon,0) + (new.PointGNon))
  where kodecust = new.kodecust;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `BeforeUpd` BEFORE UPDATE ON `tr_jual_m` FOR EACH ROW begin
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrJualUpdate` AFTER UPDATE ON `tr_jual_m` FOR EACH ROW BEGIN
 Update tm_Customer set Point =  ifnull(Point,0) - (old.pointG), PointNon = (ifnull(PointNon,0) - (old.PointGNon))
 where kodecust = old.kodecust;
 Update tm_Customer set Point =  ifnull(Point,0) + (new.pointG), PointNon = (ifnull(PointNon,0) + (new.PointGNon))
where kodecust = new.kodecust;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrJualDelete` AFTER DELETE ON `tr_jual_m` FOR EACH ROW BEGIN
  Update tm_Customer set Point =  ifnull(Point,0) - (old.pointG), PointNon = (ifnull(PointNon,0) - (old.PointGNon))
  where kodecust = Old.kodecust;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_jualr_d`
--

CREATE TABLE `tr_jualr_d` (
  `TransRetail` varchar(2) NOT NULL default '',
  `NoJualR` varchar(11) NOT NULL default '',
  `ItemJual` int(11) NOT NULL default '0',
  `NoPO` varchar(11) default NULL,
  `ItemPO` int(5) default NULL,
  `KodeBrg` varchar(20) NOT NULL,
  `KodeGd` varchar(5) NOT NULL,
  `NamaBrg` varchar(50) default NULL,
  `Harga` double default NULL,
  `Disc` double default NULL,
  `DiscPersen` double default NULL,
  `Jml` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  `HargaRetail` double default NULL,
  `HargaAvg` double default NULL,
  `Diretur` double default NULL,
  `HPP` double default NULL,
  `total` double default NULL,
  `HargaPeny` double default NULL,
  `JmlPeny` double default NULL,
  `Sales` varchar(50) default NULL,
  `Teknisi` varchar(50) default NULL,
  `isSdhBayarToko` char(1) default 'N',
  `GDJual` varchar(5) default NULL,
  `isKirim` char(1) default 'N',
  `isCetakSJ` char(1) default 'N',
  `MerkBrg` varchar(50) default NULL,
  `UID` char(36) default NULL,
  PRIMARY KEY  (`TransRetail`,`NoJualR`,`ItemJual`),
  KEY `fk_tr_JualR_d1` (`KodeBrg`),
  KEY `fk_tr_JualR_d2` (`KodeGd`),
  KEY `idx_tr_jualr_d1` (`TransRetail`,`NoJualR`),
  KEY `idx_tr_jualr_d2` (`NoJualR`),
  CONSTRAINT `fk_tr_JualR_d1` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`),
  CONSTRAINT `fk_tr_JualR_d2` FOREIGN KEY (`KodeGd`) REFERENCES `tm_gudang` (`KodeGd`),
  CONSTRAINT `fk_tr_JualR_d3` FOREIGN KEY (`TransRetail`, `NoJualR`) REFERENCES `tr_jualr_m` (`TransRetail`, `NoJualR`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_jualr_d`
--

INSERT INTO `tr_jualr_d` VALUES ('JR','211000001',1,NULL,NULL,'B00000315','GD 2','JASMINE CREAM 25X40 KW 1',57000,0,0,2,'Dus',1,NULL,47000,NULL,NULL,114000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000002',1,NULL,NULL,'B00000378','GD','MURANO 30X30 KW 1',40000,0,0,1,'Dus',1,NULL,31000,NULL,NULL,40000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000003',1,NULL,NULL,'B00002236','GD','KUCAN MONZA GREEN  W-30 ULIR   RRT',1000,0,0,25,'Pcs',1,NULL,587,NULL,NULL,25000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000003',2,NULL,NULL,'B00002256','GD','LIST SAVANA GREEN 8X40 KW 1',5000,0,0,10,'Pcs',1,NULL,2500,NULL,NULL,50000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000004',1,NULL,NULL,'B00000384','GD','ILLUSION BEIGE 25X40 KW 1',63000,0,0,3,'Dus',1,NULL,53000,NULL,NULL,189000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000005',1,NULL,NULL,'B00000298','GD','NAVARE BEIGE 40X40 KW 1',58000,0,0,5,'Dus',1,NULL,46000,NULL,NULL,290000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000006',1,NULL,NULL,'B00000309','GD','MURANO 40X40 KW 1 PROMO',48000,0,0,2,'Dus',1,NULL,37500,NULL,NULL,96000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000007',1,NULL,NULL,'B00002019','GD 2','TRIFECTA BROWN 25X40 KW 1',58000,0,0,2,'Dus',1,NULL,49500,NULL,NULL,116000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000007',2,NULL,NULL,'B00000636','GD','LIST RM 120G BROWN',8000,0,0,4,'Pcs',1,NULL,4250,NULL,NULL,32000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000008',1,NULL,NULL,'B00001887','GD 2','OKLAHOMA GREY 50X50 KW 1',65000,0,0,3,'Dus',1,NULL,53500,NULL,NULL,195000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000009',1,NULL,NULL,'B00000710','GD','DUPONT GREY 50X50 KW 1 PLATINUM',63000,0,0,21,'Dus',1,NULL,52000,NULL,NULL,1323000,NULL,NULL,NULL,NULL,'N','GD','Y','Y','',NULL),('JR','211000009',2,NULL,NULL,'B00000469','GD 2','CANOWOOD GREYS 50X50 KW 1',75000,0,0,3,'Dus',1,NULL,63000,NULL,NULL,225000,NULL,NULL,NULL,NULL,'N','GD','Y','Y','',NULL),('JR','211000010',1,NULL,NULL,'B00001138','GD','LIST KEVIN/ZIGZAG GREEN',5000,0,0,6,'Pcs',1,NULL,2500,NULL,NULL,30000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000010',2,NULL,NULL,'B00002000','GD 2','ROSETTA GREEN 25X50 KW 1',65000,0,0,2,'Dus',1,NULL,53500,NULL,NULL,130000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000010',3,NULL,NULL,'B00001583','GD','TELTRIM GOLD TIPIS',45000,0,0,1,'Pcs',1,NULL,32500,NULL,NULL,45000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000011',1,NULL,NULL,'B00002063','GD','KUCAN BOTT WHITE',2000,0,0,20,'Pcs',1,NULL,1400,NULL,NULL,40000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000011',2,NULL,NULL,'B00002640','GD 3','DAYTONA BROWN 50X50 KW 3',57000,0,0,2,'Dus',1,NULL,44000,NULL,NULL,114000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000012',1,NULL,NULL,'B00000926','GD','RIO GREY 40X40 KW 1',58000,0,0,1,'Dus',1,NULL,46000,NULL,NULL,58000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000013',1,NULL,NULL,'B00002194','GD 3','OSLO BROWN 30X30 KW 1',55000,0,0,2,'Dus',1,NULL,39000,NULL,NULL,110000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000014',1,NULL,NULL,'B00000778','GD 3','RUBY GREY 50X50 KW 1',78000,0,0,1,'Dus',1,NULL,65000,NULL,NULL,78000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000015',1,NULL,NULL,'B00000937','GD','OSCAR BROWN 40X40 KW 3',50000,0,0,3,'Dus',1,NULL,37500,NULL,NULL,150000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000016',1,NULL,NULL,'B00001521','GD 3','FIRENZE GREY 25X50 KW 1',65000,0,0,2,'Dus',1,NULL,53500,NULL,NULL,130000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL),('JR','211000016',2,NULL,NULL,'B00001559','GD','PIANO CREAM 60X60 KW 3 ',80000,0,0,1,'Dus',1,NULL,63772,NULL,NULL,80000,NULL,NULL,NULL,NULL,'N','GD','','Y','',NULL);

DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `DetJualRAdd` AFTER INSERT ON `tr_jualr_d` FOR EACH ROW BEGIN

 DECLARE sJenisBrg VARCHAR(30);



select IFNULL(jenisbrg,"Inventory") INTO sJenisBrg from tm_barang where kodebrg=new.KodeBrg;



if (sJenisBrg="Inventory") then

  Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)-(ifnull(new.jml,0)*ifnull(new.konv,1))

  where kodebrg=new.kodebrg and kodeGd= new.KodeGD;

end if;

end */;;

/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `DetJualRUpdate` AFTER UPDATE ON `tr_jualr_d` FOR EACH ROW BEGIN

 DECLARE sJenisBrg VARCHAR(30);



select IFNULL(jenisbrg,"Inventory") INTO sJenisBrg from tm_barang where kodebrg=old.KodeBrg;



if (sJenisBrg="Inventory") then

   Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)+(ifnull(old.jml,0)*ifnull(old.konv,1))

   where kodebrg=old.kodebrg and kodeGd= old.KodeGD;

end if;



select IFNULL(jenisbrg,"Inventory") INTO sJenisBrg from tm_barang where kodebrg=new.KodeBrg;

if (sJenisBrg="Inventory") then

   Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)-(ifnull(new.jml,0)*ifnull(new.konv,1))

   where kodebrg=new.kodebrg and kodeGd= new.KodeGD;

end if;

end */;;

/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `DetJualRDelete` AFTER DELETE ON `tr_jualr_d` FOR EACH ROW BEGIN

 DECLARE sJenisBrg VARCHAR(30);



select IFNULL(jenisbrg,"Inventory") INTO sJenisBrg from tm_barang where kodebrg=old.KodeBrg;



if (sJenisBrg="Inventory") then

  Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)+(ifnull(old.jml,0)*ifnull(old.konv,1)) 

  where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;

end if;

end */;;

DELIMITER ;

--
-- Table structure for table `tr_jualr_m`
--

CREATE TABLE `tr_jualr_m` (
  `TransRetail` varchar(2) NOT NULL default '',
  `NoJualR` varchar(11) NOT NULL default '',
  `TglJual` datetime default NULL,
  `TglBatal` datetime default NULL,
  `KodeCustR` varchar(20) default NULL,
  `NamaCust` varchar(50) default NULL,
  `Alamat` varchar(50) default NULL,
  `Kota` varchar(30) default NULL,
  `DiscRp` double default NULL,
  `PPN` double default NULL,
  `PPNRps` double default NULL,
  `Tambahan` double default NULL,
  `KetTambahan` varchar(200) default NULL,
  `BayarVoucher` decimal(10,0) default NULL,
  `BayarTunai` decimal(10,0) default NULL,
  `BayarCard` decimal(10,0) default NULL,
  `TipeCard` varchar(20) default NULL,
  `NoCard` varchar(20) default NULL,
  `BankCard` varchar(20) default NULL,
  `NamaCard` varchar(30) default NULL,
  `Nilai` decimal(10,0) default NULL,
  `NoClose` varchar(11) default NULL,
  `kasir` varchar(10) default NULL,
  `KodeSales` varchar(10) default NULL,
  `Tglentry` datetime default NULL,
  `NilaiPeny` double default NULL,
  `Sales` varchar(50) default NULL,
  `Teknisi` varchar(50) default NULL,
  `BankPerkiraan` varchar(10) default NULL,
  `PointR` decimal(15,0) NOT NULL default '0',
  `PointRNon` decimal(15,0) default NULL,
  `PointNon` decimal(15,0) default NULL,
  `NoKomputer` varchar(1) default NULL,
  `SisaBayar` double default NULL,
  `isCetakSJ` char(1) default 'N',
  `NamaSJ` varchar(100) default NULL,
  `AlamatSJ` varchar(400) default NULL,
  `GDJual` varchar(10) default NULL,
  `KodeSJ` int(12) default NULL,
  `isPindah` smallint(6) NOT NULL default '0',
  `UID` char(36) default NULL,
  PRIMARY KEY  (`TransRetail`,`NoJualR`,`PointR`),
  KEY `tr_jualr_m_idx1` (`NoJualR`),
  KEY `TransRetail` (`TransRetail`,`NoJualR`),
  KEY `TransRetail_2` (`TransRetail`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_jualr_m`
--

INSERT INTO `tr_jualr_m` VALUES ('JR','211000001','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','150000','0','','','','','114000','','admin','','2021-10-01 08:23:13',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,1,'5781faaa-73a6-103a-81bd-cf9ca151b185'),('JR','211000002','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','100000','0','','','','','40000','','admin','','2021-10-01 08:11:59',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'c5ad3c6f-73a4-103a-81bd-cf9ca151b185'),('JR','211000003','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','100000','0','','','','','75000','','admin','','2021-10-01 08:35:39',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'13f3626c-73a8-103a-81bd-cf9ca151b185'),('JR','211000004','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','200000','0','','','','','189000','','admin','','2021-10-01 08:44:34',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'52f697cb-73a9-103a-81bd-cf9ca151b185'),('JR','211000005','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','300000','0','','','','','290000','','admin','','2021-10-01 09:01:45',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'b9614ebf-73ab-103a-81bd-cf9ca151b185'),('JR','211000006','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','100000','0','','','','','96000','','admin','','2021-10-01 09:02:20',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'ce2cd620-73ab-103a-81bd-cf9ca151b185'),('JR','211000007','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','150000','0','','','','','148000','','admin','','2021-10-01 09:04:38',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'209eb981-73ac-103a-81bd-cf9ca151b185'),('JR','211000008','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','195000','0','','','','','195000','','admin','','2021-10-01 09:05:31',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'408c8b7c-73ac-103a-81bd-cf9ca151b185'),('JR','211000009','2021-10-01 00:00:00',NULL,'','CASH TF','','',0,0,0,0,'','0','1548000','0','','','','','1548000','','admin','','2021-10-01 09:23:41',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','pak sentot','jalan busuri, suratan regency (pertigaan hadap utara tingkat)  08113034515','GD',65,0,'ca29ad2d-73ae-103a-81bd-cf9ca151b185'),('JR','211000010','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','205000','0','','','','','205000','','admin','','2021-10-01 09:30:16',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'b58edf88-73af-103a-81bd-cf9ca151b185'),('JR','211000011','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','200000','0','','','','','154000','','admin','','2021-10-01 09:38:45',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'e4dd2b81-73b0-103a-81bd-cf9ca151b185'),('JR','211000012','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','100000','0','','','','','58000','','admin','','2021-10-01 09:48:26',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'3ef4d06f-73b2-103a-81bd-cf9ca151b185'),('JR','211000013','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','150000','0','','','','','110000','','admin','','2021-10-01 09:58:15',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'9e714a7e-73b3-103a-81bd-cf9ca151b185'),('JR','211000014','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','100000','0','','','','','78000','','admin','','2021-10-01 09:59:47',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'d507db77-73b3-103a-81bd-cf9ca151b185'),('JR','211000015','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','150000','0','','','','','150000','','admin','','2021-10-01 10:00:37',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'f2da6c51-73b3-103a-81bd-cf9ca151b185'),('JR','211000016','2021-10-01 00:00:00',NULL,'','CASH','','',0,0,0,0,'','0','220000','0','','','','','210000','','admin','','2021-10-01 10:02:17',NULL,NULL,NULL,'','0','0',NULL,NULL,0,'Y','','','GD',NULL,0,'2e491ad5-73b4-103a-81bd-cf9ca151b185');

DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `AddTrJualM` AFTER INSERT ON `tr_jualr_m` FOR EACH ROW BEGIN
  Update tm_Customer set Point =  ifnull(Point,0) + (new.pointR), PointNon= ifnull(PointNon,0)+(new.PointRNon)
  where kodecust = new.kodecustR;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `editTrJualM` AFTER UPDATE ON `tr_jualr_m` FOR EACH ROW BEGIN
Update tm_customer set Point = ifnull(Point,0)-(old.PointR),PointNon = ifnull(Pointnon,0)-(old.PointRNon) 
where kodecust = old.kodecustR;
Update tm_customer set Point = ifnull(Point,0)+(new.PointR),PointNon = ifnull(Pointnon,0)+(new.PointRNon)
where kodecust = new.kodecustR;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DeleteTrJualM` AFTER DELETE ON `tr_jualr_m` FOR EACH ROW BEGIN
Update tm_customer set Point = ifnull(Point,0)-(old.PointR),PointNon = ifnull(Pointnon,0)-(old.PointRNon) 
where kodecust = old.kodecustR;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_jualrakitan_d`
--

CREATE TABLE `tr_jualrakitan_d` (
  `TransJual` varchar(2) NOT NULL default '',
  `NoJual` varchar(11) NOT NULL default '',
  `ItemJual` int(11) NOT NULL default '0',
  `NOPO` varchar(11) default NULL,
  `ItemPO` int(11) default NULL,
  `KodeBrg` varchar(20) NOT NULL,
  `KodeGd` varchar(5) NOT NULL,
  `NamaBrg` varchar(50) default NULL,
  `Harga` double default NULL,
  `Disc` double default NULL,
  `DiscPersen` double default NULL,
  `Jml` double default NULL,
  `JmlTitip` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  `HargaAvg` double default NULL,
  `Diretur` double default NULL,
  `HPP` double default NULL,
  `HargaPeny` double default NULL,
  `JmlPeny` double default NULL,
  `Sales` varchar(50) default NULL,
  `Teknisi` varchar(50) default NULL,
  PRIMARY KEY  (`TransJual`,`NoJual`,`ItemJual`),
  KEY `fk_tr_Jualrakitan_d1` (`KodeBrg`),
  KEY `fk_tr_Jualrakitan_d2` (`KodeGd`),
  KEY `fk_tr_Jualrakitan_d4` (`NOPO`,`ItemPO`),
  KEY `tr_jualrakitan_d_idx1` (`NoJual`),
  CONSTRAINT `fk_tr_Jualrakitan_d1` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`),
  CONSTRAINT `fk_tr_Jualrakitan_d2` FOREIGN KEY (`KodeGd`) REFERENCES `tm_gudang` (`KodeGd`),
  CONSTRAINT `fk_tr_Jualrakitan_d3` FOREIGN KEY (`TransJual`, `NoJual`) REFERENCES `tr_jualrakitan_m` (`TransJual`, `NoJual`) ON DELETE CASCADE,
  CONSTRAINT `fk_tr_Juarakitanl_d4` FOREIGN KEY (`NOPO`, `ItemPO`) REFERENCES `tr_pojualrakitan_d` (`NoPO`, `ItemPO`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_jualrakitan_d`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetJualRakitanAdd` AFTER INSERT ON `tr_jualrakitan_d` FOR EACH ROW BEGIN
DECLARE vtemp double;
 select stockakhir-new.jml into vtemp from tm_stockbrg where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
   Update tm_stockbrg set Stockakhir =  stockakhir-new.jml
   where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetJualRakitanUpdate` AFTER UPDATE ON `tr_jualrakitan_d` FOR EACH ROW BEGIN
 DECLARE vtemp double;
 select stockakhir-(new.jml-old.jml) into vtemp from tm_stockbrg where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
   Update tm_stockbrg set Stockakhir =  stockakhir+old.jml
   where kodebrg=old.kodebrg and kodeGd= old.KodeGD;
   Update tm_stockbrg set Stockakhir =  stockakhir-new.jml
   where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetJualRakitanDelete` AFTER DELETE ON `tr_jualrakitan_d` FOR EACH ROW BEGIN
  Update tm_stockbrg set Stockakhir =  stockakhir+old.jml 
  where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_jualrakitan_m`
--

CREATE TABLE `tr_jualrakitan_m` (
  `TransJual` varchar(2) NOT NULL default '',
  `NoJual` varchar(11) NOT NULL default '',
  `TglJual` datetime default NULL,
  `KodeCust` varchar(10) default NULL,
  `NamaCust` varchar(50) default NULL,
  `Alamat` varchar(50) default NULL,
  `Kota` varchar(30) default NULL,
  `NoPo` varchar(11) default NULL,
  `KodeRakitan` varchar(20) default NULL,
  `NamaRakitan` varchar(50) default NULL,
  `JmlRakitan` int(11) default NULL,
  `TglBatal` datetime default NULL,
  `DiscRp` double default NULL,
  `PPN` double default NULL,
  `Tambahan` double default NULL,
  `Sisa` double default NULL,
  `KetTambahan` varchar(50) default NULL,
  `Nilai` double default NULL,
  `KodeSales` varchar(10) default NULL,
  `TglJT` datetime default NULL,
  `NPWP` varchar(20) default NULL,
  `NoTitip` varchar(11) default NULL,
  `NilaiTitip` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `PPNRps` double default NULL,
  `TipePPN` varchar(3) default NULL,
  `NoFPajak` varchar(20) default NULL,
  `TglFPajak` datetime default NULL,
  `Keterangan` varchar(100) default NULL,
  `ItemKirim` int(11) default NULL,
  `Kendaraan` varchar(50) default NULL,
  `NoPol` varchar(15) default NULL,
  `BayarCard` double default NULL,
  `TipeCard` varchar(20) default NULL,
  `NoCard` varchar(20) default NULL,
  `BankCard` varchar(20) default NULL,
  `NamaCard` varchar(30) default NULL,
  `BayarVoucher` double default NULL,
  `BayarTunai` double default NULL,
  `StatusCash` varchar(1) default NULL,
  `ReturRakitan` int(11) default NULL,
  `NilaiPeny` double default NULL,
  `SisaPeny` double default NULL,
  `BayarCardPeny` double default NULL,
  `BayarTunaiPeny` double default NULL,
  `BayarVoucherPeny` double default NULL,
  `Sales` varchar(50) default NULL,
  `Teknisi` varchar(50) default NULL,
  PRIMARY KEY  (`TransJual`,`NoJual`),
  KEY `fk_TR_Jualrakitan_m2` (`KodeSales`),
  KEY `fk_TR_Jualrakitan_m3` (`KodeCust`,`ItemKirim`),
  KEY `tr_jualrakiitan_m_idx1` (`NoJual`),
  CONSTRAINT `fk_TR_Jualrakitan_m1` FOREIGN KEY (`KodeCust`) REFERENCES `tm_customer` (`KodeCust`),
  CONSTRAINT `fk_TR_Jualrakitan_m3` FOREIGN KEY (`KodeCust`, `ItemKirim`) REFERENCES `tm_custkirim` (`KodeCust`, `ItemCust`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_jualrakitan_m`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrJualRakitanAdd` AFTER INSERT ON `tr_jualrakitan_m` FOR EACH ROW BEGIN
  Update tm_Customer set Piutang =  ifnull(piutang,0) + ((new.nilai-new.bayartunai-new.bayarcard-new.bayarvoucher)*new.exrate)
  where kodecust = new.kodecust;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrJualRakitanUpdate` AFTER UPDATE ON `tr_jualrakitan_m` FOR EACH ROW BEGIN
  Update tm_Customer set Piutang =  ifnull(piutang,0) + ((new.nilai-new.bayartunai-new.bayarcard-new.bayarvoucher)*new.exrate)
  where kodecust = new.kodecust;
  Update tm_Customer set Piutang =  ifnull(piutang,0) - ((old.nilai-old.bayartunai-old.bayarcard-old.bayarvoucher)*old.exrate)
  where kodecust = old.kodecust;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrJualRakitanDelete` AFTER DELETE ON `tr_jualrakitan_m` FOR EACH ROW BEGIN
  Update tm_Customer set Piutang =  ifnull(piutang,0) - ((old.nilai-old.bayartunai-old.bayarcard-old.bayarvoucher) * Old.exrate) 
  where kodecust = Old.kodecust;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_koreksistc_d`
--

CREATE TABLE `tr_koreksistc_d` (
  `NoKoreksi` varchar(15) default NULL,
  `ItemDet` int(11) default NULL,
  `kodebrg` varchar(20) default NULL,
  `Satuan` varchar(10) default NULL,
  `JmlSebelum` double(10,2) default NULL,
  `JmlSesudah` double(10,2) default NULL,
  `Konv` double(10,2) default NULL,
  `SelisihKurang` double default NULL,
  `SelisihLebih` double default NULL,
  `Harga` double default NULL,
  `KodeGd` varchar(15) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_koreksistc_d`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `UpdateStock` AFTER INSERT ON `tr_koreksistc_d` FOR EACH ROW update tm_stockbrg set stockakhir=new.jmlsesudah * new.konv where kodegd=new.kodegd and kodebrg=new.kodebrg */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `UpdateStock2` AFTER UPDATE ON `tr_koreksistc_d` FOR EACH ROW update tm_stockbrg set stockakhir=new.jmlsesudah * new.konv where kodegd=new.kodegd and kodebrg=new.kodebrg */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DeleteStock` AFTER DELETE ON `tr_koreksistc_d` FOR EACH ROW update tm_StockBrg set stockakhir=old.JmlSebelum*old.konv where kodebrg=old.kodebrg and kodegd=old.kodegd */;;

DELIMITER ;

--
-- Table structure for table `tr_koreksistc_m`
--

CREATE TABLE `tr_koreksistc_m` (
  `NoKoreksi` varchar(15) NOT NULL,
  `TglKoreksi` date default NULL,
  `Keterangan` varchar(255) default NULL,
  `GDKoreksi` varchar(10) default NULL,
  PRIMARY KEY  (`NoKoreksi`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_koreksistc_m`
--


--
-- Table structure for table `tr_log`
--

CREATE TABLE `tr_log` (
  `Log` varchar(50) NOT NULL default '',
  `NoBukti` varchar(20) default NULL,
  `Keterangan` varchar(500) default NULL,
  `Tanggal` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`Log`,`Tanggal`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_log`
--


--
-- Table structure for table `tr_modx`
--

CREATE TABLE `tr_modx` (
  `NoModX` varchar(11) NOT NULL default '',
  `TglModx` datetime default NULL,
  `Keterangan` varchar(200) default NULL,
  `TglBatal` datetime default NULL,
  PRIMARY KEY  (`NoModX`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_modx`
--


--
-- Table structure for table `tr_mutasibuku`
--

CREATE TABLE `tr_mutasibuku` (
  `TransMutasiBuku` varchar(2) NOT NULL,
  `NoMutasiBuku` varchar(11) NOT NULL,
  `NoJual` varchar(11) default NULL,
  `Tanggal` datetime default NULL,
  `ItemMutasi` varchar(11) default NULL,
  `KodeCustAsal` varchar(10) default NULL,
  `KodeCustTujuan` varchar(10) default NULL,
  `KodeBrg` varchar(50) default NULL,
  `NamaBrg` varchar(50) default NULL,
  `Tahun` int(11) default NULL,
  `Semester` int(11) default NULL,
  `Jml` double default NULL,
  `Harga` double default NULL,
  `Satuan` varchar(10) default NULL,
  `Nilai` double default NULL,
  `Keterangan` text,
  `itemjual` int(11) default NULL,
  PRIMARY KEY  (`TransMutasiBuku`,`NoMutasiBuku`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_mutasibuku`
--


--
-- Table structure for table `tr_mutasigd`
--

CREATE TABLE `tr_mutasigd` (
  `NoPindah` varchar(11) default NULL,
  `TglPindah` date default NULL,
  `ItemPindah` int(11) default NULL,
  `KodeBrg` varchar(20) default NULL,
  `TokoAsal` varchar(1) default NULL,
  `KodeGDAsal` varchar(5) default NULL,
  `TokoTujuan` varchar(1) default NULL,
  `KodeGDTujuan` varchar(5) default NULL,
  `Jumlah` double default NULL,
  `Satuan` varchar(10) default NULL,
  `Konv` double default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_mutasigd`
--


--
-- Table structure for table `tr_opnameall`
--

CREATE TABLE `tr_opnameall` (
  `TglOpname` datetime NOT NULL default '0000-00-00 00:00:00',
  `KodeBrg` varchar(20) NOT NULL,
  `JmlStock` double default NULL,
  `JmlOpname` double default NULL,
  `JmlUpdate` double default NULL,
  `KodeGd` varchar(5) NOT NULL,
  PRIMARY KEY  (`TglOpname`,`KodeBrg`),
  KEY `fk_OpnameAll1` (`KodeGd`),
  KEY `fk_OpnameAll2` (`KodeBrg`),
  CONSTRAINT `fk_OpnameAll1` FOREIGN KEY (`KodeGd`) REFERENCES `tm_gudang` (`KodeGd`),
  CONSTRAINT `fk_OpnameAll2` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_opnameall`
--


--
-- Table structure for table `tr_pindahgd_d`
--

CREATE TABLE `tr_pindahgd_d` (
  `NoPindahGd` varchar(11) NOT NULL default '',
  `ItemDet` int(11) NOT NULL default '0',
  `KodeBrg` varchar(20) NOT NULL,
  `KodeGdAsal` varchar(5) NOT NULL,
  `KodeGdTujuan` varchar(5) NOT NULL,
  `Jumlah` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` int(11) default NULL,
  `Harga` double default NULL,
  `Total` double default NULL,
  `isSdhBayarToko` char(1) default 'N',
  PRIMARY KEY  (`NoPindahGd`,`ItemDet`),
  KEY `fk_DetPIndahGd2` (`KodeBrg`),
  KEY `fk_DetPindahGd3` (`KodeGdAsal`),
  KEY `fk_DetPindahGd4` (`KodeGdTujuan`),
  CONSTRAINT `fk_DetPindahGd1` FOREIGN KEY (`NoPindahGd`) REFERENCES `tr_pindahgd_m` (`NoPindahGd`) ON DELETE CASCADE,
  CONSTRAINT `fk_DetPIndahGd2` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`),
  CONSTRAINT `fk_DetPindahGd3` FOREIGN KEY (`KodeGdAsal`) REFERENCES `tm_gudang` (`KodeGd`),
  CONSTRAINT `fk_DetPindahGd4` FOREIGN KEY (`KodeGdTujuan`) REFERENCES `tm_gudang` (`KodeGd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_pindahgd_d`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetPindahGdAdd` AFTER INSERT ON `tr_pindahgd_d` FOR EACH ROW BEGIN
Declare vtemp double;
Declare vJml double;
  select stockakhir-new.jumlah into vJml from tm_stockbrg where kodeGd=new.KodeGDasal and kodebrg=new.kodebrg;
     select count(*) into vtemp from tm_stockbrg where kodebrg=new.kodebrg and kodeGd= new.KodeGDTujuan;
     if vtemp = 0 then
        insert  into tm_stockbrg (kodebrg,kodegd,StockAwal,stockakhir) values (new.kodebrg,new.kodegdtujuan,0,new.Jumlah);
        Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)-new.jumlah where kodeGd= new.KodeGDAsal and kodebrg=new.kodebrg;
     else  
        Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)+new.jumlah where kodeGd= new.KodeGDTujuan and kodebrg=new.kodebrg;
        Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)-new.jumlah where kodeGd= new.KodeGDAsal and kodebrg=new.kodebrg;
     end if;
END */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetPindahGdUpdate` AFTER UPDATE ON `tr_pindahgd_d` FOR EACH ROW BEGIN
declare vtemp double;
declare vJmltujuan double;
declare vJmlasal   double;
declare vJml   double;
  select count(*) into vtemp from tm_stockbrg where kodeGd= new.KodeGDTujuan and kodebrg=new.kodebrg;
  select ifnull(stockakhir,0)-new.jumlah into vJmlAsal from tm_stockbrg where kodeGd= new.KodeGDAsal and kodebrg=new.kodebrg;
  select ifnull(stockakhir,0)-old.jumlah into vJmlTujuan from tm_stockbrg where kodeGd= old.KodeGDTujuan and kodebrg=old.kodebrg;
     if vtemp = 0 then
        insert  into tm_stockbrg (kodebrg,kodegd,StockAwal,stockakhir) values (new.kodebrg,new.kodegdtujuan,0,new.jumlah);
 
        Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)+old.Jumlah*old.konv where kodeGd= old.KodeGDasal and kodebrg=old.kodebrg;
        Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)-new.Jumlah*new.konv where kodeGd= new.KodeGDasal and kodebrg=new.kodebrg;
        Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)-old.Jumlah*old.konv where kodeGd= old.KodeGDtujuan and kodebrg=old.kodebrg;
     else
        Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)+new.Jumlah*new.konv where kodeGd= new.KodeGDTujuan and kodebrg=new.kodebrg;
        Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)+old.Jumlah*old.konv where kodeGd= old.KodeGDasal and kodebrg=old.kodebrg;
        Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)-new.Jumlah*new.konv where kodeGd= new.KodeGDasal and kodebrg=new.kodebrg;
        Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)-old.Jumlah*old.konv where kodeGd= old.KodeGDtujuan and kodebrg=old.kodebrg;
     end if;
END */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetPindahGdDelete` AFTER DELETE ON `tr_pindahgd_d` FOR EACH ROW BEGIN
declare vtemp double;
Declare vJmlTujuan double;
  select ifnull(stockakhir,0)-old.jumlah into vJmlTujuan from tm_stockbrg where kodeGd= old.KodeGDTujuan and kodebrg=old.kodebrg;
  select count(*) into vtemp from tm_stockbrg where kodeGd= old.KodeGDtujuan and kodebrg=old.kodebrg;
  
     if vtemp > 0 then
       Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)-old.Jumlah where kodeGd= old.KodeGDTujuan and kodebrg=old.kodebrg;
       Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)+old.Jumlah where kodeGd= old.KodeGDAsal and kodebrg=old.kodebrg;
     END if;
 
END */;;

DELIMITER ;

--
-- Table structure for table `tr_pindahgd_m`
--

CREATE TABLE `tr_pindahgd_m` (
  `NoPindahGd` varchar(11) NOT NULL default '',
  `TglPindahGd` datetime default NULL,
  `Keterangan` varchar(200) default NULL,
  `TglBatal` datetime default NULL,
  `User` varchar(30) default NULL,
  `GDPindah` varchar(10) default NULL,
  `GDAsal` varchar(10) default NULL,
  PRIMARY KEY  (`NoPindahGd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_pindahgd_m`
--


--
-- Table structure for table `tr_piusem`
--

CREATE TABLE `tr_piusem` (
  `KodeCust` varchar(20) default NULL,
  `NamaCust` varchar(75) default NULL,
  `Alamat` varchar(75) default NULL,
  `Kota` varchar(50) default NULL,
  `Telp` varchar(20) default NULL,
  `Semester` varchar(20) default NULL,
  `Piutang_sem` double default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_piusem`
--


--
-- Table structure for table `tr_pobeli_d`
--

CREATE TABLE `tr_pobeli_d` (
  `NoPO` varchar(11) NOT NULL,
  `ItemPO` int(11) NOT NULL,
  `KodeBrg` varchar(20) default NULL,
  `Keterangan` varchar(100) default NULL,
  `Harga` double default NULL,
  `Disc` double default NULL,
  `Jml` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  `SdhTerima` double default NULL,
  `TglFinish` datetime default NULL,
  `Sisa` double default NULL,
  PRIMARY KEY  (`NoPO`,`ItemPO`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_pobeli_d`
--


--
-- Table structure for table `tr_pobeli_m`
--

CREATE TABLE `tr_pobeli_m` (
  `NoPO` varchar(11) NOT NULL,
  `TglPO` datetime default NULL,
  `TglBatal` datetime default NULL,
  `KodeSupp` varchar(10) default NULL,
  `Keterangan` varchar(200) default NULL,
  `DiscRp` double default NULL,
  `Tambahan` double default NULL,
  `KetTambahan` varchar(50) default NULL,
  `PPN` double default NULL,
  `PPNRps` double default NULL,
  `SyaratByr` int(11) default NULL,
  `KetSyaratByr` varchar(50) default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  PRIMARY KEY  (`NoPO`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_pobeli_m`
--


--
-- Table structure for table `tr_pojual_d`
--

CREATE TABLE `tr_pojual_d` (
  `NoPO` varchar(11) NOT NULL default '',
  `ItemPO` int(11) NOT NULL default '0',
  `KodeBrg` varchar(20) default NULL,
  `Keterangan` varchar(100) default NULL,
  `Harga` double default NULL,
  `Disc` double default NULL,
  `Jml` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  `SdhTerima` double default NULL,
  `TglFinish` datetime default NULL,
  PRIMARY KEY  (`NoPO`,`ItemPO`),
  KEY `fk_POJual_d2` (`KodeBrg`),
  CONSTRAINT `fk_POJual_d1` FOREIGN KEY (`NoPO`) REFERENCES `tr_pojual_m` (`NoPO`) ON DELETE CASCADE,
  CONSTRAINT `fk_POJual_d2` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_pojual_d`
--


--
-- Table structure for table `tr_pojual_m`
--

CREATE TABLE `tr_pojual_m` (
  `NoPO` varchar(11) NOT NULL default '',
  `TglPO` datetime default NULL,
  `TglBatal` datetime default NULL,
  `KodeCust` varchar(10) default NULL,
  `Keterangan` varchar(200) default NULL,
  `DiscRp` double default NULL,
  `Tambahan` double default NULL,
  `KetTambahan` varchar(50) default NULL,
  `PPN` double default NULL,
  `PPNRps` double default NULL,
  `SyaratByr` int(11) default NULL,
  `KetSyaratByr` varchar(50) default NULL,
  `Valas` varchar(10) default NULL,
  `Exrate` double default NULL,
  PRIMARY KEY  (`NoPO`),
  KEY `fk_tr_POJual_m` (`KodeCust`),
  CONSTRAINT `fk_tr_POJual_m` FOREIGN KEY (`KodeCust`) REFERENCES `tm_customer` (`KodeCust`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_pojual_m`
--


--
-- Table structure for table `tr_pojualr_d`
--

CREATE TABLE `tr_pojualr_d` (
  `NoPO` varchar(11) NOT NULL default '',
  `ItemPO` int(11) NOT NULL default '0',
  `KodeBrg` varchar(20) default NULL,
  `Keterangan` varchar(100) default NULL,
  `Harga` double default NULL,
  `Disc` double default NULL,
  `Jml` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  `SdhTerima` double default NULL,
  `TglFinish` datetime default NULL,
  `KodeGD` varchar(5) default NULL,
  PRIMARY KEY  (`NoPO`,`ItemPO`),
  KEY `fk_POJual_d2` (`KodeBrg`),
  CONSTRAINT `fk_POJualr_d1` FOREIGN KEY (`NoPO`) REFERENCES `tr_pojualr_m` (`NoPO`) ON DELETE CASCADE,
  CONSTRAINT `fk_POJualr_d2` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_pojualr_d`
--


--
-- Table structure for table `tr_pojualr_m`
--

CREATE TABLE `tr_pojualr_m` (
  `NoPO` varchar(11) NOT NULL default '',
  `TglPO` datetime default NULL,
  `TglBatal` datetime default NULL,
  `KodeCust` varchar(10) default NULL,
  `Keterangan` varchar(200) default NULL,
  `DiscRp` double default NULL,
  `Tambahan` double default NULL,
  `KetTambahan` varchar(50) default NULL,
  `PPN` double default NULL,
  `PPNRps` double default NULL,
  `SyaratByr` int(11) default NULL,
  `KetSyaratByr` varchar(50) default NULL,
  `Valas` varchar(10) default NULL,
  `Exrate` double default NULL,
  `UangMuka` double default NULL,
  `Nilai` double default NULL,
  `Sisa` double default NULL,
  `GDPO` varchar(10) default NULL,
  PRIMARY KEY  (`NoPO`),
  KEY `fk_tr_POJualr_m` (`KodeCust`),
  CONSTRAINT `fk_tr_POJualr_m` FOREIGN KEY (`KodeCust`) REFERENCES `tm_customer` (`KodeCust`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_pojualr_m`
--


--
-- Table structure for table `tr_pojualrakitan_d`
--

CREATE TABLE `tr_pojualrakitan_d` (
  `NoPO` varchar(11) NOT NULL default '',
  `ItemPO` int(11) NOT NULL default '0',
  `KodeBrg` varchar(20) default NULL,
  `Keterangan` varchar(100) default NULL,
  `Harga` double default NULL,
  `Disc` double default NULL,
  `Jml` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  `SdhTerima` double default NULL,
  `TglFinish` datetime default NULL,
  PRIMARY KEY  (`NoPO`,`ItemPO`),
  KEY `fk_POJualrakitan_d2` (`KodeBrg`),
  CONSTRAINT `fk_POJualrakitan_d1` FOREIGN KEY (`NoPO`) REFERENCES `tr_pojualrakitan_m` (`NoPO`) ON DELETE CASCADE,
  CONSTRAINT `fk_POJualrakitan_d2` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_pojualrakitan_d`
--


--
-- Table structure for table `tr_pojualrakitan_m`
--

CREATE TABLE `tr_pojualrakitan_m` (
  `NoPO` varchar(11) NOT NULL default '',
  `TglPO` datetime default NULL,
  `TglBatal` datetime default NULL,
  `KodeCust` varchar(10) default NULL,
  `KodeRakitan` varchar(20) default NULL,
  `JmlRakitan` int(11) default NULL,
  `SdhTerima` int(11) default NULL,
  `Keterangan` varchar(200) default NULL,
  `DiscRp` double default NULL,
  `Tambahan` double default NULL,
  `KetTambahan` varchar(50) default NULL,
  `PPN` double default NULL,
  `PPNRps` double default NULL,
  `SyaratByr` int(11) default NULL,
  `KetSyaratByr` varchar(50) default NULL,
  `Valas` varchar(10) default NULL,
  `Exrate` double default NULL,
  PRIMARY KEY  (`NoPO`),
  KEY `fk_tr_POJualrakitan_m` (`KodeCust`),
  CONSTRAINT `fk_tr_POJualrakitan_m` FOREIGN KEY (`KodeCust`) REFERENCES `tm_customer` (`KodeCust`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_pojualrakitan_m`
--


--
-- Table structure for table `tr_retbeli_d`
--

CREATE TABLE `tr_retbeli_d` (
  `TransRetB` varchar(2) NOT NULL default '',
  `NoRetB` varchar(11) NOT NULL default '',
  `ItemRetB` int(11) NOT NULL default '0',
  `TransBeli` varchar(2) default NULL,
  `NoBeli` varchar(11) default NULL,
  `itemBeli` int(11) default NULL,
  `KodeBrg` varchar(20) NOT NULL,
  `KodeGd` varchar(5) NOT NULL,
  `Harga` double default NULL,
  `Disc` double default NULL,
  `Jml` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  `Replaced` varchar(1) default NULL,
  `Locked` varchar(1) default NULL,
  `Direplace` double default NULL,
  `Sisa` double default NULL,
  PRIMARY KEY  (`TransRetB`,`NoRetB`,`ItemRetB`),
  KEY `fk_tr_RetBeli_d2` (`KodeGd`),
  KEY `fk_tr_RetBeli_d3` (`KodeBrg`),
  KEY `fk_tr_RetBeli_d4` (`TransBeli`,`NoBeli`,`itemBeli`),
  CONSTRAINT `fk_tr_RetBeli_d1` FOREIGN KEY (`TransRetB`, `NoRetB`) REFERENCES `tr_retbeli_m` (`TransRetB`, `NoRetB`) ON DELETE CASCADE,
  CONSTRAINT `fk_tr_RetBeli_d2` FOREIGN KEY (`KodeGd`) REFERENCES `tm_gudang` (`KodeGd`),
  CONSTRAINT `fk_tr_RetBeli_d3` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`),
  CONSTRAINT `fk_tr_RetBeli_d4` FOREIGN KEY (`TransBeli`, `NoBeli`, `itemBeli`) REFERENCES `tr_beli_d` (`TransBeli`, `NoBeli`, `ItemBeli`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_retbeli_d`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetRetBeliAdd` AFTER INSERT ON `tr_retbeli_d` FOR EACH ROW BEGIN
declare vnoretb varchar(11);
DECLARE vjumlah  double; 
DECLARE vTglBatal datetime;
Declare vnobeli varchar(11);
declare vcode varchar(20);
declare vitemBeli int;
declare vtrans varchar(2);
declare vTransbeli varchar(2);
declare vKodeGd varchar(5);
 select TransRetB,NoretB,Kodebrg, ifnull(jml,0),kodegd, ifnull(TransBeli,''), ifnull(NoBeli,''), ifnull(itemBeli,0) into vtrans,vNoretB,vcode,vjumlah,vkodegd, vTransbeli, vNoBeli, vItemBeli 
 from Tr_RetBeli_d where TransRetB = new.TransRetB and NoretB = new.NoretB and ItemRetB=new.ItemretB;
 select Tglbatal into vTglbatal from Tr_RetBeli_M where new.TransRetB and NoretB = new.NoretB;
 update tm_stockbrg set stockakhir = ifnull(stockakhir,0) -new.jml where kodebrg=new.kodebrg and kodeGd= new.KodeGD; 
 
 if (vnobeli<>'') and (vTransBeli<>'') and (vItemBeli<>0) then
    update Tr_Beli_d set diretur = ifnull(diretur,0) + vJumlah where Transbeli=vTransBeli and nobeli=vnobeli and ItemBeli=vItemBeli;
 end if;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetRetBeliUpdate` AFTER UPDATE ON `tr_retbeli_d` FOR EACH ROW BEGIN
 declare vnoretb varchar(11);
 DECLARE vjumlah  double; 
 DECLARE vTglBatal datetime;
 Declare vnobeli varchar(11);
 declare vcode varchar(20);
 declare vitemBeli int;
 declare vtrans varchar(2);
 declare vTransbeli varchar(2);
 declare vKodeGd varchar(5);
  select TransRetB,NoretB,Kodebrg, ifnull(jml,0),kodegd, ifnull(TransBeli,''), ifnull(NoBeli,''), ifnull(itemBeli,0) into vtrans,vNoretB,vcode,vjumlah,vkodegd, vTransbeli, vNoBeli, vItemBeli 
  from Tr_RetBeli_d where TransRetB = new.TransRetB and NoretB = new.NoretB and ItemRetB=new.ItemretB;
  select Tglbatal into vTglbatal from Tr_RetBeli_M where new.TransRetB and NoretB = new.NoretB;
  update tm_stockbrg set stockakhir = ifnull(stockakhir,0) +Old.jml where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD; 
  update tm_stockbrg set stockakhir = ifnull(stockakhir,0) -new.jml where kodebrg=new.kodebrg and kodeGd= new.KodeGD; 
  update tr_Beli_d set diretur = ifnull(diretur,0)-Old.Jml  where Transbeli=old.TransBeli and nobeli=old.nobeli and ItemBeli=old.ItemBeli;
  update tr_Beli_d set diretur = ifnull(diretur,0)+New.Jml  where Transbeli=new.TransBeli and nobeli=new.nobeli and ItemBeli=new.ItemBeli;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetRetBeliDelete` AFTER DELETE ON `tr_retbeli_d` FOR EACH ROW BEGIN
 update tm_stockbrg set stockakhir = ifnull(stockakhir,0) +Old.jml where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD; 
 update tr_Beli_d set diretur = ifnull(diretur,0)-Old.Jml  where Transbeli=old.TransBeli and nobeli=old.nobeli and ItemBeli=old.ItemBeli;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_retbeli_m`
--

CREATE TABLE `tr_retbeli_m` (
  `TransRetB` varchar(2) NOT NULL default '',
  `NoRetB` varchar(11) NOT NULL default '',
  `TglRetB` datetime default NULL,
  `TglBatal` datetime default NULL,
  `KodeSupp` varchar(10) default NULL,
  `Keterangan` varchar(200) default NULL,
  `TRansBeli` varchar(2) default NULL,
  `NoBeli` varchar(11) default NULL,
  `DiscRp` double default NULL,
  `Tambahan` double default NULL,
  `KetTambahan` varchar(50) default NULL,
  `PPN` double default NULL,
  `PPNRps` double default NULL,
  `Nilai` double default NULL,
  `Sisa` double default NULL,
  `valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `GDRetur` varchar(10) default NULL,
  PRIMARY KEY  (`TransRetB`,`NoRetB`),
  KEY `fk_tr_RetBeli_m1` (`KodeSupp`),
  KEY `fk_tr_RetBeli_m2` (`TRansBeli`,`NoBeli`),
  CONSTRAINT `fk_tr_RetBeli_m1` FOREIGN KEY (`KodeSupp`) REFERENCES `tm_supplier` (`KodeSupp`),
  CONSTRAINT `fk_tr_RetBeli_m2` FOREIGN KEY (`TRansBeli`, `NoBeli`) REFERENCES `tr_beli_m` (`TransBeli`, `NoBeli`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_retbeli_m`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `trRetBeliAdd` AFTER INSERT ON `tr_retbeli_m` FOR EACH ROW BEGIN
  Update tm_Supplier set Hutang =  ifnull(hutang,0) - new.nilai * new.exrate 
  where kodesupp = new.kodesupp;
  Update tr_beli_m set sisa =  ifnull(sisa,0) - new.nilai * new.exrate 
  where TransBeli = new.TransBeli and NoBeli=New.NoBeli;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `trRetBeliUpdate` AFTER UPDATE ON `tr_retbeli_m` FOR EACH ROW BEGIN
  Update tm_Supplier set Hutang =  ifnull(hutang,0) +  old.nilai *  Old.exrate 
  where kodesupp = old.kodesupp;
  
  Update tm_Supplier set Hutang =  ifnull(hutang,0) -  new.nilai *  new.exrate 
  where kodesupp = new.kodesupp;
  Update tr_beli_m set sisa =  ifnull(sisa,0) - new.nilai * new.exrate 
  where TransBeli = new.TransBeli and NoBeli=New.NoBeli;
  Update tr_beli_m set sisa =  ifnull(sisa,0) + old.nilai * old.exrate 
  where TransBeli = old.TransBeli and NoBeli=old.NoBeli;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `trRetBeliDelete` AFTER DELETE ON `tr_retbeli_m` FOR EACH ROW BEGIN
  Update tm_Supplier set Hutang =  ifnull(hutang,0) + (Old.nilai * Old.exrate) 
  where kodesupp = Old.kodesupp;
  Update tr_beli_m set sisa =  ifnull(sisa,0) + old.nilai * old.exrate 
  where TransBeli = old.TransBeli and NoBeli=old.NoBeli;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_retjual_d`
--

CREATE TABLE `tr_retjual_d` (
  `TransRetJ` varchar(2) NOT NULL default '',
  `NoRetJ` varchar(11) NOT NULL default '',
  `ItemRetJ` int(11) NOT NULL default '0',
  `TransJual` varchar(2) default NULL,
  `NoJual` varchar(11) default NULL,
  `ItemJual` int(11) default NULL,
  `KodeBrg` varchar(20) NOT NULL,
  `KodeGd` varchar(5) NOT NULL,
  `Harga` double default NULL,
  `Disc` double default NULL,
  `Jml` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  PRIMARY KEY  (`TransRetJ`,`NoRetJ`,`ItemRetJ`),
  KEY `fk_Tr_RetJual_D1` (`KodeGd`),
  KEY `fk_Tr_RetJual_D2` (`KodeBrg`),
  KEY `fk_Tr_RetJual_D3` (`TransJual`,`NoJual`,`ItemJual`),
  KEY `fk_Tr_RetJual_D7` (`TransJual`,`NoJual`,`ItemJual`),
  CONSTRAINT `fk_Tr_RetJual_D4` FOREIGN KEY (`TransRetJ`, `NoRetJ`) REFERENCES `tr_retjual_m` (`TransRetJ`, `NoRetJ`) ON DELETE CASCADE,
  CONSTRAINT `fk_Tr_RetJual_D5` FOREIGN KEY (`KodeGd`) REFERENCES `tm_gudang` (`KodeGd`),
  CONSTRAINT `fk_Tr_RetJual_D6` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`),
  CONSTRAINT `fk_Tr_RetJual_D7` FOREIGN KEY (`TransJual`, `NoJual`, `ItemJual`) REFERENCES `tr_jual_d` (`TransJual`, `NoJual`, `ItemJual`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_retjual_d`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetREtJualAdd` AFTER INSERT ON `tr_retjual_d` FOR EACH ROW BEGIN
  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) + new.jml where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
  update tr_jual_d set diretur = ifnull(diretur,0) + new.Jml  where nojual = new.nojual and TransJual=new.Transjual and ItemJual=new.ItemJual;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetREtJualUpdate` AFTER UPDATE ON `tr_retjual_d` FOR EACH ROW BEGIN
  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) - Old.jml where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;
  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) + New.jml where kodebrg=New.kodebrg and kodeGd= New.KodeGD;
  update tr_jual_d set diretur = ifnull(diretur,0) -Old.Jml  where nojual = Old.nojual and TransJual=Old.Transjual and ItemJual=Old.ItemJual;
  update tr_jual_d set diretur = ifnull(diretur,0) +New.Jml  where nojual = New.nojual and TransJual=New.Transjual and ItemJual=New.ItemJual;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetREtJualDelete` AFTER DELETE ON `tr_retjual_d` FOR EACH ROW BEGIN
Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) - Old.jml where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;
update tr_jual_d set diretur = ifnull(diretur,0) - Old.Jml  where nojual = Old.nojual and TransJual=Old.Transjual and ItemJual=Old.ItemJual;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_retjual_m`
--

CREATE TABLE `tr_retjual_m` (
  `TransRetJ` varchar(2) NOT NULL default '',
  `NoRetJ` varchar(11) NOT NULL default '',
  `TglRetJ` datetime default NULL,
  `TglBatal` datetime default NULL,
  `KodeCust` varchar(10) default NULL,
  `Keterangan` varchar(200) default NULL,
  `TRansJual` varchar(2) default NULL,
  `NoJual` varchar(11) default NULL,
  `DiscRp` double default NULL,
  `Tambahan` double default NULL,
  `KetTambahan` varchar(50) default NULL,
  `PPN` double default NULL,
  `PPNRps` double default NULL,
  `Nilai` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `Sisa` double default NULL,
  PRIMARY KEY  (`TransRetJ`,`NoRetJ`),
  KEY `fk_Tr_RetJual_M1` (`KodeCust`),
  KEY `fk_Tr_RetJual_M2` (`TRansJual`,`NoJual`),
  CONSTRAINT `fk_Tr_RetJual_M1` FOREIGN KEY (`KodeCust`) REFERENCES `tm_customer` (`KodeCust`),
  CONSTRAINT `fk_Tr_RetJual_M2` FOREIGN KEY (`TRansJual`, `NoJual`) REFERENCES `tr_jual_m` (`TransJual`, `NoJual`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_retjual_m`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrRetJualAdd` AFTER INSERT ON `tr_retjual_m` FOR EACH ROW BEGIN
Declare vPiutang double;
Declare vSisa double;
  select ifnull(Piutang,0) into vPiutang from tm_Customer where kodeCust = new.kodeCust; 
  Update tm_Customer set Piutang =  ifnull(Piutang,0) - new.nilai * new.exrate 
  where kodeCust = new.kodeCust;
  Update tr_Jual_m set sisa =  ifnull(sisa,0) - new.nilai * new.exrate 
  where TransJual = new.TransJual and NoJual=New.NoJual;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrRetJualUpdate` AFTER UPDATE ON `tr_retjual_m` FOR EACH ROW BEGIN
Declare vPiutang double;
Declare vSisa double;
  select ifnull(Piutang,0) into vPiutang from tm_Customer where kodeCust = new.kodeCust; 
  Update tm_Customer set Piutang =  ifnull(Piutang,0) - new.nilai * new.exrate 
  where kodeCust = new.kodeCust;
  Update tm_Customer set Piutang =  ifnull(Piutang,0) + Old.nilai * Old.exrate 
  where kodeCust = Old.kodeCust;
  Update tr_Jual_m set sisa =  ifnull(sisa,0) - new.nilai * new.exrate 
  where TransJual = new.TransJual and NoJual=New.NoJual;
  Update tr_Jual_m set sisa =  ifnull(sisa,0) + old.nilai * old.exrate 
  where TransJual = old.TransJual and NoJual=old.NoJual;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrRetJualDelete` AFTER DELETE ON `tr_retjual_m` FOR EACH ROW BEGIN
Declare vSisa double;
  Update tm_Customer set Piutang =  ifnull(Piutang,0) + Old.nilai * Old.exrate 
  where kodeCust = Old.kodeCust;
  Update tr_Jual_m set sisa =  ifnull(sisa,0) + old.nilai * old.exrate 
  where TransJual = old.TransJual and NoJual=old.NoJual;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_retjualr_d`
--

CREATE TABLE `tr_retjualr_d` (
  `TransRetJ` varchar(2) NOT NULL default '',
  `NoRetJ` varchar(11) NOT NULL default '',
  `ItemRetJ` int(11) NOT NULL default '0',
  `TransJual` varchar(2) default NULL,
  `NoJual` varchar(11) default NULL,
  `ItemJual` int(11) default NULL,
  `KodeBrg` varchar(20) NOT NULL,
  `KodeGd` varchar(5) NOT NULL,
  `Harga` double default NULL,
  `Disc` double default NULL,
  `Jml` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  `HargaAVG` double default NULL,
  `GDRetur` varchar(5) default NULL,
  PRIMARY KEY  (`TransRetJ`,`NoRetJ`,`ItemRetJ`),
  KEY `fk_Tr_RetJualr_D1` (`KodeGd`),
  KEY `fk_Tr_RetJualr_D2` (`KodeBrg`),
  KEY `fk_Tr_RetJualr_D3` (`TransJual`,`NoJual`,`ItemJual`),
  KEY `fk_Tr_RetJualr_D7` (`TransJual`,`NoJual`,`ItemJual`),
  CONSTRAINT `fk_Tr_RetJualr_D4` FOREIGN KEY (`TransRetJ`, `NoRetJ`) REFERENCES `tr_retjualr_m` (`TransRetJ`, `NoRetJ`) ON DELETE CASCADE,
  CONSTRAINT `fk_Tr_RetJualr_D5` FOREIGN KEY (`KodeGd`) REFERENCES `tm_gudang` (`KodeGd`),
  CONSTRAINT `fk_Tr_RetJualr_D6` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`),
  CONSTRAINT `fk_Tr_RetJualr_D7` FOREIGN KEY (`TransJual`, `NoJual`, `ItemJual`) REFERENCES `tr_jualr_d` (`TransRetail`, `NoJualR`, `ItemJual`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_retjualr_d`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetREtJualRAdd` AFTER INSERT ON `tr_retjualr_d` FOR EACH ROW BEGIN
  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) + new.jml where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
  update tr_jualR_d set diretur = ifnull(diretur,0) + new.Jml where nojualR = new.nojual and TransRetail=new.Transjual and ItemJual=new.ItemJual;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetREtJualRUpdate` AFTER UPDATE ON `tr_retjualr_d` FOR EACH ROW BEGIN
  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) - (old.jml-new.jml) where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
  update tr_jualR_d set diretur =  ifnull(diretur,0)- (old.jml * old.konv) where nojualR=new.nojual and TransRetail=new.Transjual and ItemJual=new.ItemJual;
  update tr_jualR_d set diretur =  ifnull(diretur,0)+ (new.jml * new.konv) where nojualR=new.nojual and TransRetail=new.Transjual and ItemJual=new.ItemJual;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetREtJualRDelete` AFTER DELETE ON `tr_retjualr_d` FOR EACH ROW BEGIN
  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) - old.jml 
  where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;
  update tr_jualR_d set diretur = ifnull(diretur,0) - Old.Jml
  where nojualR=Old.nojual and TransRetail=Old.Transjual and ItemJual=Old.ItemJual;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_retjualr_m`
--

CREATE TABLE `tr_retjualr_m` (
  `TransRetJ` varchar(2) NOT NULL default '',
  `NoRetJ` varchar(11) NOT NULL default '',
  `TglRetJ` datetime default NULL,
  `TglBatal` datetime default NULL,
  `NamaCust` varchar(50) default NULL,
  `Alamat` varchar(50) default NULL,
  `Kota` varchar(30) default NULL,
  `Keterangan` varchar(200) default NULL,
  `TRansJual` varchar(2) default NULL,
  `NoJual` varchar(11) default NULL,
  `DiscRp` double default NULL,
  `Tambahan` double default NULL,
  `KetTambahan` varchar(50) default NULL,
  `PPN` double default NULL,
  `PPNRps` double default NULL,
  `Nilai` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `Sisa` double default NULL,
  `KodeCustR` varchar(30) default NULL,
  `NilaiHPP` double default NULL,
  `GDRetur` varchar(10) default NULL,
  PRIMARY KEY  (`TransRetJ`,`NoRetJ`),
  KEY `fk_Tr_RetJualR_M2` (`TRansJual`,`NoJual`),
  CONSTRAINT `fk_Tr_RetJualR_M2` FOREIGN KEY (`TRansJual`, `NoJual`) REFERENCES `tr_jualr_m` (`TransRetail`, `NoJualR`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_retjualr_m`
--


--
-- Table structure for table `tr_retjualrakitan_d`
--

CREATE TABLE `tr_retjualrakitan_d` (
  `TransRetJ` varchar(2) NOT NULL default '',
  `NoRetJ` varchar(11) NOT NULL default '',
  `ItemRetJ` int(11) NOT NULL default '0',
  `TransJual` varchar(2) default NULL,
  `NoJual` varchar(11) default NULL,
  `ItemJual` int(11) default NULL,
  `KodeBrg` varchar(20) NOT NULL,
  `KodeGd` varchar(5) NOT NULL,
  `Harga` double default NULL,
  `Disc` double default NULL,
  `Jml` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  PRIMARY KEY  (`TransRetJ`,`NoRetJ`,`ItemRetJ`),
  KEY `fk_Tr_RetJualRakitan_D1` (`KodeGd`),
  KEY `fk_Tr_RetJualRakitan_D2` (`KodeBrg`),
  KEY `fk_Tr_RetJualRakitan_D3` (`TransJual`,`NoJual`,`ItemJual`),
  KEY `fk_Tr_RetJualRakitan_D7` (`TransJual`,`NoJual`,`ItemJual`),
  CONSTRAINT `fk_Tr_RetJualRakitan_D4` FOREIGN KEY (`TransRetJ`, `NoRetJ`) REFERENCES `tr_retjualrakitan_m` (`TransRetJ`, `NoRetJ`) ON DELETE CASCADE,
  CONSTRAINT `fk_Tr_RetJualRakitan_D5` FOREIGN KEY (`KodeGd`) REFERENCES `tm_gudang` (`KodeGd`),
  CONSTRAINT `fk_Tr_RetJualRakitan_D6` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`),
  CONSTRAINT `fk_Tr_RetJualRakitan_D7` FOREIGN KEY (`TransJual`, `NoJual`, `ItemJual`) REFERENCES `tr_jualrakitan_d` (`TransJual`, `NoJual`, `ItemJual`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_retjualrakitan_d`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetREtJualRakitanAdd` AFTER INSERT ON `tr_retjualrakitan_d` FOR EACH ROW BEGIN
  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) + new.jml where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
  update tr_jualRakitan_d set diretur = ifnull(diretur,0) + new.Jml  where nojual = new.nojual and TransJual=new.Transjual and ItemJual=new.ItemJual;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetREtJualRakitanUpdate` AFTER UPDATE ON `tr_retjualrakitan_d` FOR EACH ROW BEGIN
  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) + new.jml where kodebrg=new.kodebrg and kodeGd= new.KodeGD;
  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) - Old.jml where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;
  update tr_jualrakitan_d set diretur = ifnull(diretur,0) + new.Jml  where nojual = new.nojual and TransJual=new.Transjual and ItemJual=new.ItemJual;
  update tr_jualrakitan_d set diretur = ifnull(diretur,0) - Old.Jml  where nojual = Old.nojual and TransJual=Old.Transjual and ItemJual=Old.ItemJual;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DetREtJualRakitanDelete` AFTER DELETE ON `tr_retjualrakitan_d` FOR EACH ROW BEGIN
  Update tm_StockBrg set stockakhir = ifnull(stockakhir,0) - Old.jml where kodebrg=Old.kodebrg and kodeGd= Old.KodeGD;
  update tr_jualRakitan_d set diretur = ifnull(diretur,0) - Old.Jml  where nojual = Old.nojual and TransJual=Old.Transjual and ItemJual=Old.ItemJual;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_retjualrakitan_m`
--

CREATE TABLE `tr_retjualrakitan_m` (
  `TransRetJ` varchar(2) NOT NULL default '',
  `NoRetJ` varchar(11) NOT NULL default '',
  `TglRetJ` datetime default NULL,
  `TglBatal` datetime default NULL,
  `KodeCust` varchar(10) default NULL,
  `KodeRakitan` varchar(20) default NULL,
  `jmlrakitan` int(11) default NULL,
  `Keterangan` varchar(200) default NULL,
  `TRansJual` varchar(2) default NULL,
  `NoJual` varchar(11) default NULL,
  `DiscRp` double default NULL,
  `Tambahan` double default NULL,
  `KetTambahan` varchar(50) default NULL,
  `PPN` double default NULL,
  `PPNRps` double default NULL,
  `Nilai` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `Sisa` double default NULL,
  PRIMARY KEY  (`TransRetJ`,`NoRetJ`),
  KEY `fk_Tr_RetJualR_M1` (`KodeCust`),
  KEY `fk_Tr_RetJualR_M2` (`TRansJual`,`NoJual`),
  CONSTRAINT `fk_Tr_RetJualR_M3` FOREIGN KEY (`KodeCust`) REFERENCES `tm_customer` (`KodeCust`),
  CONSTRAINT `fk_Tr_RetJualR_M4` FOREIGN KEY (`TRansJual`, `NoJual`) REFERENCES `tr_jualrakitan_m` (`TransJual`, `NoJual`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_retjualrakitan_m`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrRetJualRakitanAdd` AFTER INSERT ON `tr_retjualrakitan_m` FOR EACH ROW BEGIN
Declare vPiutang double;
  select ifnull(Piutang,0) into vPiutang from tm_Customer where kodeCust = new.kodeCust; 
  Update tm_Customer set Piutang =  ifnull(Piutang,0) - new.nilai * new.exrate 
  where kodeCust = new.kodeCust;
  Update tr_Jualrakitan_m set sisa =  ifnull(sisa,0) - new.nilai * new.exrate 
  where TransJual = new.TransJual and NoJual=New.NoJual;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrRetJualRakitanUpdate` AFTER UPDATE ON `tr_retjualrakitan_m` FOR EACH ROW BEGIN
Declare vPiutang double;
  select ifnull(Piutang,0) into vPiutang from tm_Customer where kodeCust = new.kodeCust; 
 
  Update tm_Customer set Piutang =  ifnull(Piutang,0) - new.nilai * new.exrate 
  where kodeCust = new.kodeCust;
  Update tm_Customer set Piutang =  ifnull(Piutang,0) + Old.nilai * Old.exrate 
  where kodeCust = Old.kodeCust;
  Update tr_Jualrakitan_m set sisa =  ifnull(sisa,0) - new.nilai * new.exrate 
  where TransJual = new.TransJual and NoJual=New.NoJual;
  Update tr_Jualrakitan_m set sisa =  ifnull(sisa,0) + old.nilai * old.exrate 
  where TransJual = old.TransJual and NoJual=old.NoJual;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `TrRetJualRakitanDelete` AFTER DELETE ON `tr_retjualrakitan_m` FOR EACH ROW BEGIN
  Update tm_Customer set Piutang =  ifnull(Piutang,0) + Old.nilai * Old.exrate 
  where kodeCust = Old.kodeCust;
  Update tr_Jualrakitan_m set sisa =  ifnull(sisa,0) + old.nilai * old.exrate 
  where TransJual = old.TransJual and NoJual=old.NoJual;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_saldocounter`
--

CREATE TABLE `tr_saldocounter` (
  `KodeShift` varchar(15) NOT NULL,
  `KodeMesin` varchar(15) NOT NULL,
  `NoClose` varchar(15) default NULL,
  `UserID` varchar(15) NOT NULL,
  `Tanggal` date NOT NULL,
  `SaldoAwal` int(11) NOT NULL,
  `SaldoAkhir` int(11) NOT NULL,
  `OverShiff` varchar(2) default NULL,
  PRIMARY KEY  (`KodeShift`,`UserID`,`Tanggal`,`KodeMesin`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_saldocounter`
--


--
-- Table structure for table `tr_savetmp`
--

CREATE TABLE `tr_savetmp` (
  `NoJualR` varchar(11) NOT NULL default '',
  `ItemJual` int(11) NOT NULL default '0',
  `KodeBrg` varchar(20) NOT NULL,
  `KodeGd` varchar(5) NOT NULL,
  `NamaBrg` varchar(50) default NULL,
  `Harga` double default NULL,
  `HargaAvg` double default NULL,
  `Disc` double default NULL,
  `DiscPersen` double default NULL,
  `Jml` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  `Jam` datetime default NULL,
  `priceedits` varchar(1) default NULL,
  `cashr` int(11) default NULL,
  `kasir` varchar(10) default NULL,
  `HargaBeliLm` double default NULL,
  `MerkBrg` varchar(100) default NULL,
  PRIMARY KEY  (`NoJualR`,`ItemJual`),
  KEY `fk_SaveTmp` (`KodeBrg`),
  CONSTRAINT `fk_SaveTmp` FOREIGN KEY (`KodeBrg`) REFERENCES `tm_barang` (`KodeBrg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_savetmp`
--


--
-- Table structure for table `tr_savetmpgrosir`
--

CREATE TABLE `tr_savetmpgrosir` (
  `NoJual` varchar(20) NOT NULL,
  `ItemJual` int(11) NOT NULL default '0',
  `kodebrg` varchar(15) default NULL,
  `kodegd` varchar(10) default NULL,
  `namabrg` varchar(50) default NULL,
  `harga` double default NULL,
  `hargaavg` double default NULL,
  `disc` double default NULL,
  `discpersen` double default NULL,
  `jml` double default NULL,
  `satuan` varchar(30) default NULL,
  `konv` double default NULL,
  `jam` time default NULL,
  `priceedits` double default NULL,
  `Kasir` varchar(50) default NULL,
  `Kodecust` varchar(15) default NULL,
  `NamaCust` varchar(50) default NULL,
  `AlamatCust` varchar(50) default NULL,
  `HargaBeliLm` double default NULL,
  PRIMARY KEY  (`NoJual`,`ItemJual`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_savetmpgrosir`
--


--
-- Table structure for table `tr_scrbayarbeli`
--

CREATE TABLE `tr_scrbayarbeli` (
  `NoBayarB` varchar(11) NOT NULL default '',
  `ItemSBayarB` int(11) NOT NULL default '0',
  `TransBeli` varchar(2) default NULL,
  `NoBeli` varchar(11) default NULL,
  `Nilai` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `UID` char(36) default NULL,
  `UIDTrans` char(36) default NULL,
  PRIMARY KEY  (`NoBayarB`,`ItemSBayarB`),
  KEY `fk_tr_ScrBayarBeli` (`NoBayarB`),
  KEY `fk_tr_ScrBayarBeli1` (`TransBeli`,`NoBeli`),
  CONSTRAINT `fk_tr_ScrBayarBeli` FOREIGN KEY (`NoBayarB`) REFERENCES `tr_bayarbeli_m` (`NoBayarB`) ON DELETE CASCADE,
  CONSTRAINT `fk_tr_ScrBayarBeli1` FOREIGN KEY (`TransBeli`, `NoBeli`) REFERENCES `tr_beli_m` (`TransBeli`, `NoBeli`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_scrbayarbeli`
--

INSERT INTO `tr_scrbayarbeli` VALUES ('210700001',1,'BT','210700012',18750000,'',1,'3578aa85-659b-103a-ba01-d11e22512ef6','c38fd6a3-659a-103a-ba01-d11e22512ef6'),('210900001',1,'BT','210900015',15500000,'',1,'35799fc0-659b-103a-ba01-d11e22512ef6','c3988cf9-659a-103a-ba01-d11e22512ef6'),('210900002',1,'BT','210800024',19500000,'',1,'357989eb-659b-103a-ba01-d11e22512ef6','c3983181-659a-103a-ba01-d11e22512ef6'),('210900003',1,'BT','210700005',33346080,'',1,'3579adf8-659b-103a-ba01-d11e22512ef6','c3977b32-659a-103a-ba01-d11e22512ef6'),('210900004',1,'BT','210700002',3550000,'',1,'09555554-68bd-103a-ba01-d11e22512ef6','c3973024-659a-103a-ba01-d11e22512ef6'),('210900005',1,'BT','210800013',7200000,'',1,'5189cbc0-68b8-103a-ba01-d11e22512ef6','c397bd0b-659a-103a-ba01-d11e22512ef6'),('210900006',1,'BT','210700011',18750000,'',1,'7659e4e3-6b33-103a-ba01-d11e22512ef6','c3986ac3-659a-103a-ba01-d11e22512ef6'),('210900007',1,'BT','210900014',18750000,'',1,'5303469b-6b33-103a-ba01-d11e22512ef6','e0c860a0-68e2-103a-ba01-d11e22512ef6'),('210900008',1,'BT','210800014',33346080,'',1,'5d4633e0-6e3c-103a-8058-c946033d2811','c397bee7-659a-103a-ba01-d11e22512ef6'),('210900009',1,'BT','210800012',21256500,'',1,'189cf45c-6e3c-103a-8058-c946033d2811','c397aa42-659a-103a-ba01-d11e22512ef6'),('210900010',1,'BT','210800015',19104000,'',1,'39e9cc2b-6e3c-103a-8058-c946033d2811','c397d45c-659a-103a-ba01-d11e22512ef6'),('210900011',1,'BT','210800016',9092064,'',1,'2373ed8d-6e3c-103a-8058-c946033d2811','c397d602-659a-103a-ba01-d11e22512ef6'),('210900012',1,'BT','210800027',19048000,'',1,'148ccc19-709b-103a-915c-0ee556fef7d8','c3979b2a-659a-103a-ba01-d11e22512ef6'),('210900013',1,'BT','210700010',23900000,'',1,'0b1c81dc-709b-103a-915c-0ee556fef7d8','c3976a22-659a-103a-ba01-d11e22512ef6'),('211000001',1,'BT','211000005',27183765,'',1,'60f46e80-7623-103a-9681-22bb4424e71b','49c54d4f-73bc-103a-81bd-cf9ca151b185'),('211000002',1,'BT','211000003',25328520,'',1,'1deae650-7b98-103a-a8f7-6b7403b37a48','5d6cee5b-77b9-103a-9681-22bb4424e71b'),('211000003',1,'BT','211000004',23763600,'',1,'23fc851a-7b98-103a-a8f7-6b7403b37a48','8bc91425-7a04-103a-87c0-e6408d0264ef'),('211000004',1,'BT','211000001',25279170,'',1,'c95f9e51-8116-103a-b723-a3e284ef20d0','e267fc30-7d4b-103a-b981-aed008b67a3f'),('211000005',1,'BT','211000006',24129000,'',1,'2a5ee464-8697-103a-b723-a3e284ef20d0','258c3681-842f-103a-b723-a3e284ef20d0'),('211000006',1,'BT','211000008',27500000,'',1,'c961fefe-8827-103a-afd3-856465ccd1b2','28620479-812b-103a-b723-a3e284ef20d0'),('211000007',1,'BT','210800019',17110000,'',1,'252548d0-73bb-103a-81bd-cf9ca151b185','c397f15e-659a-103a-ba01-d11e22512ef6'),('211000008',1,'BT','210800017',33107040,'',1,'35169c43-73bb-103a-81bd-cf9ca151b185','c397d96f-659a-103a-ba01-d11e22512ef6'),('211000009',1,'BT','210800032',48643200,'',1,'c8bb7cb4-7625-103a-9681-22bb4424e71b','c397adc2-659a-103a-ba01-d11e22512ef6'),('211000010',1,'BT','210800031',20696000,'',1,'788f9f04-7625-103a-9681-22bb4424e71b','c397a0cc-659a-103a-ba01-d11e22512ef6'),('211000011',1,'BT','210700004',27782000,'',1,'087d276c-7938-103a-87c0-e6408d0264ef','c3973fd4-659a-103a-ba01-d11e22512ef6'),('211000012',1,'BT','210800020',32140800,'',1,'19a8f30b-793b-103a-87c0-e6408d0264ef','c3981589-659a-103a-ba01-d11e22512ef6'),('211000013',1,'BT','210800022',4455000,'',1,'0db7f5f2-793b-103a-87c0-e6408d0264ef','c3982bc6-659a-103a-ba01-d11e22512ef6'),('211000014',1,'BT','210800029',20800000,'',1,'ee64d43a-79fb-103a-87c0-e6408d0264ef','c397d7d9-659a-103a-ba01-d11e22512ef6'),('211000015',1,'BT','210800004',10620000,'',1,'acb928af-7a10-103a-87c0-e6408d0264ef','c3979215-659a-103a-ba01-d11e22512ef6'),('211000016',1,'BT','210800023',17841600,'',1,'07feeeb3-7b92-103a-a8f7-6b7403b37a48','c397a49d-659a-103a-ba01-d11e22512ef6'),('211000017',1,'BT','210800006',10080000,'',1,'0bd362cf-7d27-103a-b981-aed008b67a3f','c397c3ab-659a-103a-ba01-d11e22512ef6'),('211000018',1,'BT','210700006',69868000,'',1,'4039d733-7ebb-103a-a265-507f8e4cce28','c39782e5-659a-103a-ba01-d11e22512ef6'),('211000019',1,'BT','210700001',18271500,'',1,'03c5be7b-7ebc-103a-a265-507f8e4cce28','c3972d02-659a-103a-ba01-d11e22512ef6'),('211000020',1,'BT','210800010',69593000,'',1,'5352df30-7ebb-103a-a265-507f8e4cce28','c397e900-659a-103a-ba01-d11e22512ef6'),('211000021',1,'BT','210800025',17575000,'',1,'4b420abd-8136-103a-b723-a3e284ef20d0','c398023e-659a-103a-ba01-d11e22512ef6'),('211000022',1,'BT','210800026',23400000,'',1,'445d4502-8136-103a-b723-a3e284ef20d0','c397f330-659a-103a-ba01-d11e22512ef6'),('211000023',1,'BT','210800028',18712500,'',1,'5239e671-8136-103a-b723-a3e284ef20d0','c398582b-659a-103a-ba01-d11e22512ef6'),('211000024',1,'BT','210900005',32140800,'',1,'b1882feb-843b-103a-b723-a3e284ef20d0','c39881b6-659a-103a-ba01-d11e22512ef6'),('211000025',1,'BT','210700008',1014120,'',1,'82d6d8e3-843b-103a-b723-a3e284ef20d0','c3975c49-659a-103a-ba01-d11e22512ef6'),('211000026',1,'BT','210800018',32140800,'',1,'a3bba249-843b-103a-b723-a3e284ef20d0','c39850e4-659a-103a-ba01-d11e22512ef6'),('211000027',1,'BT','210700007',7918000,'',1,'7747da35-843b-103a-b723-a3e284ef20d0','c3973ca0-659a-103a-ba01-d11e22512ef6'),('211000028',1,'BT','210900007',32140800,'',1,'c6f434f2-843b-103a-b723-a3e284ef20d0','c398a821-659a-103a-ba01-d11e22512ef6'),('211000029',1,'BT','210800009',14053000,'',1,'9731afc8-843b-103a-b723-a3e284ef20d0','c3986560-659a-103a-ba01-d11e22512ef6'),('211000030',1,'BT','210800007',14750458,'',1,'73ac01c3-8511-103a-b723-a3e284ef20d0','c397e1cb-659a-103a-ba01-d11e22512ef6'),('211000031',1,'BT','210800030',21373000,'',1,'25cdf0f2-8828-103a-afd3-856465ccd1b2','c398672b-659a-103a-ba01-d11e22512ef6'),('211000032',1,'BT','210800008',29696900,'',1,'37f3e5ce-8a85-103a-8d76-fb1c97a46d36','c397ff0d-659a-103a-ba01-d11e22512ef6'),('211000033',1,'BT','210700009',47905500,'',1,'e66afcda-89b6-103a-afd3-856465ccd1b2','c39761c2-659a-103a-ba01-d11e22512ef6'),('211000034',1,'BT','210800011',48703500,'',1,'ecc628fa-89b6-103a-afd3-856465ccd1b2','c397b95f-659a-103a-ba01-d11e22512ef6'),('211000035',1,'BT','210800021',70250250,'',1,'160bcd93-89b7-103a-afd3-856465ccd1b2','c3981dca-659a-103a-ba01-d11e22512ef6'),('211100001',1,'BT','211000007',22729518,'',1,'27447240-8c1a-103a-8d76-fb1c97a46d36','61048562-84fc-103a-b723-a3e284ef20d0'),('211100002',1,'BT','211000002',25336885,'',1,'2d0ffe95-8c1a-103a-8d76-fb1c97a46d36','885cdb9c-8855-103a-afd3-856465ccd1b2'),('211100003',1,'BT','210800036',20400000,'',1,'2344d96f-8c06-103a-8d76-fb1c97a46d36','c3981c12-659a-103a-ba01-d11e22512ef6'),('211100004',1,'BT','210900024',49008960,'',1,'6f5a2774-9717-103a-a744-624e61fccb07','c398853e-659a-103a-ba01-d11e22512ef6'),('211100005',1,'BT','210900023',42831360,'',1,'a369d369-9717-103a-a744-624e61fccb07','c3989606-659a-103a-ba01-d11e22512ef6'),('211100006',1,'BT','210900020',10400000,'',1,'3f584189-94ac-103a-a744-624e61fccb07','8c7bdda9-6809-103a-ba01-d11e22512ef6'),('211100007',1,'BT','210900004',37785600,'',1,'883f8db5-94ba-103a-a744-624e61fccb07','973ed277-7251-103a-81bd-cf9ca151b185'),('211100008',1,'BT','210800005',1250000,'',1,'0fbce443-932c-103a-aa74-708754125b93','c397de99-659a-103a-ba01-d11e22512ef6'),('211100009',1,'BT','210800003',17712000,'',1,'049601ff-932c-103a-aa74-708754125b93','c39788a6-659a-103a-ba01-d11e22512ef6'),('211100010',1,'BT','210900021',20696000,'',1,'3950ead8-9289-103a-aa74-708754125b93','6a60c867-6684-103a-ba01-d11e22512ef6'),('211100011',1,'BT','210900016',23140000,'',1,'aad4d2f4-91bf-103a-aa74-708754125b93','c3988838-659a-103a-ba01-d11e22512ef6'),('211100012',1,'BT','210800034',20247000,'',1,'1b611df0-9198-103a-aa74-708754125b93','c3985bd0-659a-103a-ba01-d11e22512ef6'),('211100013',1,'BT','210800033',5950000,'',1,'688113d1-9198-103a-aa74-708754125b93','c3985da4-659a-103a-ba01-d11e22512ef6'),('211100014',1,'BT','210900008',23427360,'',1,'dda62d5f-8f50-103a-aa74-708754125b93','8cd7eb9a-6d82-103a-8058-c946033d2811'),('211100015',1,'BT','210700003',2120000,'',1,'7e2d544f-8f4e-103a-aa74-708754125b93','c39733e0-659a-103a-ba01-d11e22512ef6'),('211100016',1,'BT','210800001',5435000,'',1,'c44eda6b-8f4e-103a-aa74-708754125b93','c3986ffc-659a-103a-ba01-d11e22512ef6'),('211100017',1,'BT','210800035',49193280,'',1,'29b7730f-8c06-103a-8d76-fb1c97a46d36','c3982a2c-659a-103a-ba01-d11e22512ef6'),('211100018',1,'BT','210800002',16280000,'',1,'ec3a3fce-8c02-103a-8d76-fb1c97a46d36','c397c6c8-659a-103a-ba01-d11e22512ef6'),('211100019',1,'BT','211000013',18750000,'',1,'7b05763b-a233-103a-bc93-b87c43dc8609','4d67c7a4-749c-103a-8737-e4f729e70b81'),('211100020',1,'BT','210900026',20800000,'',1,'9bbf601d-a22b-103a-bc93-b87c43dc8609','f7980091-6bfa-103a-ba01-d11e22512ef6'),('211100021',1,'BT','211000039',18720000,'',1,'666e92f6-a23e-103a-bc93-b87c43dc8609','4fc60d87-7496-103a-8737-e4f729e70b81'),('211100022',1,'BT','210900017',18750000,'',1,'7485a589-a233-103a-bc93-b87c43dc8609','1cec1f26-7300-103a-81bd-cf9ca151b185'),('211100023',1,'BT','210900011',40176000,'',1,'8b0fa967-9fb1-103a-8fb7-03f9d648e190','59218cfe-717f-103a-81bd-cf9ca151b185'),('211100024',1,'BT','211000024',4087500,'',1,'d5f45be5-9fbb-103a-8fb7-03f9d648e190','04b1b0ee-7fa8-103a-a265-507f8e4cce28'),('211100025',1,'BT','211000021',15024750,'',1,'ca1256f3-9fbb-103a-8fb7-03f9d648e190','bc361dd5-77cb-103a-9681-22bb4424e71b'),('211100026',1,'BT','211000023',23108000,'',1,'d0003e4b-9fbb-103a-8fb7-03f9d648e190','fe974c3a-7d4a-103a-b981-aed008b67a3f'),('211100027',1,'BT','211100002',25807820,'',1,'c5444fef-9c97-103a-9f42-42448efe4d88','be32416d-97ff-103a-aa37-829253eba060'),('211100028',1,'BT','210900012',10712000,'',1,'9050b7f9-9ca5-103a-9f42-42448efe4d88','15c22cb5-6f19-103a-915c-0ee556fef7d8'),('211100029',1,'BT','210900009',1056000,'',1,'c40f1081-9c8b-103a-9f42-42448efe4d88','4379a00d-6ca1-103a-8058-c946033d2811'),('211100030',1,'BT','210900018',20800000,'',1,'c9224168-9c98-103a-9f42-42448efe4d88','73667765-6e58-103a-8058-c946033d2811'),('211100031',1,'BT','211100004',3300000,'',1,'995e7b0a-9ca5-103a-9f42-42448efe4d88','acfea224-94ef-103a-a744-624e61fccb07'),('211100032',1,'BT','211100001',25088085,'',1,'bf67fc47-9c97-103a-9f42-42448efe4d88','0d563bb4-9342-103a-aa74-708754125b93'),('211100033',1,'BT','210900013',9321000,'',1,'89c158f9-9ca5-103a-9f42-42448efe4d88','e90a2251-6f18-103a-915c-0ee556fef7d8'),('211100034',1,'BT','210900002',4235000,'',1,'ab077646-9a53-103a-b45d-96ebd877ca8f','3d0a29b7-6971-103a-ba01-d11e22512ef6'),('211100035',1,'BT','211000019',24012000,'',1,'1da6fed2-9a56-103a-b45d-96ebd877ca8f','c0e29ffa-748d-103a-8737-e4f729e70b81'),('211100036',1,'BT','210900019',19916000,'',1,'c21a5c05-9a2c-103a-b45d-96ebd877ca8f','a9ffc461-6cbc-103a-8058-c946033d2811'),('211100037',1,'BT','210900006',94132500,'',1,'fbb85b7c-9a55-103a-b45d-96ebd877ca8f','c3989273-659a-103a-ba01-d11e22512ef6'),('211100038',1,'BT','210900003',10340000,'',1,'a49f5b4d-9a53-103a-b45d-96ebd877ca8f','c398940d-659a-103a-ba01-d11e22512ef6'),('211100039',1,'BT','211000022',13500000,'',1,'0f220314-9a56-103a-b45d-96ebd877ca8f','dd74a920-77cb-103a-9681-22bb4424e71b'),('211100040',1,'BT','210900022',21012500,'',1,'aa34095c-9717-103a-a744-624e61fccb07','c39897a1-659a-103a-ba01-d11e22512ef6'),('211200001',1,'BT','211000028',32826240,'',1,'a6f99850-a538-103a-a679-5e3c12a8146a','1c9b4d43-8212-103a-b723-a3e284ef20d0'),('211200002',1,'BT','211000026',16350000,'',1,'8e0367ec-a538-103a-a679-5e3c12a8146a','afb26aaf-8138-103a-b723-a3e284ef20d0'),('211200003',1,'BT','211000029',33062400,'',1,'aef639dc-a538-103a-a679-5e3c12a8146a','38f0ca4c-8212-103a-b723-a3e284ef20d0'),('211200004',1,'BT','211000027',28704000,'',1,'9a554643-a538-103a-a679-5e3c12a8146a','335a83e4-8139-103a-b723-a3e284ef20d0'),('211200005',1,'BT','211100022',25740000,'',1,'fa6c682b-a45b-103a-a679-5e3c12a8146a','36792f6e-9f0f-103a-a242-4db5a4167f3b'),('211200006',1,'BT','211000042',7810000,'',1,'80f7bd62-b9a4-103a-904c-05403444b9d4','ddd98cc2-86b9-103a-b723-a3e284ef20d0'),('211200007',1,'BT','211000038',20748000,'',1,'0638e0bc-b9c2-103a-904c-05403444b9d4','b676e160-8a8d-103a-8d76-fb1c97a46d36'),('211200008',1,'BT','211100007',20250000,'',1,'047473d7-b99a-103a-904c-05403444b9d4','dfa53f70-8dd0-103a-bb13-b3e5644221dc'),('211200009',1,'BT','211200024',21200000,'',1,'8a3cff9e-b9a4-103a-904c-05403444b9d4','34b3dbfd-b055-103a-a2b7-4e372a2f6b8d'),('211200010',1,'BT','211200025',17468000,'',1,'92eecb35-b9a4-103a-904c-05403444b9d4','fe946e1f-b5d2-103a-8c26-f47a873573a4'),('211200011',1,'BT','211000043',23074000,'',1,'794559c9-b9a4-103a-904c-05403444b9d4','311fa90d-81e0-103a-b723-a3e284ef20d0'),('211200012',1,'BT','211000015',16875000,'',1,'47dc21c6-b8e1-103a-904c-05403444b9d4','5e05ec27-8779-103a-b723-a3e284ef20d0'),('211200013',1,'BT','211000011',11000000,'',1,'4d42bf24-b8e1-103a-904c-05403444b9d4','cd259b9d-89e5-103a-afd3-856465ccd1b2'),('211200014',1,'BT','211000016',3373920,'',1,'05c616bb-b824-103a-904c-05403444b9d4','049843fb-877a-103a-b723-a3e284ef20d0'),('211200015',1,'BT','211200017',25500000,'',1,'f45ba955-b823-103a-904c-05403444b9d4','389480ab-b381-103a-a61c-5b701e491280'),('211200016',1,'BT','211000014',24156000,'',1,'ffc80bc3-b823-103a-904c-05403444b9d4','35a097d2-86a8-103a-b723-a3e284ef20d0'),('211200017',1,'BT','211000036',35717760,'',1,'717b6bb8-b68c-103a-8c26-f47a873573a4','9c125089-8828-103a-afd3-856465ccd1b2'),('211200018',1,'BT','211100009',23400000,'',1,'15ff7a79-b5bc-103a-8c26-f47a873573a4','4169a3f2-9411-103a-aa74-708754125b93'),('211200019',1,'BT','211100012',16350000,'',1,'25e2ce52-b5bc-103a-8c26-f47a873573a4','4db15559-9731-103a-a744-624e61fccb07'),('211200020',1,'BT','211100010',30185000,'',1,'1b276f1b-b5bc-103a-8c26-f47a873573a4','beaaf445-9572-103a-a744-624e61fccb07'),('211200021',1,'BT','211100013',18389000,'',1,'3c2a95dc-b5bc-103a-8c26-f47a873573a4','2605875f-97fe-103a-aa37-829253eba060'),('211200022',1,'BT','211100008',37785600,'',1,'0f03edcd-b5bc-103a-8c26-f47a873573a4','94df8f82-9251-103a-aa74-708754125b93'),('211200023',1,'BT','211100011',9120000,'',1,'20d94db5-b5bc-103a-8c26-f47a873573a4','1f5d2c9c-9731-103a-a744-624e61fccb07'),('211200024',1,'BT','211200016',20790000,'',1,'2904eff5-b11c-103a-a2b7-4e372a2f6b8d','5fac50af-ad3e-103a-9534-19141b4c2af1'),('211200025',1,'BT','211000034',30091000,'',1,'47cb89f9-b053-103a-a2b7-4e372a2f6b8d','32a4596f-891b-103a-afd3-856465ccd1b2'),('211200026',1,'BT','211000020',20000000,'',1,'59d9fd00-b053-103a-a2b7-4e372a2f6b8d','bfd45363-8c23-103a-8d76-fb1c97a46d36'),('211200027',1,'BT','210900001',5005000,'',1,'404d7deb-b03d-103a-a2b7-4e372a2f6b8d','f46b5e24-6c99-103a-8058-c946033d2811'),('211200028',1,'BT','211000017',28211250,'',1,'4e7f16ec-b053-103a-a2b7-4e372a2f6b8d','52432601-89e4-103a-afd3-856465ccd1b2'),('211200029',1,'BT','211000037',20696000,'',1,'c211b713-b03d-103a-a2b7-4e372a2f6b8d','63caa347-8460-103a-b723-a3e284ef20d0'),('211200030',1,'BT','211000018',4983560,'',1,'547cdb6f-b053-103a-a2b7-4e372a2f6b8d','ba973dc9-89e4-103a-afd3-856465ccd1b2'),('211200031',1,'BT','211000035',48500000,'',1,'0a16629f-aed1-103a-96f4-2073e10ea306','b89998b5-81e9-103a-b723-a3e284ef20d0'),('211200032',1,'BT','211000009',26000000,'',1,'1fe650f7-ad2d-103a-9534-19141b4c2af1','13a4bae8-7d4c-103a-b981-aed008b67a3f'),('211200033',1,'BT','211000010',26000000,'',1,'256dfc52-ad2d-103a-9534-19141b4c2af1','6543388e-7ee5-103a-a265-507f8e4cce28'),('211200034',1,'BT','211000031',13455000,'',1,'0938d742-aabd-103a-9534-19141b4c2af1','0cd52260-8517-103a-b723-a3e284ef20d0'),('211200035',1,'BT','211000032',32536500,'',1,'10cc64c5-aabd-103a-9534-19141b4c2af1','9f0293af-86b9-103a-b723-a3e284ef20d0'),('211200036',1,'BT','211000030',21800000,'',1,'0386c040-aabd-103a-9534-19141b4c2af1','b7e24943-8390-103a-b723-a3e284ef20d0'),('211200037',1,'BT','211000033',32482000,'',1,'18c44937-aabd-103a-9534-19141b4c2af1','f834199a-8789-103a-b723-a3e284ef20d0'),('211200038',1,'BT','210900025',20696000,'',1,'d826ec36-a924-103a-a2be-50c1d8f64883','f03a9228-7163-103a-81bd-cf9ca151b185'),('211200039',1,'BT','211000041',5440000,'',1,'ddbfbb96-a924-103a-a2be-50c1d8f64883','4462e7ef-7a03-103a-87c0-e6408d0264ef'),('211200040',1,'BT','211000025',16295500,'',1,'851efb4c-a538-103a-a679-5e3c12a8146a','51d70f2b-7fa8-103a-a265-507f8e4cce28'),('211200041',1,'BT','211000012',11500000,'',1,'f93c12f4-b999-103a-904c-05403444b9d4','21e2677d-89e6-103a-afd3-856465ccd1b2');

DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `ScrBayarBeliAdd` AFTER INSERT ON `tr_scrbayarbeli` FOR EACH ROW BEGIN

declare vTransbeli varchar (2);

DECLARE vNoBeli varchar (11);

DECLARE vNilai double; 

DECLARE vTglBatal datetime;

Declare vKodeSupp varchar(10);

declare vNoBayar varchar(11);

declare vExrate integer;

select ifnull(TransBeli,''), ifnull(NoBeli,''), ifnull(Nilai,0), ifnull(ExRate,1) into  vTransbeli, vNoBeli, vNilai ,vexrate 

from Tr_ScrBayarBeli where NoBayarB = new.NobayarB and ItemSBayarB=new.ItemSBayarB;

select Tglbatal,KodeSupp into vTglbatal,vKodeSupp from tr_BayarBeli_M where NoBayarB=new.NoBayarB;

if ifnull(vTglBatal,'')='' then

# update tr_beli_m set Sisa=ifnull(Sisa,0)-new.Nilai where NoBeli=vNoBeli and TransBeli=vTransBeli;

 update tM_Supplier set hutang= ifnull(Hutang,0)-new.Nilai*new.ExRate where KodeSupp=vKodeSupp;

END if;

end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `ScrBayarBeliUpdate` AFTER UPDATE ON `tr_scrbayarbeli` FOR EACH ROW BEGIN
declare vTransBelibaru varchar(2);
DECLARE vNoBeliBaru varchar(11);
DECLARE vNilaiBaru double; 
DECLARE vTglBatal datetime;
Declare vKodeSupp varchar(10);
declare vNoBayar varchar(11);
declare vExrateBaru integer;
declare vExrateLama integer;
declare vTransBelilama varchar(2);
declare vNoBeliLama varchar(11);
DECLARE vNilaiLama double; 
select ifnull(TransBeli,''), ifnull(NoBeli,''), ifnull(Nilai,0), ifnull(ExRate,1) into  vTransbeliBaru, vNoBeliBaru, vNilaiBaru ,vexrateBaru 
from Tr_ScrBayarBeli where NoBayarB = new.NobayarB and ItemSBayarB=new.ItemSBayarB;
select Tglbatal,KodeSupp into vTglbatal,vKodeSupp from tr_BayarBeli_M where NoBayarB=new.NoBayarB;
if ifnull(vTglBatal,'')='' then
 update tr_beli_m set Sisa=ifnull(Sisa,0)+Old.Nilai where NoBeli=Old.NoBeli and TransBeli=Old.TransBeli;
 update tr_beli_m set Sisa=ifnull(Sisa,0)-New.Nilai where NoBeli=New.NoBeli and TransBeli=New.TransBeli;
 update tM_Supplier set hutang= ifnull(Hutang,0)+(Old.Nilai*Old.ExRate ) where KodeSupp=vKodeSupp;
 update tM_Supplier set hutang= ifnull(Hutang,0)-(New.Nilai*New.ExRate) where KodeSupp=vKodeSupp;
END if;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `ScrBayarBeliDelete` AFTER DELETE ON `tr_scrbayarbeli` FOR EACH ROW BEGIN
declare vTransBelibaru varchar(2);
DECLARE vNoBeliBaru varchar(11);
DECLARE vNilaiBaru double; 
DECLARE vTglBatal datetime;
Declare vKodeSupp varchar(10);
declare vNoBayar varchar(11);
declare vExrateBaru integer;
declare vExrateLama integer;
declare vTransBelilama varchar(2);
declare vNoBeliLama varchar(11);
DECLARE vNilaiLama double; 
select ifnull(TransBeli,''), ifnull(NoBeli,''), ifnull(Nilai,0), ifnull(ExRate,1) into  vTransbeliBaru, vNoBeliBaru, vNilaiBaru ,vexrateBaru 
from Tr_ScrBayarBeli where NoBayarB = Old.NobayarB and ItemSBayarB=old.ItemSBayarB;
select Tglbatal,KodeSupp into vTglbatal,vKodeSupp from tr_BayarBeli_M where NoBayarB=Old.NoBayarB;
if ifnull(vTglBatal,'')='' then
 update tr_beli_m set Sisa=ifnull(Sisa,0)+Old.Nilai  where NoBeli=Old.NoBeli and TransBeli=Old.TransBeli;
 update tM_Supplier set hutang= ifnull(Hutang,0)+(Old.Nilai*Old.ExRate)  where KodeSupp=vKodeSupp;
END if;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_scrbayarjual`
--

CREATE TABLE `tr_scrbayarjual` (
  `NoBayarJ` varchar(11) NOT NULL default '',
  `ItemSBayarJ` int(11) NOT NULL default '0',
  `TransJual` varchar(2) default NULL,
  `NoJual` varchar(11) default NULL,
  `Nilai` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  PRIMARY KEY  (`NoBayarJ`,`ItemSBayarJ`),
  KEY `fk_tr_ScrBayarJual1` (`NoBayarJ`),
  KEY `fk_tr_ScrBayarJual2` (`TransJual`,`NoJual`),
  CONSTRAINT `fk_tr_ScrBayarJual3` FOREIGN KEY (`NoBayarJ`) REFERENCES `tr_bayarjual_m` (`NoBayarJ`) ON DELETE CASCADE,
  CONSTRAINT `fk_tr_ScrBayarJual4` FOREIGN KEY (`TransJual`, `NoJual`) REFERENCES `tr_jual_m` (`TransJual`, `NoJual`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_scrbayarjual`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `ScrBayarJualDelete` AFTER DELETE ON `tr_scrbayarjual` FOR EACH ROW BEGIN
declare vTransJual varchar (2);
DECLARE vNoJual varchar (11);
DECLARE vNilai double; 
DECLARE vTglBatal datetime;
Declare vKodeCust varchar(10);
declare vNoBayar varchar(11);
declare vExrate integer;
select Tglbatal,KodeCust into vTglbatal,vKodeCust from tr_BayarJual_M where NoBayarJ=Old.NoBayarJ;
  Update tr_jual_m set sisa =  ifnull(sisa,0) + old.nilai * old.exrate 
  where TransJual = old.TransJual and NoJual = old.NoJual;
  
  
end */;;

DELIMITER ;

--
-- Table structure for table `tr_scrbayarjualr`
--

CREATE TABLE `tr_scrbayarjualr` (
  `NoBayarJ` varchar(11) NOT NULL default '',
  `ItemSBayarJ` int(11) NOT NULL default '0',
  `TransJual` varchar(2) default NULL,
  `NoJual` varchar(11) default NULL,
  `Nilai` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  `isPindah` smallint(6) NOT NULL default '0',
  `UID` char(36) default NULL,
  `UIDTrans` char(36) default NULL,
  PRIMARY KEY  (`NoBayarJ`,`ItemSBayarJ`),
  KEY `fk_tr_ScrBayarJualR1` (`NoBayarJ`),
  KEY `fk_tr_ScrBayarJualR2` (`TransJual`,`NoJual`),
  CONSTRAINT `fk_ScrBayarJualR3` FOREIGN KEY (`NoBayarJ`) REFERENCES `tr_bayarjualr_m` (`NoBayarJ`) ON DELETE CASCADE,
  CONSTRAINT `fk_ScrBayarJualR4` FOREIGN KEY (`TransJual`, `NoJual`) REFERENCES `tr_jualr_m` (`TransRetail`, `NoJualR`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_scrbayarjualr`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `AfterDelScrBayarJualR` AFTER DELETE ON `tr_scrbayarjualr` FOR EACH ROW UPDATE tr_jualr_m SET SisaBayar=IFNULL(SisaBayar,0) + IFNULL(old.Nilai,0) WHERE Uid=old.UidTrans */;;

DELIMITER ;

--
-- Table structure for table `tr_scrbayarjualrakitan`
--

CREATE TABLE `tr_scrbayarjualrakitan` (
  `NoBayarJ` varchar(11) NOT NULL default '',
  `ItemSBayarJ` int(11) NOT NULL default '0',
  `TransJual` varchar(2) default NULL,
  `NoJual` varchar(11) default NULL,
  `Nilai` double default NULL,
  `Valas` varchar(10) default NULL,
  `ExRate` double default NULL,
  PRIMARY KEY  (`NoBayarJ`,`ItemSBayarJ`),
  KEY `fk_tr_ScrBayarJualrakitan1` (`NoBayarJ`),
  KEY `fk_tr_ScrBayarJualrakitan2` (`TransJual`,`NoJual`),
  CONSTRAINT `fk_tr_ScrBayarJualrakitan3` FOREIGN KEY (`NoBayarJ`) REFERENCES `tr_bayarjualrakitan_m` (`NoBayarJ`) ON DELETE CASCADE,
  CONSTRAINT `fk_tr_ScrBayarJualrakitan4` FOREIGN KEY (`TransJual`, `NoJual`) REFERENCES `tr_jualrakitan_m` (`TransJual`, `NoJual`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_scrbayarjualrakitan`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `ScrBayarJualRakitanAdd` AFTER INSERT ON `tr_scrbayarjualrakitan` FOR EACH ROW BEGIN
declare vTransJual varchar (2);
DECLARE vNoJual varchar (11);
DECLARE vNilai double; 
DECLARE vTglBatal datetime;
Declare vKodeCust varchar(10);
declare vNoBayar varchar(11);
declare vExrate integer;
select Tglbatal,KodeCust into vTglbatal,vKodeCust from tr_BayarJualRakitan_M where NoBayarJ=new.NoBayarJ;
  Update tr_JualRakitan_m set sisa =  ifnull(sisa,0) - new.nilai * new.exrate 
  where TransJual = New.TransJual and NoJual=New.NoJual;
  Update tm_customer set piutang =  ifnull(piutang,0) - new.nilai * new.exrate 
  where KodeCust = vKodeCust;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `ScrBayarJualRakitanUpdate` AFTER UPDATE ON `tr_scrbayarjualrakitan` FOR EACH ROW BEGIN
declare vTransJual varchar (2);
DECLARE vNoJual varchar (11);
DECLARE vNilai double; 
DECLARE vTglBatal datetime;
Declare vKodeCust varchar(10);
declare vNoBayar varchar(11);
declare vExrate integer;
select Tglbatal,KodeCust into vTglbatal,vKodeCust from tr_BayarJualRakitan_M where NoBayarJ=new.NoBayarJ;
  Update tr_JualRakitan_m set sisa =  ifnull(sisa,0) - new.nilai * new.exrate 
  where TransJual = New.TransJual and NoJual=New.NoJual;
  Update tr_JualRakitan_m set sisa =  ifnull(sisa,0) + old.nilai * old.exrate 
  where TransJual = old.TransJual and NoJual = old.NoJual;
  Update tm_customer set piutang =  ifnull(piutang,0) - new.nilai * new.exrate 
  where KodeCust = vKodeCust;
  Update tm_customer set piutang =  ifnull(piutang,0) + old.nilai * old.exrate 
  where KodeCust = vKodeCust;
end */;;

/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `ScrBayarJualRakitanDelete` AFTER DELETE ON `tr_scrbayarjualrakitan` FOR EACH ROW BEGIN
declare vTransJual varchar (2);
DECLARE vNoJual varchar (11);
DECLARE vNilai double; 
DECLARE vTglBatal datetime;
Declare vKodeCust varchar(10);
declare vNoBayar varchar(11);
declare vExrate integer;
select Tglbatal,KodeCust into vTglbatal,vKodeCust from tr_BayarJualRakitan_M where NoBayarJ=Old.NoBayarJ;
  Update tr_JualRakitan_m set sisa =  ifnull(sisa,0) + old.nilai * old.exrate 
  where TransJual = old.TransJual and NoJual = old.NoJual;
  Update tm_customer set piutang =  ifnull(piutang,0) + old.nilai * old.exrate 
  where KodeCust = vKodeCust;
end */;;

DELIMITER ;

--
-- Table structure for table `tr_scrbayartoko`
--

CREATE TABLE `tr_scrbayartoko` (
  `NoBayarT` varchar(11) NOT NULL default '',
  `ItemSBayarT` int(11) NOT NULL default '0',
  `NoNota` varchar(11) default NULL,
  `Nilai` double default NULL,
  `Keterangan` varchar(50) default NULL,
  `KodeToko` varchar(30) default NULL,
  `GDBayar` varchar(10) default NULL,
  PRIMARY KEY  (`NoBayarT`,`ItemSBayarT`),
  KEY `fk_tr_ScrBayarJual1` USING BTREE (`NoBayarT`),
  KEY `fk_tr_ScrBayarJual2` USING BTREE (`NoNota`),
  CONSTRAINT `tr_scrbayartoko_ibfk_1` FOREIGN KEY (`NoBayarT`) REFERENCES `tr_bayartoko_m` (`NoBayarT`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

--
-- Dumping data for table `tr_scrbayartoko`
--


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`coba`@`%` */ /*!50003 TRIGGER `DelScrBayarToko3` AFTER DELETE ON `tr_scrbayartoko` FOR EACH ROW BEGIN
IF old.keterangan = "Penjualan" THEN
       Update tr_jualr_d set isSdhBayarToko="N" where NoJualR=old.NoNota and KodeGD=old.GDBayar;
END IF;
IF old.keterangan = 'Mutasi Gudang' THEN
       Update tr_pindahGD_d set isSdhBayarToko="N" where NoPindahGD=old.NoNota and KodeGDTujuan=old.KodeToko;
END IF;
END */;;

DELIMITER ;

--
-- Table structure for table `tr_scrmodx`
--

CREATE TABLE `tr_scrmodx` (
  `NoModx` varchar(11) NOT NULL default '',
  `ItemModX` int(11) NOT NULL default '0',
  `Kodebrg` varchar(20) NOT NULL,
  `KodeGd` varchar(5) NOT NULL,
  `Jumlah` double default NULL,
  `Satuan` varchar(10) NOT NULL,
  `Konv` double default NULL,
  `BagHarga` double default NULL,
  PRIMARY KEY  (`NoModx`,`ItemModX`),
  KEY `fk_SCRModX2` (`Kodebrg`),
  KEY `fk_SCRModX3` (`KodeGd`),
  CONSTRAINT `fk_ScrModX1` FOREIGN KEY (`NoModx`) REFERENCES `tr_modx` (`NoModX`) ON DELETE CASCADE,
  CONSTRAINT `fk_SCRModX2` FOREIGN KEY (`Kodebrg`) REFERENCES `tm_barang` (`KodeBrg`),
  CONSTRAINT `fk_SCRModX3` FOREIGN KEY (`KodeGd`) REFERENCES `tm_gudang` (`KodeGd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tr_scrmodx`
--


--
-- Table structure for table `tuser`
--

CREATE TABLE `tuser` (
  `UserId` varchar(10) NOT NULL default '0',
  `UserName` varchar(25) default NULL,
  `Password` varchar(30) default NULL,
  `HakAkses` varchar(50) default NULL,
  `SuperUser` enum('Y','N','') default NULL,
  `IpLogin` varchar(15) default NULL,
  `NoUser` varchar(2) default NULL,
  PRIMARY KEY  (`UserId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tuser`
--

INSERT INTO `tuser` VALUES ('ABDULAZIZ','ABDUL AZIZ','sÍ•#€šÂKµY€ŸØ;K','02','Y','*',NULL),('ABDULKADIR','ABDUL KADIR','ž«~)`éëk—=-sS Z','01','Y','*',NULL),('admin','admin','*\"ð‹Óu‡È¹þaUq„\'r','02','N','*',NULL),('ADMIRAL','ADMIRAL','\ZõG¦(ORp±Z€O™¸¥','04','N','*',NULL),('AGUNG','AGUNG','Æxl†ôõvšÑ÷ã','03','N','*',NULL),('AGUS','AGUS','­òÚ:ýVö]ÅõÌÛ','05','N','*',NULL),('ANDI','ANDI','Fßg=†ž…\n:v,ƒDÏ¯','05','N','*',NULL),('ARSENAL','ARSENAL','\\ßg·‚\'\nDÇ´©¢´','01','Y','*',NULL),('KHOIRIYAH','KHOIRIYAH','[îãsxƒî·FFj¤f€@','04','N','*',NULL),('link','link','[š7 ‚ŸÆ>êƒ\nl c','01','Y','*','3'),('PRAS','PRAS','&Ÿòlõ/ÎÉS[—b†¦','05','N','*',NULL),('SALEH','SALEH','Ÿ\\ŒØ÷ÔëžúšÑKð\0','02','Y','*',NULL),('sugeng','sugeng','®†ÒÓ×d\\Û“óJm\rÀ	','05','N','*',NULL),('yanti','yamti','íÚv/X·±l,®@Ü„','01','Y','*',NULL);

--
-- Table structure for table `tuserlevel`
--

CREATE TABLE `tuserlevel` (
  `userlevel_id` varchar(2) NOT NULL,
  `menu` varchar(6) NOT NULL,
  `status` varchar(1) default NULL,
  `Ket_level` varchar(20) default NULL,
  PRIMARY KEY  (`userlevel_id`,`menu`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tuserlevel`
--

INSERT INTO `tuserlevel` VALUES ('01','010000','1','Management'),('01','010100','1','Management'),('01','010200','1','Management'),('01','010300','1','Management'),('01','010400','1','Management'),('01','010500','1','Management'),('01','010600','0','Management'),('01','010700','1','Management'),('01','010800','1','Management'),('01','010900','1','Management'),('01','020000','1','Management'),('01','020100','1','Management'),('01','020200','1','Management'),('01','020300','1','Management'),('01','020400','1','Management'),('01','020500','1','Management'),('01','020600','1','Management'),('01','020700','0','Management'),('01','020800','1','Management'),('01','020900','0','Management'),('01','021000','0','Management'),('01','030000','1','Management'),('01','030100','1','Management'),('01','030101','1','Management'),('01','030102','1','Management'),('01','030103','1','Management'),('01','030104','1','Management'),('01','040000','1','Management'),('01','040100','1','Management'),('01','040101','1','Management'),('01','040102','1','Management'),('01','040200','1','Management'),('01','040201','1','Management'),('01','040202','1','Management'),('01','040300','1','Management'),('01','040301','1','Management'),('01','040302','1','Management'),('01','040400','0','Management'),('01','040401','0','Management'),('01','040402','0','Management'),('01','040500','0','Management'),('01','040501','0','Management'),('01','040502','0','Management'),('01','040800','0','Management'),('01','040801','1','Management'),('01','040802','1','Management'),('01','050000','1','Management'),('01','050100','1','Management'),('01','050101','1','Management'),('01','050102','1','Management'),('01','050110','1','Management'),('01','050111','1','Management'),('01','050112','1','Management'),('01','050120','1','Management'),('01','050121','1','Management'),('01','050122','1','Management'),('01','050200','1','Management'),('01','050201','1','Management'),('01','050202','1','Management'),('01','050300','0','Management'),('01','050301','0','Management'),('01','050302','0','Management'),('01','050400','0','Management'),('01','050401','1','Management'),('01','050402','1','Management'),('01','050500','0','Management'),('01','050501','1','Management'),('01','050502','1','Management'),('01','050600','0','Management'),('01','050601','1','Management'),('01','050602','1','Management'),('01','050700','0','Management'),('01','050701','0','Management'),('01','050702','0','Management'),('01','050800','0','Management'),('01','050801','0','Management'),('01','050802','0','Management'),('01','050803','0','Management'),('01','050900','0','Management'),('01','050901','0','Management'),('01','050902','0','Management'),('01','051000','0','Management'),('01','051001','0','Management'),('01','051002','0','Management'),('01','051100','1','Management'),('01','051101','1','Management'),('01','051102','1','Management'),('01','052000','0','Management'),('01','052001','1','Management'),('01','052002','1','Management'),('01','060000','1','Management'),('01','060100','1','Management'),('01','060101','1','Management'),('01','060102','1','Management'),('01','060103','1','Management'),('01','060104','1','Management'),('01','060105','1','Management'),('01','060106','1','Management'),('01','060107','1','Management'),('01','060108','1','Management'),('01','060109','1','Management'),('01','060200','1','Management'),('01','060300','1','Management'),('01','060400','1','Management'),('01','060401','1','Management'),('01','060402','1','Management'),('01','060403','1','Management'),('01','060404','1','Management'),('01','060500','1','Management'),('01','060501','1','Management'),('01','060502','0','Management'),('01','060503','1','Management'),('01','060504','1','Management'),('01','060600','1','Management'),('01','060601','1','Management'),('01','060602','0','Management'),('01','060603','0','Management'),('01','060604','1','Management'),('01','060611','0','Management'),('01','060612','1','Management'),('01','060613','1','Management'),('01','060700','1','Management'),('01','060701','1','Management'),('01','060702','1','Management'),('01','060703','1','Management'),('01','060800','1','Management'),('01','060801','1','Management'),('01','060802','1','Management'),('01','060803','1','Management'),('01','060900','0','Management'),('01','060901','1','Management'),('01','060902','1','Management'),('01','060903','0','Management'),('01','060904','1','Management'),('01','061000','0','Management'),('01','061001','0','Management'),('01','061002','0','Management'),('01','061003','0','Management'),('01','061004','0','Management'),('01','061100','1','Management'),('01','061101','1','Management'),('01','061102','1','Management'),('01','061103','1','Management'),('01','061104','1','Management'),('01','070000','1','Management'),('01','070100','0','Management'),('01','070200','1','Management'),('01','070300','1','Management'),('01','070400','1','Management'),('01','070500','1','Management'),('01','070600','0','Management'),('01','070700','1','Management'),('01','080000','1','Management'),('01','080100','1','Management'),('01','080200','1','Management'),('01','080300','1','Management'),('01','090000','1','Management'),('01','090100','0','Management'),('01','090101','1','Management'),('01','090102','1','Management'),('01','090200','1','Management'),('01','090201','1','Management'),('01','090202','1','Management'),('01','090203','1','Management'),('01','090300','1','Management'),('01','090301','1','Management'),('01','090302','1','Management'),('01','090303','0','Management'),('01','090304','0','Management'),('01','090305','0','Management'),('01','100000','1','Management'),('01','110000','1','Management'),('02','010000','1','Kepala Outlet'),('02','010100','1','Kepala Outlet'),('02','010200','1','Kepala Outlet'),('02','010300','1','Kepala Outlet'),('02','010400','0','Kepala Outlet'),('02','010500','0','Kepala Outlet'),('02','010600','0','Kepala Outlet'),('02','010700','0','Kepala Outlet'),('02','010900','0','Kepala Outlet'),('02','020000','1','Kepala Outlet'),('02','020100','0','Kepala Outlet'),('02','020200','1','Kepala Outlet'),('02','020300','1','Kepala Outlet'),('02','020400','1','Kepala Outlet'),('02','020500','0','Kepala Outlet'),('02','020600','1','Kepala Outlet'),('02','020700','0','Kepala Outlet'),('02','020800','1','Kepala Outlet'),('02','020900','0','Kepala Outlet'),('02','030000','0','Kepala Outlet'),('02','030100','0','Kepala Outlet'),('02','040000','0','Kepala Outlet'),('02','040100','1','Kepala Outlet'),('02','040101','1','Kepala Outlet'),('02','040102','1','Kepala Outlet'),('02','040200','1','Kepala Outlet'),('02','040201','1','Kepala Outlet'),('02','040202','1','Kepala Outlet'),('02','040300','1','Kepala Outlet'),('02','040301','1','Kepala Outlet'),('02','040302','1','Kepala Outlet'),('02','040400','1','Kepala Outlet'),('02','040401','1','Kepala Outlet'),('02','040402','1','Kepala Outlet'),('02','040500','1','Kepala Outlet'),('02','040501','1','Kepala Outlet'),('02','040502','1','Kepala Outlet'),('02','040800','0','Kepala Outlet'),('02','040801','1','Kepala Outlet'),('02','040802','1','Kepala Outlet'),('02','050000','1','Kepala Outlet'),('02','050100','1','Kepala Outlet'),('02','050101','1','Kepala Outlet'),('02','050102','0','Kepala Outlet'),('02','050110','1','Kepala Outlet'),('02','050111','1','Kepala Outlet'),('02','050112','1','Kepala Outlet'),('02','050120','1','Kepala Outlet'),('02','050121','1','Kepala Outlet'),('02','050122','0','Kepala Outlet'),('02','050200','1','Kepala Outlet'),('02','050201','1','Kepala Outlet'),('02','050202','0','Kepala Outlet'),('02','050301','0','Kepala Outlet'),('02','050302','0','Kepala Outlet'),('02','050400','0','Kepala Outlet'),('02','050401','1','Kepala Outlet'),('02','050402','1','Kepala Outlet'),('02','050500','0','Kepala Outlet'),('02','050501','1','Kepala Outlet'),('02','050502','1','Kepala Outlet'),('02','050600','0','Kepala Outlet'),('02','050601','1','Kepala Outlet'),('02','050602','1','Kepala Outlet'),('02','050700','0','Kepala Outlet'),('02','050701','0','Kepala Outlet'),('02','050702','0','Kepala Outlet'),('02','050800','0','Kepala Outlet'),('02','050801','0','Kepala Outlet'),('02','050802','0','Kepala Outlet'),('02','050803','0','Kepala Outlet'),('02','050900','0','Kepala Outlet'),('02','050901','0','Kepala Outlet'),('02','050902','0','Kepala Outlet'),('02','051000','0','Kepala Outlet'),('02','051001','1','Kepala Outlet'),('02','051002','1','Kepala Outlet'),('02','052000','0','Kepala Outlet'),('02','052001','1','Kepala Outlet'),('02','052002','1','Kepala Outlet'),('02','060000','1','Kepala Outlet'),('02','060100','0','Kepala Outlet'),('02','060101','0','Kepala Outlet'),('02','060102','0','Kepala Outlet'),('02','060103','0','Kepala Outlet'),('02','060104','0','Kepala Outlet'),('02','060105','1','Kepala Outlet'),('02','060106','1','Kepala Outlet'),('02','060107','1','Kepala Outlet'),('02','060108','1','Kepala Outlet'),('02','060109','0','Kepala Outlet'),('02','060200','1','Kepala Outlet'),('02','060300','1','Kepala Outlet'),('02','060400','1','Kepala Outlet'),('02','060401','1','Kepala Outlet'),('02','060402','1','Kepala Outlet'),('02','060403','1','Kepala Outlet'),('02','060404','0','Kepala Outlet'),('02','060500','1','Kepala Outlet'),('02','060501','1','Kepala Outlet'),('02','060502','0','Kepala Outlet'),('02','060503','1','Kepala Outlet'),('02','060504','1','Kepala Outlet'),('02','060600','1','Kepala Outlet'),('02','060601','1','Kepala Outlet'),('02','060602','0','Kepala Outlet'),('02','060603','1','Kepala Outlet'),('02','060604','1','Kepala Outlet'),('02','060611','0','Kepala Outlet'),('02','060612','1','Kepala Outlet'),('02','060613','1','Kepala Outlet'),('02','060700','0','Kepala Outlet'),('02','060701','1','Kepala Outlet'),('02','060702','1','Kepala Outlet'),('02','060703','1','Kepala Outlet'),('02','060800','1','Kepala Outlet'),('02','060801','1','Kepala Outlet'),('02','060802','1','Kepala Outlet'),('02','060900','0','Kepala Outlet'),('02','060901','1','Kepala Outlet'),('02','060902','1','Kepala Outlet'),('02','060903','1','Kepala Outlet'),('02','060904','1','Kepala Outlet'),('02','061000','0','Kepala Outlet'),('02','061001','1','Kepala Outlet'),('02','061002','1','Kepala Outlet'),('02','061003','1','Kepala Outlet'),('02','061004','1','Kepala Outlet'),('02','061100','0','Kepala Outlet'),('02','061101','1','Kepala Outlet'),('02','061102','1','Kepala Outlet'),('02','061104','1','Kepala Outlet'),('02','070000','0','Kepala Outlet'),('02','070100','0','Kepala Outlet'),('02','070200','0','Kepala Outlet'),('02','070400','0','Kepala Outlet'),('02','070500','0','Kepala Outlet'),('02','070600','0','Kepala Outlet'),('02','080000','1','Kepala Outlet'),('02','080100','1','Kepala Outlet'),('02','080200','1','Kepala Outlet'),('02','080300','0','Kepala Outlet'),('02','090000','1','Kepala Outlet'),('02','090100','0','Kepala Outlet'),('02','090101','1','Kepala Outlet'),('02','090102','1','Kepala Outlet'),('02','090203','0','Kepala Outlet'),('02','090300','1','Kepala Outlet'),('02','090301','1','Kepala Outlet'),('02','090302','1','Kepala Outlet'),('02','100000','1','Kepala Outlet'),('02','110000','1','Kepala Outlet'),('03','010000','1','Akuntansi & Gudang'),('03','010100','1','Akuntansi & Gudang'),('03','010200','1','Akuntansi & Gudang'),('03','010300','1','Akuntansi & Gudang'),('03','020000','1','Akuntansi & Gudang'),('03','020100','0','Akuntansi & Gudang'),('03','020200','1','Akuntansi & Gudang'),('03','020300','0','Akuntansi & Gudang'),('03','020400','1','Akuntansi & Gudang'),('03','020700','0','Akuntansi & Gudang'),('03','020800','1','Akuntansi & Gudang'),('03','030000','0','Akuntansi & Gudang'),('03','030100','1','Akuntansi & Gudang'),('03','040000','1','Akuntansi & Gudang'),('03','040100','1','Akuntansi & Gudang'),('03','040101','1','Akuntansi & Gudang'),('03','040102','1','Akuntansi & Gudang'),('03','040200','0','Akuntansi & Gudang'),('03','040201','0','Akuntansi & Gudang'),('03','040202','0','Akuntansi & Gudang'),('03','040300','1','Akuntansi & Gudang'),('03','040301','1','Akuntansi & Gudang'),('03','040302','1','Akuntansi & Gudang'),('03','040800','1','Akuntansi & Gudang'),('03','040801','1','Akuntansi & Gudang'),('03','040802','1','Akuntansi & Gudang'),('03','050000','1','Akuntansi & Gudang'),('03','050100','1','Akuntansi & Gudang'),('03','050102','1','Akuntansi & Gudang'),('03','050120','1','Akuntansi & Gudang'),('03','050121','1','Akuntansi & Gudang'),('03','050122','0','Akuntansi & Gudang'),('03','050200','0','Akuntansi & Gudang'),('03','050201','0','Akuntansi & Gudang'),('03','050202','0','Akuntansi & Gudang'),('03','050400','0','Akuntansi & Gudang'),('03','050401','1','Akuntansi & Gudang'),('03','050402','1','Akuntansi & Gudang'),('03','050500','0','Akuntansi & Gudang'),('03','050501','1','Akuntansi & Gudang'),('03','050502','1','Akuntansi & Gudang'),('03','050600','0','Akuntansi & Gudang'),('03','050601','1','Akuntansi & Gudang'),('03','050602','1','Akuntansi & Gudang'),('03','052000','1','Akuntansi & Gudang'),('03','052001','1','Akuntansi & Gudang'),('03','060000','1','Akuntansi & Gudang'),('03','060100','0','Akuntansi & Gudang'),('03','060101','1','Akuntansi & Gudang'),('03','060102','1','Akuntansi & Gudang'),('03','060103','1','Akuntansi & Gudang'),('03','060104','1','Akuntansi & Gudang'),('03','060105','1','Akuntansi & Gudang'),('03','060106','1','Akuntansi & Gudang'),('03','060107','1','Akuntansi & Gudang'),('03','060108','1','Akuntansi & Gudang'),('03','060200','1','Akuntansi & Gudang'),('03','060300','1','Akuntansi & Gudang'),('03','060400','1','Akuntansi & Gudang'),('03','060401','1','Akuntansi & Gudang'),('03','060402','1','Akuntansi & Gudang'),('03','060403','1','Akuntansi & Gudang'),('03','060500','1','Akuntansi & Gudang'),('03','060501','1','Akuntansi & Gudang'),('03','060502','0','Akuntansi & Gudang'),('03','060503','1','Akuntansi & Gudang'),('03','060504','1','Akuntansi & Gudang'),('03','060600','1','Akuntansi & Gudang'),('03','060601','1','Akuntansi & Gudang'),('03','060602','0','Akuntansi & Gudang'),('03','060603','1','Akuntansi & Gudang'),('03','060604','1','Akuntansi & Gudang'),('03','060611','1','Akuntansi & Gudang'),('03','060612','1','Akuntansi & Gudang'),('03','060613','1','Akuntansi & Gudang'),('03','060700','1','Akuntansi & Gudang'),('03','060701','1','Akuntansi & Gudang'),('03','060702','1','Akuntansi & Gudang'),('03','060703','1','Akuntansi & Gudang'),('03','060800','1','Akuntansi & Gudang'),('03','060801','1','Akuntansi & Gudang'),('03','060802','1','Akuntansi & Gudang'),('03','060900','0','Akuntansi & Gudang'),('03','060901','1','Akuntansi & Gudang'),('03','060902','1','Akuntansi & Gudang'),('03','060903','1','Akuntansi & Gudang'),('03','060904','1','Akuntansi & Gudang'),('03','061100','1','Akuntansi & Gudang'),('03','061101','1','Akuntansi & Gudang'),('03','061102','1','Akuntansi & Gudang'),('03','061104','1','Akuntansi & Gudang'),('03','080000','1','Akuntansi & Gudang'),('03','080200','1','Akuntansi & Gudang'),('03','090000','1','Akuntansi & Gudang'),('03','090100','1','Akuntansi & Gudang'),('03','090101','1','Akuntansi & Gudang'),('03','090102','1','Akuntansi & Gudang'),('03','090300','1','Akuntansi & Gudang'),('03','090301','1','Akuntansi & Gudang'),('03','090302','1','Akuntansi & Gudang'),('03','100000','1','Akuntansi & Gudang'),('03','110000','1','Akuntansi & Gudang'),('04','010000','1','Kasir'),('04','010100','0','Kasir'),('04','010200','0','Kasir'),('04','010300','1','Kasir'),('04','010400','0','Kasir'),('04','010500','0','Kasir'),('04','010600','0','Kasir'),('04','010700','0','Kasir'),('04','010900','0','Kasir'),('04','020000','1','Kasir'),('04','020100','0','Kasir'),('04','020200','0','Kasir'),('04','020300','1','Kasir'),('04','020400','0','Kasir'),('04','020500','0','Kasir'),('04','020600','0','Kasir'),('04','020700','0','Kasir'),('04','020800','0','Kasir'),('04','020900','0','Kasir'),('04','030000','0','Kasir'),('04','030100','0','Kasir'),('04','040000','0','Kasir'),('04','040100','0','Kasir'),('04','040101','1','Kasir'),('04','040102','1','Kasir'),('04','040200','0','Kasir'),('04','040201','0','Kasir'),('04','040202','0','Kasir'),('04','040300','0','Kasir'),('04','040301','1','Kasir'),('04','040302','1','Kasir'),('04','040400','0','Kasir'),('04','040401','0','Kasir'),('04','040402','0','Kasir'),('04','040500','0','Kasir'),('04','040501','0','Kasir'),('04','040502','0','Kasir'),('04','050000','1','Kasir'),('04','050100','1','Kasir'),('04','050101','1','Kasir'),('04','050102','1','Kasir'),('04','050110','1','Kasir'),('04','050111','1','Kasir'),('04','050120','1','Kasir'),('04','050121','1','Kasir'),('04','050200','1','Kasir'),('04','050201','1','Kasir'),('04','050202','0','Kasir'),('04','050400','0','Kasir'),('04','050401','1','Kasir'),('04','050402','1','Kasir'),('04','050500','0','Kasir'),('04','050501','0','Kasir'),('04','050502','0','Kasir'),('04','050600','0','Kasir'),('04','050601','0','Kasir'),('04','050602','0','Kasir'),('04','050700','0','Kasir'),('04','050701','0','Kasir'),('04','050702','0','Kasir'),('04','050800','0','Kasir'),('04','050801','0','Kasir'),('04','050802','0','Kasir'),('04','050803','0','Kasir'),('04','050900','0','Kasir'),('04','050901','0','Kasir'),('04','050902','0','Kasir'),('04','051000','0','Kasir'),('04','051001','0','Kasir'),('04','051002','0','Kasir'),('04','060000','1','Kasir'),('04','060100','0','Kasir'),('04','060101','0','Kasir'),('04','060102','0','Kasir'),('04','060103','0','Kasir'),('04','060104','0','Kasir'),('04','060105','0','Kasir'),('04','060106','0','Kasir'),('04','060107','0','Kasir'),('04','060108','0','Kasir'),('04','060200','0','Kasir'),('04','060300','0','Kasir'),('04','060400','0','Kasir'),('04','060401','1','Kasir'),('04','060402','1','Kasir'),('04','060403','0','Kasir'),('04','060500','0','Kasir'),('04','060501','0','Kasir'),('04','060502','0','Kasir'),('04','060503','0','Kasir'),('04','060600','0','Kasir'),('04','060601','0','Kasir'),('04','060602','0','Kasir'),('04','060603','0','Kasir'),('04','060700','0','Kasir'),('04','060701','0','Kasir'),('04','060702','0','Kasir'),('04','060703','0','Kasir'),('04','060800','1','Kasir'),('04','060801','1','Kasir'),('04','060802','1','Kasir'),('04','060900','0','Kasir'),('04','060902','0','Kasir'),('04','060903','0','Kasir'),('04','060904','0','Kasir'),('04','061000','0','Kasir'),('04','061001','0','Kasir'),('04','061002','0','Kasir'),('04','061003','0','Kasir'),('04','061004','0','Kasir'),('04','061100','0','Kasir'),('04','061101','0','Kasir'),('04','061102','0','Kasir'),('04','070000','0','Kasir'),('04','070100','0','Kasir'),('04','070200','0','Kasir'),('04','070400','0','Kasir'),('04','070500','0','Kasir'),('04','070600','0','Kasir'),('04','080000','0','Kasir'),('04','080100','0','Kasir'),('04','080200','0','Kasir'),('04','080300','0','Kasir'),('04','090000','1','Kasir'),('04','090100','1','Kasir'),('04','090101','1','Kasir'),('04','090102','0','Kasir'),('04','090203','0','Kasir'),('04','090300','0','Kasir'),('04','090301','0','Kasir'),('04','090302','0','Kasir'),('04','100000','1','Kasir'),('04','110000','1','Kasir'),('05','010000','1','Sales'),('05','010100','1','Sales'),('05','010200','1','Sales'),('05','010300','1','Sales'),('05','010400','0','Sales'),('05','010500','0','Sales'),('05','010600','0','Sales'),('05','010700','0','Sales'),('05','010900','0','Sales'),('05','020000','0','Sales'),('05','020100','0','Sales'),('05','020200','0','Sales'),('05','020300','0','Sales'),('05','020400','0','Sales'),('05','020500','0','Sales'),('05','020600','0','Sales'),('05','020700','0','Sales'),('05','020800','0','Sales'),('05','020900','0','Sales'),('05','030000','0','Sales'),('05','030100','0','Sales'),('05','040000','0','Sales'),('05','040100','0','Sales'),('05','040101','1','Sales'),('05','040102','1','Sales'),('05','040200','0','Sales'),('05','040201','1','Sales'),('05','040202','1','Sales'),('05','040300','0','Sales'),('05','040301','1','Sales'),('05','040302','1','Sales'),('05','040400','0','Sales'),('05','040401','1','Sales'),('05','040402','1','Sales'),('05','040500','0','Sales'),('05','040501','1','Sales'),('05','040502','1','Sales'),('05','040800','1','Sales'),('05','040801','1','Sales'),('05','050000','1','Sales'),('05','050100','0','Sales'),('05','050101','1','Sales'),('05','050102','1','Sales'),('05','050110','1','Sales'),('05','050111','1','Sales'),('05','050112','1','Sales'),('05','050200','0','Sales'),('05','050201','1','Sales'),('05','050202','1','Sales'),('05','050400','0','Sales'),('05','050401','1','Sales'),('05','050402','1','Sales'),('05','050500','0','Sales'),('05','050501','1','Sales'),('05','050502','0','Sales'),('05','050600','1','Sales'),('05','050601','1','Sales'),('05','050602','1','Sales'),('05','050700','0','Sales'),('05','050701','1','Sales'),('05','050702','1','Sales'),('05','050800','0','Sales'),('05','050801','1','Sales'),('05','050802','1','Sales'),('05','050803','1','Sales'),('05','050900','0','Sales'),('05','050901','1','Sales'),('05','050902','1','Sales'),('05','051000','0','Sales'),('05','051001','1','Sales'),('05','051002','1','Sales'),('05','060000','0','Sales'),('05','060100','0','Sales'),('05','060101','1','Sales'),('05','060102','1','Sales'),('05','060103','1','Sales'),('05','060104','1','Sales'),('05','060105','1','Sales'),('05','060106','1','Sales'),('05','060107','0','Sales'),('05','060108','0','Sales'),('05','060200','0','Sales'),('05','060300','0','Sales'),('05','060400','0','Sales'),('05','060401','1','Sales'),('05','060402','1','Sales'),('05','060500','0','Sales'),('05','060501','1','Sales'),('05','060502','1','Sales'),('05','060503','1','Sales'),('05','060600','0','Sales'),('05','060601','1','Sales'),('05','060602','1','Sales'),('05','060603','1','Sales'),('05','060700','0','Sales'),('05','060701','1','Sales'),('05','060702','1','Sales'),('05','060703','1','Sales'),('05','060800','0','Sales'),('05','060801','1','Sales'),('05','060802','1','Sales'),('05','060900','0','Sales'),('05','060902','1','Sales'),('05','060903','1','Sales'),('05','060904','1','Sales'),('05','061000','0','Sales'),('05','061001','1','Sales'),('05','061002','1','Sales'),('05','061003','1','Sales'),('05','061004','1','Sales'),('05','061100','0','Sales'),('05','061101','1','Sales'),('05','061102','1','Sales'),('05','070000','0','Sales'),('05','070100','1','Sales'),('05','070200','1','Sales'),('05','070400','1','Sales'),('05','070500','1','Sales'),('05','070600','1','Sales'),('05','080000','0','Sales'),('05','080100','1','Sales'),('05','080200','1','Sales'),('05','080300','1','Sales'),('05','090000','0','Sales'),('05','090100','1','Sales'),('05','090101','1','Sales'),('05','090102','1','Sales'),('05','090203','1','Sales'),('05','100000','0','Sales'),('05','110000','1','Sales'),('06','010000','1','Pindah Barang Saja'),('06','010100','1','Pindah Barang Saja'),('06','010200','1','Pindah Barang Saja'),('06','010300','1','Pindah Barang Saja'),('06','010400','1','Pindah Barang Saja'),('06','010500','1','Pindah Barang Saja'),('06','010600','1','Pindah Barang Saja'),('06','010700','1','Pindah Barang Saja'),('06','010900','1','Pindah Barang Saja'),('06','020000','1','Pindah Barang Saja'),('06','020100','1','Pindah Barang Saja'),('06','020200','1','Pindah Barang Saja'),('06','020300','1','Pindah Barang Saja'),('06','020400','1','Pindah Barang Saja'),('06','020500','1','Pindah Barang Saja'),('06','020600','1','Pindah Barang Saja'),('06','020700','1','Pindah Barang Saja'),('06','020800','1','Pindah Barang Saja'),('06','020900','1','Pindah Barang Saja'),('06','030000','1','Pindah Barang Saja'),('06','030100','1','Pindah Barang Saja'),('06','040000','1','Pindah Barang Saja'),('06','040100','1','Pindah Barang Saja'),('06','040101','1','Pindah Barang Saja'),('06','040102','1','Pindah Barang Saja'),('06','040200','1','Pindah Barang Saja'),('06','040201','1','Pindah Barang Saja'),('06','040202','1','Pindah Barang Saja'),('06','040300','1','Pindah Barang Saja'),('06','040301','1','Pindah Barang Saja'),('06','040302','1','Pindah Barang Saja'),('06','040400','1','Pindah Barang Saja'),('06','040401','1','Pindah Barang Saja'),('06','040402','1','Pindah Barang Saja'),('06','040500','1','Pindah Barang Saja'),('06','040501','1','Pindah Barang Saja'),('06','040502','1','Pindah Barang Saja'),('06','050000','1','Pindah Barang Saja'),('06','050100','1','Pindah Barang Saja'),('06','050101','1','Pindah Barang Saja'),('06','050102','1','Pindah Barang Saja'),('06','050200','1','Pindah Barang Saja'),('06','050201','1','Pindah Barang Saja'),('06','050202','1','Pindah Barang Saja'),('06','050400','1','Pindah Barang Saja'),('06','050401','1','Pindah Barang Saja'),('06','050402','1','Pindah Barang Saja'),('06','050500','1','Pindah Barang Saja'),('06','050501','1','Pindah Barang Saja'),('06','050502','1','Pindah Barang Saja'),('06','050600','1','Pindah Barang Saja'),('06','050601','1','Pindah Barang Saja'),('06','050602','1','Pindah Barang Saja'),('06','050700','1','Pindah Barang Saja'),('06','050701','1','Pindah Barang Saja'),('06','050702','1','Pindah Barang Saja'),('06','050800','1','Pindah Barang Saja'),('06','050801','1','Pindah Barang Saja'),('06','050802','1','Pindah Barang Saja'),('06','050803','1','Pindah Barang Saja'),('06','050900','1','Pindah Barang Saja'),('06','050901','1','Pindah Barang Saja'),('06','050902','1','Pindah Barang Saja'),('06','051000','1','Pindah Barang Saja'),('06','051001','1','Pindah Barang Saja'),('06','051002','1','Pindah Barang Saja'),('06','060000','1','Pindah Barang Saja'),('06','060100','1','Pindah Barang Saja'),('06','060101','1','Pindah Barang Saja'),('06','060102','1','Pindah Barang Saja'),('06','060103','1','Pindah Barang Saja'),('06','060104','1','Pindah Barang Saja'),('06','060105','1','Pindah Barang Saja'),('06','060106','1','Pindah Barang Saja'),('06','060107','1','Pindah Barang Saja'),('06','060108','1','Pindah Barang Saja'),('06','060200','1','Pindah Barang Saja'),('06','060300','1','Pindah Barang Saja'),('06','060400','1','Pindah Barang Saja'),('06','060401','1','Pindah Barang Saja'),('06','060402','1','Pindah Barang Saja'),('06','060500','1','Pindah Barang Saja'),('06','060501','1','Pindah Barang Saja'),('06','060502','1','Pindah Barang Saja'),('06','060503','1','Pindah Barang Saja'),('06','060600','1','Pindah Barang Saja'),('06','060601','1','Pindah Barang Saja'),('06','060602','1','Pindah Barang Saja'),('06','060603','1','Pindah Barang Saja'),('06','060700','1','Pindah Barang Saja'),('06','060701','1','Pindah Barang Saja'),('06','060702','1','Pindah Barang Saja'),('06','060703','1','Pindah Barang Saja'),('06','060800','1','Pindah Barang Saja'),('06','060801','1','Pindah Barang Saja'),('06','060802','1','Pindah Barang Saja'),('06','060900','1','Pindah Barang Saja'),('06','060902','1','Pindah Barang Saja'),('06','060903','1','Pindah Barang Saja'),('06','060904','1','Pindah Barang Saja'),('06','061000','1','Pindah Barang Saja'),('06','061001','1','Pindah Barang Saja'),('06','061002','1','Pindah Barang Saja'),('06','061003','1','Pindah Barang Saja'),('06','061004','1','Pindah Barang Saja'),('06','061100','1','Pindah Barang Saja'),('06','061101','1','Pindah Barang Saja'),('06','061102','1','Pindah Barang Saja'),('06','070000','1','Pindah Barang Saja'),('06','070100','1','Pindah Barang Saja'),('06','070200','1','Pindah Barang Saja'),('06','070400','1','Pindah Barang Saja'),('06','070500','1','Pindah Barang Saja'),('06','070600','1','Pindah Barang Saja'),('06','080000','1','Pindah Barang Saja'),('06','080100','1','Pindah Barang Saja'),('06','080200','1','Pindah Barang Saja'),('06','080300','1','Pindah Barang Saja'),('06','090000','1','Pindah Barang Saja'),('06','090100','1','Pindah Barang Saja'),('06','090101','1','Pindah Barang Saja'),('06','090102','1','Pindah Barang Saja'),('06','090203','1','Pindah Barang Saja'),('06','100000','1','Pindah Barang Saja'),('06','110000','1','Pindah Barang Saja'),('07','010000','1','Jual Barang Saja'),('07','010100','0','Jual Barang Saja'),('07','010200','1','Jual Barang Saja'),('07','010300','0','Jual Barang Saja'),('07','010400','0','Jual Barang Saja'),('07','010500','0','Jual Barang Saja'),('07','010600','0','Jual Barang Saja'),('07','010700','0','Jual Barang Saja'),('07','010900','0','Jual Barang Saja'),('07','020000','0','Jual Barang Saja'),('07','020100','0','Jual Barang Saja'),('07','020200','0','Jual Barang Saja'),('07','020300','0','Jual Barang Saja'),('07','020400','0','Jual Barang Saja'),('07','020500','0','Jual Barang Saja'),('07','020600','0','Jual Barang Saja'),('07','020700','0','Jual Barang Saja'),('07','020800','0','Jual Barang Saja'),('07','020900','0','Jual Barang Saja'),('07','030000','0','Jual Barang Saja'),('07','030100','0','Jual Barang Saja'),('07','040000','0','Jual Barang Saja'),('07','040100','0','Jual Barang Saja'),('07','040101','0','Jual Barang Saja'),('07','040102','0','Jual Barang Saja'),('07','040200','0','Jual Barang Saja'),('07','040201','0','Jual Barang Saja'),('07','040202','0','Jual Barang Saja'),('07','040300','0','Jual Barang Saja'),('07','040301','0','Jual Barang Saja'),('07','040302','0','Jual Barang Saja'),('07','040400','0','Jual Barang Saja'),('07','040401','0','Jual Barang Saja'),('07','040402','0','Jual Barang Saja'),('07','040500','0','Jual Barang Saja'),('07','040501','0','Jual Barang Saja'),('07','040502','0','Jual Barang Saja'),('07','050000','1','Jual Barang Saja'),('07','050100','1','Jual Barang Saja'),('07','050101','1','Jual Barang Saja'),('07','050102','0','Jual Barang Saja'),('07','050200','0','Jual Barang Saja'),('07','050201','0','Jual Barang Saja'),('07','050202','0','Jual Barang Saja'),('07','050300','0','Jual Barang Saja'),('07','050301','0','Jual Barang Saja'),('07','050302','0','Jual Barang Saja'),('07','050400','0','Jual Barang Saja'),('07','050401','0','Jual Barang Saja'),('07','050402','0','Jual Barang Saja'),('07','050500','0','Jual Barang Saja'),('07','050501','0','Jual Barang Saja'),('07','050502','0','Jual Barang Saja'),('07','050600','0','Jual Barang Saja'),('07','050601','0','Jual Barang Saja'),('07','050602','0','Jual Barang Saja'),('07','050700','0','Jual Barang Saja'),('07','050701','0','Jual Barang Saja'),('07','050702','0','Jual Barang Saja'),('07','050800','0','Jual Barang Saja'),('07','050801','0','Jual Barang Saja'),('07','050802','0','Jual Barang Saja'),('07','050803','0','Jual Barang Saja'),('07','050900','0','Jual Barang Saja'),('07','050901','0','Jual Barang Saja'),('07','050902','0','Jual Barang Saja'),('07','051000','0','Jual Barang Saja'),('07','051001','0','Jual Barang Saja'),('07','051002','0','Jual Barang Saja'),('07','060000','0','Jual Barang Saja'),('07','060100','0','Jual Barang Saja'),('07','060101','0','Jual Barang Saja'),('07','060102','0','Jual Barang Saja'),('07','060103','0','Jual Barang Saja'),('07','060104','0','Jual Barang Saja'),('07','060105','0','Jual Barang Saja'),('07','060106','0','Jual Barang Saja'),('07','060107','0','Jual Barang Saja'),('07','060108','0','Jual Barang Saja'),('07','060200','0','Jual Barang Saja'),('07','060300','0','Jual Barang Saja'),('07','060400','0','Jual Barang Saja'),('07','060401','0','Jual Barang Saja'),('07','060402','0','Jual Barang Saja'),('07','060403','0','Jual Barang Saja'),('07','060500','0','Jual Barang Saja'),('07','060501','0','Jual Barang Saja'),('07','060502','0','Jual Barang Saja'),('07','060503','0','Jual Barang Saja'),('07','060600','0','Jual Barang Saja'),('07','060601','0','Jual Barang Saja'),('07','060602','0','Jual Barang Saja'),('07','060603','0','Jual Barang Saja'),('07','060700','0','Jual Barang Saja'),('07','060701','0','Jual Barang Saja'),('07','060702','0','Jual Barang Saja'),('07','060703','0','Jual Barang Saja'),('07','060800','0','Jual Barang Saja'),('07','060801','0','Jual Barang Saja'),('07','060802','0','Jual Barang Saja'),('07','060900','0','Jual Barang Saja'),('07','060901','0','Jual Barang Saja'),('07','060902','0','Jual Barang Saja'),('07','060903','0','Jual Barang Saja'),('07','060904','0','Jual Barang Saja'),('07','061000','0','Jual Barang Saja'),('07','061001','0','Jual Barang Saja'),('07','061002','0','Jual Barang Saja'),('07','061003','0','Jual Barang Saja'),('07','061004','0','Jual Barang Saja'),('07','061100','0','Jual Barang Saja'),('07','061101','0','Jual Barang Saja'),('07','061102','0','Jual Barang Saja'),('07','061104','0','Jual Barang Saja'),('07','070000','0','Jual Barang Saja'),('07','070100','0','Jual Barang Saja'),('07','070200','0','Jual Barang Saja'),('07','070400','0','Jual Barang Saja'),('07','070500','0','Jual Barang Saja'),('07','070600','0','Jual Barang Saja'),('07','080000','0','Jual Barang Saja'),('07','080100','0','Jual Barang Saja'),('07','080200','0','Jual Barang Saja'),('07','080300','0','Jual Barang Saja'),('07','090000','0','Jual Barang Saja'),('07','090100','0','Jual Barang Saja'),('07','090101','0','Jual Barang Saja'),('07','090102','0','Jual Barang Saja'),('07','090203','0','Jual Barang Saja'),('07','090300','0','Jual Barang Saja'),('07','090301','0','Jual Barang Saja'),('07','090302','0','Jual Barang Saja'),('07','100000','0','Jual Barang Saja'),('07','110000','1','Jual Barang Saja'),('08','010000','1','Khusus antar'),('08','010100','1','Khusus antar'),('08','010200','1','Khusus antar'),('08','010300','1','Khusus antar'),('08','010400','1','Khusus antar'),('08','010500','1','Khusus antar'),('08','010600','1','Khusus antar'),('08','010700','1','Khusus antar'),('08','010900','1','Khusus antar'),('08','020000','1','Khusus antar'),('08','020100','1','Khusus antar'),('08','020200','1','Khusus antar'),('08','020300','1','Khusus antar'),('08','020400','1','Khusus antar'),('08','020500','1','Khusus antar'),('08','020600','1','Khusus antar'),('08','020700','1','Khusus antar'),('08','020800','1','Khusus antar'),('08','020900','1','Khusus antar'),('08','030000','1','Khusus antar'),('08','030100','1','Khusus antar'),('08','040000','1','Khusus antar'),('08','040100','1','Khusus antar'),('08','040101','1','Khusus antar'),('08','040102','1','Khusus antar'),('08','040200','1','Khusus antar'),('08','040201','1','Khusus antar'),('08','040202','1','Khusus antar'),('08','040300','1','Khusus antar'),('08','040301','1','Khusus antar'),('08','040302','1','Khusus antar'),('08','040400','1','Khusus antar'),('08','040401','1','Khusus antar'),('08','040402','1','Khusus antar'),('08','040500','1','Khusus antar'),('08','040501','1','Khusus antar'),('08','040502','1','Khusus antar'),('08','050000','1','Khusus antar'),('08','050100','1','Khusus antar'),('08','050101','1','Khusus antar'),('08','050102','1','Khusus antar'),('08','050200','1','Khusus antar'),('08','050201','1','Khusus antar'),('08','050202','1','Khusus antar'),('08','050400','1','Khusus antar'),('08','050401','1','Khusus antar'),('08','050402','1','Khusus antar'),('08','050500','1','Khusus antar'),('08','050501','1','Khusus antar'),('08','050502','1','Khusus antar'),('08','050600','1','Khusus antar'),('08','050601','1','Khusus antar'),('08','050602','1','Khusus antar'),('08','050700','1','Khusus antar'),('08','050701','1','Khusus antar'),('08','050702','1','Khusus antar'),('08','050800','1','Khusus antar'),('08','050801','1','Khusus antar'),('08','050802','1','Khusus antar'),('08','050803','1','Khusus antar'),('08','050900','1','Khusus antar'),('08','050901','1','Khusus antar'),('08','050902','1','Khusus antar'),('08','051000','1','Khusus antar'),('08','051001','1','Khusus antar'),('08','051002','1','Khusus antar'),('08','060000','1','Khusus antar'),('08','060100','1','Khusus antar'),('08','060101','1','Khusus antar'),('08','060102','1','Khusus antar'),('08','060103','1','Khusus antar'),('08','060104','1','Khusus antar'),('08','060105','1','Khusus antar'),('08','060106','1','Khusus antar'),('08','060107','1','Khusus antar'),('08','060108','1','Khusus antar'),('08','060200','1','Khusus antar'),('08','060300','1','Khusus antar'),('08','060400','1','Khusus antar'),('08','060401','1','Khusus antar'),('08','060402','1','Khusus antar'),('08','060500','1','Khusus antar'),('08','060501','1','Khusus antar'),('08','060502','1','Khusus antar'),('08','060503','1','Khusus antar'),('08','060600','1','Khusus antar'),('08','060601','1','Khusus antar'),('08','060602','1','Khusus antar'),('08','060603','1','Khusus antar'),('08','060700','1','Khusus antar'),('08','060701','1','Khusus antar'),('08','060702','1','Khusus antar'),('08','060703','1','Khusus antar'),('08','060800','1','Khusus antar'),('08','060801','1','Khusus antar'),('08','060802','1','Khusus antar'),('08','060900','1','Khusus antar'),('08','060902','1','Khusus antar'),('08','060903','1','Khusus antar'),('08','060904','1','Khusus antar'),('08','061000','1','Khusus antar'),('08','061001','1','Khusus antar'),('08','061002','1','Khusus antar'),('08','061003','1','Khusus antar'),('08','061004','1','Khusus antar'),('08','061100','1','Khusus antar'),('08','061101','1','Khusus antar'),('08','061102','1','Khusus antar'),('08','070000','1','Khusus antar'),('08','070100','1','Khusus antar'),('08','070200','1','Khusus antar'),('08','070400','1','Khusus antar'),('08','070500','1','Khusus antar'),('08','070600','1','Khusus antar'),('08','080000','1','Khusus antar'),('08','080100','1','Khusus antar'),('08','080200','1','Khusus antar'),('08','080300','1','Khusus antar'),('08','090000','1','Khusus antar'),('08','090100','1','Khusus antar'),('08','090101','1','Khusus antar'),('08','090102','1','Khusus antar'),('08','090203','1','Khusus antar'),('08','100000','1','Khusus antar'),('08','110000','1','Khusus antar'),('09','010000','1','Kasir 2'),('09','010100','1','Kasir 2'),('09','010200','1','Kasir 2'),('09','010300','1','Kasir 2'),('09','010400','1','Kasir 2'),('09','010500','1','Kasir 2'),('09','010600','1','Kasir 2'),('09','010700','1','Kasir 2'),('09','010900','1','Kasir 2'),('09','020000','1','Kasir 2'),('09','020100','1','Kasir 2'),('09','020200','1','Kasir 2'),('09','020300','1','Kasir 2'),('09','020400','1','Kasir 2'),('09','020500','1','Kasir 2'),('09','020600','1','Kasir 2'),('09','020700','1','Kasir 2'),('09','020800','1','Kasir 2'),('09','020900','1','Kasir 2'),('09','030000','1','Kasir 2'),('09','030100','1','Kasir 2'),('09','040000','1','Kasir 2'),('09','040100','1','Kasir 2'),('09','040101','1','Kasir 2'),('09','040102','1','Kasir 2'),('09','040200','1','Kasir 2'),('09','040201','1','Kasir 2'),('09','040202','1','Kasir 2'),('09','040300','1','Kasir 2'),('09','040301','1','Kasir 2'),('09','040302','1','Kasir 2'),('09','040400','1','Kasir 2'),('09','040401','1','Kasir 2'),('09','040402','1','Kasir 2'),('09','040500','1','Kasir 2'),('09','040501','1','Kasir 2'),('09','040502','1','Kasir 2'),('09','050000','1','Kasir 2'),('09','050100','1','Kasir 2'),('09','050101','1','Kasir 2'),('09','050102','1','Kasir 2'),('09','050200','1','Kasir 2'),('09','050201','1','Kasir 2'),('09','050202','1','Kasir 2'),('09','050400','1','Kasir 2'),('09','050401','1','Kasir 2'),('09','050402','1','Kasir 2'),('09','050500','1','Kasir 2'),('09','050501','1','Kasir 2'),('09','050502','1','Kasir 2'),('09','050600','1','Kasir 2'),('09','050601','1','Kasir 2'),('09','050602','1','Kasir 2'),('09','050700','1','Kasir 2'),('09','050701','1','Kasir 2'),('09','050702','1','Kasir 2'),('09','050800','1','Kasir 2'),('09','050801','1','Kasir 2'),('09','050802','1','Kasir 2'),('09','050803','1','Kasir 2'),('09','050900','1','Kasir 2'),('09','050901','1','Kasir 2'),('09','050902','1','Kasir 2'),('09','051000','1','Kasir 2'),('09','051001','1','Kasir 2'),('09','051002','1','Kasir 2'),('09','060000','1','Kasir 2'),('09','060100','1','Kasir 2'),('09','060101','1','Kasir 2'),('09','060102','1','Kasir 2'),('09','060103','1','Kasir 2'),('09','060104','1','Kasir 2'),('09','060105','1','Kasir 2'),('09','060106','1','Kasir 2'),('09','060107','1','Kasir 2'),('09','060108','1','Kasir 2'),('09','060200','1','Kasir 2'),('09','060300','1','Kasir 2'),('09','060400','1','Kasir 2'),('09','060401','1','Kasir 2'),('09','060402','1','Kasir 2'),('09','060500','1','Kasir 2'),('09','060501','1','Kasir 2'),('09','060502','1','Kasir 2'),('09','060503','1','Kasir 2'),('09','060600','1','Kasir 2'),('09','060601','1','Kasir 2'),('09','060602','1','Kasir 2'),('09','060603','1','Kasir 2'),('09','060700','1','Kasir 2'),('09','060701','1','Kasir 2'),('09','060702','1','Kasir 2'),('09','060703','1','Kasir 2'),('09','060800','1','Kasir 2'),('09','060801','1','Kasir 2'),('09','060802','1','Kasir 2'),('09','060900','1','Kasir 2'),('09','060902','1','Kasir 2'),('09','060903','1','Kasir 2'),('09','060904','1','Kasir 2'),('09','061000','1','Kasir 2'),('09','061001','1','Kasir 2'),('09','061002','1','Kasir 2'),('09','061003','1','Kasir 2'),('09','061004','1','Kasir 2'),('09','061100','1','Kasir 2'),('09','061101','1','Kasir 2'),('09','061102','1','Kasir 2'),('09','070000','1','Kasir 2'),('09','070100','1','Kasir 2'),('09','070200','1','Kasir 2'),('09','070400','1','Kasir 2'),('09','070500','1','Kasir 2'),('09','070600','1','Kasir 2'),('09','080000','1','Kasir 2'),('09','080100','1','Kasir 2'),('09','080200','1','Kasir 2'),('09','080300','1','Kasir 2'),('09','090000','1','Kasir 2'),('09','090100','1','Kasir 2'),('09','090101','1','Kasir 2'),('09','090102','1','Kasir 2'),('09','090203','1','Kasir 2'),('09','100000','1','Kasir 2'),('09','110000','1','Kasir 2'),('10','010000','1','Kasir 2 Exclusiv'),('10','010100','1','Kasir 2 Exclusiv'),('10','010200','1','Kasir 2 Exclusiv'),('10','010300','1','Kasir 2 Exclusiv'),('10','010400','1','Kasir 2 Exclusiv'),('10','010500','1','Kasir 2 Exclusiv'),('10','010600','1','Kasir 2 Exclusiv'),('10','010700','1','Kasir 2 Exclusiv'),('10','010900','1','Kasir 2 Exclusiv'),('10','020000','1','Kasir 2 Exclusiv'),('10','020100','1','Kasir 2 Exclusiv'),('10','020200','1','Kasir 2 Exclusiv'),('10','020300','1','Kasir 2 Exclusiv'),('10','020400','1','Kasir 2 Exclusiv'),('10','020500','1','Kasir 2 Exclusiv'),('10','020600','1','Kasir 2 Exclusiv'),('10','020700','1','Kasir 2 Exclusiv'),('10','020800','1','Kasir 2 Exclusiv'),('10','020900','1','Kasir 2 Exclusiv'),('10','030000','1','Kasir 2 Exclusiv'),('10','030100','1','Kasir 2 Exclusiv'),('10','040000','1','Kasir 2 Exclusiv'),('10','040100','1','Kasir 2 Exclusiv'),('10','040101','1','Kasir 2 Exclusiv'),('10','040102','1','Kasir 2 Exclusiv'),('10','040200','1','Kasir 2 Exclusiv'),('10','040201','1','Kasir 2 Exclusiv'),('10','040202','1','Kasir 2 Exclusiv'),('10','040300','1','Kasir 2 Exclusiv'),('10','040301','1','Kasir 2 Exclusiv'),('10','040302','1','Kasir 2 Exclusiv'),('10','040400','1','Kasir 2 Exclusiv'),('10','040401','1','Kasir 2 Exclusiv'),('10','040402','1','Kasir 2 Exclusiv'),('10','040500','1','Kasir 2 Exclusiv'),('10','040501','1','Kasir 2 Exclusiv'),('10','040502','1','Kasir 2 Exclusiv'),('10','050000','1','Kasir 2 Exclusiv'),('10','050100','1','Kasir 2 Exclusiv'),('10','050101','1','Kasir 2 Exclusiv'),('10','050102','1','Kasir 2 Exclusiv'),('10','050200','1','Kasir 2 Exclusiv'),('10','050201','1','Kasir 2 Exclusiv'),('10','050202','1','Kasir 2 Exclusiv'),('10','050400','1','Kasir 2 Exclusiv'),('10','050401','1','Kasir 2 Exclusiv'),('10','050402','1','Kasir 2 Exclusiv'),('10','050500','1','Kasir 2 Exclusiv'),('10','050501','1','Kasir 2 Exclusiv'),('10','050502','1','Kasir 2 Exclusiv'),('10','050600','1','Kasir 2 Exclusiv'),('10','050601','1','Kasir 2 Exclusiv'),('10','050602','1','Kasir 2 Exclusiv'),('10','050700','1','Kasir 2 Exclusiv'),('10','050701','1','Kasir 2 Exclusiv'),('10','050702','1','Kasir 2 Exclusiv'),('10','050800','1','Kasir 2 Exclusiv'),('10','050801','1','Kasir 2 Exclusiv'),('10','050802','1','Kasir 2 Exclusiv'),('10','050803','1','Kasir 2 Exclusiv'),('10','050900','1','Kasir 2 Exclusiv'),('10','050901','1','Kasir 2 Exclusiv'),('10','050902','1','Kasir 2 Exclusiv'),('10','051000','1','Kasir 2 Exclusiv'),('10','051001','1','Kasir 2 Exclusiv'),('10','051002','1','Kasir 2 Exclusiv'),('10','060000','1','Kasir 2 Exclusiv'),('10','060100','1','Kasir 2 Exclusiv'),('10','060101','1','Kasir 2 Exclusiv'),('10','060102','1','Kasir 2 Exclusiv'),('10','060103','1','Kasir 2 Exclusiv'),('10','060104','1','Kasir 2 Exclusiv'),('10','060105','1','Kasir 2 Exclusiv'),('10','060106','1','Kasir 2 Exclusiv'),('10','060107','1','Kasir 2 Exclusiv'),('10','060108','1','Kasir 2 Exclusiv'),('10','060200','1','Kasir 2 Exclusiv'),('10','060300','1','Kasir 2 Exclusiv'),('10','060400','1','Kasir 2 Exclusiv'),('10','060401','1','Kasir 2 Exclusiv'),('10','060402','1','Kasir 2 Exclusiv'),('10','060500','1','Kasir 2 Exclusiv'),('10','060501','1','Kasir 2 Exclusiv'),('10','060502','1','Kasir 2 Exclusiv'),('10','060503','1','Kasir 2 Exclusiv'),('10','060600','1','Kasir 2 Exclusiv'),('10','060601','1','Kasir 2 Exclusiv'),('10','060602','1','Kasir 2 Exclusiv'),('10','060603','1','Kasir 2 Exclusiv'),('10','060700','1','Kasir 2 Exclusiv'),('10','060701','1','Kasir 2 Exclusiv'),('10','060702','1','Kasir 2 Exclusiv'),('10','060703','1','Kasir 2 Exclusiv'),('10','060800','1','Kasir 2 Exclusiv'),('10','060801','1','Kasir 2 Exclusiv'),('10','060802','1','Kasir 2 Exclusiv'),('10','060900','1','Kasir 2 Exclusiv'),('10','060902','1','Kasir 2 Exclusiv'),('10','060903','1','Kasir 2 Exclusiv'),('10','060904','1','Kasir 2 Exclusiv'),('10','061000','1','Kasir 2 Exclusiv'),('10','061001','1','Kasir 2 Exclusiv'),('10','061002','1','Kasir 2 Exclusiv'),('10','061003','1','Kasir 2 Exclusiv'),('10','061004','1','Kasir 2 Exclusiv'),('10','061100','1','Kasir 2 Exclusiv'),('10','061101','1','Kasir 2 Exclusiv'),('10','061102','1','Kasir 2 Exclusiv'),('10','070000','1','Kasir 2 Exclusiv'),('10','070100','1','Kasir 2 Exclusiv'),('10','070200','1','Kasir 2 Exclusiv'),('10','070400','1','Kasir 2 Exclusiv'),('10','070500','1','Kasir 2 Exclusiv'),('10','070600','1','Kasir 2 Exclusiv'),('10','080000','1','Kasir 2 Exclusiv'),('10','080100','1','Kasir 2 Exclusiv'),('10','080200','1','Kasir 2 Exclusiv'),('10','080300','1','Kasir 2 Exclusiv'),('10','090000','1','Kasir 2 Exclusiv'),('10','090100','1','Kasir 2 Exclusiv'),('10','090101','1','Kasir 2 Exclusiv'),('10','090102','1','Kasir 2 Exclusiv'),('10','090203','1','Kasir 2 Exclusiv'),('10','100000','1','Kasir 2 Exclusiv'),('10','110000','1','Kasir 2 Exclusiv'),('11','010000','1','Lain - lain'),('11','010100','1','Lain - lain'),('11','010200','1','Lain - lain'),('11','010300','1','Lain - lain'),('11','010400','1','Lain - lain'),('11','010500','1','Lain - lain'),('11','010600','1','Lain - lain'),('11','010700','1','Lain - lain'),('11','010900','1','Lain - lain'),('11','020000','1','Lain - lain'),('11','020100','1','Lain - lain'),('11','020200','1','Lain - lain'),('11','020300','1','Lain - lain'),('11','020400','1','Lain - lain'),('11','020500','1','Lain - lain'),('11','020600','1','Lain - lain'),('11','020700','1','Lain - lain'),('11','020800','1','Lain - lain'),('11','020900','1','Lain - lain'),('11','030000','1','Lain - lain'),('11','030100','1','Lain - lain'),('11','040000','1','Lain - lain'),('11','040100','1','Lain - lain'),('11','040101','1','Lain - lain'),('11','040102','1','Lain - lain'),('11','040200','1','Lain - lain'),('11','040201','1','Lain - lain'),('11','040202','1','Lain - lain'),('11','040300','1','Lain - lain'),('11','040301','1','Lain - lain'),('11','040302','1','Lain - lain'),('11','040400','1','Lain - lain'),('11','040401','1','Lain - lain'),('11','040402','1','Lain - lain'),('11','040500','1','Lain - lain'),('11','040501','1','Lain - lain'),('11','040502','1','Lain - lain'),('11','050000','1','Lain - lain'),('11','050100','1','Lain - lain'),('11','050101','1','Lain - lain'),('11','050102','1','Lain - lain'),('11','050200','1','Lain - lain'),('11','050201','1','Lain - lain'),('11','050202','1','Lain - lain'),('11','050400','1','Lain - lain'),('11','050401','1','Lain - lain'),('11','050402','1','Lain - lain'),('11','050500','1','Lain - lain'),('11','050501','1','Lain - lain'),('11','050502','1','Lain - lain'),('11','050600','1','Lain - lain'),('11','050601','1','Lain - lain'),('11','050602','1','Lain - lain'),('11','050700','1','Lain - lain'),('11','050701','1','Lain - lain'),('11','050702','1','Lain - lain'),('11','050800','1','Lain - lain'),('11','050801','1','Lain - lain'),('11','050802','1','Lain - lain'),('11','050803','1','Lain - lain'),('11','050900','1','Lain - lain'),('11','050901','1','Lain - lain'),('11','050902','1','Lain - lain'),('11','051000','1','Lain - lain'),('11','051001','1','Lain - lain'),('11','051002','1','Lain - lain'),('11','060000','1','Lain - lain'),('11','060100','1','Lain - lain'),('11','060101','1','Lain - lain'),('11','060102','1','Lain - lain'),('11','060103','1','Lain - lain'),('11','060104','1','Lain - lain'),('11','060105','1','Lain - lain'),('11','060106','1','Lain - lain'),('11','060107','1','Lain - lain'),('11','060108','1','Lain - lain'),('11','060200','1','Lain - lain'),('11','060300','1','Lain - lain'),('11','060400','1','Lain - lain'),('11','060401','1','Lain - lain'),('11','060402','1','Lain - lain'),('11','060500','1','Lain - lain'),('11','060501','1','Lain - lain'),('11','060502','1','Lain - lain'),('11','060503','1','Lain - lain'),('11','060600','1','Lain - lain'),('11','060601','1','Lain - lain'),('11','060602','1','Lain - lain'),('11','060603','1','Lain - lain'),('11','060700','1','Lain - lain'),('11','060701','1','Lain - lain'),('11','060702','1','Lain - lain'),('11','060703','1','Lain - lain'),('11','060800','1','Lain - lain'),('11','060801','1','Lain - lain'),('11','060802','1','Lain - lain'),('11','060900','1','Lain - lain'),('11','060902','1','Lain - lain'),('11','060903','1','Lain - lain'),('11','060904','1','Lain - lain'),('11','061000','1','Lain - lain'),('11','061001','1','Lain - lain'),('11','061002','1','Lain - lain'),('11','061003','1','Lain - lain'),('11','061004','1','Lain - lain'),('11','061100','1','Lain - lain'),('11','061101','1','Lain - lain'),('11','061102','1','Lain - lain'),('11','070000','1','Lain - lain'),('11','070100','1','Lain - lain'),('11','070200','1','Lain - lain'),('11','070400','1','Lain - lain'),('11','070500','1','Lain - lain'),('11','070600','1','Lain - lain'),('11','080000','1','Lain - lain'),('11','080100','1','Lain - lain'),('11','080200','1','Lain - lain'),('11','080300','1','Lain - lain'),('11','090000','1','Lain - lain'),('11','090100','1','Lain - lain'),('11','090101','1','Lain - lain'),('11','090102','1','Lain - lain'),('11','090203','1','Lain - lain'),('11','100000','1','Lain - lain'),('11','110000','1','Lain - lain'),('12','010000','1','Pembelian & cek'),('12','010100','1','Pembelian & cek'),('12','010200','1','Pembelian & cek'),('12','010300','0','Pembelian & cek'),('12','030000','1','Pembelian & cek'),('12','030100','1','Pembelian & cek'),('12','040000','1','Pembelian & cek'),('12','040100','1','Pembelian & cek'),('12','040101','1','Pembelian & cek'),('12','040102','1','Pembelian & cek'),('12','040200','1','Pembelian & cek'),('12','040201','1','Pembelian & cek'),('12','040202','1','Pembelian & cek'),('12','040300','1','Pembelian & cek'),('12','040301','1','Pembelian & cek'),('12','040302','1','Pembelian & cek'),('12','050000','1','Pembelian & cek'),('12','050100','1','Pembelian & cek'),('12','050101','1','Pembelian & cek'),('12','050102','1','Pembelian & cek'),('12','050200','1','Pembelian & cek'),('12','050201','1','Pembelian & cek'),('12','050202','1','Pembelian & cek'),('12','050400','1','Pembelian & cek'),('12','050401','1','Pembelian & cek'),('12','050402','1','Pembelian & cek'),('12','050500','1','Pembelian & cek'),('12','050501','1','Pembelian & cek'),('12','050502','1','Pembelian & cek'),('12','050600','1','Pembelian & cek'),('12','050601','1','Pembelian & cek'),('12','050602','1','Pembelian & cek'),('12','050700','1','Pembelian & cek'),('12','050701','1','Pembelian & cek'),('12','050702','1','Pembelian & cek'),('12','050800','1','Pembelian & cek'),('12','050801','1','Pembelian & cek'),('12','050802','1','Pembelian & cek'),('12','050803','1','Pembelian & cek'),('12','050900','1','Pembelian & cek'),('12','050901','1','Pembelian & cek'),('12','050902','1','Pembelian & cek'),('12','051000','1','Pembelian & cek'),('12','051001','1','Pembelian & cek'),('12','051002','1','Pembelian & cek'),('12','060000','1','Pembelian & cek'),('12','060100','1','Pembelian & cek'),('12','060101','1','Pembelian & cek'),('12','060102','1','Pembelian & cek'),('12','060103','1','Pembelian & cek'),('12','060104','1','Pembelian & cek'),('12','060105','1','Pembelian & cek'),('12','060106','1','Pembelian & cek'),('12','060107','1','Pembelian & cek'),('12','060108','1','Pembelian & cek'),('12','060200','1','Pembelian & cek'),('12','060300','1','Pembelian & cek'),('12','060400','1','Pembelian & cek'),('12','060401','1','Pembelian & cek'),('12','060402','1','Pembelian & cek'),('12','060700','1','Pembelian & cek'),('12','060701','1','Pembelian & cek'),('12','060702','1','Pembelian & cek'),('12','060703','1','Pembelian & cek'),('12','060800','1','Pembelian & cek'),('12','060801','1','Pembelian & cek'),('12','060802','1','Pembelian & cek'),('12','060900','1','Pembelian & cek'),('12','060902','1','Pembelian & cek'),('12','060903','1','Pembelian & cek'),('12','060904','1','Pembelian & cek'),('12','061000','1','Pembelian & cek'),('12','061001','1','Pembelian & cek'),('12','061002','1','Pembelian & cek'),('12','061003','1','Pembelian & cek'),('12','061004','1','Pembelian & cek'),('12','061100','1','Pembelian & cek'),('12','061101','1','Pembelian & cek'),('12','061102','1','Pembelian & cek'),('12','061104','1','Pembelian & cek'),('12','090000','1','Pembelian & cek'),('12','090100','1','Pembelian & cek'),('12','090101','1','Pembelian & cek'),('12','090102','1','Pembelian & cek'),('12','100000','1','Pembelian & cek'),('12','110000','1','Pembelian & cek'),('13','010000','1','Pembelian saja tok!'),('13','010100','1','Pembelian saja tok!'),('13','010200','1','Pembelian saja tok!'),('13','040000','1','Pembelian saja tok!'),('13','040100','1','Pembelian saja tok!'),('13','040101','1','Pembelian saja tok!'),('13','040102','1','Pembelian saja tok!'),('13','060400','1','Pembelian saja tok!'),('13','060401','1','Pembelian saja tok!'),('13','060402','1','Pembelian saja tok!'),('13','060700','1','Pembelian saja tok!'),('13','060701','1','Pembelian saja tok!'),('13','110000','1','Pembelian saja tok!');

--
-- Table structure for table `userlog`
--

CREATE TABLE `userlog` (
  `tgllog` date NOT NULL default '0000-00-00',
  `jamlog` time NOT NULL default '00:00:00',
  `log` char(255) NOT NULL default '',
  `user` char(65) NOT NULL default '',
  `userip` char(15) NOT NULL default '',
  `userhost` char(60) NOT NULL default '',
  KEY `Index_tgl` (`tgllog`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `userlog`
--

INSERT INTO `userlog` VALUES ('2021-09-13','11:47:31','Login','link - link','192.168.18.230',''),('2021-09-13','11:58:51','Login','link - link','192.168.18.230',''),('2021-09-13','12:58:40','Login','link - link','192.168.18.230',''),('2021-10-05','08:48:06','Login','link - link','192.168.18.230',''),('2021-10-05','08:48:19','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:19','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:19','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:19','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:19','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:20','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:20','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:20','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:20','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:20','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:20','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:20','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:20','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:21','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:21','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:21','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:21','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:21','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:21','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:21','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:22','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:22','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:22','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:22','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:22','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:22','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:22','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:22','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:22','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:23','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:23','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:23','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:23','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:24','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:24','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:24','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:24','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:24','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:24','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:24','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:24','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:24','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:25','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:25','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:25','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:25','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:25','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:25','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:25','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:26','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:26','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:26','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:26','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:27','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:28','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:28','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:28','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:28','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:28','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:28','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:28','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:28','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:28','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:29','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:29','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:29','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:29','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:29','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:29','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:29','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:29','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:29','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:30','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:30','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:30','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:30','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:30','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:30','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:30','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:31','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:31','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:31','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:31','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:31','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:31','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:31','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:31','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:32','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:32','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:32','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:32','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:32','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:32','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:33','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:33','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:33','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:33','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:33','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:34','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:34','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:34','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:34','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:34','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:34','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:34','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:34','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:35','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:35','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:35','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:35','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:35','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:35','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:36','Update setting level user (level=01)','link','192.168.18.230',''),('2021-10-05','08:48:36','Update setting level user (level=01)','link','192.168.18.230',''),('2021-11-21','14:23:48','Login','link - link','192.168.18.101',''),('2021-11-21','14:24:03','Buat user (userbaru=yanti)','link','192.168.18.101',''),('2021-11-21','14:24:24','Login','yamti - yanti','192.168.18.101',''),('2021-11-23','13:27:31','Login','yamti - yanti','192.168.18.230',''),('2023-07-25','14:17:05','Login dari IP lain','SAMIR','192.168.18.230','');

--
-- Table structure for table `v_stockbrg`
--

CREATE TABLE `v_stockbrg` (
  `KodeBrg` varchar(50) default NULL,
  `Namabrg` varchar(200) default NULL,
  `StockAkhir` decimal(10,0) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `v_stockbrg`
--


--
-- Dumping routines for database 'cv_samirjaya'
--
DELIMITER ;;
/*!50003 DROP FUNCTION IF EXISTS `BuatNo` */;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`client`@`%`*/ /*!50003 FUNCTION `BuatNo`(sUser varchar(1),Nama Varchar(20),Codes varchar(2),Tgl Varchar(10),Trans varchar(2),NoBaru varchar(11)) RETURNS char(11) CHARSET latin1
BEGIN
  DECLARE nUser Varchar(1) DEFAULT 0;
  DECLARE yy Varchar(2) DEFAULT 0;
  DECLARE mm Varchar(2) DEFAULT 0;
  DECLARE dd Varchar(2) DEFAULT 0;
  DECLARE NoInt Integer DEFAULT 0;
  DECLARE NoStr Varchar(11) DEFAULT 0;
  DECLARE Nomer Varchar(11) DEFAULT 0;
  DECLARE thn Varchar(6) DEFAULT 0;
  DECLARE TipeNo Integer DEFAULT 0;
  set nUser = Substring(sUser,1,1); 
  Set yy=Substring(tgl,3,2);
  Set mm=Substring(tgl,6,2);
  Set dd=Substring(tgl,9,2);
  Select ifnull(nilainum,1) into TipeNo from tm_setupall where groups='Nomor' and subgroups=Codes;
  If (TipeNo=0) or (TipeNo=1) then
     select if(ifnull(substring(nilaichar,3,6),0)='',0,ifnull(substring(nilaichar,3,6),0)),ifnull(nilaichar,'00') into NoInt,Nomer from tm_setupall where groups='Nomor' and subgroups=Codes;
     set thn=substring(nomer,1,2);
     if thn=yy then
        set NoInt=NoInt+1;
        set NoStr=NoInt;
        set NoBaru=concat(yy,REPEAT('0',6-length(NoStr)),NoStr);
     else
        case upper(Nama)
             when upper('Tr_Beli') then select ifnull(max(substring(noBeli,3,6)),0) into NoInt from TR_Beli_m where left(NoBeli,2)=yy and transBeli=Trans;
             when upper('Tr_Jual') then select ifnull(max(substring(noJual,3,6)),0) into NoInt from TR_Jual_m where left(NoJual,2)=yy and TransJual=Trans;
             when upper('Tr_JualR') then select ifnull(max(substring(noJualR,3,6)),0) into NoInt from TR_JualR_m where left(NoJualR,2)=yy and TransRetail=Trans;
             when upper('Tr_JualRakitan') then select ifnull(max(substring(noJual,3,6)),0) into NoInt from TR_JualRakitan_m where left(NoJual,2)=yy and TransJual=Trans;
             when upper('Tr_BayarBeli') then select ifnull(max(substring(noBayarB,3,6)),0) into NoInt from TR_BayarBeli_m where left(NoBayarB,2)=yy;
             when upper('Tr_BayarJual') then select ifnull(max(substring(noBayarJ,3,6)),0) into NoInt from TR_BayarJual_m where left(NoBayarJ,2)=yy;
             when upper('Tr_BayarJualRakitan') then select ifnull(max(substring(noBayarJ,3,6)),0) into NoInt from TR_BayarJualRakitan_m where left(NoBayarJ,2)=yy;
             when upper('Tr_RetBeli') then select ifnull(max(substring(noRetB,3,6)),0) into NoInt from TR_RetBeli_m where left(NoRetB,2)=yy and TransRetB=Trans;
             when upper('Tr_RetJual') then select ifnull(max(substring(noRetJ,3,6)),0) into NoInt from TR_RetJual_m where left(NoRetJ,2)=yy and TransRetJ=Trans;
             when upper('Tr_RetJualR') then select ifnull(max(substring(noRetJ,3,6)),0) into NoInt from TR_RetJualR_m where left(NoRetJ,2)=yy and TransRetJ=Trans;
             when upper('Tr_RetJualRakitan') then select ifnull(max(substring(noRetJ,3,6)),0) into NoInt from TR_RetJualRakitan_m where left(NoRetJ,2)=yy and TransRetJ=Trans;
             when upper('Tr_PoJual') then select ifnull(max(substring(nopo,3,6)),0) into NoInt from TR_PoJual_m where left(NoPo,2)=yy;
             when upper('Tr_PoJualRakitan') then select ifnull(max(substring(nopo,3,6)),0) into NoInt from TR_PoJualRakitan_m where left(NoPo,2)=yy;
             when upper('Tr_PIndahGd') then select ifnull(max(substring(noPindahGd,3,6)),0) into NoInt from Tr_PindahGd_M where left(noPindahGd,2)=yy;
             when upper('Tr_BuangGd') then select ifnull(max(substring(noBuangGd,3,6)),0) into NoInt from Tr_BuangGd_M where left(noBuangGd,2)=yy;
             when upper('Close') then select ifnull(max(substring(noClose,3,6)),0) into NoInt from TR_JualR_m where left(NoJualR,2)=yy and TransRetail=Trans;
        end case;
        if NoInt=0 then
           set NoBaru = concat(yy,'000001');
        else
           set noInt = noInt + 1;
           set noStr = noInt;
           set NoBaru= concat(yy,repeat('0',6-length(NoStr)),NoStr);
        end if;
     end if;
  end if;
  If (TipeNo=2) then
     select if(ifnull(substring(nilaichar,5,4),0)='',0,ifnull(substring(nilaichar,5,4),0)),ifnull(nilaichar,'00') into NoInt,Nomer from tm_setupall where groups='Nomor' and subgroups=Codes;
     set thn=substring(nomer,1,4);
     if thn=concat(yy,mm) then
        set NoInt=NoInt+1;
        set NoStr=NoInt;
        set NoBaru=concat(yy,mm,REPEAT('0',4-length(NoStr)),NoStr);
     else
        case upper(Nama)
             when upper('Tr_Beli') then select ifnull(max(substring(noBeli,5,4)),0) into NoInt from TR_Beli_m where left(NoBeli,4)=concat(yy,mm) and transBeli=Trans;
             when upper('Tr_Jual') then select ifnull(max(substring(noJual,5,4)),0) into NoInt from TR_Jual_m where left(NoJual,4)=concat(yy,mm) and TransJual=Trans;
             when upper('Tr_JualR') then select ifnull(max(substring(noJualR,5,4)),0) into NoInt from TR_JualR_m where left(NoJualR,4)=concat(yy,mm) and TransRetail=Trans;
             when upper('Tr_JualRakitan') then select ifnull(max(substring(noJual,5,4)),0) into NoInt from TR_JualRakitan_m where left(NoJual,4)=concat(yy,mm) and TransJual=Trans;
             when upper('Tr_BayarBeli') then select ifnull(max(substring(noBayarB,5,4)),0) into NoInt from TR_BayarBeli_m where left(NoBayarB,4)=concat(yy,mm);
             when upper('Tr_BayarJual') then select ifnull(max(substring(noBayarJ,5,4)),0) into NoInt from TR_BayarJual_m where left(NoBayarJ,4)=concat(yy,mm);
             when upper('Tr_BayarJualRakitan') then select ifnull(max(substring(noBayarJ,5,4)),0) into NoInt from TR_BayarJualRakitan_m where left(NoBayarJ,4)=concat(yy,mm);
             when upper('Tr_RetBeli') then select ifnull(max(substring(noRetB,5,4)),0) into NoInt from TR_RetBeli_m where left(NoRetB,4)=concat(yy,mm) and TransRetB=Trans;
             when upper('Tr_RetJual') then select ifnull(max(substring(noRetJ,5,4)),0) into NoInt from TR_RetJual_m where left(NoRetJ,4)=concat(yy,mm) and TransRetJ=Trans;
             when upper('Tr_RetJualR') then select ifnull(max(substring(noRetJ,5,4)),0) into NoInt from TR_RetJualR_m where left(NoRetJ,4)=concat(yy,mm) and TransRetJ=Trans;
             when upper('Tr_RetJualRakitan') then select ifnull(max(substring(noRetJ,5,4)),0) into NoInt from TR_RetJualRakitan_m where left(NoRetJ,4)=concat(yy,mm) and TransRetJ=Trans;
             when upper('Tr_PoJual') then select ifnull(max(substring(nopo,5,4)),0) into NoInt from TR_PoJual_m where left(NoPo,4)=concat(yy,mm);
             when upper('Tr_PoJualRakitan') then select ifnull(max(substring(nopo,5,4)),0) into NoInt from TR_PoJualRakitan_m where left(NoPo,4)=concat(yy,mm);
             when upper('Tr_PIndahGd') then select ifnull(max(substring(noPindahGd,5,4)),0) into NoInt from Tr_PindahGd_M where left(noPindahGd,4)=concat(yy,mm);
             when upper('Tr_BuangGd') then select ifnull(max(substring(noBuangGd,5,4)),0) into NoInt from Tr_BuangGd_M where left(noBuangGd,4)=concat(yy,mm);
             when upper('Close') then select ifnull(max(substring(noClose,5,4)),0) into NoInt from TR_JualR_m where left(NoJualR,4)=concat(yy,mm) and TransRetail=Trans;
       end case;
        if NoInt=0 then
           set NoBaru = concat(yy,mm,'0001');
        else
           set noInt = noInt + 1;
           set noStr = noInt;
           set NoBaru= concat(yy,mm,repeat('0',4-length(NoStr)),NoStr);
        end if;
     end if;
  end if;
 If (TipeNo=3) then
     select if(ifnull(substring(nilaichar,8,3),0)='',0,ifnull(substring(nilaichar,8,3),0)),ifnull(nilaichar,'00') into NoInt,Nomer from tm_setupall where groups='Nomor' and subgroups=Codes;
     set thn=substring(nomer,2,6);
     if thn=concat(yy,mm,dd) then
        set NoInt=NoInt+1;
        set NoStr=NoInt;
        set NoBaru=concat(nUser,yy,mm,dd,REPEAT('0',3-length(NoStr)),NoStr);
     else
        case upper(Nama)
             when upper('Tr_Beli') then select ifnull(max(substring(noBeli,7,3)),0) into NoInt from TR_Beli_m where left(NoBeli,6)=concat(yy,mm,dd) and transBeli=Trans;
             when upper('Tr_Jual') then select ifnull(max(substring(noJual,8,3)),0) into NoInt from TR_Jual_m where substring(NoJual,2,6)=concat(yy,mm,dd) and TransJual=Trans;
             when upper('Tr_JualR') then select ifnull(max(substring(noJualR,8,3)),0) into NoInt from TR_JualR_m where substring(NoJualR,2,6)=concat(yy,mm,dd) and TransRetail=Trans;
             when upper('Tr_JualRakitan') then select ifnull(max(substring(noJual,7,3)),0) into NoInt from TR_JualRakitan_m where left(NoJual,6)=concat(yy,mm,dd) and TransJual=Trans;
             when upper('Tr_BayarBeli') then select ifnull(max(substring(noBayarB,7,3)),0) into NoInt from TR_BayarBeli_m where left(NoBayarB,6)=concat(yy,mm,dd);
             when upper('Tr_BayarJual') then select ifnull(max(substring(noBayarJ,7,3)),0) into NoInt from TR_BayarJual_m where left(NoBayarJ,6)=concat(yy,mm,dd);
             when upper('Tr_BayarJualRakitan') then select ifnull(max(substring(noBayarJ,7,3)),0) into NoInt from TR_BayarJualRakitan_m where left(NoBayarJ,6)=concat(yy,mm,dd);
             when upper('Tr_RetBeli') then select ifnull(max(substring(noRetB,7,3)),0) into NoInt from TR_RetBeli_m where left(NoRetB,6)=concat(yy,mm,dd) and TransRetB=Trans;
             when upper('Tr_RetJual') then select ifnull(max(substring(noRetJ,8,3)),0) into NoInt from TR_RetJual_m where substring(NoRetJ,2,6)=concat(yy,mm,dd) and TransRetJ=Trans;
             when upper('Tr_RetJualR') then select ifnull(max(substring(noRetJ,7,3)),0) into NoInt from TR_RetJualR_m where left(NoRetJ,6)=concat(yy,mm,dd) and TransRetJ=Trans;
             when upper('Tr_RetJualRakitan') then select ifnull(max(substring(noRetJ,7,3)),0) into NoInt from TR_RetJualRakitan_m where left(NoRetJ,6)=concat(yy,mm,dd) and TransRetJ=Trans;
             when upper('Tr_PoJual') then select ifnull(max(substring(nopo,7,3)),0) into NoInt from TR_PoJual_m where left(NoPo,6)=concat(yy,mm,dd);
             when upper('Tr_PoJualRakitan') then select ifnull(max(substring(nopo,7,3)),0) into NoInt from TR_PoJualRakitan_m where left(NoPo,6)=concat(yy,mm,dd);
             when upper('Tr_PIndahGd') then select ifnull(max(substring(noPindahGd,7,3)),0) into NoInt from Tr_PindahGd_M where left(noPindahGd,6)=concat(yy,mm,dd);
             when upper('Tr_BuangGd') then select ifnull(max(substring(noBuangGd,8,3)),0) into NoInt from Tr_BuangGd_M where SUBSTRING(noBuangGd,2,6)=concat(yy,mm,dd);
             when upper('Close') then select ifnull(max(substring(noClose,7,3)),0) into NoInt from TR_JualR_m where left(NoJualR,6)=concat(yy,mm,dd) and TransRetail=Trans;
      end case;
        if NoInt=0 then
           set NoBaru = concat(nUser,yy,mm,dd,'001');
        else
           set noInt = noInt + 1;
           set noStr = noInt;
           set NoBaru= concat(nUser,yy,mm,dd,repeat('0',3-length(NoStr)),NoStr);
        end if;
     end if;
  end if;
  update tm_setupall set nilaichar=NoBaru where groups='Nomor' and subgroups=codes;
  Return NoBaru;
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP FUNCTION IF EXISTS `GenAnggota_id_tm_anggota` */;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 FUNCTION `GenAnggota_id_tm_anggota`() RETURNS char(5) CHARSET latin1
BEGIN
  DECLARE nomor INTEGER DEFAULT 0;
  DECLARE VPK char(5) DEFAULT 0;
  SELECT IFNULL(MAX(right(Anggota_id,5)), 0)+1 INTO nomor FROM tm_anggota;
  SET vpk=INSERT('00000',6-LENGTH(nomor), length(nomor), nomor);
  RETURN concat(vPK);
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP FUNCTION IF EXISTS `GenKodeBrg` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 FUNCTION `GenKodeBrg`(NoBk char(10)) RETURNS char(13) CHARSET latin1
BEGIN
  DECLARE nomor INTEGER DEFAULT 0;
  DECLARE VPK char(10) DEFAULT 0;
  SELECT IFNULL(MAX(right(kodebrg,8)), 0)+1 INTO nomor FROM tm_barang where left(kodebrg,length(nobk))=NoBk;
  SET vpk=INSERT('00000000',9-LENGTH(nomor), length(nomor), nomor);
  RETURN upper(concat(NoBk,vPK));
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP FUNCTION IF EXISTS `GenKodeCust` */;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 FUNCTION `GenKodeCust`(NoBk char(10)) RETURNS char(13) CHARSET latin1
BEGIN
  DECLARE nomor INTEGER DEFAULT 0;
  DECLARE VPK char(3) DEFAULT 0;
  SELECT IFNULL(MAX(right(kodecust,3)), 0)+1 INTO nomor FROM tm_customer where left(kodecust,length(nobk))=NoBk;
  SET vpk=INSERT('000',4-LENGTH(nomor), length(nomor), nomor);
  RETURN upper( concat(NoBk,vPK));
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP FUNCTION IF EXISTS `GenNoBuktiJurnal` */;;
/*!50003 SET SESSION SQL_MODE="NO_AUTO_VALUE_ON_ZERO"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 FUNCTION `GenNoBuktiJurnal`(NoBk char(10)) RETURNS char(13) CHARSET latin1
BEGIN
  DECLARE nomor INTEGER DEFAULT 0;
  DECLARE VPK char(3) DEFAULT 0;
  SELECT IFNULL(MAX(right(no_bukti,3)), 0)+1 INTO nomor FROM tJurnal where left(no_bukti,length(nobk))=NoBk;
  SET vpk=INSERT('000',4-LENGTH(nomor), length(nomor), nomor);
  RETURN concat(NoBk,vPK);
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP FUNCTION IF EXISTS `sDQuot` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 FUNCTION `sDQuot`(text VARCHAR(2000)) RETURNS varchar(2000) CHARSET latin1
BEGIN
	RETURN CONCAT('"', text, '"');
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP FUNCTION IF EXISTS `sQuot` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 FUNCTION `sQuot`(text VARCHAR(2000)) RETURNS varchar(2000) CHARSET latin1
BEGIN
	RETURN CONCAT("'",text, "'");
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `CL_BayarBeli_Delete` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `CL_BayarBeli_Delete`(sNoTransBayar CHAR(36))
BEGIN
SET @ProcJurnal = 'dbkeramik2.DeleteJurnal_BayarBeli';
	SET @SourceDB = 'dbsamir'; 
	SET @TargetDB ='cv_samirjaya';
	SET @TblMaster = 'tr_bayarbeli_m';
	SET @TblDetail = 'tr_bayarbeli_d';
	SET @TblScr = 'tr_scrbayarbeli';
	SET @KeyField = 'NoBayarB';
	SET @TransKeyField = 'NoBeli';
	
	SET @UidScr = "";
	SET @Qry = CONCAT("SELECT GROUP_CONCAT(sQuot(UID)) INTO @UidScr FROM ", @SourceDB, ".", @TblScr, " WHERE ", @KeyField, " = ", sQuot(sNoTransBayar), ";");
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @UidMaster = "";
	SET @Qry = CONCAT("SELECT GROUP_CONCAT(sQuot(UID)) INTO @UidMaster FROM ", @SourceDB, ".", @TblMaster, " WHERE ", @KeyField, " = ", sQuot(sNoTransBayar), ";");
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @UidDetail = "";
	SET @Qry = CONCAT("SELECT GROUP_CONCAT(sQuot(UID)) INTO @UidDetail FROM ", @SourceDB, ".", @TblDetail, " WHERE ", @KeyField, " = ", sQuot(sNoTransBayar), ";");
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @NewNo = (SELECT NoBayarB FROM dbkeramik2.tr_scrbayarbeli WHERE POSITION(UID IN @UidScr) > 0  LIMIT 0,1);
	IF TRIM(IFNULL(@UidScr,"")) <> "" THEN
		SET @Qry=CONCAT("DELETE FROM ", @TargetDB, ".", @TblScr, " WHERE UID IN", "(", @UidScr, ");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
	IF TRIM(IFNULL(@UidDetail,"")) <> "" THEN
		SET @Qry=CONCAT("DELETE FROM ", @TargetDB, ".", @TblDetail, " WHERE UID IN (",@UidDetail, ");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
	IF TRIM(IFNULL(@UidMaster,"")) <> "" THEN
		SET @Qry=CONCAT("DELETE FROM ", @TargetDB, ".", @TblMaster, " WHERE UID IN (",@UidMaster, ");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
	IF TRIM(IFNULL(@NewNo,"")) <> "" THEN
		SET @Qry=CONCAT("CALL ", @ProcJurnal, "(", sQuot(@NewNo), ");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `CL_BayarJualRetail_Delete` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `CL_BayarJualRetail_Delete`(sNoTransBayar CHAR(36))
BEGIN
	SET @ProcJurnal = 'dbkeramik2.DeleteJurnal_BayarRetail';
	SET @SourceDB = 'dbsamir'; 
	SET @TargetDB ='cv_samirjaya';
	SET @TblMaster = 'tr_bayarjualr_m';
	SET @TblDetail = 'tr_bayarjualr_d';
	SET @TblScr = 'tr_scrbayarjualr';
	SET @KeyField = 'NoBayarJ';
	SET @TransKeyField = 'NoJualR';
	SET @UidScr = "";
	SET @Qry = CONCAT("SELECT GROUP_CONCAT(sQuot(UID)) INTO @UidScr FROM ", @SourceDB, ".", @TblScr, " WHERE ", @KeyField, " = ", sQuot(sNoTransBayar), ";");
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @NewNo = (SELECT NoBayarJ FROM dbkeramik2.tr_scrbayarjualr WHERE POSITION(UID IN @UidScr) > 0 LIMIT 0,1);
	SET @UidMaster = "";
	SET @Qry = CONCAT("SELECT GROUP_CONCAT(sQuot(UID)) INTO @UidMaster FROM ", @SourceDB, ".", @TblMaster, " WHERE ", @KeyField, " = ", sQuot(sNoTransBayar), ";");
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @UidDetail = "";
	SET @Qry = CONCAT("SELECT GROUP_CONCAT(sQuot(UID)) INTO @UidDetail FROM ", @SourceDB, ".", @TblDetail, " WHERE ", @KeyField, " = ", sQuot(sNoTransBayar), ";");
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	IF TRIM(IFNULL(@UidDetail,"")) <> "" THEN
		SET @Qry=CONCAT("DELETE FROM ", @TargetDB, ".", @TblDetail, " WHERE UID IN (",@UidDetail, ");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
	IF TRIM(IFNULL(@UidMaster,"")) <> "" THEN
		SET @Qry=CONCAT("DELETE FROM ", @TargetDB, ".", @TblMaster, " WHERE UID IN (",@UidMaster, ");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
	IF TRIM(IFNULL(@UidScr,"")) <> "" THEN
		SET @Qry=CONCAT("DELETE FROM ", @TargetDB, ".", @TblScr, " WHERE UID IN", "(", @UidScr, ");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
	IF TRIM(IFNULL(@NewNo,"")) <> "" THEN
		SET @Qry=CONCAT("CALL ", @ProcJurnal, "(", sQuot(@NewNo), ");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `CL_BayarJualRetail_Insert` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `CL_BayarJualRetail_Insert`(sNoTransBayarJ CHAR(36))
BEGIN
	
	SET @SourceDB = 'dbsamir'; 
	SET @TargetDB ='cv_samirjaya';
	CALL CL_BayarJualRetail_Delete(sNoTransBayarJ);
	
	SET @ProcJurnal = 'dbkeramik2.SimpanJurnal_BayarRetail';
	SET @TblMaster = 'tr_jualr_m';
	SET @TblDetail = 'tr_jualr_d';
	SET @TblScr = 'tr_scrbayarjualr';
	SET @TblByrMaster = 'tr_bayarjualr_m';
	SET @TblByrDetail = 'tr_bayarjualr_d';
	SET @KeyField = 'NoBayarJ';	
	SET @TransKeyField = 'NoJualR';
	SET @FieldTgl = 'TglBayarJ';
	SET @FormatNo = '%y%m';
	SET @PrefixNo = "";
	SET @GetPrefix= CONCAT("SELECT DATE_FORMAT(", @FieldTgl, ",", sDQuot(@FormatNo), ") INTO @PrefixNo FROM ", @SourceDB,".", @TblByrMaster, " WHERE ", @KeyField, " = ", sQuot(sNoTransBayarJ), " LIMIT 0,1;");
	 
	PREPARE stmt FROM @GetPrefix; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	SET @MaxTrans = 0;
	SET @GetMaxTrans = CONCAT("SELECT IFNULL(MAX(RIGHT(", @KeyField, ",LENGTH(", @KeyField, ") - LENGTH(@PrefixNo))) + 1,1) INTO @MaxTrans FROM ", @TargetDB, ".", @TblScr, " WHERE LEFT(",@KeyField, ",", LENGTH(@PrefixNo),") = ", sQuot(@PrefixNo),";");
	
	PREPARE stmt FROM @GetMaxTrans;
 	EXECUTE stmt;
 	DEALLOCATE PREPARE stmt;
	
	SET @NewNo = sQuot(CONCAT(@PrefixNo, LPAD(@MaxTrans, 5, "0")));
	SET @ColumnM = "";
	SET @ColumnD = "";
  	SET @ColumnScr = "";
	
	SET @ColM = CONCAT("SELECT GROUP_CONCAT(COLUMN_NAME) INTO @ColumnM FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME=", sQuot(@TblByrMaster), " AND TABLE_SCHEMA=", sQuot(@SourceDB) , ";");
	SET @ColScr = CONCAT("SELECT GROUP_CONCAT(COLUMN_NAME) INTO @ColumnScr FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME=", sQuot(@TblScr), " AND TABLE_SCHEMA=", sQuot(@SourceDB) , ";");	
	SET @ColD = CONCAT("SELECT GROUP_CONCAT(COLUMN_NAME) INTO @ColumnD FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME=", sQuot(@TblByrDetail), " AND TABLE_SCHEMA=", sQuot(@SourceDB) , ";");
	PREPARE stmt FROM @ColScr; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	PREPARE stmt FROM @ColM; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	PREPARE stmt FROM @ColD; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	
	SET @ColumnValM = REPLACE(@ColumnM, @KeyField, CONCAT(@NewNo, " AS ", @KeyField));	
	SET @Qry=CONCAT("INSERT INTO ", @TargetDB, ".", @TblByrMaster, "(", @ColumnM, ") SELECT ", @ColumnValM," FROM ", @SourceDB , ".", @TblByrMaster, " WHERE " , @KeyField, " = ", sQuot(sNoTransBayarJ),  ";");  
 	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @ColumnValScr = REPLACE(@ColumnScr, @KeyField, CONCAT(@NewNo, " AS ", @KeyField));	
	SET @ColumnValScr = REPLACE(@ColumnValScr, "NoJual", CONCAT("(SELECT NoJualR FROM ", @TargetDB, ".", @TblMaster, " WHERE Uid=UidTrans)"));
	SET @Qry=CONCAT("INSERT INTO ", @TargetDB, ".", @TblScr, "(", @ColumnScr, ") SELECT ", @ColumnValScr," FROM ", @SourceDB , ".", @TblScr, " WHERE " , @KeyField, " = ", sQuot(sNoTransBayarJ),  ";");
  PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @ColumnValD = REPLACE(@ColumnD, @KeyField, CONCAT(@NewNo, " AS ", @KeyField));  
	
	SET @Qry=CONCAT("INSERT INTO ", @TargetDB, ".", @TblByrDetail, "(", @ColumnD, ") SELECT ", @ColumnValD," FROM ", @SourceDB , ".", @TblByrDetail, " WHERE " , @KeyField, " = ", sQuot(sNoTransBayarJ),  ";"); 
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @Qry=CONCAT("UPDATE ", @TargetDB, ".", @TblMaster, " a JOIN ", @TargetDB, ".", @TblScr, " b ON b.UidTrans=a.Uid AND b.",@KeyField,"=", @NewNo, " SET a.SisaBayar=IFNULL(a.SisaBayar,0)- IFNULL(b.Nilai,0);");
	
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	
	IF TRIM(IFNULL(@NewNo,"")) <> "" THEN
		SET @Qry=CONCAT("CALL ", @ProcJurnal, "(", @NewNo, ");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
	
	
	
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `CL_Beli_Delete` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `CL_Beli_Delete`(sNoTrans CHAR(36))
BEGIN	 
	SET @ProcJurnal = 'dbkeramik2.DeleteJurnal_Pembelian';
	SET @SourceDB = 'dbsamir'; 
	SET @TargetDB ='cv_samirjaya';
	SET @TblMaster = 'tr_beli_m';
	SET @TblDetail = 'tr_beli_d';
	SET @KeyField = 'NoBeli';
	SET @UidDetail = "";
	SET @Qry = CONCAT("SELECT GROUP_CONCAT(sQuot(UID)) INTO @UidDetail FROM ", @SourceDB, ".", @TblDetail, " WHERE ", @KeyField, " = ", sQuot(sNoTrans), ";");
	
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @NewNo = (SELECT NoBeli FROM dbkeramik2.tr_beli_d WHERE POSITION(UID IN @UidDetail) > 0 LIMIT 0,1);
	IF TRIM(IFNULL(@NewNo, "")) <> "" THEN
		SET @Tgl= (SELECT TglBeli FROM dbkeramik2.tr_beli_m WHERE NoBeli=@NewNo LIMIT 0,1);
	END IF;
	IF TRIM(IFNULL(@UidDetail,"")) <> "" THEN
		SET @Qry=CONCAT("DELETE FROM ", @TargetDB, ".", @TblDetail, " WHERE Uid IN (", @UidDetail ,");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
	SET @Qry=CONCAT("DELETE FROM ", @TargetDB, ".", @TblMaster, " WHERE Uid=(SELECT Uid FROM (SELECT * FROM ", @SourceDB, ".", @TblMaster, ")x  WHERE ", @KeyField, " = ", sQuot(sNoTrans) , ");");
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	IF TRIM(IFNULL(@NewNo,"")) <> "" THEN
		SET @Qry=CONCAT("CALL ", @ProcJurnal, "(", sQuot(@NewNo), ",", sQuot(DATE_FORMAT(@Tgl, '%Y-%m-%d')),");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `CL_Beli_Insert` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `CL_Beli_Insert`(sNoTrans CHAR(36))
BEGIN
	SET @SourceDB = 'dbsamir'; 
	SET @TargetDB ='cv_samirjaya';
	CALL CL_Beli_Delete(sNoTrans);
	SET @ProcJurnal = 'dbkeramik2.SimpanJurnal_Pembelian';
	SET @TblMaster = 'tr_beli_m';
	SET @TblDetail = 'tr_beli_d';
	SET @KeyField = 'NoBeli';
	SET @FieldTgl = 'TglBeli';
	SET @FormatNo = '%y%m';
	SET @PrefixNo = "";
	SET @GetPrefix= CONCAT("SELECT DATE_FORMAT(", @FieldTgl, ",", sDQuot(@FormatNo), ") INTO @PrefixNo FROM ", @SourceDB,".", @TblMaster, " WHERE ", @KeyField, " = ", sQuot(sNoTrans), ";");
	 
	PREPARE stmt FROM @GetPrefix; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	SET @MaxTrans = 0;
	SET @GetMaxTrans = CONCAT("SELECT IFNULL(MAX(RIGHT(", @KeyField, ",LENGTH(", @KeyField, ") - LENGTH(@PrefixNo))) + 1,1) INTO @MaxTrans FROM ", @TargetDB, ".", @TblMaster, " WHERE LEFT(",@KeyField, ",", LENGTH(@PrefixNo),") = ", sQuot(@PrefixNo),";");
	PREPARE stmt FROM @GetMaxTrans; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	
	SET @NewNo = sQuot(CONCAT(@PrefixNo, LPAD(@MaxTrans, 5, "0")));
	SET @ColumnM = "";
	SET @ColumnD = "";
	SET @ColumnBrg = "";
	SET @ColumnSupp = "";
	SET @ColM = CONCAT("SELECT GROUP_CONCAT(COLUMN_NAME) INTO @ColumnM FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME=", sQuot(@TblMaster), " AND TABLE_SCHEMA=", sQuot(@SourceDB) , ";");
	SET @ColD = CONCAT("SELECT GROUP_CONCAT(COLUMN_NAME) INTO @ColumnD FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME=", sQuot(@TblDetail), " AND TABLE_SCHEMA=", sQuot(@SourceDB) , ";");
	SET @ColBrg = CONCAT("SELECT GROUP_CONCAT(COLUMN_NAME) INTO @ColumnBrg FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='tm_barang' AND TABLE_SCHEMA=", sQuot(@SourceDB) , ";");	
	SET @ColSupp = CONCAT("SELECT GROUP_CONCAT(COLUMN_NAME) INTO @ColumnSupp FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='tm_supplier' AND TABLE_SCHEMA=", sQuot(@SourceDB) , ";");	
	
	PREPARE stmt FROM @ColM; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	PREPARE stmt FROM @ColD; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	PREPARE stmt FROM @ColBrg; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	PREPARE stmt FROM @ColSupp; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	SET @ListBrg= "";
	SET @Qry = CONCAT("SELECT GROUP_CONCAT(sQuot(KodeBrg)) INTO @ListBrg FROM ", @SourceDB, ".", @TblDetail, " WHERE ", @KeyField, " = ", sQuot(sNoTrans), ";");
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @Qry=CONCAT("INSERT INTO ", @TargetDB, ".tm_barang", "(", @ColumnBrg, ") SELECT ", @ColumnBrg," FROM ", @SourceDB , ".tm_barang", " WHERE KodeBrg IN (" , @ListBrg, ") ON DUPLICATE KEY UPDATE KodeBrg=VALUES(KodeBrg);"); 
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @KodeSupp= "";
	SET @Qry = CONCAT("SELECT KodeSupp INTO @KodeSupp FROM ", @SourceDB, ".", @TblMaster, " WHERE ", @KeyField, " = ", sQuot(sNoTrans), ";");
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	IF TRIM(IFNULL(@KodeSupp,"")) <> "" THEN
		SET @Qry=CONCAT("INSERT INTO ", @TargetDB, ".tm_supplier", "(", @ColumnSupp, ") SELECT ", @ColumnSupp," FROM ", @SourceDB , ".tm_supplier", " WHERE KodeSupp =" , sQuot(@KodeSupp), " ON DUPLICATE KEY UPDATE KodeSupp=VALUES(KodeSupp);"); 
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
	SET @ColumnValM = REPLACE(@ColumnM, @KeyField, CONCAT(@NewNo, " AS ", @KeyField));		
	SET @ColumnValM = REPLACE(@ColumnValM, "Sisa", "Nilai AS Sisa");	
	SET @Qry=CONCAT("INSERT INTO ", @TargetDB, ".", @TblMaster, "(", @ColumnM, ") SELECT ", @ColumnValM," FROM ", @SourceDB , ".", @TblMaster, " WHERE " , @KeyField, " = ", sQuot(sNoTrans),  ";"); 
  	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @ColumnValD = REPLACE(@ColumnD, @KeyField, CONCAT(@NewNo, " AS ", @KeyField)); 
	SET @Qry=CONCAT("INSERT INTO ", @TargetDB, ".", @TblDetail, "(", @ColumnD, ") SELECT ", @ColumnValD," FROM ", @SourceDB , ".", @TblDetail, " WHERE " , @KeyField, " = ", sQuot(sNoTrans),  ";"); 
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	
	IF TRIM(IFNULL(@NewNo,"")) <> "" THEN
		SET @Qry=CONCAT("CALL ", @ProcJurnal, "(", @NewNo, ");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
	
	
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `CL_JualRetail_Delete` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `CL_JualRetail_Delete`(sNoTrans CHAR(36))
BEGIN
	SET @ProcJurnal = 'dbkeramik2.DeleteJurnal_JualRetail';
	SET @SourceDB = 'dbsamir'; 
	SET @TargetDB ='cv_samirjaya';
	SET @TblMaster = 'tr_jualr_m';
	SET @TblDetail = 'tr_jualr_d';
	SET @KeyField = 'NoJualR';
	SET @UidDetail = "";
	SET @Qry = CONCAT("SELECT GROUP_CONCAT(sQuot(UID)) INTO @UidDetail FROM ", @SourceDB, ".", @TblDetail, " WHERE ", @KeyField, " = ", sQuot(sNoTrans), ";");
	PREPARE stmt FROM @Qry;
	EXECUTE stmt;
	DEALLOCATE PREPARE stmt;
	SET @NewNo = (SELECT NoJualR FROM dbkeramik2.tr_jualr_d WHERE POSITION(UID IN @UidDetail) > 0 LIMIT 0,1);
	IF TRIM(IFNULL(@NewNo, "")) <> "" THEN
		SET @Tgl= (SELECT TglJual FROM dbkeramik2.tr_jualr_m WHERE NoJualR=@NewNo LIMIT 0,1);
	END IF;
	IF TRIM(IFNULL(@UidDetail,"")) <> "" THEN
		SET @Qry= CONCAT("DELETE FROM ", @TargetDB, ".", @TblDetail, " WHERE Uid IN (", @UidDetail ,");");
		PREPARE stmt FROM @Qry;
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
	SET @Qry=CONCAT("DELETE FROM ", @TargetDB, ".", @TblMaster, " WHERE Uid=(SELECT Uid FROM ", @SourceDB, ".", @TblMaster, " WHERE ", @KeyField, " = ", sQuot(sNoTrans) , ");");
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	IF TRIM(IFNULL(@NewNo,"")) <> "" THEN
		SET @Qry=CONCAT("CALL ", @ProcJurnal, "(", sQuot(@NewNo), ",", sQuot(DATE_FORMAT(@Tgl, '%Y-%m-%d')), ");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `CL_JualRetail_Insert` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `CL_JualRetail_Insert`(sNoTrans CHAR(36))
BEGIN
	
	SET @SourceDB = 'dbsamir'; 
	SET @TargetDB ='cv_samirjaya';
	CALL CL_JualRetail_Delete(sNoTrans);
	SET @ProcJurnal = 'dbkeramik2.SimpanJurnal_JualRetail';
	SET @TblMaster = 'tr_jualr_m';
	SET @TblDetail = 'tr_jualr_d';
	SET @KeyField = 'NoJualR';
	SET @FieldTgl = 'TglJual';
	SET @FormatNo = '%y%m';
	SET @PrefixNo = "";
	SET @GetPrefix= CONCAT("SELECT DATE_FORMAT(", @FieldTgl, ",", sDQuot(@FormatNo), ") INTO @PrefixNo FROM ", @SourceDB,".", @TblMaster, " WHERE ", @KeyField, " = ", sQuot(sNoTrans), ";");
	
  
	PREPARE stmt FROM @GetPrefix; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	SET @MaxTrans = 0;
	SET @GetMaxTrans = CONCAT("SELECT IFNULL(MAX(RIGHT(", @KeyField, ",LENGTH(", @KeyField, ") - LENGTH(@PrefixNo))) + 1,1) INTO @MaxTrans FROM ", @TargetDB, ".", @TblMaster, " WHERE LEFT(",@KeyField, ",", LENGTH(@PrefixNo),") = ", sQuot(@PrefixNo),";");
	
	PREPARE stmt FROM @GetMaxTrans; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	
	SET @NewNo = sQuot(CONCAT(@PrefixNo, LPAD(@MaxTrans, 5, "0")));
	SET @ColumnM = "";
	SET @ColumnD = "";	
	SET @ColumnBrg = "";	
	SET @ColumnCust = "";
	SET @ColM = CONCAT("SELECT GROUP_CONCAT(COLUMN_NAME) INTO @ColumnM FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME=", sQuot(@TblMaster), " AND TABLE_SCHEMA=", sQuot(@SourceDB) , ";");
	SET @ColD = CONCAT("SELECT GROUP_CONCAT(COLUMN_NAME) INTO @ColumnD FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME=", sQuot(@TblDetail), " AND TABLE_SCHEMA=", sQuot(@SourceDB) , ";");	
	SET @ColBrg = CONCAT("SELECT GROUP_CONCAT(COLUMN_NAME) INTO @ColumnBrg FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='tm_barang' AND TABLE_SCHEMA=", sQuot(@SourceDB) , ";");	
	SET @ColCust = CONCAT("SELECT GROUP_CONCAT(COLUMN_NAME) INTO @ColumnCust FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='tm_customer' AND TABLE_SCHEMA=", sQuot(@SourceDB) , ";");	
	
	PREPARE stmt FROM @ColM; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	PREPARE stmt FROM @ColD; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	PREPARE stmt FROM @ColBrg; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	PREPARE stmt FROM @ColCust; 
 	EXECUTE stmt; 
 	DEALLOCATE PREPARE stmt;
	SET @ListBrg= "";
	SET @Qry = CONCAT("SELECT GROUP_CONCAT(sQuot(KodeBrg)) INTO @ListBrg FROM ", @SourceDB, ".", @TblDetail, " WHERE ", @KeyField, " = ", sQuot(sNoTrans), ";");
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @Qry=CONCAT("INSERT INTO ", @TargetDB, ".tm_barang", "(", @ColumnBrg, ") SELECT ", @ColumnBrg," FROM ", @SourceDB , ".tm_barang", " WHERE KodeBrg IN (" , @ListBrg, ") ON DUPLICATE KEY UPDATE KodeBrg=VALUES(KodeBrg);"); 
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	SET @KodeCust= "";
	SET @Qry = CONCAT("SELECT KodeCustR INTO  @KodeCust FROM ", @SourceDB, ".", @TblMaster, " WHERE ", @KeyField, " = ", sQuot(sNoTrans), ";");
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	IF TRIM(IFNULL(@KodeCust,"")) <> "" THEN
		SET @Qry=CONCAT("INSERT INTO ", @TargetDB, ".tm_customer", "(", @ColumnCust, ") SELECT ", @ColumnCust," FROM ", @SourceDB , ".tm_customer", " WHERE KodeCust =" , sQuot(@KodeCust), " ON DUPLICATE KEY UPDATE KodeCust=VALUES(KodeCust);"); 
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
	SET @ColumnValM = REPLACE(@ColumnM, @KeyField, CONCAT(@NewNo, " AS ", @KeyField));		
	SET @ColumnValM = REPLACE(@ColumnValM, "Sisa", "IF(Nilai - BayarTunai < 0, 0, Nilai-IFNULL(BayarTunai,0)) AS Sisa");	
	SET @Qry=CONCAT("INSERT INTO ", @TargetDB, ".", @TblMaster, "(", @ColumnM, ") SELECT ", @ColumnValM," FROM ", @SourceDB , ".", @TblMaster, " WHERE " , @KeyField, " = ", sQuot(sNoTrans),  ";");
    	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	
	SET @ColumnValD = REPLACE(@ColumnD, @KeyField, CONCAT(@NewNo, " AS ", @KeyField)); 
	SET @Qry=CONCAT("INSERT INTO ", @TargetDB, ".", @TblDetail, "(", @ColumnD, ") SELECT ", @ColumnValD," FROM ", @SourceDB , ".", @TblDetail, " WHERE " , @KeyField, " = ", sQuot(sNoTrans),  ";"); 
	PREPARE stmt FROM @Qry; 
	EXECUTE stmt; 
	DEALLOCATE PREPARE stmt;
	
	
	IF TRIM(IFNULL(@NewNo,"")) <> "" THEN
		SET @Qry=CONCAT("CALL ", @ProcJurnal, "(", @NewNo, ");");
		PREPARE stmt FROM @Qry; 
		EXECUTE stmt; 
		DEALLOCATE PREPARE stmt;
	END IF;
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteJurnal_BayarBeli` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `DeleteJurnal_BayarBeli`(sNoBayar VARCHAR(15))
BEGIN

	DECLARE NoBukti,sNoBukti VARCHAR(30); 

	

	Select No_bukti INTO sNoBukti from tjurnal_m where Jns_jurnal="JK" and Sandi_Trans_Id="YB" and Nobukti_Rtl=sNoBayar LIMIT 0,1;

    

	delete from tJurnal_d where Jns_Jurnal="JK" and No_bukti=sNoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and No_bukti=sNoBukti;

	SET NoBukti = CONCAT("YB",sNoBayar);

	delete from tJurnal_d where Jns_Jurnal="JK" and No_bukti=NoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and No_bukti=NoBukti;

END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteJurnal_BayarRetail` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `DeleteJurnal_BayarRetail`(sNoBayar VARCHAR(15))
BEGIN

	DECLARE NoBukti,sNoBukti VARCHAR(30);

	

	Select No_bukti INTO sNoBukti from tjurnal_m where Jns_jurnal="JK" and Sandi_Trans_Id="YR" and Nobukti_Rtl=sNoBayar LIMIT 0,1;

    

	delete from tJurnal_d where Jns_Jurnal="JK" and No_bukti=sNoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and No_bukti=sNoBukti;

	SET NoBukti = CONCAT("YR",sNoBayar);

	delete from tJurnal_d where Jns_Jurnal="JK" and No_bukti=NoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and No_bukti=NoBukti;

END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteJurnal_JualRetail` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `DeleteJurnal_JualRetail`(sNoJual VARCHAR(15), sTgl DATE)
BEGIN

  DECLARE sNoBukti, NoBukti VARCHAR(30);

	select No_bukti INTO sNoBukti from tjurnal_m where Jns_jurnal="JK" and tgl_validasi=Date(sTgl) and Sandi_Trans_Id="JR" and Nobukti_Rtl=sNoJual LIMIT 0,1;

  delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=sNoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=sNoBukti;

	#select gennobuktijurnal(CONCAT("JR",DATE_FORMAT(Date(sTgl),"%d%m%y"))) INTO NoBukti;

	SET NoBukti = CONCAT("JR",sNoJual);

	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=NoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=NoBukti;

END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteJurnal_Pembelian` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `DeleteJurnal_Pembelian`(sNoBeli VARCHAR(15), sTgl DATE)
BEGIN

  DECLARE sNoBukti, NoBukti VARCHAR(30); 

	Select No_bukti INTO sNoBukti from tjurnal where Jns_jurnal="JK" and tgl_validasi=Date(sTgl) and Sandi_Trans_Id="BT" and Nobukti_Rtl=sNoBeli LIMIT 0,1;  

	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=sNoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=sNoBukti;

	#select gennobuktijurnal(CONCAT("BT",DATE_FORMAT(Date(sTgl),"%y%m%d"))) INTO NoBukti;

	SET NoBukti = CONCAT("BT",sNoBeli);

	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=NoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=NoBukti;  

END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteJurnal_ReturBeli` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `DeleteJurnal_ReturBeli`(sNoRetB VARCHAR(15), sTgl DATE)
BEGIN
  DECLARE sNoBukti, NoBukti VARCHAR(30); 
	Select No_bukti INTO sNoBukti from tjurnal where Jns_jurnal="JK" and tgl_validasi=Date(sTgl) and Sandi_Trans_Id="RB" and Nobukti_Rtl=sNoRetB LIMIT 0,1;
	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=sNoBukti;
	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=sNoBukti;
	
	SET NoBukti = CONCAT("RB",sNoRetB);
	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=NoBukti;
	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=NoBukti;
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteJurnal_ReturRetail` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `DeleteJurnal_ReturRetail`(sNoRetJ VARCHAR(15))
BEGIN
	DECLARE NoBukti VARCHAR(30);
  DECLARE sNoBukti VARCHAR(30); 
	
	Select No_bukti INTO sNoBukti from tjurnal_m where Jns_jurnal="JK" and Sandi_Trans_Id="RR" and Nobukti_Rtl=sNoRetJ LIMIT 0,1; 
    
	delete from tJurnal_d where Jns_Jurnal="JK" and No_bukti=sNoBukti;
	delete from tJurnal_m where Jns_Jurnal="JK" and No_bukti=sNoBukti;
	SET NoBukti = CONCAT("RR",sNoRetJ);
	delete from tJurnal_d where Jns_Jurnal="JK" and No_bukti=NoBukti;
	delete from tJurnal_m where Jns_Jurnal="JK" and No_bukti=NoBukti;
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `HitungStock` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`link`@`%`*/ /*!50003 PROCEDURE `HitungStock`(sKodeGD VARCHAR(15))
BEGIN

	DECLARE finished INTEGER DEFAULT 0;

	DECLARE sKodeBrg VARCHAR(20);

	DECLARE sJenisBrg VARCHAR(20);

	DEClARE curBrg

		CURSOR FOR 

			SELECT x.* FROM (SELECT KodeBrg FROM tm_stockbrg WHERE KodeGD=sKodeGD) x;

	DECLARE CONTINUE HANDLER 

        FOR NOT FOUND SET finished = 1;

	OPEN curBrg;

	getBrg: LOOP

		FETCH curBrg INTO sKodeBrg;

		IF finished = 1 THEN 

			LEAVE getBrg;

		END IF;

		

	  SELECT JenisBrg INTO sJenisBrg FROM tm_barang WHERE KodeBrg=sKodeBrg;

		IF sJenisBrg="Inventory" THEN

			UPDATE tm_stockbrg set stockakhir=(SELECT 

				( IFNULL((SELECT IFNULL(a.SaldoAwal,0) * IFNULL(a.Konv,1)),0) +

				IFNULL((select sum(IFNULL(b.jml,0) * IFNULL(b.Konv,1)) from tr_beli_d b where a.kodebrg=b.kodebrg AND b.KodeGD=sKodeGD),0) -

				IFNULL((select sum(IFNULL(c.jml,0) * IFNULL(c.Konv,1)) from tr_retbeli_d c where a.kodebrg=c.kodebrg AND c.KodeGD=sKodeGD),0) -

				IFNULL((select sum(IFNULL(d.jml,0) * IFNULL(d.Konv,1)) from tr_jualr_d d where a.kodebrg=d.kodebrg AND d.KodeGD=sKodeGD),0) +

				IFNULL((select sum(IFNULL(e.jml,0) * IFNULL(e.Konv,1)) from tr_retjualr_d e where a.kodebrg=e.kodebrg AND e.KodeGD=sKodeGD),0) -

				IFNULL((select sum(IFNULL(f.jml,0) * IFNULL(f.Konv,1)) from tr_jual_d f where a.kodebrg=f.kodebrg AND f.KodeGD=sKodeGD),0) +

				IFNULL((select sum(IFNULL(g.jml,0) * IFNULL(g.Konv,1)) from tr_retjual_d g where a.kodebrg=g.KodeBrg AND g.KodeGD=sKodeGD),0) +

				IFNULL((select sum(IFNULL(h.jumlah,0) * IFNULL(h.Konv,1)) from tr_pindahgd_d h where a.kodebrg=h.KodeBrg AND h.KodeGDAsal=sKodeGD),0) -

				IFNULL((select sum(IFNULL(i.jumlah,0) * IFNULL(i.Konv,1)) from tr_pindahgd_d i where a.kodebrg=i.KodeBrg AND i.KodeGDTujuan=sKodeGD),0) -

				IFNULL((select sum(j.SelisihKurang) from tr_koreksistc_d j where a.kodebrg=j.kodebrg AND j.KodeGD=sKodeGD),0) +

				IFNULL((select sum(k.SelisihLebih) from tr_koreksistc_d k where a.kodebrg=k.kodebrg AND k.KodeGD=sKodeGD),0) 

				)

			FROM tb_saldoawal a WHERE a.kodebrg=sKodeBrg AND a.KodeGD=sKodeGD) WHERE KodeBrg=sKodeBrg AND KodeGD=sKodeGD;

		END IF;

		

	END LOOP getBrg;

	CLOSE curBrg;

END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `ProsesSimpanJurnal_Beli` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `ProsesSimpanJurnal_Beli`(sTglStart DATE, sTglEnd DATE)
BEGIN
	DECLARE finished INTEGER DEFAULT 0;
	DECLARE sNomer VARCHAR(20);
	DEClARE curNomer
		CURSOR FOR 
			SELECT x.NoBeli FROM (SELECT NoBeli FROM tr_beli_m WHERE TglBeli >= sTglStart AND TglBeli <= sTglEnd) x;
	DECLARE CONTINUE HANDLER 
        FOR NOT FOUND SET finished = 1;
	OPEN curNomer;
	getNomer: LOOP
		FETCH curNomer INTO sNomer;
		IF finished = 1 THEN 
			LEAVE getNomer;
		END IF;
		
		CALL SimpanJurnal_Pembelian(sNomer);
		
	END LOOP getNomer;
	CLOSE curNomer;
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `ProsesSimpanJurnal_Retail` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `ProsesSimpanJurnal_Retail`(sTglStart DATE, sTglEnd DATE)
BEGIN
	DECLARE finished INTEGER DEFAULT 0;
	DECLARE sNomer VARCHAR(20);
	DEClARE curNomer
		CURSOR FOR 
			SELECT x.NoJualR FROM (SELECT NoJualR FROM tr_jualr_m WHERE TglJual >= sTglStart AND TglJual <= sTglEnd) x;
	DECLARE CONTINUE HANDLER 
        FOR NOT FOUND SET finished = 1;
	OPEN curNomer;
	getNomer: LOOP
		FETCH curNomer INTO sNomer;
		IF finished = 1 THEN 
			LEAVE getNomer;
		END IF;
		
		CALL SimpanJurnal_JualRetail(sNomer);
		
	END LOOP getNomer;
	CLOSE curNomer;
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `ProsesSimpanJurnal_ReturBeli` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `ProsesSimpanJurnal_ReturBeli`(sTglStart DATE, sTglEnd DATE)
BEGIN
	DECLARE finished INTEGER DEFAULT 0;
	DECLARE sNomer VARCHAR(20);
	DEClARE curNomer
		CURSOR FOR 
			SELECT x.NoRetB FROM (SELECT NoRetB FROM tr_retbeli_m WHERE TglRetB >= sTglStart AND TglRetB <= sTglEnd) x;
	DECLARE CONTINUE HANDLER 
        FOR NOT FOUND SET finished = 1;
	OPEN curNomer;
	getNomer: LOOP
		FETCH curNomer INTO sNomer;
		IF finished = 1 THEN 
			LEAVE getNomer;
		END IF;
		
		CALL SimpanJurnal_ReturBeli(sNomer);
		
	END LOOP getNomer;
	CLOSE curNomer;
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `ProsesSimpanJurnal_ReturRetail` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `ProsesSimpanJurnal_ReturRetail`(sTglStart DATE, sTglEnd DATE)
BEGIN
	DECLARE finished INTEGER DEFAULT 0;
	DECLARE sNomer VARCHAR(20);
	DEClARE curNomer
		CURSOR FOR 
			SELECT x.NoRetJ FROM (SELECT NoRetJ FROM tr_retjualr_m WHERE TglRetJ >= sTglStart AND TglRetJ <= sTglEnd) x;
	DECLARE CONTINUE HANDLER 
        FOR NOT FOUND SET finished = 1;
	OPEN curNomer;
	getNomer: LOOP
		FETCH curNomer INTO sNomer;
		IF finished = 1 THEN 
			LEAVE getNomer;
		END IF;
		
		CALL SimpanJurnal_ReturRetail(sNomer);
		
	END LOOP getNomer;
	CLOSE curNomer;
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `SimpanJurnal_BayarBeli` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `SimpanJurnal_BayarBeli`(sNoBayar VARCHAR(15))
BEGIN

	DECLARE NoBukti,sNoBukti VARCHAR(30);

  DECLARE sKodePerk VARCHAR(30);

  DECLARE HPP DECIMAL(15,2);

	DECLARE sTgl DATE; 

	DECLARE sNamaSupp VARCHAR(100);

  DECLARE sNilai DECIMAL(15,2);

	DECLARE sJmlRow,sIndex INTEGER(4);

	

	SELECT m.TglBayarB,s.NamaSupp INTO sTgl,sNamaSupp FROM tr_bayarbeli_m m JOIN tm_supplier s ON m.KodeSupp=s.KodeSupp WHERE NoBayarB=sNoBayar;

	

	Select No_bukti INTO sNoBukti from tjurnal_m where Jns_jurnal="JK" and tgl_validasi=Date(sTgl) and Sandi_Trans_Id="YB" and Nobukti_Rtl=sNoBayar LIMIT 0,1;

    

	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=sNoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=sNoBukti;

	SET NoBukti = CONCAT("YB",sNoBayar);

	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=NoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=NoBukti;

	insert into tjurnal_m (tanggal,no_bukti,keterangan,Sandi_Trans_Id,Status_Val,Nobukti_Rtl,pst,jns_jurnal,tgl_validasi,tgl_edit,user) 	values 

		("0000-00-00",NoBukti,CONCAT("Pembayaran Pembelian No: YB-",sNoBayar," a.n ", sNamaSupp),"YB",0,sNoBayar,0,"JK",DATE(sTgl),now(),"ADMIN");

	

	SELECT COUNT(*) INTO sJmlRow FROM tr_bayarbeli_d WHERE NoBayarB=sNoBayar;

		

	SET sIndex=1;

	WHILE sIndex <= sJmlRow DO

		SELECT IFNULL(Bank,"111001"),Nilai INTO sKodePerk,sNilai FROM tr_bayarbeli_d WHERE NoBayarB=sNoBayar AND ItemDBayarB=sIndex;

		IF sKodePerk = '' THEN SET sKodePerk="111001"; END IF; 

		insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values 

				(YEAR(sTgl),DATE(sTgl),NoBukti,(sIndex * 2)-1,sKodePerk,sNilai,0,"JK");

		insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values 

				(YEAR(sTgl),DATE(sTgl),NoBukti,(sIndex * 2),"211001",0,sNilai,"JK");

		SET sIndex= sIndex + 1; 

	END WHILE;

END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `SimpanJurnal_BayarRetail` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `SimpanJurnal_BayarRetail`(sNoBayar VARCHAR(15))
BEGIN

	DECLARE NoBukti,sNoBukti VARCHAR(30); 

  DECLARE sKodePerk VARCHAR(30);

  DECLARE HPP DECIMAL(15,2);

	DECLARE sTgl DATE;

	DECLARE sNamaCust VARCHAR(100); 

  DECLARE sNilai DECIMAL(15,2);

	DECLARE sJmlRow,sIndex INTEGER(4);

	

	SELECT m.TglBayarJ,c.NamaCust INTO sTgl,sNamaCust FROM tr_bayarjualr_m m JOIN tm_customer c ON m.KodeCust=c.KodeCust WHERE NoBayarJ=sNoBayar;

	

	Select No_bukti INTO sNoBukti from tjurnal_m where Jns_jurnal="JK" and tgl_validasi=Date(sTgl) and Sandi_Trans_Id="YR" and Nobukti_Rtl=sNoBayar LIMIT 0,1;

    

	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=sNoBukti; 

	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=sNoBukti;

	SET NoBukti = CONCAT("YR",sNoBayar);

	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=NoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=NoBukti;

	insert into tjurnal_m (tanggal,no_bukti,keterangan,Sandi_Trans_Id,Status_Val,Nobukti_Rtl,pst,jns_jurnal,tgl_validasi,tgl_edit,user) 	values 

		("0000-00-00",NoBukti,CONCAT("Pembayaran Penjualan Retail No: YR-",sNoBayar," a.n ", sNamaCust),"YR",0,sNoBayar,0,"JK",DATE(sTgl),now(),"ADMIN");

	

	SELECT COUNT(*) INTO sJmlRow FROM tr_bayarjualr_d WHERE NoBayarJ=sNoBayar;

	

	

	SET sIndex=1;

	WHILE sIndex <= sJmlRow DO

		SELECT IFNULL(Bank,"111001"),Nilai INTO sKodePerk,sNilai FROM tr_bayarjualr_d WHERE NoBayarJ=sNoBayar AND ItemDBayarJ=sIndex;

		IF sKodePerk = '' THEN SET sKodePerk="111001"; END IF; 

		insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values 

				(YEAR(sTgl),DATE(sTgl),NoBukti,(sIndex * 2)-1,sKodePerk,sNilai,0,"JK");

		insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values 

				(YEAR(sTgl),DATE(sTgl),NoBukti,(sIndex * 2),"112001",0,sNilai,"JK");

		SET sIndex= sIndex + 1; 

	END WHILE;

END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `SimpanJurnal_JualRetail` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `SimpanJurnal_JualRetail`(sNoJual VARCHAR(15))
BEGIN

	DECLARE NoBukti VARCHAR(30); 

  DECLARE sNoBukti VARCHAR(30);

  DECLARE HPP DECIMAL(15,2);

	DECLARE sTgl DATE;

  DECLARE sNilai,sNilaiTanpaOngkir, sNilaiOngkir, sBayar DECIMAL(15,2);

	SELECT TglJual, Nilai, IFNULL(Tambahan,0), IFNULL(BayarTunai,0) INTO sTgl, sNilai, sNilaiOngkir,sBayar FROM tr_jualr_m WHERE NoJualR=sNoJual;

	SELECT SUM(d.HargaAVG * d.Jml) INTO HPP FROM tr_jualr_d d WHERE d.NoJualR=sNoJual;

	SET sNilaiTanpaOngkir = sNilai - sNilaiOngkir;

	Select No_bukti INTO sNoBukti from tjurnal where Jns_jurnal="JK" and tgl_validasi=Date(sTgl) and Sandi_Trans_Id="JR" and Nobukti_Rtl=sNoJual LIMIT 0,1;

    

	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=sNoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=sNoBukti;

	#select gennobuktijurnal(CONCAT("JR",DATE_FORMAT(Date(sTgl),"%d%m%y"))) INTO NoBukti;

	SET NoBukti = CONCAT("JR",sNoJual);

	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=NoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=NoBukti;



	insert into tjurnal_m (tanggal,no_bukti,keterangan,Sandi_Trans_Id,Status_Val,Nobukti_Rtl,pst,jns_jurnal,tgl_validasi,tgl_edit,user) 	values 

		("0000-00-00",NoBukti,CONCAT("Penjualan Retail No: JR-",sNoJual),"JR",0,sNoJual,0,"JK",DATE(sTgl),now(),"ADMIN");

	

	IF sBayar >= sNilai THEN

		insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,1,"511001",HPP,0,"JK");

		insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,2,"111001",sNilai,0,"JK");

		insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,3,"113001",0,HPP,"JK");

		insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,4,"411001",0,sNilaiTanpaOngkir,"JK");

		IF sNilaiOngkir > 0 THEN

			insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,5,"411002",0,sNilaiOngkir,"JK");

		END IF;

	ELSE

		insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,1,"511001",HPP,0,"JK");

		IF sBayar > 0 THEN

			insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,2,"111001",sBayar,0,"JK");

			insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,3,"112001",sNilai - sBayar,0,"JK");

			insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,4,"113001",0,HPP,"JK");

			insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,5,"411001",0,sNilaiTanpaOngkir,"JK");

			IF sNilaiOngkir > 0 THEN

				insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,6,"411002",0,sNilaiOngkir,"JK");

			END IF;

		ELSE

			insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,2,"112001",sNilai,0,"JK");

			insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,3,"113001",0,HPP,"JK");

			insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,4,"411001",0,sNilaiTanpaOngkir,"JK");

			IF sNilaiOngkir > 0 THEN

				insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,5,"411002",0,sNilaiOngkir,"JK");

			END IF;

		END IF;

	END IF;

END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `SimpanJurnal_Pembelian` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `SimpanJurnal_Pembelian`(sNoBeli  VARCHAR(15))
BEGIN

	DECLARE NoBukti VARCHAR(30); 

  DECLARE sNoBukti VARCHAR(30);  

  DECLARE HPP DECIMAL(15,2); 

	DECLARE sTgl DATE;

	DECLARE sNamaSupp VARCHAR(100);

  DECLARE sNilai DECIMAL(15,2);

	DECLARE sKodePerkD1,sKodePerkD2,sKodePerkD3 CHAR(6);

	DECLARE Persediaan1, Persediaan2, Persediaan3 DECIMAL(15,2);

	DECLARE sIndex,sJmlRow INTEGER;

	SELECT TglBeli,NamaSupp, Nilai  INTO sTgl,sNamaSupp, sNilai FROM tr_beli_m WHERE NoBeli=sNoBeli;

	Select No_bukti INTO sNoBukti from tjurnal where Jns_jurnal="JK" and tgl_validasi=Date(sTgl) and Sandi_Trans_Id="BT" and Nobukti_Rtl=sNoBeli LIMIT 0,1;

    

	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=sNoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=sNoBukti;

	#select gennobuktijurnal(CONCAT("BT",DATE_FORMAT(Date(sTgl),"%y%m%d"))) INTO NoBukti;

	SET NoBukti = CONCAT("BT",sNoBeli);

	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=NoBukti;

	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=NoBukti;

	insert into tjurnal_m (tanggal,no_bukti,keterangan,Sandi_Trans_Id,Status_Val,Nobukti_Rtl,pst,jns_jurnal,tgl_validasi,tgl_edit,user)	values 

		("0000-00-00",NoBukti,CONCAT("Pembelian BT-",sNoBeli," , a.n ", sNamaSupp),"BT",0,sNoBeli,0,"JK",DATE(sTgl),now(),"ADMIN");

	insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values 

			(YEAR(sTgl),DATE(sTgl),NoBukti,1,113001,sNilai,0,"JK");

	insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values 

			(YEAR(sTgl),DATE(sTgl),NoBukti,2,211001,0,sNilai,"JK");

END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `SimpanJurnal_ReturBeli` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `SimpanJurnal_ReturBeli`(sNoRetB  VARCHAR(15))
BEGIN
	DECLARE NoBukti VARCHAR(30); 
  DECLARE sNoBukti VARCHAR(30);
  DECLARE HPP DECIMAL(15,2); 
	DECLARE sTgl DATE;
	DECLARE sNamaSupp VARCHAR(100);
  DECLARE sNilai DECIMAL(15,2);
	DECLARE sKodePerkD1,sKodePerkD2,sKodePerkD3 CHAR(6);
	DECLARE Persediaan1, Persediaan2, Persediaan3 DECIMAL(15,2);
	DECLARE sIndex,sJmlRow INTEGER;
	SELECT TglRetB,(SELECT a.NamaSupp FROM tm_supplier a where a.KodeSupp=KodeSupp), Nilai  INTO sTgl,sNamaSupp, sNilai FROM tr_retbeli_m WHERE NoRetB=sNoRetB;
	Select No_bukti INTO sNoBukti from tjurnal where Jns_jurnal="JK" and tgl_validasi=Date(sTgl) and Sandi_Trans_Id="RB" and Nobukti_Rtl=sNoRetB LIMIT 0,1;
    
	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=sNoBukti;
	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=sNoBukti;
	
	SET NoBukti = CONCAT("RB",sNoRetB);
	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=NoBukti;
	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=NoBukti;
	insert into tjurnal_m (tanggal,no_bukti,keterangan,Sandi_Trans_Id,Status_Val,Nobukti_Rtl,pst,jns_jurnal,tgl_validasi,tgl_edit,user)	values 
		("0000-00-00",NoBukti,CONCAT("Retur Pembelian RT-",sNoRetB," , a.n ", sNamaSupp),"RB",0,sNoRetB,0,"JK",DATE(sTgl),now(),"ADMIN");
	insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values 
			(YEAR(sTgl),DATE(sTgl),NoBukti,1,113001,0,sNilai,"JK");
	insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values 
			(YEAR(sTgl),DATE(sTgl),NoBukti,2,211001,sNilai,0,"JK");
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
/*!50003 DROP PROCEDURE IF EXISTS `SimpanJurnal_ReturRetail` */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER"*/;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `SimpanJurnal_ReturRetail`(sNoRetJ VARCHAR(15))
BEGIN
	DECLARE NoBukti VARCHAR(30); 
  DECLARE sNoBukti VARCHAR(30);
  DECLARE HPP DECIMAL(15,2);
	DECLARE sTgl DATE;
  DECLARE sNilai DECIMAL(15,2); 
	SELECT r.TglRetJ, r.Nilai INTO sTgl, sNilai 
		FROM tr_retjualr_m r WHERE r.NoRetJ=sNoRetJ;
	SELECT SUM(d.HargaAVG * d.Jml) INTO HPP FROM tr_retjualr_d d WHERE d.NoRetJ=sNoRetJ; 
	
	Select No_bukti INTO sNoBukti from tjurnal_m where Jns_jurnal="JK" and tgl_validasi=Date(sTgl) and Sandi_Trans_Id="RR" and Nobukti_Rtl=sNoRetJ LIMIT 0,1;
    
	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=sNoBukti;
	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=sNoBukti;
	SET NoBukti = CONCAT("RR",sNoRetJ);
	delete from tJurnal_d where Jns_Jurnal="JK" and Tanggal=Date(sTgl) and No_bukti=NoBukti;
	delete from tJurnal_m where Jns_Jurnal="JK" and Tgl_validasi=Date(sTgl) and No_bukti=NoBukti;
	insert into tjurnal_m (tanggal,no_bukti,keterangan,Sandi_Trans_Id,Status_Val,Nobukti_Rtl,pst,jns_jurnal,tgl_validasi,tgl_edit,user) 	values 
		("0000-00-00",NoBukti,CONCAT("Retur Penjualan Retail No: RR-",sNoRetJ),"RR",0,sNoRetJ,0,"JK",DATE(sTgl),now(),"ADMIN");
		
	insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,1,"511001",0,HPP,"JK");
	insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,2,"111001",0,sNilai,"JK");
	insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,3,"113001",HPP,0,"JK");
	insert into tjurnal_d(tahun,tanggal,no_bukti,row_id,kode_perk,debet,kredit,jns_jurnal) values (YEAR(sTgl),DATE(sTgl),NoBukti,4,"411001",sNilai,0,"JK");
END */;;
/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
DELIMITER ;

--
-- Final view structure for view `tjurnal`
--

/*!50001 DROP TABLE IF EXISTS `tjurnal`*/;
/*!50001 DROP VIEW IF EXISTS `tjurnal`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `tjurnal` AS select `a`.`Jns_jurnal` AS `Jns_jurnal`,`a`.`Tanggal` AS `Tanggal`,`a`.`Tgl_Validasi` AS `Tgl_Validasi`,`a`.`No_bukti` AS `No_bukti`,`b`.`Row_id` AS `Row_id`,`a`.`Keterangan` AS `Keterangan`,`a`.`Pst` AS `Pst`,`a`.`Tgl_Edit` AS `Tgl_Edit`,`a`.`User` AS `User`,`a`.`Sandi_trans_id` AS `Sandi_trans_id`,`a`.`Norek_Simp` AS `Norek_Simp`,`a`.`Norek_Pinj` AS `Norek_Pinj`,`a`.`Norek_Dep` AS `Norek_Dep`,`a`.`Status_Val` AS `Status_Val`,`a`.`Status_AB` AS `Status_AB`,`a`.`Nobukti_Rtl` AS `Nobukti_Rtl`,`b`.`Kode_perk` AS `Kode_perk`,`b`.`Debet` AS `Debet`,`b`.`Kredit` AS `Kredit`,`a`.`JenisBukti` AS `JenisBukti`,`a`.`Penerima` AS `Penerima` from (`tjurnal_m` `a` join `tjurnal_d` `b`) where ((`a`.`Jns_jurnal` = `b`.`Jns_jurnal`) and (`a`.`No_bukti` = `b`.`No_bukti`) and (`a`.`Tgl_Validasi` = `b`.`Tanggal`)) */;


