

CREATE TABLE `backset` (
  `url` varchar(100) NOT NULL,
  `sessiontime` varchar(4) DEFAULT NULL,
  `footer` varchar(50) DEFAULT NULL,
  `themesback` varchar(2) DEFAULT NULL,
  `responsive` varchar(2) DEFAULT NULL,
  `namabisnis1` tinytext NOT NULL,
  `tipenota` int(1) NOT NULL,
  `l153n53` int(11) NOT NULL,
  `printer` varchar(2) NOT NULL,
  `loginbg` varchar(255) NOT NULL,
  PRIMARY KEY (`url`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO backset VALUES("http://localhost/pro2","1000","Toko Andalan","2","0","Indotory Pro","1","2","80","dist/upload/images.jpg");



CREATE TABLE `barang` (
  `no` int(11) NOT NULL AUTO_INCREMENT,
  `kode` varchar(20) NOT NULL,
  `sku` varchar(20) NOT NULL,
  `nama` varchar(50) DEFAULT NULL,
  `kategori` varchar(20) DEFAULT 'NULL',
  `brand` text NOT NULL,
  `barcode` varchar(50) NOT NULL,
  `hargabeli` int(10) NOT NULL,
  `hargajual` int(11) NOT NULL,
  `terjual` int(11) NOT NULL,
  `terbeli` int(11) NOT NULL,
  `sisa` int(11) NOT NULL,
  `retur` int(10) NOT NULL,
  `stokmin` int(10) NOT NULL,
  `satuan` varchar(10) NOT NULL,
  `keterangan` varchar(200) DEFAULT 'NULL',
  PRIMARY KEY (`kode`),
  KEY `no` (`no`),
  KEY `jenis` (`kategori`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO barang VALUES("1","000001","SKU01","Dell 6510 Core i7 / NVIDIA/hdd 320/4gb","LAPTOP","DELL","IDWARE01","3133900","3750000","2","1","0","1","1","pcs","Laci AA");
INSERT INTO barang VALUES("2","000002","SKU02","HP8440p corei5 m520/hdd320/ram4","LAPTOP","HP","IDWARE02","2748900","3250000","0","0","2","0","2","pcs","Laci AA");
INSERT INTO barang VALUES("3","000003","SKU03","HP core i5 m520/4gb/320gb (dikirim HP8440 JUGA)","LAPTOP","HP","IDWARE03","2748900","3250000","1","0","3","0","3","pcs","Laci AA");
INSERT INTO barang VALUES("4","000004","SKU04","HARDDISK EXTERNAL 500Gb SEAGATE","DISK","SEAGATE","IDWARE04","533000","635000","2","2","5","0","4","pcs","Laci AA");
INSERT INTO barang VALUES("5","000005","SKU05","HARDDISK EXTERNAL 1TB SEAGATE","DISK","SEAGATE","IDWARE05","828100","850000","1","3","8","0","5","pcs","Laci AA");
INSERT INTO barang VALUES("6","000006","SKU06","MOUSE LOGITECH B100","AKSESORIS","LOGITECH","IDWARE06","100000","125000","0","0","7","0","6","pcs","Laci AA");
INSERT INTO barang VALUES("7","000007","SKU07","KABEL HDMI 3 METER","KABEL KONEKTOR","UNIVERSAL","IDWARE07","44000","85000","0","0","8","0","7","pcs","Laci AA");
INSERT INTO barang VALUES("8","000008","SKU08","Monitor Varro 19 Inch","MONITOR","VARRO","IDWARE08","923000","990000","0","0","9","0","8","pcs","Laci AA");
INSERT INTO barang VALUES("9","000009","SKU09","Kabel Hdmi 1.5m","KABEL KONEKTOR","UNIVERSAL","IDWARE09","14000","35000","0","0","10","0","9","pcs","Laci AA");
INSERT INTO barang VALUES("10","000010","SKU10","Adaptor 2a 12v For DVR Dan CCTV","LISTRIK","UNIVERSAL","IDWARE10","29500","50000","0","0","11","0","10","pcs","Laci AA");
INSERT INTO barang VALUES("11","000011","SKU11","Power Supply Jaring CCTV 12v/10a","LISTRIK","UNIVERSAL","IDWARE11","104000","150000","0","0","12","0","11","pcs","Laci AA");
INSERT INTO barang VALUES("12","000012","SKU12","Cctv Cabang 4","KABEL KONEKTOR","UNIVERSAL","IDWARE12","10000","3000","0","0","13","0","12","pcs","Laci AA");
INSERT INTO barang VALUES("13","000013","SKU13","Poe Kabel Splitter Injector SET","KABEL KONEKTOR","UNIVERSAL","IDWARE13","23000","50000","0","0","14","0","13","pcs","Laci AA");
INSERT INTO barang VALUES("14","000014","SKU14","Jack Bnc Cctv","KABEL KONEKTOR","UNIVERSAL","IDWARE14","4500","5000","0","0","15","0","14","pcs","Laci AA");
INSERT INTO barang VALUES("15","000015","SKU15","Jack Bnc Cctv TAIWAN","KABEL KONEKTOR","UNIVERSAL","IDWARE15","5700","5000","0","0","16","0","15","pcs","Laci AA");
INSERT INTO barang VALUES("16","000016","SKU16","Conector Sambungan Untuk Cctv BNC","KABEL KONEKTOR","UNIVERSAL","IDWARE16","9000","10000","0","57","74","0","16","pcs","Laci AA");
INSERT INTO barang VALUES("17","000017","SKU17","Lampu Bardi 9W","SMARTHOME","BARDI","IDWARE17","142500","185000","0","23","41","0","17","pcs","Laci AA");



CREATE TABLE `barang_setting` (
  `view_sku` int(1) NOT NULL,
  `view_nama` int(1) NOT NULL,
  `view_hbeli` int(1) NOT NULL,
  `view_hjual` int(1) NOT NULL,
  `view_stok` int(1) NOT NULL,
  `view_terjual` int(1) NOT NULL,
  `view_kategori` int(1) NOT NULL,
  `view_lokasi` int(1) NOT NULL,
  `view_warna` int(1) NOT NULL,
  `view_ukuran` int(1) NOT NULL,
  `view_merek` int(1) NOT NULL,
  `view_expired` int(1) NOT NULL,
  `view_satuan` int(1) NOT NULL,
  `kode` int(2) NOT NULL,
  PRIMARY KEY (`view_sku`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO barang_setting VALUES("1","1","1","1","1","1","1","0","0","0","0","0","1","99");



CREATE TABLE `bayar` (
  `nota` varchar(20) NOT NULL,
  `tglbayar` date DEFAULT NULL,
  `jam` varchar(10) NOT NULL,
  `bayar` int(11) DEFAULT NULL,
  `total` int(11) DEFAULT NULL,
  `kembali` int(11) DEFAULT NULL,
  `keluar` int(11) DEFAULT NULL,
  `kasir` varchar(100) DEFAULT NULL,
  `diskon` int(10) NOT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  `tipebayar` varchar(30) NOT NULL,
  `pelanggan` varchar(10) NOT NULL,
  `keterangan` varchar(100) NOT NULL,
  PRIMARY KEY (`nota`),
  KEY `no` (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO bayar VALUES("00001","2022-11-18","12:26","7000000","2450000","4550000","2748900","admin","800000","1","Cash","0000","Retur");



CREATE TABLE `beli` (
  `nota` varchar(20) NOT NULL,
  `nomor` varchar(50) NOT NULL,
  `tglbeli` date DEFAULT NULL,
  `jatuhtempo` date NOT NULL,
  `subtotal` int(10) NOT NULL,
  `biaya` int(10) NOT NULL,
  `total` int(11) DEFAULT NULL,
  `dp` int(10) NOT NULL,
  `sudahbayar` int(10) NOT NULL,
  `kredit` int(10) NOT NULL,
  `supplier` varchar(20) DEFAULT NULL,
  `status` varchar(10) NOT NULL,
  `kasir` varchar(100) DEFAULT NULL,
  `keterangan` varchar(200) DEFAULT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`nota`),
  KEY `no` (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO beli VALUES("000001","PB000001","2022-11-18","2022-11-19","7243900","100000","7343900","0","0","7343900","0003","belum","admin","diantar ke alamat toko sekian sekian","1");
INSERT INTO beli VALUES("000002","PB000002","2022-11-18","2022-11-18","1863200","0","1863200","1863200","1863200","-136800","0002","lunas","admin","lunas","2");
INSERT INTO beli VALUES("000003","PB000003","2022-11-18","2022-11-18","3583500","0","3583500","400000","2400000","3183500","0001","belum","admin","","3");



CREATE TABLE `beli_payment` (
  `kode` varchar(10) NOT NULL,
  `nota` varchar(10) NOT NULL,
  `tanggal` date NOT NULL,
  `jumlah` int(10) NOT NULL,
  `metode` varchar(20) NOT NULL,
  `keterangan` varchar(100) NOT NULL,
  `user` varchar(100) NOT NULL,
  `no` int(10) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO beli_payment VALUES("00000001","000003","2022-11-18","1000000","cash","cicilan 1","Kasirman","1");
INSERT INTO beli_payment VALUES("00000002","000003","2022-11-18","1000000","cash","cicilan 2","Kasirman","2");



CREATE TABLE `beli_retur` (
  `nota` varchar(10) NOT NULL,
  `tanggal` date NOT NULL,
  `nomor` varchar(50) NOT NULL,
  `notabeli` varchar(50) NOT NULL,
  `subtotal` int(10) NOT NULL,
  `biaya` int(10) NOT NULL,
  `total` int(10) NOT NULL,
  `alasan` varchar(200) NOT NULL,
  `kasir` varchar(50) NOT NULL,
  `supplier` varchar(10) NOT NULL,
  `no` int(10) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO beli_retur VALUES("000001","2022-11-18","RETUR000001","bPB01","5882800","1","5882801","rusak","admin","0003","1");



CREATE TABLE `brand` (
  `kode` varchar(20) NOT NULL,
  `nama` varchar(30) DEFAULT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`kode`),
  KEY `no4` (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO brand VALUES("0001","Prada","1");
INSERT INTO brand VALUES("0002","Dell","2");



CREATE TABLE `chmenu` (
  `userjabatan` varchar(20) NOT NULL,
  `menu1` varchar(1) DEFAULT '0',
  `menu2` varchar(1) DEFAULT '0',
  `menu3` varchar(1) DEFAULT '0',
  `menu4` varchar(1) DEFAULT '0',
  `menu5` varchar(1) DEFAULT '0',
  `menu6` varchar(1) DEFAULT '0',
  `menu7` varchar(1) DEFAULT '0',
  `menu8` varchar(1) DEFAULT '0',
  `menu9` varchar(1) DEFAULT '0',
  `menu10` varchar(1) DEFAULT '0',
  `menu11` varchar(1) DEFAULT '0',
  PRIMARY KEY (`userjabatan`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO chmenu VALUES("admin","5","5","5","5","5","5","5","5","5","5","5");
INSERT INTO chmenu VALUES("Kasir","0","1","1","2","2","4","2","2","0","0","");



CREATE TABLE `data` (
  `nama` varchar(100) DEFAULT NULL,
  `tagline` varchar(100) DEFAULT NULL,
  `alamat` varchar(255) DEFAULT NULL,
  `notelp` varchar(20) DEFAULT NULL,
  `signature` varchar(255) DEFAULT NULL,
  `avatar` varchar(150) DEFAULT NULL,
  `no` int(11) NOT NULL,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO data VALUES("Toko Andalan","Computer Sparepart Expert","Jl. Yos Sudarso 45A, banyuwangi, Jawa timur, Indonesia, 68421","081235218776","Thank You","dist/upload/logo.png","0");



CREATE TABLE `dataretur` (
  `nota` varchar(10) NOT NULL,
  `kode` varchar(10) NOT NULL,
  `nama` varchar(150) NOT NULL,
  `jumlah` int(10) NOT NULL,
  `harga` int(10) NOT NULL,
  `hargaakhir` int(10) NOT NULL,
  `no` int(10) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO dataretur VALUES("00001","000001","Dell 6510 Core i7 / NVIDIA/hdd 320/4gb","1","3750000","3750000","1");



CREATE TABLE `info` (
  `nama` varchar(50) DEFAULT NULL,
  `avatar` varchar(100) DEFAULT NULL,
  `tanggal` date DEFAULT NULL,
  `isi` text DEFAULT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");
INSERT INTO info VALUES("Kasirman","dist/upload/avatar.png","2022-11-18","<h1>PENGUMUMAN DISINI</h1>","1");



CREATE TABLE `jabatan` (
  `kode` varchar(20) NOT NULL,
  `nama` varchar(20) DEFAULT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`kode`),
  KEY `no` (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO jabatan VALUES("0001","admin","28");
INSERT INTO jabatan VALUES("0002","Kasir","37");



CREATE TABLE `kategori` (
  `kode` varchar(20) NOT NULL,
  `nama` varchar(30) DEFAULT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`kode`),
  KEY `no4` (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO kategori VALUES("0001","TES","1");
INSERT INTO kategori VALUES("0002","LAPTOP","2");
INSERT INTO kategori VALUES("0003","elektronik","3");



CREATE TABLE `mutasi` (
  `namauser` varchar(50) NOT NULL,
  `tgl` date NOT NULL,
  `jam` varchar(10) NOT NULL,
  `kodebarang` varchar(10) NOT NULL,
  `sisa` int(10) NOT NULL,
  `jumlah` int(10) NOT NULL,
  `kegiatan` varchar(100) NOT NULL,
  `keterangan` varchar(100) NOT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  `status` varchar(10) NOT NULL,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO mutasi VALUES("admin","2022-11-18","12:15","000001","1","-1","menjual barang memakai struk","00001","1","berhasil");
INSERT INTO mutasi VALUES("admin","2022-11-18","12:15","000003","3","-1","menjual barang memakai struk","00001","2","berhasil");
INSERT INTO mutasi VALUES("Kasirman","2022-11-18","12:37","000001","2","1","stok masuk","0001","3","pending");
INSERT INTO mutasi VALUES("Kasirman","2022-11-18","12:37","000004","7","1","stok masuk","0001","4","pending");
INSERT INTO mutasi VALUES("Kasirman","2022-11-18","12:38","000004","6","1","stok keluar","0001","5","pending");
INSERT INTO mutasi VALUES("Kasirman","2022-11-18","12:38","000005","8","1","stok keluar","0001","6","pending");
INSERT INTO mutasi VALUES("admin","2022-11-18","12:39","000001","0","1","retur penjualan","00001","7","berhasil");



CREATE TABLE `operasional` (
  `kode` varchar(20) NOT NULL,
  `nama` varchar(100) DEFAULT NULL,
  `tanggal` date DEFAULT NULL,
  `biaya` int(11) DEFAULT NULL,
  `keterangan` varchar(255) DEFAULT NULL,
  `kasir` varchar(20) DEFAULT NULL,
  `tipe` varchar(30) NOT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`kode`),
  KEY `no` (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO operasional VALUES("000001","Listrik Kios","2022-11-18","200000","beli di tokopedia dengan kode vocer:
XXX-XXX","admin","Listrik","1");



CREATE TABLE `operasional_tipe` (
  `Kode` varchar(10) NOT NULL,
  `nama` varchar(30) NOT NULL,
  `no` int(10) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO operasional_tipe VALUES("0001","Gaji Karyawan","3");
INSERT INTO operasional_tipe VALUES("0002","Listrik","4");
INSERT INTO operasional_tipe VALUES("0003","Sewa Bangunan","5");
INSERT INTO operasional_tipe VALUES("0004","Pajak","6");



CREATE TABLE `operasional_view` (
  `kode_view` int(1) NOT NULL,
  `nama_view` int(1) NOT NULL,
  `tipe_view` int(1) NOT NULL,
  `tgl_view` int(1) NOT NULL,
  `biaya_view` int(1) NOT NULL,
  `ket_view` int(1) NOT NULL,
  `opsi_view` int(1) NOT NULL,
  PRIMARY KEY (`kode_view`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO operasional_view VALUES("0","0","1","1","1","1","0");



CREATE TABLE `options` (
  `nama` varchar(20) NOT NULL,
  `tipe` varchar(20) NOT NULL,
  `no` int(10) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO options VALUES("BCA","bank","2");
INSERT INTO options VALUES("BRI","bank","3");
INSERT INTO options VALUES("MANDIRI","bank","4");
INSERT INTO options VALUES("Transfer","pay","6");



CREATE TABLE `pelanggan` (
  `kode` varchar(20) NOT NULL,
  `tgldaftar` date DEFAULT NULL,
  `nama` varchar(25) DEFAULT NULL,
  `alamat` varchar(70) DEFAULT NULL,
  `nohp` varchar(20) DEFAULT NULL,
  `idpelanggan` varchar(20) NOT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`kode`),
  KEY `no3` (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO pelanggan VALUES("0000","","Non Pelanggan","Non Pelanggan","00000","0000","3");
INSERT INTO pelanggan VALUES("0001","2022-11-13","Denisa","aaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbb
aaaaaa","09139191","0001","1");
INSERT INTO pelanggan VALUES("0002","2022-11-13","marina marini derta nina","aaaaa","08918181","0002","2");



CREATE TABLE `retur` (
  `nota` varchar(20) NOT NULL,
  `tanggal` date NOT NULL,
  `dana` int(10) NOT NULL,
  `status` varchar(20) NOT NULL,
  `petugas` varchar(100) NOT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO retur VALUES("00001","2022-11-18","3750000","Retur","admin","1");



CREATE TABLE `stok_keluar` (
  `nota` varchar(10) NOT NULL,
  `cabang` varchar(2) NOT NULL,
  `tgl` date NOT NULL,
  `pelanggan` varchar(10) NOT NULL,
  `userid` varchar(10) NOT NULL,
  `keterangan` varchar(100) NOT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;




CREATE TABLE `stok_keluar_daftar` (
  `nota` varchar(10) NOT NULL,
  `kode_barang` varchar(10) NOT NULL,
  `nama` varchar(200) NOT NULL,
  `jumlah` int(10) NOT NULL,
  `no` int(10) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO stok_keluar_daftar VALUES("0001","000004","HARDDISK EXTERNAL 500Gb SEAGATE","1","1");
INSERT INTO stok_keluar_daftar VALUES("0001","000005","HARDDISK EXTERNAL 1TB SEAGATE","1","2");



CREATE TABLE `stok_masuk` (
  `nota` varchar(10) NOT NULL,
  `cabang` varchar(2) NOT NULL,
  `tgl` date NOT NULL,
  `supplier` varchar(10) NOT NULL,
  `userid` varchar(10) NOT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;




CREATE TABLE `stok_masuk_daftar` (
  `nota` varchar(10) NOT NULL,
  `kode_barang` varchar(10) NOT NULL,
  `nama` varchar(200) NOT NULL,
  `jumlah` int(10) NOT NULL,
  `no` int(10) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO stok_masuk_daftar VALUES("0001","000001","Dell 6510 Core i7 / NVIDIA/hdd 320/4gb","1","1");
INSERT INTO stok_masuk_daftar VALUES("0001","000004","HARDDISK EXTERNAL 500Gb SEAGATE","1","2");



CREATE TABLE `stok_sesuai` (
  `nota` varchar(10) NOT NULL,
  `tgl` date NOT NULL,
  `oleh` varchar(100) NOT NULL,
  `keterangan` varchar(200) NOT NULL,
  `no` int(10) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO stok_sesuai VALUES("0001","2022-11-18","Kasirman"," kehilangan ditanggung karyawan jaga","1");



CREATE TABLE `stok_sesuai_daftar` (
  `nota` varchar(10) NOT NULL,
  `kode_brg` varchar(10) NOT NULL,
  `nama` varchar(200) NOT NULL,
  `sebelum` int(10) NOT NULL,
  `sesudah` int(10) NOT NULL,
  `selisih` int(10) NOT NULL,
  `catatan` varchar(100) NOT NULL,
  `no` int(10) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO stok_sesuai_daftar VALUES("0001","000002","HP8440p corei5 m520/hdd320/ram4","3","2","-1","hilang","1");



CREATE TABLE `stokretur` (
  `kode` varchar(100) NOT NULL,
  `stok` int(7) NOT NULL,
  `no` int(9) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`no`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;




CREATE TABLE `supplier` (
  `kode` varchar(20) NOT NULL,
  `tgldaftar` date DEFAULT NULL,
  `nama` varchar(25) DEFAULT NULL,
  `alamat` varchar(70) DEFAULT NULL,
  `nohp` varchar(20) DEFAULT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`kode`),
  KEY `no3` (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO supplier VALUES("0001","2022-11-12","PT HISAB NEBAS SATURAGA","jalan parangkota jambu kota Nomor 25 keluharan dadapt kecamatan jambu ","02183917101","1");
INSERT INTO supplier VALUES("0002","2022-11-17","PT NAJIB","aaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbb","0139191","2");
INSERT INTO supplier VALUES("0003","2022-11-18","PT BUMN","jalan pangeran jayakatwang","021938791","3");



CREATE TABLE `transaksibeli` (
  `nota` varchar(20) NOT NULL,
  `kode` varchar(20) NOT NULL,
  `nama` varchar(100) DEFAULT NULL,
  `harga` int(11) DEFAULT NULL,
  `jumlah` int(11) DEFAULT NULL,
  `hargaakhir` int(11) DEFAULT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`nota`,`kode`),
  KEY `no` (`no`),
  KEY `username` (`kode`),
  KEY `kdbarang` (`harga`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO transaksibeli VALUES("000001","000001","Dell 6510 Core i7 / NVIDIA/hdd 320/4gb","3133900","1","3133900","1");
INSERT INTO transaksibeli VALUES("000001","000002","HP8440p corei5 m520/hdd320/ram4","2748900","1","2748900","2");
INSERT INTO transaksibeli VALUES("000001","000004","HARDDISK EXTERNAL 500Gb SEAGATE","533000","1","533000","3");
INSERT INTO transaksibeli VALUES("000001","000005","HARDDISK EXTERNAL 1TB SEAGATE","828100","1","828100","4");
INSERT INTO transaksibeli VALUES("000002","000005","HARDDISK EXTERNAL 1TB SEAGATE","828100","2","1656200","5");
INSERT INTO transaksibeli VALUES("000002","000016","Conector Sambungan Untuk Cctv BNC","9000","23","207000","6");
INSERT INTO transaksibeli VALUES("000003","000016","Conector Sambungan Untuk Cctv BNC","9000","34","306000","7");
INSERT INTO transaksibeli VALUES("000003","000017","Lampu Bardi 9W","142500","23","3277500","8");



CREATE TABLE `transaksibeli_retur` (
  `nota` varchar(20) NOT NULL,
  `kode` varchar(20) NOT NULL,
  `nama` varchar(100) DEFAULT NULL,
  `harga` int(11) DEFAULT NULL,
  `retur` int(11) DEFAULT NULL,
  `subtotalretur` int(11) DEFAULT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`nota`,`kode`),
  KEY `no` (`no`),
  KEY `username` (`kode`),
  KEY `kdbarang` (`harga`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO transaksibeli_retur VALUES("000001","000001","Dell 6510 Core i7 / NVIDIA/hdd 320/4gb","3133900","1","3133900","3");
INSERT INTO transaksibeli_retur VALUES("000001","000002","HP8440p corei5 m520/hdd320/ram4","2748900","1","2748900","4");



CREATE TABLE `transaksimasuk` (
  `nota` varchar(20) NOT NULL,
  `kode` varchar(200) NOT NULL,
  `nama` varchar(100) DEFAULT NULL,
  `harga` int(11) DEFAULT NULL,
  `hargabeli` int(11) DEFAULT NULL,
  `jumlah` int(11) DEFAULT NULL,
  `hargaakhir` int(11) DEFAULT NULL,
  `hargabeliakhir` int(11) DEFAULT NULL,
  `retur` varchar(3) NOT NULL,
  `no` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`nota`,`kode`),
  KEY `barang` (`nama`),
  KEY `no5_2` (`no`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

INSERT INTO transaksimasuk VALUES("00001","000003","HP core i5 m520/4gb/320gb (dikirim HP8440 JUGA)","3250000","2748900","1","3250000","2748900","NO","2");

