-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `waur7899_percetakan`
--

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

--
-- Table structure for table `m_admin`
--

CREATE TABLE `m_admin` (
  `id` bigint(11) NOT NULL,
  `username` varchar(30) NOT NULL,
  `password` text DEFAULT NULL,
  `nama_lengkap` varchar(150) NOT NULL,
  `email` varchar(100) NOT NULL,
  `status` tinyint(1) DEFAULT NULL,
  `level` enum('admin','kasir','produksi','manager') NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `last_login` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `m_admin`
--

INSERT INTO `m_admin` (`id`, `username`, `password`, `nama_lengkap`, `email`, `status`, `level`, `created_at`, `updated_at`, `last_login`) VALUES
(1, 'adminku', '8cb2237d0679ca88db6464eac60da96345513964', 'Mr. Jon', 'hamana@gmail.com', 1, 'admin', '2021-02-07 13:33:34', '2023-12-31 16:02:47', '2023-12-31 16:02:47'),
(4, 'siti', '8cb2237d0679ca88db6464eac60da96345513964', 'Siti', 'siticantik@gmail.com', 1, 'kasir', '2021-04-09 17:34:15', '2023-12-31 15:55:36', '2023-12-31 15:55:36'),
(5, 'masudin', '8cb2237d0679ca88db6464eac60da96345513964', 'Nasrudin', 'udinku@gmail.com', 1, 'produksi', '2021-04-09 19:42:29', '2023-12-29 18:03:08', '2023-12-29 18:03:08'),
(6, 'soladi', '8cb2237d0679ca88db6464eac60da96345513964', 'Soladi', 'soladiganteng@gmail.com', 1, 'manager', '2021-04-09 19:43:02', '2021-04-19 22:03:24', '2021-04-19 22:03:24'),
(7, 'darsono', '765aa02ea9193408190a8a405ce29ec279e60c6f', 'jl masangan', 'darsono@gmail.com', 1, 'admin', '2022-01-10 12:54:21', '2022-01-10 12:54:56', NULL),
(8, 'manajer', 'a13fb40490e7d01a1a6ad6da8dab0fd4daff6d0d', 'manajer', 'dasdsaf', 1, 'manager', '2023-12-29 19:05:10', '2023-12-29 19:05:24', '2023-12-29 19:05:24');

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

--
-- Table structure for table `m_bahan`
--

CREATE TABLE `m_bahan` (
  `id` bigint(11) NOT NULL,
  `kode_bahan` varchar(20) NOT NULL,
  `nama_bahan` varchar(150) NOT NULL,
  `satuan` varchar(10) NOT NULL,
  `stok_min` int(2) NOT NULL,
  `stok_awal` float NOT NULL,
  `merek` varchar(30) DEFAULT NULL,
  `id_supplier` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `m_bahan`
--

INSERT INTO `m_bahan` (`id`, `kode_bahan`, `nama_bahan`, `satuan`, `stok_min`, `stok_awal`, `merek`, `id_supplier`, `created_at`, `updated_at`) VALUES
(2, 'AB003', 'Flexi China', 'Meter', 1, 0, 'Flexi', 3, '2021-03-26 16:15:28', '2021-03-26 16:15:28'),
(3, 'FL002', 'Flexi Korea Glossy', 'Meter', 1, 15, 'Flexi', 1, '2021-03-26 16:16:06', '2021-04-09 04:45:59'),
(4, 'GL001', 'Glossy Paper', 'Meter', 1, 50, 'GLPRO', 3, '2021-03-26 16:16:38', '2023-12-31 16:14:03'),
(5, 'dfdf', 'dfdf', 'dfdf', 1, 50, 'dfdf', 1, '2021-03-26 16:24:14', '2023-12-31 16:13:49');

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

--
-- Table structure for table `m_barang_h`
--

CREATE TABLE `m_barang_h` (
  `id` bigint(11) NOT NULL,
  `kode_barang` varchar(20) NOT NULL,
  `nama_barang` varchar(150) NOT NULL,
  `satuan` varchar(20) NOT NULL,
  `harga_jual` decimal(16,0) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `m_barang_h`
--

INSERT INTO `m_barang_h` (`id`, `kode_barang`, `nama_barang`, `satuan`, `harga_jual`, `created_at`, `updated_at`) VALUES
(1, 'AB025', 'Cetak Baner', 'PCS', 2500, '2021-03-27 10:48:47', '2022-01-19 09:38:45'),
(2, 'IDC001', 'Kartu Nama', 'Paket', 35000, '2021-04-04 07:45:47', '2022-01-19 09:39:06'),
(3, 'IDC002', 'Kartu Nama Biasa', 'Paket', 25000, '2021-04-04 07:46:44', '2021-04-04 07:46:44'),
(4, 'SPL001', 'Sampul Raport', 'PCS', 15000, '2021-04-04 07:47:14', '2021-04-04 07:47:14'),
(5, 'YSN001', 'Yassin Jilid Soft Cover', 'PCS', 5000, '2021-04-04 07:47:38', '2021-04-04 07:47:38'),
(6, 'YSN002', 'Yassin Hard Cover', 'PCS', 12000, '2021-04-04 07:47:59', '2021-04-04 07:47:59'),
(7, 'YSN003', 'Yassin Cover Blouse', 'PCS', 25000, '2021-04-04 07:48:21', '2021-04-04 07:48:21'),
(8, 'warna', 'tambah warna pada nota/invoice', 'pcs', 5000, '2022-01-10 10:58:38', '2022-01-10 10:58:38'),
(15, 'MG0001', 'Mug Cetak Tinta', 'PCS', 23000, '2022-01-26 07:35:27', '2022-01-26 07:35:27');

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

--
-- Table structure for table `m_barang_harga`
--

CREATE TABLE `m_barang_harga` (
  `id` int(11) NOT NULL,
  `id_barang` int(11) NOT NULL,
  `min_order1` int(7) NOT NULL,
  `harga1` double NOT NULL,
  `min_order2` int(7) DEFAULT NULL,
  `harga2` double DEFAULT NULL,
  `min_order3` int(7) DEFAULT NULL,
  `harga3` double DEFAULT NULL,
  `min_order4` int(7) DEFAULT NULL,
  `harga4` double DEFAULT NULL,
  `min_order5` int(7) DEFAULT NULL,
  `harga5` double DEFAULT NULL,
  `min_order6` int(7) DEFAULT NULL,
  `harga6` double DEFAULT NULL,
  `min_order7` int(7) DEFAULT NULL,
  `harga7` double DEFAULT NULL,
  `min_order8` int(7) DEFAULT NULL,
  `harga8` double DEFAULT NULL,
  `min_order9` int(7) DEFAULT NULL,
  `harga9` double DEFAULT NULL,
  `min_order10` int(7) DEFAULT NULL,
  `harga10` double DEFAULT NULL,
  `min_order11` int(7) DEFAULT NULL,
  `harga11` double DEFAULT NULL,
  `min_order12` int(7) DEFAULT NULL,
  `harga12` double DEFAULT NULL,
  `min_order13` int(7) DEFAULT NULL,
  `harga13` double DEFAULT NULL,
  `min_order14` int(7) DEFAULT NULL,
  `harga14` double DEFAULT NULL,
  `min_order15` int(7) DEFAULT NULL,
  `harga15` double DEFAULT NULL,
  `min_order16` int(7) DEFAULT NULL,
  `harga16` double DEFAULT NULL,
  `min_order17` int(7) DEFAULT NULL,
  `harga17` double DEFAULT NULL,
  `min_order18` int(7) DEFAULT NULL,
  `harga18` double DEFAULT NULL,
  `min_order19` int(7) DEFAULT NULL,
  `harga19` double DEFAULT NULL,
  `min_order20` int(7) DEFAULT NULL,
  `harga20` double DEFAULT NULL,
  `min_order21` int(7) DEFAULT NULL,
  `harga21` double DEFAULT NULL,
  `min_order22` int(7) DEFAULT NULL,
  `harga22` double DEFAULT NULL,
  `min_order23` int(7) DEFAULT NULL,
  `harga23` double DEFAULT NULL,
  `min_order24` int(7) DEFAULT NULL,
  `harga24` double DEFAULT NULL,
  `min_order25` int(7) DEFAULT NULL,
  `harga25` double DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `m_barang_harga`
--

INSERT INTO `m_barang_harga` (`id`, `id_barang`, `min_order1`, `harga1`, `min_order2`, `harga2`, `min_order3`, `harga3`, `min_order4`, `harga4`, `min_order5`, `harga5`, `min_order6`, `harga6`, `min_order7`, `harga7`, `min_order8`, `harga8`, `min_order9`, `harga9`, `min_order10`, `harga10`, `min_order11`, `harga11`, `min_order12`, `harga12`, `min_order13`, `harga13`, `min_order14`, `harga14`, `min_order15`, `harga15`, `min_order16`, `harga16`, `min_order17`, `harga17`, `min_order18`, `harga18`, `min_order19`, `harga19`, `min_order20`, `harga20`, `min_order21`, `harga21`, `min_order22`, `harga22`, `min_order23`, `harga23`, `min_order24`, `harga24`, `min_order25`, `harga25`, `created_at`, `updated_at`) VALUES
(2, 15, 6, 21000, 12, 20000, 24, 19000, 36, 18000, 48, 17000, 60, 16000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2022-01-26 07:35:27', '2022-01-26 07:58:32');

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

--
-- Table structure for table `m_mesin`
--

CREATE TABLE `m_mesin` (
  `id` int(11) NOT NULL,
  `nama_mesin` varchar(100) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `m_mesin`
--

INSERT INTO `m_mesin` (`id`, `nama_mesin`, `created_at`, `updated_at`) VALUES
(1, 'Epson Z13', '2021-04-04 08:34:39', '2021-04-04 08:34:39'),
(2, 'Zutterman C65', '2021-04-04 08:34:55', '2021-04-04 08:36:13');

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

--
-- Table structure for table `m_pegawai`
--

CREATE TABLE `m_pegawai` (
  `id` bigint(11) UNSIGNED NOT NULL,
  `nik` varchar(20) NOT NULL,
  `nama_lengkap` varchar(50) NOT NULL,
  `alamat` varchar(150) NOT NULL,
  `no_telp` varchar(18) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `tgl_masuk` date DEFAULT NULL,
  `status` tinyint(1) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `m_pegawai`
--

INSERT INTO `m_pegawai` (`id`, `nik`, `nama_lengkap`, `alamat`, `no_telp`, `email`, `password`, `tgl_masuk`, `status`, `created_at`, `updated_at`) VALUES
(1, '2002210001', 'Ryan Antoni Jaya', 'Jl. Jalak No. 19 Adiwerna', '085223147789', 'ryanganteng@gmail.com', '8cb2237d0679ca88db6464eac60da96345513964', '2020-02-11', 1, '2021-03-26 15:11:47', '2021-03-26 15:30:25'),
(3, '2102210002', 'Jusmiyanto', 'Slawi', '08152256989', 'ronaldotegal@gmail.com', '8cb2237d0679ca88db6464eac60da96345513964', '2021-03-26', 1, '2021-03-26 15:32:38', '2021-03-26 15:32:38'),
(4, '2011210025', 'Melati Mawar', 'Desa Kebasen', '081544278956', 'mawarmerah@gmail.com', '8cb2237d0679ca88db6464eac60da96345513964', '2021-01-05', 1, '2021-03-26 15:33:18', '2021-03-26 15:33:18'),
(5, '1654654874363284', 'darsono', 'Jl masangan wetan', '0857654656968', 'darsono@gmail.com', '765aa02ea9193408190a8a405ce29ec279e60c6f', '2022-01-10', 1, '2022-01-10 12:53:15', '2022-01-10 12:53:15');

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

--
-- Table structure for table `m_supplier`
--

CREATE TABLE `m_supplier` (
  `id` int(11) NOT NULL,
  `nama_supplier` varchar(150) NOT NULL,
  `alamat` varchar(150) NOT NULL,
  `no_telp` varchar(20) NOT NULL,
  `email` varchar(50) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `m_supplier`
--

INSERT INTO `m_supplier` (`id`, `nama_supplier`, `alamat`, `no_telp`, `email`, `created_at`, `updated_at`) VALUES
(1, 'PT. Harum Sekar', 'Semarang', '024-36985212', 'harumsekarcompany@gmail.com', '2021-03-26 10:04:05', '2021-03-26 10:04:05'),
(3, 'Hamana Tira', 'Kramat Tegal', '08122236587', 'hamanaworkstira@gmail.com', '2021-03-26 10:08:23', '2021-03-26 10:08:23'),
(4, 'paperku', 'jl panjangjiwo', '081225365430', 'paperku38@gmail.com', '2022-01-11 02:02:34', '2022-01-11 02:02:34'),
(5, 'sablon magersari abah yoyok', 'magersari abah yoyok', '098754854654', 'abahyoyok@gmail.com', '2022-01-11 02:03:05', '2022-01-11 02:03:05');

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

--
-- Table structure for table `t_bahan_hilang`
--

CREATE TABLE `t_bahan_hilang` (
  `id` int(11) NOT NULL,
  `id_rusak` varchar(20) NOT NULL,
  `id_bahan` int(11) NOT NULL,
  `jml_hilang` decimal(16,0) NOT NULL,
  `tgl_hilang` date NOT NULL,
  `keterangan` text NOT NULL,
  `tipe` enum('hilang','rusak') NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `t_bahan_hilang`
--

INSERT INTO `t_bahan_hilang` (`id`, `id_rusak`, `id_bahan`, `jml_hilang`, `tgl_hilang`, `keterangan`, `tipe`, `created_at`, `updated_at`) VALUES
(1, 'LAP0421000001', 2, 3, '2021-04-07', 'Hilang tidak tau rimbanya.', 'hilang', '2021-04-09 14:07:58', '2021-04-09 14:07:58');

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

--
-- Table structure for table `t_bahan_hilang_customer`
--

CREATE TABLE `t_bahan_hilang_customer` (
  `id` int(11) NOT NULL,
  `no_nota` varchar(30) NOT NULL,
  `namapel` varchar(150) NOT NULL,
  `jml_hilang` decimal(16,0) NOT NULL,
  `tgl_hilang` date NOT NULL,
  `keterangan` text NOT NULL,
  `nama_barang` varchar(150) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `t_bahan_hilang_customer`
--

INSERT INTO `t_bahan_hilang_customer` (`id`, `no_nota`, `namapel`, `jml_hilang`, `tgl_hilang`, `keterangan`, `nama_barang`, `created_at`, `updated_at`) VALUES
(1, 'NT0122000006', 'Fadlizhon', 3, '2022-01-19', 'Hilang sebelum dikirim', 'Buku Yasin Hard Cover', '2022-01-19 13:38:39', '2022-01-19 13:43:46');

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

--
-- Table structure for table `t_beli_d`
--

CREATE TABLE `t_beli_d` (
  `id` int(11) NOT NULL,
  `id_beli` varchar(20) NOT NULL,
  `id_bahan` int(11) NOT NULL,
  `qty` double NOT NULL,
  `harga` decimal(16,0) NOT NULL,
  `disc` double NOT NULL,
  `total` decimal(16,0) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `t_beli_d`
--

INSERT INTO `t_beli_d` (`id`, `id_beli`, `id_bahan`, `qty`, `harga`, `disc`, `total`, `created_at`, `updated_at`) VALUES
(1, 'BL0421000001', 2, 25, 25000, 1.5, 615625, '2021-04-09 15:41:54', NULL),
(2, 'BL0421000001', 3, 20, 25000, 0, 500000, '2021-04-09 15:43:04', NULL),
(3, 'BL0421000001', 4, 2, 1000, 0, 2000, '2021-04-09 15:45:42', NULL),
(4, 'BL0421000001', 5, 2, 15800, 0, 31600, '2021-04-09 16:49:47', NULL),
(5, 'BL0122000002', 4, 12, 15000, 1, 178200, '2022-01-11 02:04:37', NULL);

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

--
-- Table structure for table `t_beli_h`
--

CREATE TABLE `t_beli_h` (
  `id` bigint(11) NOT NULL,
  `id_beli` varchar(20) NOT NULL,
  `no_faktur` varchar(20) NOT NULL,
  `tanggal` date NOT NULL,
  `id_supplier` int(11) NOT NULL,
  `totalbeli` decimal(16,0) NOT NULL,
  `keterangan` varchar(150) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `t_beli_h`
--

INSERT INTO `t_beli_h` (`id`, `id_beli`, `no_faktur`, `tanggal`, `id_supplier`, `totalbeli`, `keterangan`, `created_at`, `updated_at`) VALUES
(1, 'BL0421000001', 'F042012-009876', '2021-04-07', 3, 1149225, 'Bayar via ovo', '2021-04-09 15:55:32', '2021-04-09 16:55:10');

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

--
-- Table structure for table `t_cetak_bahan`
--

CREATE TABLE `t_cetak_bahan` (
  `id` int(11) UNSIGNED NOT NULL,
  `id_trans` varchar(20) NOT NULL,
  `id_bahan` int(11) NOT NULL,
  `qty` float NOT NULL,
  `created_at` datetime NOT NULL,
  `update_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `t_cetak_bahan`
--

INSERT INTO `t_cetak_bahan` (`id`, `id_trans`, `id_bahan`, `qty`, `created_at`, `update_at`) VALUES
(1, 'ORD1223000001', 2, 2, '2023-12-29 18:04:45', NULL),
(2, 'ORD1223000003', 5, 10, '2023-12-31 16:11:07', NULL),
(3, 'ORD1223000003', 4, 10, '2023-12-31 16:11:15', NULL),
(4, 'ORD1223000004', 5, 10, '2023-12-31 16:19:11', NULL),
(5, 'ORD1223000004', 4, 10, '2023-12-31 16:19:26', NULL);

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

--
-- Table structure for table `t_cetak_d`
--

CREATE TABLE `t_cetak_d` (
  `id` int(11) UNSIGNED NOT NULL,
  `id_trans` varchar(20) NOT NULL,
  `id_produk` int(11) NOT NULL,
  `is_banner` int(1) DEFAULT NULL,
  `qty` int(11) NOT NULL,
  `panjang` float DEFAULT NULL,
  `lebar` float DEFAULT NULL,
  `harga` decimal(16,0) NOT NULL,
  `diskon` double NOT NULL,
  `total` decimal(16,0) NOT NULL,
  `selesai` tinyint(1) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `update_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `t_cetak_d`
--

INSERT INTO `t_cetak_d` (`id`, `id_trans`, `id_produk`, `is_banner`, `qty`, `panjang`, `lebar`, `harga`, `diskon`, `total`, `selesai`, `created_at`, `update_at`) VALUES
(1, 'ORD0122000001', 15, 0, 6, NULL, NULL, 21000, 0, 126000, NULL, '2022-01-26 08:08:16', NULL),
(2, 'ORD0122000001', 15, 0, 21, NULL, NULL, 20000, 0, 420000, NULL, '2022-01-26 08:08:37', NULL),
(3, 'ORD0122000001', 15, 0, 26, NULL, NULL, 19000, 0, 494000, NULL, '2022-01-26 08:10:21', NULL),
(4, 'ORD0122000001', 15, 0, 2, NULL, NULL, 23000, 0, 46000, NULL, '2022-01-26 08:10:35', NULL),
(5, 'ORD1223000001', 2, 0, 100, 7, 12, 35000, 0, 3500000, 1, '2023-12-29 17:43:07', NULL),
(6, 'ORD1223000001', 1, 1, 1, 2, 3, 2500, 0, 15000, 1, '2023-12-29 17:55:47', NULL),
(7, 'ORD1223000002', 2, 0, 100, NULL, NULL, 35000, 0, 3500000, NULL, '2023-12-29 18:59:14', NULL),
(8, 'ORD1223000003', 2, 0, 10, NULL, NULL, 35000, 0, 350000, 1, '2023-12-31 15:56:51', NULL),
(9, 'ORD1223000003', 3, 0, 10, NULL, NULL, 25000, 0, 250000, 1, '2023-12-31 15:57:02', NULL),
(10, 'ORD1223000004', 2, 0, 100, NULL, NULL, 35000, 0, 3500000, 1, '2023-12-31 16:16:53', NULL);

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

--
-- Table structure for table `t_cetak_h`
--

CREATE TABLE `t_cetak_h` (
  `id` bigint(11) NOT NULL,
  `id_trans` varchar(20) NOT NULL,
  `id_nota` varchar(20) DEFAULT NULL,
  `tgl_trans` date NOT NULL,
  `tgl_proses` date DEFAULT NULL,
  `tgl_selesai` date DEFAULT NULL,
  `id_pelanggan` varchar(20) NOT NULL,
  `total` decimal(16,0) NOT NULL,
  `diskon_persen` double DEFAULT NULL,
  `diskon_rupiah` decimal(16,0) DEFAULT NULL,
  `uangmuka` decimal(16,0) NOT NULL,
  `grandtotal` decimal(16,0) NOT NULL,
  `bayar` decimal(16,0) NOT NULL,
  `lunas` enum('lunas','belum') NOT NULL,
  `tgl_lunas` date DEFAULT NULL,
  `status` enum('baru','proses','pending','selesai','spk') NOT NULL,
  `akses` tinyint(1) DEFAULT NULL,
  `tipepel` varchar(30) NOT NULL,
  `id_user` int(11) NOT NULL,
  `keterangan` text DEFAULT NULL,
  `sales` varchar(100) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `t_cetak_h`
--

INSERT INTO `t_cetak_h` (`id`, `id_trans`, `id_nota`, `tgl_trans`, `tgl_proses`, `tgl_selesai`, `id_pelanggan`, `total`, `diskon_persen`, `diskon_rupiah`, `uangmuka`, `grandtotal`, `bayar`, `lunas`, `tgl_lunas`, `status`, `akses`, `tipepel`, `id_user`, `keterangan`, `sales`, `created_at`, `updated_at`) VALUES
(1, 'ORD1223000001', 'NT1223000001', '2023-12-29', '2023-12-30', '2023-12-30', '2912237151', 3515000, NULL, 0, 500000, 3515000, 3100000, 'lunas', '2023-12-29', 'selesai', 1, 'biasa', 1, 'Diambil tanggal 03 Januari 2023', '-', '2023-12-29 17:56:52', '2023-12-29 18:06:01'),
(2, 'ORD1223000002', NULL, '2023-12-29', NULL, NULL, '2912237152', 3500000, NULL, 10000, 50000, 3500000, 0, 'belum', NULL, 'baru', NULL, 'biasa', 1, '232124', 'xzcvXC', '2023-12-29 19:00:59', '2023-12-29 19:00:59'),
(3, 'ORD1223000003', 'NT1223000002', '2023-12-31', '2023-12-31', '2024-01-01', '3112237153', 600000, NULL, 0, 100000, 600000, 560000, 'lunas', '2023-12-31', 'selesai', 1, 'biasa', 4, 'datelane 2 januari 2024', '-', '2023-12-31 15:59:58', '2023-12-31 16:15:09'),
(4, 'ORD1223000004', 'NT1223000003', '2023-12-31', '2023-12-31', '2023-12-31', '3112237154', 3500000, NULL, 0, 100000, 3500000, 3400000, 'lunas', '2023-12-31', 'selesai', 1, 'biasa', 1, '-', '-', '2023-12-31 16:17:26', '2023-12-31 16:21:55');

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

--
-- Table structure for table `t_kas`
--

CREATE TABLE `t_kas` (
  `id` int(11) NOT NULL,
  `id_kas` varchar(20) NOT NULL,
  `tanggal` date NOT NULL,
  `ref_id` varchar(50) NOT NULL,
  `tipe_kas` enum('debet','kredit') NOT NULL,
  `deskripsi` text NOT NULL,
  `debet` decimal(16,0) NOT NULL,
  `kredit` decimal(16,0) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `t_kas`
--

INSERT INTO `t_kas` (`id`, `id_kas`, `tanggal`, `ref_id`, `tipe_kas`, `deskripsi`, `debet`, `kredit`, `created_at`, `updated_at`) VALUES
(1, 'KSM1223000001', '2023-12-29', 'ORD1223000001', 'debet', 'Uangmuka (DP) No:ORD1223000001', 100000, 0, '2023-12-29 17:44:45', '2023-12-29 17:44:45'),
(2, 'KSM1223000002', '2023-12-29', 'ORD1223000001', 'debet', 'Uangmuka (DP) No:ORD1223000001', 500000, 0, '2023-12-29 17:56:19', '2023-12-29 17:56:19'),
(3, 'KSM1223000003', '2023-12-29', 'ORD1223000001', 'debet', 'Uangmuka (DP) No:ORD1223000001', 500000, 0, '2023-12-29 17:56:52', '2023-12-29 17:56:52'),
(4, 'KSM1223000004', '2023-12-29', 'ORD1223000001', 'debet', 'Pelunasan Tagihan No:ORD1223000001', 3015000, 0, '2023-12-29 18:06:01', '2023-12-29 18:06:01'),
(5, 'KSM1223000005', '2023-12-29', 'ORD1223000002', 'debet', 'Uangmuka (DP) No:ORD1223000002', 50000, 0, '2023-12-29 19:00:59', '2023-12-29 19:00:59'),
(6, 'KSM1223000006', '2023-12-31', 'ORD1223000003', 'debet', 'Uangmuka (DP) No:ORD1223000003', 100000, 0, '2023-12-31 15:59:58', '2023-12-31 15:59:58'),
(7, 'KSM1223000007', '2023-12-31', 'ORD1223000003', 'debet', 'Pelunasan Tagihan No:ORD1223000003', 500000, 0, '2023-12-31 16:15:09', '2023-12-31 16:15:09'),
(8, 'KSM1223000008', '2023-12-31', 'ORD1223000004', 'debet', 'Uangmuka (DP) No:ORD1223000004', 100000, 0, '2023-12-31 16:17:26', '2023-12-31 16:17:26'),
(9, 'KSM1223000009', '2023-12-31', 'ORD1223000004', 'debet', 'Pelunasan Tagihan No:ORD1223000004', 3400000, 0, '2023-12-31 16:21:55', '2023-12-31 16:21:55');

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

--
-- Table structure for table `t_member`
--

CREATE TABLE `t_member` (
  `id` int(11) UNSIGNED NOT NULL,
  `memberreg` varchar(20) NOT NULL,
  `namapel` varchar(50) NOT NULL,
  `alamatpel` varchar(200) NOT NULL,
  `telppel` varchar(18) NOT NULL,
  `emailpel` varchar(50) NOT NULL,
  `tipepel` varchar(30) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `diskon` float DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `t_member`
--

INSERT INTO `t_member` (`id`, `memberreg`, `namapel`, `alamatpel`, `telppel`, `emailpel`, `tipepel`, `status`, `diskon`, `created_at`, `updated_at`) VALUES
(1, '25897145', 'Abdul Aziz', 'Tembok Lor RT 09/01 Adiwerna', '085714778925', 'abdulaziz@gmail.com', 'member', 1, 5, '2022-01-17 08:19:15', '2022-01-17 08:19:15'),
(2, '1501227146', 'SDN Mintaragen 8', 'Jl. Halmahera No. 89 Tegal', '0823325897', 'mintaragen8tgl@gmail.com', 'biasa', 1, 5, '2022-01-17 08:20:05', '2022-01-19 11:22:57'),
(3, '1601227147', 'Rumah Sakit Mitra Siaga', 'Mejasem Timur', '0823355897', 'mediatim@rsmitrasiaga.co.id', 'member', 1, 3, '2022-01-17 08:21:05', '2022-01-19 11:27:06'),
(4, '1701227148', 'Abdul Aziz Syarif', 'Ujungrusi', '081322547763', 'aasdesign@gmail.com', 'biasa', 1, NULL, '2022-01-17 08:40:48', '2022-01-17 08:41:24'),
(5, '1701227146', 'SMPN 03 Kota Tegal', 'Jalan Yos Sudarso Tegal Barat', '0283-356987', 'admin@smpn3tegal.sch.id', 'biasa', 1, 3, '2022-01-17 18:14:56', '2022-01-19 11:27:20'),
(6, '2912237149', 'Nur Hidayat', 'Pagedangan', '085611232500', 'hidayatnur@gmail.com', 'member', 1, 0, '2023-12-29 17:54:44', '2023-12-29 17:54:44'),
(7, '2912237150', 'MWCNU Kec. Adiwerna', 'Adiwerna', '-', '-', 'biasa', 1, NULL, '2023-12-29 17:56:19', '2023-12-29 17:56:19'),
(8, '2912237151', 'MWCNU Kec. Adiwerna', 'Adiwerna', '-', '-', 'biasa', 1, NULL, '2023-12-29 17:56:52', '2023-12-29 17:56:52'),
(9, '2912237152', 'Asep', 'vc', 'cbvc', '-', 'biasa', 1, NULL, '2023-12-29 19:00:59', '2023-12-29 19:00:59'),
(10, '3112237153', 'roni', 'roji', '123', '-', 'biasa', 1, NULL, '2023-12-31 15:59:58', '2023-12-31 15:59:58'),
(11, '3112237154', 'Asep', 'gbn', '123', '-', 'biasa', 1, NULL, '2023-12-31 16:17:26', '2023-12-31 16:17:26');

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

--
-- Table structure for table `t_pelanggan`
--

CREATE TABLE `t_pelanggan` (
  `id` int(11) UNSIGNED NOT NULL,
  `namapel` varchar(50) NOT NULL,
  `alamatpel` varchar(200) NOT NULL,
  `telppel` varchar(18) NOT NULL,
  `emailpel` varchar(50) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `t_pelanggan`
--

INSERT INTO `t_pelanggan` (`id`, `namapel`, `alamatpel`, `telppel`, `emailpel`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Rohadi', 'Jln. Kebasen Timur No. 57 Slawi', '081544789635', 'rohadi@gmail.com', 1, '2021-04-08 16:19:07', '2021-04-08 16:19:07'),
(3, 'Nimas', 'Tegal', '0811111122', 'nimas@gmail.com', 1, '2021-04-08 16:57:04', '2021-04-08 16:57:04'),
(4, 'Smartled', 'Kalimantan', '081251339481', 'smartled@gmail.com', 1, '2021-04-09 19:20:37', '2021-04-09 19:20:37'),
(5, 'KARANG TARUNA DESA BONGKOK', 'BALAI DESA BONGKOK KEC. KRAMAT', '08152253580', 'katarbongkok@gmail.com', 1, '2021-04-13 06:32:52', '2021-04-13 06:32:52'),
(8, 'Nimas Ageng', 'Slawi', '081235468', 'nimasageng@gmail.com', 1, '2021-04-13 07:40:10', '2021-04-13 07:40:10'),
(9, 'ridho', 'sdadsa', '08989788877', 'smartled.ptk@gmail.com', 1, '2021-04-14 04:33:19', '2021-04-14 04:33:19'),
(10, 'Jeni', 'Jl. Sutan Syahrir No. 7', '08989788877', 'reklameborneo@gmail.com', 1, '2021-04-19 19:31:47', '2021-04-19 19:31:47'),
(11, 'Sinyo', 'Bandung', '08123456789', 'sinyo@gmail.com', 1, '2022-01-09 01:38:49', '2022-01-09 01:38:49'),
(12, 'Fery', 'Bandung', '08123456789', 'fery@gmail.com', 1, '2022-01-09 06:26:21', '2022-01-09 06:26:21'),
(13, 'fadhlizon, ST', 'jl sdn maolang ganting no 456\r\nsteet 23454', '085704876527', 'kecefeksible@gmail.com', 1, '2022-01-10 10:52:33', '2022-01-10 10:52:33'),
(14, 'abdul soleh', 'jl. rahmat bahyaqi', '085657465408', 'email@gmail.com', 1, '2022-01-10 11:11:16', '2022-01-10 11:11:16'),
(15, 'ghfg', 'jl', '085704876527', 'kecefeksible@gmail.com', 1, '2022-01-10 11:20:11', '2022-01-10 11:20:11'),
(16, 'M. Sholehuddin', 'jl bulak banteng surabaya`', '085765459873', 's@gmail.com', 1, '2022-01-10 13:00:32', '2022-01-10 13:00:32'),
(17, 'M. syihabuddin', 'MI Darul Falah Surabaya 26\r\nRT 005 RW 007', '0857652357846', 'AAA@gmail.com', 1, '2022-01-11 03:46:12', '2022-01-11 03:46:12'),
(18, '2555', '25', '20320320', 'artbadur@gmail.com', 1, '2022-01-12 15:56:52', '2022-01-12 15:56:52'),
(19, 'm solehkapri', 'kjdshjhsdnf jhdfjdhdf', '0865867968565', 'sahsh@gmail.com', 1, '2022-01-12 19:31:47', '2022-01-12 19:31:47'),
(20, 'fadhlizon, ST', 'asasas', '085704876527', 'kecefeksible@gmail.com', 1, '2022-01-12 19:57:44', '2022-01-12 19:57:44'),
(21, 'fadli', 'durung bedug', '085566789648', 'darsono@gmail.com', 1, '2022-01-13 03:04:21', '2022-01-13 03:04:21'),
(22, 'D', 'DD', '214', 's@gmail.com', 1, '2022-01-13 04:56:30', '2022-01-13 04:56:30'),
(23, 'RS Mitra Siaga', 'Mejasem Timur', '0293-355221', 'service@rsmitrasiaga.co.id', 1, '2022-01-17 18:20:24', '2022-01-17 18:20:24');

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

--
-- Table structure for table `t_piutang`
--

CREATE TABLE `t_piutang` (
  `id` int(11) UNSIGNED NOT NULL,
  `id_trans` varchar(20) NOT NULL,
  `tgl_piutang` date NOT NULL,
  `total_piutang` decimal(16,0) NOT NULL,
  `dibayar` decimal(16,0) DEFAULT NULL,
  `sisa` decimal(16,0) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `t_piutang_bayar`
--

CREATE TABLE `t_piutang_bayar` (
  `id` int(11) UNSIGNED NOT NULL,
  `id_trans` varchar(20) NOT NULL,
  `tgl_bayar` date NOT NULL,
  `nominal` decimal(16,0) NOT NULL,
  `created_at` datetime NOT NULL,
  `update_at` datetime DEFAULT NULL,
  `id_user` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `t_setting_usaha`
--

CREATE TABLE `t_setting_usaha` (
  `id` int(1) NOT NULL,
  `nama` varchar(150) NOT NULL,
  `alamat` text DEFAULT NULL,
  `no_telp` varchar(50) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `jenis_printer` enum('dotmatrix','tinta') NOT NULL,
  `logo` varchar(150) DEFAULT NULL,
  `kartu_member` varchar(150) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `t_setting_usaha`
--

INSERT INTO `t_setting_usaha` (`id`, `nama`, `alamat`, `no_telp`, `email`, `jenis_printer`, `logo`, `kartu_member`) VALUES
(1, 'Solusi Percetakan', 'Jl. Bedug Pangkah RT 12 RW 05 Slawi', '0823352879', 'solusipertegal@gmail.com', 'dotmatrix', '1718734713.webp', '1204966425.png');

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

--
-- Table structure for table `t_setting_wa`
--

CREATE TABLE `t_setting_wa` (
  `id` int(1) NOT NULL,
  `device_id` varchar(250) NOT NULL,
  `pesan_order` text DEFAULT NULL,
  `pesan_orderproses` text DEFAULT NULL,
  `pesan_orderselesai` text DEFAULT NULL,
  `pesan_tagihan` text NOT NULL,
  `pesan_lunas` text NOT NULL,
  `aktif` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `t_setting_wa`
--

INSERT INTO `t_setting_wa` (`id`, `device_id`, `pesan_order`, `pesan_orderproses`, `pesan_orderselesai`, `pesan_tagihan`, `pesan_lunas`, `aktif`) VALUES
(1, 'e45f0db435b124d29c333d33422538b5', 'Hai, [nama]. Pesanan Cetak kamu dengan ID : [id]. Sudah masuk daftar pesanan. Terima kasih telah memilih kami.', 'Hai, [nama]. Pesanan Cetak kamu dengan ID : [id]. Sudah diproses oleh tim produksi. Terima kasih telah memilih kami.', 'Hai, [nama]. Pesanan Cetak kamu dengan ID : [id]. Sudah selesai cetak dan bisa diambil. Terima kasih telah memilih kami.', 'Hai, [nama]. Tagihan kamu dengan  ID : [id] belum dibayar. Segera lakukan pembayaran untuk dapat menerima pesanan cetakan kamu. Terima kasih telah memilih kami.', 'Hai, [nama]. Tagihan dengan ID : [id] sudah dibayarkan dan semoga berkenan. Terima kasih telah memilih kami.', 0);

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

--
-- Table structure for table `t_spk`
--

CREATE TABLE `t_spk` (
  `id` bigint(11) NOT NULL,
  `tgl_spk` date NOT NULL,
  `no_spk` varchar(20) NOT NULL,
  `no_order` varchar(20) NOT NULL,
  `status` varchar(20) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `t_spk`
--

INSERT INTO `t_spk` (`id`, `tgl_spk`, `no_spk`, `no_order`, `status`, `created_at`, `updated_at`) VALUES
(1, '2023-12-29', 'SPK1223000001', 'ORD1223000001', '', '2023-12-29 18:02:21', '2023-12-29 18:02:21'),
(2, '2023-12-31', 'SPK1223000002', 'ORD1223000003', '', '2023-12-31 16:03:47', '2023-12-31 16:03:47'),
(3, '2023-12-31', 'SPK1223000003', 'ORD1223000004', '', '2023-12-31 16:18:31', '2023-12-31 16:18:31'),
(4, '2023-12-31', 'SPK1223000003', 'ORD1223000004', '', '2023-12-31 16:18:33', '2023-12-31 16:18:33');

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

--
-- Table structure for table `t_stok`
--

CREATE TABLE `t_stok` (
  `id` bigint(11) NOT NULL,
  `id_bahan` int(11) NOT NULL,
  `tanggal` date NOT NULL,
  `masuk` double NOT NULL,
  `keluar` double NOT NULL,
  `deskripsi` varchar(255) NOT NULL,
  `refid` varchar(100) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `t_stok`
--

INSERT INTO `t_stok` (`id`, `id_bahan`, `tanggal`, `masuk`, `keluar`, `deskripsi`, `refid`, `created_at`, `updated_at`) VALUES
(1, 2, '2021-04-08', 0, 1, 'Bahan digunakan untuk Order : ORD0421000001', 'ORD0421000001', '2021-04-08 19:24:29', '2021-04-08 19:24:29'),
(2, 4, '2021-04-08', 0, 0.5, 'Bahan digunakan untuk Order : ORD0421000001', 'ORD0421000001', '2021-04-08 19:24:29', '2021-04-08 19:24:29'),
(3, 2, '2021-04-08', 0, 1, 'Bahan digunakan untuk Order : ORD0421000001', 'ORD0421000001', '2021-04-08 19:24:52', '2021-04-08 19:24:52'),
(4, 4, '2021-04-08', 0, 0.5, 'Bahan digunakan untuk Order : ORD0421000001', 'ORD0421000001', '2021-04-08 19:24:52', '2021-04-08 19:24:52'),
(5, 3, '2021-04-09', 15, 0, 'Stok Awal', 'FL002', '2021-04-09 04:46:46', '2021-04-09 04:46:46'),
(9, 2, '2021-04-07', 25, 0, 'Pembelian Bahan : BL0421000001', 'BL0421000001', '2021-04-09 16:55:10', '2021-04-09 16:55:10'),
(10, 3, '2021-04-07', 20, 0, 'Pembelian Bahan : BL0421000001', 'BL0421000001', '2021-04-09 16:55:10', '2021-04-09 16:55:10'),
(11, 4, '2021-04-07', 2, 0, 'Pembelian Bahan : BL0421000001', 'BL0421000001', '2021-04-09 16:55:10', '2021-04-09 16:55:10'),
(12, 5, '2021-04-07', 2, 0, 'Pembelian Bahan : BL0421000001', 'BL0421000001', '2021-04-09 16:55:10', '2021-04-09 16:55:10'),
(13, 2, '2021-04-13', 0, 2, 'Bahan digunakan untuk Order : ORD0421000002', 'ORD0421000002', '2021-04-13 07:23:17', '2021-04-13 07:23:17'),
(14, 2, '2021-04-14', 0, 10, 'Bahan digunakan untuk Order : ORD0421000004', 'ORD0421000004', '2021-04-14 12:33:59', '2021-04-14 12:33:59'),
(15, 2, '2022-01-10', 0, 150, 'Bahan digunakan untuk Order : ORD0122000010', 'ORD0122000010', '2022-01-10 13:03:27', '2022-01-10 13:03:27'),
(16, 2, '2023-12-29', 0, 2, 'Bahan digunakan untuk Order : ORD1223000001', 'ORD1223000001', '2023-12-29 18:04:50', '2023-12-29 18:04:50'),
(17, 5, '2023-12-31', 0, 10, 'Bahan digunakan untuk Order : ORD1223000003', 'ORD1223000003', '2023-12-31 16:11:30', '2023-12-31 16:11:30'),
(18, 4, '2023-12-31', 0, 10, 'Bahan digunakan untuk Order : ORD1223000003', 'ORD1223000003', '2023-12-31 16:11:30', '2023-12-31 16:11:30'),
(19, 5, '2023-12-31', 50, 0, 'Stok Awal', 'dfdf', '2023-12-31 16:13:49', '2023-12-31 16:13:49'),
(20, 4, '2023-12-31', 50, 0, 'Stok Awal', 'GL001', '2023-12-31 16:14:03', '2023-12-31 16:14:03'),
(21, 5, '2023-12-31', 0, 10, 'Bahan digunakan untuk Order : ORD1223000004', 'ORD1223000004', '2023-12-31 16:19:30', '2023-12-31 16:19:30'),
(22, 4, '2023-12-31', 0, 10, 'Bahan digunakan untuk Order : ORD1223000004', 'ORD1223000004', '2023-12-31 16:19:30', '2023-12-31 16:19:30');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `m_admin`
--
ALTER TABLE `m_admin`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `m_bahan`
--
ALTER TABLE `m_bahan`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `m_barang_h`
--
ALTER TABLE `m_barang_h`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `m_barang_harga`
--
ALTER TABLE `m_barang_harga`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `m_mesin`
--
ALTER TABLE `m_mesin`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `m_pegawai`
--
ALTER TABLE `m_pegawai`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `m_supplier`
--
ALTER TABLE `m_supplier`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_bahan_hilang`
--
ALTER TABLE `t_bahan_hilang`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_bahan_hilang_customer`
--
ALTER TABLE `t_bahan_hilang_customer`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_beli_d`
--
ALTER TABLE `t_beli_d`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_beli_h`
--
ALTER TABLE `t_beli_h`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_cetak_bahan`
--
ALTER TABLE `t_cetak_bahan`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_cetak_d`
--
ALTER TABLE `t_cetak_d`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_cetak_h`
--
ALTER TABLE `t_cetak_h`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_kas`
--
ALTER TABLE `t_kas`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `idkas` (`id_kas`);

--
-- Indexes for table `t_member`
--
ALTER TABLE `t_member`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_pelanggan`
--
ALTER TABLE `t_pelanggan`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_piutang`
--
ALTER TABLE `t_piutang`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_piutang_bayar`
--
ALTER TABLE `t_piutang_bayar`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_setting_usaha`
--
ALTER TABLE `t_setting_usaha`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_setting_wa`
--
ALTER TABLE `t_setting_wa`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_spk`
--
ALTER TABLE `t_spk`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `t_stok`
--
ALTER TABLE `t_stok`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `m_admin`
--
ALTER TABLE `m_admin`
  MODIFY `id` bigint(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `m_bahan`
--
ALTER TABLE `m_bahan`
  MODIFY `id` bigint(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `m_barang_h`
--
ALTER TABLE `m_barang_h`
  MODIFY `id` bigint(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `m_barang_harga`
--
ALTER TABLE `m_barang_harga`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `m_mesin`
--
ALTER TABLE `m_mesin`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `m_pegawai`
--
ALTER TABLE `m_pegawai`
  MODIFY `id` bigint(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `m_supplier`
--
ALTER TABLE `m_supplier`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `t_bahan_hilang`
--
ALTER TABLE `t_bahan_hilang`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `t_bahan_hilang_customer`
--
ALTER TABLE `t_bahan_hilang_customer`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `t_beli_d`
--
ALTER TABLE `t_beli_d`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `t_beli_h`
--
ALTER TABLE `t_beli_h`
  MODIFY `id` bigint(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `t_cetak_bahan`
--
ALTER TABLE `t_cetak_bahan`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `t_cetak_d`
--
ALTER TABLE `t_cetak_d`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `t_cetak_h`
--
ALTER TABLE `t_cetak_h`
  MODIFY `id` bigint(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `t_kas`
--
ALTER TABLE `t_kas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `t_member`
--
ALTER TABLE `t_member`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `t_pelanggan`
--
ALTER TABLE `t_pelanggan`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `t_piutang`
--
ALTER TABLE `t_piutang`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `t_piutang_bayar`
--
ALTER TABLE `t_piutang_bayar`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `t_setting_usaha`
--
ALTER TABLE `t_setting_usaha`
  MODIFY `id` int(1) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `t_spk`
--
ALTER TABLE `t_spk`
  MODIFY `id` bigint(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `t_stok`
--
ALTER TABLE `t_stok`
  MODIFY `id` bigint(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;
COMMIT;

