

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;

INSERT INTO backset VALUES("http://idwares.esy.es/pro","1000","OK","2","0","Indotory Pro","1","2","58","dist/upload/EB48A0A3-3CB1-4B8D-8AA8-E8D4B83A0283.png");



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=8 DEFAULT CHARSET=latin1;

INSERT INTO barang VALUES("4","000004","HBT001","Botol 330ml","AMDK","Hazora","8995088000467","29500","34000","10","0","10","0","10","Dus","");
INSERT INTO barang VALUES("5","000005","HGL001","Galon 19L","AMDK","Hazora","8995088000405","4500","10000","5","0","95","0","40","Galon","");
INSERT INTO barang VALUES("6","000006","HGS001","Gelas 220ml","AMDK","Hazora","8995088000436","11500","15000","12","0","88","0","40","Dus","");
INSERT INTO barang VALUES("7","000007","SKU000007","le minerale","AMDK","GORILLA","8996001600269","4000","5000","2","0","18","0","1","1","");



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;

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=5 DEFAULT CHARSET=latin1;

INSERT INTO bayar VALUES("00001","2023-02-19","12:14","329000","329000","0","229000","admin","0","1","Cash","0000","");
INSERT INTO bayar VALUES("00002","2023-02-19","06:14","15000","12000","3000","10000","admin","0","2","Cash","0000","Barang Tidak Dapat Dikembalikan");
INSERT INTO bayar VALUES("00003","2023-02-20","07:16","400000","390000","10000","317500","admin","0","3","Cash","0000","");
INSERT INTO bayar VALUES("00004","2023-02-20","07:37","200000","180000","20000","138000","admin","0","4","Cash","0001","");



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=2 DEFAULT CHARSET=latin1;

INSERT INTO beli VALUES("000001","PB000001","2023-02-20","2023-02-20","15000","0","15000","10000","10000","5000","0001","belum","admin","","1");



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 DEFAULT CHARSET=latin1;




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 DEFAULT CHARSET=latin1;




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=2 DEFAULT CHARSET=latin1;

INSERT INTO brand VALUES("0001","GORILLA","1");



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;

INSERT INTO chmenu VALUES("admin","5","5","5","5","5","5","5","5","5","5","5");
INSERT INTO chmenu VALUES("Direktur","0","0","","0","0","5","0","0","0","0","");
INSERT INTO chmenu VALUES("Driver","1","1","","1","1","0","1","1","0","0","");
INSERT INTO chmenu VALUES("Kasir","0","0","1","0","0","0","0","0","0","0","");
INSERT INTO chmenu VALUES("TEKNISI","0","0","","0","0","0","0","1","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;

INSERT INTO data VALUES("AMDK XXXXXXXXX","TOKO GORILLA","JL. KEMANA AJA JAKARTA","021-12345678","STRUK INI SEBAGAI ALAT BUKTI PEMBAYARAN YANG SAH.
TERIMA KASIH.","dist/upload/137467.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 DEFAULT CHARSET=latin1;




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;

INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></h1>","1");
INSERT INTO info VALUES("admin","dist/upload/index.jpg","2023-02-20","<h1><i>JAM ISTIRAHAT</i></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=42 DEFAULT CHARSET=latin1;

INSERT INTO jabatan VALUES("0001","admin","28");
INSERT INTO jabatan VALUES("0002","Kasir","37");
INSERT INTO jabatan VALUES("0003","TEKNISI","40");
INSERT INTO jabatan VALUES("0004","TEKNISI","41");



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=2 DEFAULT CHARSET=latin1;

INSERT INTO kategori VALUES("0001","AMDK","1");



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=6 DEFAULT CHARSET=latin1;

INSERT INTO mutasi VALUES("admin","2023-02-20","08:13","000001","20","-1","menjual barang memakai struk","00003","1","berhasil");
INSERT INTO mutasi VALUES("admin","2023-02-20","07:14","000004","10","-10","menjual barang memakai struk","00003","2","berhasil");
INSERT INTO mutasi VALUES("admin","2023-02-20","07:14","000005","95","-5","menjual barang memakai struk","00003","3","berhasil");
INSERT INTO mutasi VALUES("admin","2023-02-20","07:37","000006","88","-12","menjual barang memakai struk","00004","4","berhasil");
INSERT INTO mutasi VALUES("admin","2023-02-20","09:38","000007","18","-2","menjual barang memakai struk","00005","5","pending");



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 DEFAULT CHARSET=latin1;




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=13 DEFAULT CHARSET=latin1;

INSERT INTO operasional_tipe VALUES("0005","Bensin","7");
INSERT INTO operasional_tipe VALUES("0006","Transfort","9");
INSERT INTO operasional_tipe VALUES("0007","MAKAN DAN MINUM","10");
INSERT INTO operasional_tipe VALUES("0008","TRANPORTASI","11");
INSERT INTO operasional_tipe VALUES("0009","BIAYA UMUM","12");



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;

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;

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=3 DEFAULT CHARSET=latin1;

INSERT INTO pelanggan VALUES("0000","0000-00-00","Non Pelanggan","","","","1");
INSERT INTO pelanggan VALUES("0001","2023-02-20","BUDI PIKUN","JL. SUKA-SUKA 999 JAKARTA","081999222999","0001","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 DEFAULT CHARSET=latin1;




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;




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 DEFAULT CHARSET=latin1;




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 AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

INSERT INTO stok_masuk VALUES("0001","1","2023-02-19","UDIN","43","1");
INSERT INTO stok_masuk VALUES("0002","1","2023-02-19","UDIN","74","2");
INSERT INTO stok_masuk VALUES("0003","1","2023-02-19","UDIN","74","3");



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=7 DEFAULT CHARSET=latin1;

INSERT INTO stok_masuk_daftar VALUES("0001","000001","penggaris","1","1");
INSERT INTO stok_masuk_daftar VALUES("0002","000001","penggaris","1","2");
INSERT INTO stok_masuk_daftar VALUES("0002","000003","Leuna 212 Blue Free Size","1","3");
INSERT INTO stok_masuk_daftar VALUES("0002","000002","penghapus","5","4");
INSERT INTO stok_masuk_daftar VALUES("0003","000001","penggaris","15","5");
INSERT INTO stok_masuk_daftar VALUES("0003","000002","penghapus","1","6");



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 DEFAULT CHARSET=latin1;




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;




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;




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=2 DEFAULT CHARSET=latin1;

INSERT INTO supplier VALUES("0001","2023-02-19","UDIN","JAKARTA","0821255443543","1");



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=4 DEFAULT CHARSET=latin1;

INSERT INTO transaksibeli VALUES("000001","000001","penggaris","3000","5","15000","3");



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=2 DEFAULT CHARSET=latin1;

INSERT INTO transaksibeli_retur VALUES("000001","000001","penggaris","3000","1","3000","1");



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=10 DEFAULT CHARSET=latin1;

INSERT INTO transaksimasuk VALUES("00001","000003","Leuna 212 Blue Free Size","329000","229000","1","329000","229000","NO","3");
INSERT INTO transaksimasuk VALUES("00002","000002","penghapus","3000","2500","4","12000","10000","NO","4");
INSERT INTO transaksimasuk VALUES("00003","000004","Botol 330ml","34000","29500","10","340000","295000","NO","6");
INSERT INTO transaksimasuk VALUES("00003","000005","Galon 19L","10000","4500","5","50000","22500","NO","7");
INSERT INTO transaksimasuk VALUES("00004","000006","Gelas 220ml","15000","11500","12","180000","138000","NO","8");
INSERT INTO transaksimasuk VALUES("00005","000007","le minerale","5000","4000","2","10000","8000","NO","9");

