-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 15 Jul 2026 pada 11.34
-- Versi server: 10.4.32-MariaDB
-- Versi PHP: 8.0.30

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `kasir`
--

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

--
-- Struktur dari tabel `activity_log`
--

CREATE TABLE `activity_log` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `action` varchar(50) NOT NULL,
  `detail` text DEFAULT NULL,
  `tanggal` date NOT NULL,
  `jam` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data untuk tabel `activity_log`
--

INSERT INTO `activity_log` (`id`, `user_id`, `action`, `detail`, `tanggal`, `jam`) VALUES
(1, 1, 'login', 'Login: admin (admin)', '2026-07-15', '06:53:21'),
(2, 1, 'login', 'Login: admin (admin)', '2026-07-15', '06:53:29'),
(3, 1, 'transaksi', 'Penjualan: Keyboard Logitech K120 x1 (Rp 145.000)', '2026-07-15', '13:53:29'),
(4, 1, 'pembayaran', 'Pembayaran: Total Rp 145.000, Bayar Rp 150.000, Diskon Rp 0, Kembali Rp 5.000 (No. INV/20260715/0013)', '2026-07-15', '13:53:29'),
(5, 2, 'login', 'Login: kasir (kasir)', '2026-07-15', '06:53:56'),
(6, 2, 'transaksi', 'Penjualan: Flashdisk Sandisk 32GB x1 (Rp 80.000)', '2026-07-15', '13:53:56'),
(7, 2, 'transaksi', 'Penjualan: Keyboard Logitech K120 x2 (Rp 290.000)', '2026-07-15', '13:53:56'),
(8, 2, 'pembayaran', 'Pembayaran: Total Rp 145.000, Bayar Rp 150.000, Diskon Rp 0, Kembali Rp 5.000 (No. INV/20260715/0014)', '2026-07-15', '13:53:56'),
(9, 2, 'login', 'Login: kasir (kasir)', '2026-07-15', '06:54:27'),
(10, 2, 'transaksi', 'Penjualan: Keyboard Logitech K120 x1 (Rp 145.000)', '2026-07-15', '13:54:27'),
(11, 2, 'pembayaran', 'Pembayaran: Total Rp 145.000, Bayar Rp 150.000, Diskon Rp 5.000, Kembali Rp 10.000 (No. INV/20260715/0016)', '2026-07-15', '13:54:27'),
(12, 2, 'login', 'Login: kasir (kasir)', '2026-07-15', '06:55:19'),
(13, 2, 'transaksi', 'Penjualan: Mouse Logitech B100 x1 (Rp 70.000)', '2026-07-15', '13:55:19'),
(14, 2, 'pembayaran', 'Pembayaran: Total Rp 70.000, Bayar Rp 100.000, Diskon Rp 10.000, Kembali Rp 40.000 (No. INV/20260715/0017)', '2026-07-15', '13:55:19'),
(15, 2, 'login', 'Login: kasir (kasir)', '2026-07-15', '06:57:13'),
(16, 1, 'login', 'Login: admin (admin)', '2026-07-15', '06:58:37'),
(17, 2, 'login', 'Login: kasir (kasir)', '2026-07-15', '07:02:02'),
(18, 2, 'login', 'Login: kasir (kasir)', '2026-07-15', '07:04:35'),
(19, 1, 'login', 'Login: admin (admin)', '2026-07-15', '07:11:50'),
(20, 2, 'login', 'Login: kasir (kasir)', '2026-07-15', '07:13:42'),
(21, 2, 'login', 'Login: kasir (kasir)', '2026-07-15', '07:16:37'),
(22, 2, 'login', 'Login: kasir (kasir)', '2026-07-15', '07:20:45'),
(23, 2, 'login', 'Login: kasir (kasir)', '2026-07-15', '07:24:28'),
(24, 2, 'transaksi', 'Penjualan: Headset Gaming Fantech x2 (Rp 390.000)', '2026-07-15', '14:27:20'),
(25, 2, 'transaksi', 'Penjualan: Kabel HDMI 2 Meter x6 (Rp 300.000)', '2026-07-15', '14:27:20'),
(26, 2, 'transaksi', 'Penjualan: Monitor LG 22 Inch x1 (Rp 1.425.000)', '2026-07-15', '14:27:20'),
(27, 2, 'transaksi', 'Penjualan: Mouse Wireless Fantech x1 (Rp 110.000)', '2026-07-15', '14:27:20'),
(28, 2, 'transaksi', 'Penjualan: PC Gaming Ryzen 5 16GB 512GB x2 (Rp 17.000.000)', '2026-07-15', '14:27:20'),
(29, 2, 'transaksi', 'Penjualan: USB Hub 4 Port x2 (Rp 160.000)', '2026-07-15', '14:27:20'),
(30, 2, 'transaksi', 'Penjualan: Keyboard Logitech K120 x1 (Rp 145.000)', '2026-07-15', '14:27:20'),
(31, 2, 'pembayaran', 'Pembayaran: Total Rp 19.530.000, Bayar Rp 20.530.000, Diskon Rp 0, Kembali Rp 1.000.000 (No. INV/20260715/0018)', '2026-07-15', '14:27:20'),
(32, 2, 'login', 'Login: kasir (kasir)', '2026-07-15', '07:37:18'),
(33, 2, 'login', 'Login: kasir (kasir)', '2026-07-15', '07:39:10'),
(34, 2, 'retur', 'Retur: Headset Gaming Fantech x1 (alasan: RUSAK\r\n, No. RET/20260715/0001)', '2026-07-15', '07:39:44'),
(35, 1, 'login', 'Login: admin (admin)', '2026-07-15', '07:44:47'),
(36, 2, 'login', 'Login: kasir (kasir)', '2026-07-15', '07:44:47'),
(37, 2, 'transaksi', 'Penjualan: Flashdisk Sandisk 32GB x1 (Rp 80.000)', '2026-07-15', '14:45:00'),
(38, 2, 'pembayaran', 'Pembayaran: Total Rp 80.000, Bayar Rp 1.000.000, Diskon Rp 0, Kembali Rp 920.000 (No. INV/20260715/0025)', '2026-07-15', '14:45:00'),
(39, 1, 'login', 'Login: admin (admin)', '2026-07-15', '07:45:07'),
(40, 1, 'login', 'Login: admin (admin)', '2026-07-15', '07:47:19'),
(41, 1, 'login', 'Login: admin (admin)', '2026-07-15', '07:49:07'),
(42, 1, 'login', 'Login: admin (admin)', '2026-07-15', '07:53:53'),
(43, 1, 'login', 'Login: admin (admin)', '2026-07-15', '08:04:24'),
(44, 1, 'login', 'Login: admin (admin)', '2026-07-15', '08:08:41'),
(45, 1, 'login', 'Login: admin (admin)', '2026-07-15', '08:13:04'),
(46, 1, 'login', 'Login: admin (admin)', '2026-07-15', '08:13:14'),
(47, 1, 'login', 'Login: admin (admin)', '2026-07-15', '08:14:30'),
(48, 1, 'login', 'Login: admin (admin)', '2026-07-15', '08:14:54'),
(49, 1, 'retur', 'Retur: Flashdisk Sandisk 32GB x1 (alasan: Rusak\r\n, No. RET/20260715/0002)', '2026-07-15', '08:18:44'),
(50, 1, 'retur', 'Retur: Headset Gaming Fantech x1 (alasan: rusak, No. RET/20260715/0003)', '2026-07-15', '08:21:37'),
(51, 1, 'login', 'Login: admin (admin)', '2026-07-15', '11:00:33');

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

--
-- Struktur dari tabel `laporan_penjualan`
--

CREATE TABLE `laporan_penjualan` (
  `id` int(11) NOT NULL,
  `no_inv` varchar(255) DEFAULT NULL,
  `kdbarang` varchar(255) NOT NULL,
  `nm_barang` varchar(255) NOT NULL,
  `kategori` varchar(255) NOT NULL,
  `jumlah_beli` int(11) NOT NULL,
  `total` int(11) NOT NULL,
  `tanggal` date NOT NULL,
  `jam` varchar(50) NOT NULL,
  `kasir` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `laporan_penjualan`
--

INSERT INTO `laporan_penjualan` (`id`, `no_inv`, `kdbarang`, `nm_barang`, `kategori`, `jumlah_beli`, `total`, `tanggal`, `jam`, `kasir`) VALUES
(1, NULL, 'KD001', 'Keyboard Logitech K120', 'Aksesoris & Peripheral', 2, 290000, '2026-07-13', '10:15:00', 'Kasir Shift 1'),
(2, NULL, 'KD002', 'Mouse Logitech B100', 'Aksesoris & Peripheral', 2, 140000, '2026-07-12', '10:15:00', 'Kasir Shift 1'),
(3, NULL, 'KD010', 'Monitor LG 22 Inch', 'Komponen Hardware', 1, 1425000, '2026-07-11', '14:30:00', 'Admin Toko'),
(4, NULL, 'KD006', 'Kabel HDMI 2 Meter', 'Aksesoris & Peripheral', 1, 50000, '2026-07-10', '14:30:00', 'Admin Toko'),
(5, NULL, 'KD011', 'Printer Epson L3210', 'Printer & Tinta', 1, 2250000, '2026-07-09', '09:20:00', 'Kasir Shift 1'),
(6, NULL, 'KD014', 'Tinta Epson 003 Black', 'Printer & Tinta', 3, 240000, '2026-07-08', '09:20:00', 'Kasir Shift 1'),
(7, NULL, 'KD015', 'Tinta Epson 003 Color', 'Printer & Tinta', 3, 240000, '2026-07-14', '09:20:00', 'Kasir Shift 1'),
(8, NULL, 'KD016', 'PC Office Core i3 8GB 256GB', 'PC & Laptop', 1, 4750000, '2026-07-13', '11:10:00', 'Kasir Shift 1'),
(9, NULL, 'KD018', 'UPS Prolink 650VA', 'Komponen Hardware', 1, 725000, '2026-07-12', '11:10:00', 'Kasir Shift 1'),
(10, NULL, 'KD008', 'SSD Kingston 480GB', 'Komponen Hardware', 2, 1100000, '2026-07-11', '15:45:00', 'Kasir Shift 1'),
(11, NULL, 'KD005', 'Flashdisk Sandisk 32GB', 'Aksesoris & Peripheral', 1, 80000, '2026-07-10', '12:16 pm', 'Kasir Shift 1'),
(12, NULL, 'KD001', 'Keyboard Logitech K120', 'Aksesoris & Peripheral', 1, 145000, '2026-07-09', '12:16 pm', 'Kasir Shift 1'),
(13, 'INV/20260715/0013', 'KD001', 'Keyboard Logitech K120', 'Aksesoris & Peripheral', 1, 145000, '2026-07-15', '13:53:29', 'Admin Toko'),
(14, 'INV/20260715/0014', 'KD005', 'Flashdisk Sandisk 32GB', 'Aksesoris & Peripheral', 1, 80000, '2026-07-15', '13:53:56', 'Kasir Shift 1'),
(15, 'INV/20260715/0014', 'KD001', 'Keyboard Logitech K120', 'Aksesoris & Peripheral', 2, 290000, '2026-07-15', '13:53:56', 'Kasir Shift 1'),
(16, 'INV/20260715/0016', 'KD001', 'Keyboard Logitech K120', 'Aksesoris & Peripheral', 1, 145000, '2026-07-15', '13:54:27', 'Kasir Shift 1'),
(17, 'INV/20260715/0017', 'KD002', 'Mouse Logitech B100', 'Aksesoris & Peripheral', 1, 70000, '2026-07-15', '13:55:19', 'Kasir Shift 1'),
(18, 'INV/20260715/0018', 'KD004', 'Headset Gaming Fantech', 'Aksesoris & Peripheral', 2, 390000, '2026-07-15', '14:27:20', 'Kasir Shift 1'),
(19, 'INV/20260715/0018', 'KD006', 'Kabel HDMI 2 Meter', 'Aksesoris & Peripheral', 6, 300000, '2026-07-15', '14:27:20', 'Kasir Shift 1'),
(20, 'INV/20260715/0018', 'KD010', 'Monitor LG 22 Inch', 'Komponen Hardware', 1, 1425000, '2026-07-15', '14:27:20', 'Kasir Shift 1'),
(21, 'INV/20260715/0018', 'KD003', 'Mouse Wireless Fantech', 'Aksesoris & Peripheral', 1, 110000, '2026-07-15', '14:27:20', 'Kasir Shift 1'),
(22, 'INV/20260715/0018', 'KD017', 'PC Gaming Ryzen 5 16GB 512GB', 'PC & Laptop', 2, 17000000, '2026-07-15', '14:27:20', 'Kasir Shift 1'),
(23, 'INV/20260715/0018', 'KD007', 'USB Hub 4 Port', 'Aksesoris & Peripheral', 2, 160000, '2026-07-15', '14:27:20', 'Kasir Shift 1'),
(24, 'INV/20260715/0018', 'KD001', 'Keyboard Logitech K120', 'Aksesoris & Peripheral', 1, 145000, '2026-07-15', '14:27:20', 'Kasir Shift 1'),
(25, 'INV/20260715/0025', 'KD005', 'Flashdisk Sandisk 32GB', 'Aksesoris & Peripheral', 1, 80000, '2026-07-15', '14:45:00', 'Kasir Shift 1');

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

--
-- Struktur dari tabel `tb_barang`
--

CREATE TABLE `tb_barang` (
  `id` int(11) NOT NULL,
  `kdbarang` varchar(255) NOT NULL,
  `nm_barang` varchar(255) NOT NULL,
  `kategori` int(11) NOT NULL,
  `stok` int(11) NOT NULL,
  `harga_beli` int(11) NOT NULL,
  `harga_jual` int(11) NOT NULL,
  `satuan` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `tb_barang`
--

INSERT INTO `tb_barang` (`id`, `kdbarang`, `nm_barang`, `kategori`, `stok`, `harga_beli`, `harga_jual`, `satuan`) VALUES
(1, 'KD001', 'Keyboard Logitech K120', 1, 575, 120000, 145000, 'pcs'),
(2, 'KD002', 'Mouse Logitech B100', 1, 29, 55000, 70000, 'pcs'),
(3, 'KD003', 'Mouse Wireless Fantech', 1, 17, 85000, 110000, 'pcs'),
(4, 'KD004', 'Headset Gaming Fantech', 1, 12, 165000, 195000, 'pcs'),
(5, 'KD005', 'Flashdisk Sandisk 32GB', 1, 24, 65000, 80000, 'pcs'),
(6, 'KD006', 'Kabel HDMI 2 Meter', 1, 24, 35000, 50000, 'pcs'),
(7, 'KD007', 'USB Hub 4 Port', 1, 14, 60000, 80000, 'pcs'),
(8, 'KD008', 'SSD Kingston 480GB', 2, 10, 480000, 550000, 'pcs'),
(9, 'KD009', 'RAM DDR4 8GB', 2, 14, 280000, 325000, 'pcs'),
(10, 'KD010', 'Monitor LG 22 Inch', 2, 7, 1250000, 1425000, 'unit'),
(11, 'KD011', 'Printer Epson L3210', 4, 7, 2050000, 2250000, 'unit'),
(12, 'KD012', 'Printer Canon PIXMA G2010', 4, 6, 1750000, 1950000, 'unit'),
(13, 'KD013', 'Printer Thermal 58mm', 4, 10, 375000, 450000, 'unit'),
(14, 'KD014', 'Tinta Epson 003 Black', 4, 20, 65000, 80000, 'botol'),
(15, 'KD015', 'Tinta Epson 003 Color', 4, 20, 65000, 80000, 'botol'),
(16, 'KD016', 'PC Office Core i3 8GB 256GB', 3, 5, 4250000, 4750000, 'unit'),
(17, 'KD017', 'PC Gaming Ryzen 5 16GB 512GB', 3, 1, 7800000, 8500000, 'unit'),
(18, 'KD018', 'UPS Prolink 650VA', 2, 8, 650000, 725000, 'unit');

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

--
-- Struktur dari tabel `tb_barang_masuk`
--

CREATE TABLE `tb_barang_masuk` (
  `id` int(11) NOT NULL,
  `noinv` varchar(255) NOT NULL,
  `tanggal` date NOT NULL,
  `jam` varchar(50) NOT NULL,
  `kdbarang` varchar(255) NOT NULL,
  `nm_barang` varchar(255) NOT NULL,
  `kategori` varchar(255) NOT NULL,
  `stok` int(11) NOT NULL,
  `jml_masuk` int(11) NOT NULL,
  `admin` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `tb_barang_masuk`
--

INSERT INTO `tb_barang_masuk` (`id`, `noinv`, `tanggal`, `jam`, `kdbarang`, `nm_barang`, `kategori`, `stok`, `jml_masuk`, `admin`) VALUES
(1, 'INV/20260715/0001', '2026-07-15', '15:17', 'KD001', 'Keyboard Logitech K120', 'Aksesoris & Peripheral', 15, 560, 'Admin Toko');

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

--
-- Struktur dari tabel `tb_kat`
--

CREATE TABLE `tb_kat` (
  `id` int(11) NOT NULL,
  `kategori` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `tb_kat`
--

INSERT INTO `tb_kat` (`id`, `kategori`) VALUES
(1, 'Aksesoris & Peripheral'),
(2, 'Komponen Hardware'),
(3, 'PC & Laptop'),
(4, 'Printer & Tinta'),
(5, 'Lain-lain');

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

--
-- Struktur dari tabel `tb_retur`
--

CREATE TABLE `tb_retur` (
  `id` int(11) NOT NULL,
  `no_retur` varchar(255) NOT NULL,
  `no_inv` varchar(255) NOT NULL,
  `kdbarang` varchar(255) NOT NULL,
  `nm_barang` varchar(255) NOT NULL,
  `jumlah` int(11) NOT NULL,
  `harga` int(11) NOT NULL,
  `total` int(11) NOT NULL,
  `alasan` text DEFAULT NULL,
  `tanggal` date NOT NULL,
  `jam` varchar(20) NOT NULL,
  `kasir` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data untuk tabel `tb_retur`
--

INSERT INTO `tb_retur` (`id`, `no_retur`, `no_inv`, `kdbarang`, `nm_barang`, `jumlah`, `harga`, `total`, `alasan`, `tanggal`, `jam`, `kasir`) VALUES
(1, 'RET/20260715/0001', 'INV/20260715/0018', 'KD004', 'Headset Gaming Fantech', 1, 195000, 195000, 'RUSAK\r\n', '2026-07-15', '07:39:44', 'Kasir Shift 1'),
(2, 'RET/20260715/0002', 'INV/20260715/0025', 'KD005', 'Flashdisk Sandisk 32GB', 1, 80000, 80000, 'Rusak\r\n', '2026-07-15', '08:18:44', 'Admin Toko'),
(3, 'RET/20260715/0003', 'INV/20260715/0018', 'KD004', 'Headset Gaming Fantech', 1, 195000, 195000, 'rusak', '2026-07-15', '08:21:37', 'Admin Toko');

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

--
-- Struktur dari tabel `tb_user`
--

CREATE TABLE `tb_user` (
  `id` int(11) NOT NULL,
  `username` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `nama` varchar(255) NOT NULL,
  `level` varchar(50) NOT NULL,
  `foto` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `tb_user`
--

INSERT INTO `tb_user` (`id`, `username`, `password`, `nama`, `level`, `foto`) VALUES
(1, 'admin', '$2y$12$qQas5ePVVdDiw/FFI1SKsuOcIBDddxWl0FIeR7cz7YhNmtWDtjLM.', 'Admin Toko', 'admin', 'admin.png'),
(3, 'najwa', 'f9e9b682232ab616ffde1efbb0e914d0', 'kasir1', 'kasir', ''),
(4, 'doni', '2da9cd653f63c010b6d6c5a5ad73fe32', 'kasir2', 'kasir', '');

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

--
-- Struktur dari tabel `transaksi_temp`
--

CREATE TABLE `transaksi_temp` (
  `id` int(11) NOT NULL,
  `kdbarang` varchar(255) NOT NULL,
  `nm_barang` varchar(255) NOT NULL,
  `kategori` varchar(255) NOT NULL,
  `jumlah_beli` int(11) NOT NULL,
  `total` int(11) NOT NULL,
  `kasir_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Indexes for dumped tables
--

--
-- Indeks untuk tabel `activity_log`
--
ALTER TABLE `activity_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_tanggal` (`tanggal`),
  ADD KEY `idx_action` (`action`);

--
-- Indeks untuk tabel `laporan_penjualan`
--
ALTER TABLE `laporan_penjualan`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_lap_no_inv` (`no_inv`),
  ADD KEY `idx_lap_kdbarang` (`kdbarang`),
  ADD KEY `idx_lap_tanggal` (`tanggal`),
  ADD KEY `idx_no_inv` (`no_inv`),
  ADD KEY `idx_tanggal` (`tanggal`);

--
-- Indeks untuk tabel `tb_barang`
--
ALTER TABLE `tb_barang`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_Barang_kategori` (`kategori`);

--
-- Indeks untuk tabel `tb_barang_masuk`
--
ALTER TABLE `tb_barang_masuk`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_bm_kdbarang` (`kdbarang`);

--
-- Indeks untuk tabel `tb_kat`
--
ALTER TABLE `tb_kat`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `tb_retur`
--
ALTER TABLE `tb_retur`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_no_retur` (`no_retur`),
  ADD KEY `idx_retur_no_inv` (`no_inv`);

--
-- Indeks untuk tabel `tb_user`
--
ALTER TABLE `tb_user`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `transaksi_temp`
--
ALTER TABLE `transaksi_temp`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_tt_kasir_id` (`kasir_id`);

--
-- AUTO_INCREMENT untuk tabel yang dibuang
--

--
-- AUTO_INCREMENT untuk tabel `activity_log`
--
ALTER TABLE `activity_log`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=52;

--
-- AUTO_INCREMENT untuk tabel `laporan_penjualan`
--
ALTER TABLE `laporan_penjualan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT untuk tabel `tb_barang`
--
ALTER TABLE `tb_barang`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT untuk tabel `tb_barang_masuk`
--
ALTER TABLE `tb_barang_masuk`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT untuk tabel `tb_kat`
--
ALTER TABLE `tb_kat`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT untuk tabel `tb_retur`
--
ALTER TABLE `tb_retur`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT untuk tabel `tb_user`
--
ALTER TABLE `tb_user`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT untuk tabel `transaksi_temp`
--
ALTER TABLE `transaksi_temp`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables)
--

--
-- Ketidakleluasaan untuk tabel `tb_barang`
--
ALTER TABLE `tb_barang`
  ADD CONSTRAINT `fk_Barang_kategori` FOREIGN KEY (`kategori`) REFERENCES `tb_kat` (`id`) ON UPDATE CASCADE;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
