-- ========================================================================= -- DUMP DATABASE PRAKTIKUM ERP (POLITEKNIK META INDUSTRI - PRODI TRPL) -- Mata Kuliah : Enterprise Resource Planning (ERP) / PL/4008 -- Dosen : Adie Kusna Wibowo -- Tanggal : 2026-10-27 07:38:26 -- ========================================================================= -- --------------------------------------------------------- -- Data tabel: `coa` -- --------------------------------------------------------- INSERT INTO `coa` (`code`, `name`, `type`, `normal_balance`, `initial_balance`) VALUES ('1-1000', 'Kas / Bank', 'Aset Lancar', 'D', '30000000'); INSERT INTO `coa` (`code`, `name`, `type`, `normal_balance`, `initial_balance`) VALUES ('1-1100', 'Piutang Usaha', 'Aset Lancar', 'D', '0'); INSERT INTO `coa` (`code`, `name`, `type`, `normal_balance`, `initial_balance`) VALUES ('1-1200', 'Persediaan Bahan Baku', 'Aset Lancar', 'D', '0'); INSERT INTO `coa` (`code`, `name`, `type`, `normal_balance`, `initial_balance`) VALUES ('2-1000', 'Utang Usaha', 'Kewajiban', 'K', '0'); INSERT INTO `coa` (`code`, `name`, `type`, `normal_balance`, `initial_balance`) VALUES ('3-1000', 'Modal Awal / Saldo Awal', 'Ekuitas', 'K', '30000000'); INSERT INTO `coa` (`code`, `name`, `type`, `normal_balance`, `initial_balance`) VALUES ('4-1000', 'Penjualan Produk', 'Pendapatan', 'K', '0'); INSERT INTO `coa` (`code`, `name`, `type`, `normal_balance`, `initial_balance`) VALUES ('6-1000', 'Beban Operasional', 'Beban', 'D', '0'); INSERT INTO `coa` (`code`, `name`, `type`, `normal_balance`, `initial_balance`) VALUES ('6-1100', 'Beban Listrik', 'Beban', 'D', '0'); -- --------------------------------------------------------- -- Data tabel: `journal_entries` -- --------------------------------------------------------- INSERT INTO `journal_entries` (`id`, `entry_no`, `entry_date`, `description`, `source_doc`, `is_reversed`, `reversed_by_id`, `created_by`, `created_at`) VALUES ('1', 'TRX-001', '2026-10-01', 'Pembelian bahan baku secara kredit', 'PO-001/INV-SUP-101', '0', NULL, 'Staf Akuntansi', '2026-10-26 12:17:14'); INSERT INTO `journal_entries` (`id`, `entry_no`, `entry_date`, `description`, `source_doc`, `is_reversed`, `reversed_by_id`, `created_by`, `created_at`) VALUES ('2', 'TRX-002', '2026-10-03', 'Pembayaran sebagian utang pemasok', 'BK-001/VOUCHER-PAY', '0', NULL, 'Staf Akuntansi', '2026-10-26 12:17:14'); INSERT INTO `journal_entries` (`id`, `entry_no`, `entry_date`, `description`, `source_doc`, `is_reversed`, `reversed_by_id`, `created_by`, `created_at`) VALUES ('3', 'TRX-003', '2026-10-05', 'Penjualan produk jadi secara kredit', 'SO-001/INV-CUST-201', '0', NULL, 'Staf Akuntansi', '2026-10-26 12:17:14'); INSERT INTO `journal_entries` (`id`, `entry_no`, `entry_date`, `description`, `source_doc`, `is_reversed`, `reversed_by_id`, `created_by`, `created_at`) VALUES ('4', 'TRX-004', '2026-10-08', 'Penerimaan pembayaran sebagian piutang pelanggan', 'BM-001/RECEIPT-88', '0', NULL, 'Staf Akuntansi', '2026-10-26 12:17:14'); INSERT INTO `journal_entries` (`id`, `entry_no`, `entry_date`, `description`, `source_doc`, `is_reversed`, `reversed_by_id`, `created_by`, `created_at`) VALUES ('5', 'TRX-005', '2026-10-10', 'Pembayaran biaya operasional secara tunai', 'BKK-002/OPR-EXP', '0', NULL, 'Staf Akuntansi', '2026-10-26 12:17:14'); INSERT INTO `journal_entries` (`id`, `entry_no`, `entry_date`, `description`, `source_doc`, `is_reversed`, `reversed_by_id`, `created_by`, `created_at`) VALUES ('6', 'TRX-002-DUP', '2026-10-04', '[KESALAHAN PENGGUNA] Pembayaran sebagian utang pemasok tercatat dua kali (Duplikat)', 'BK-001/VOUCHER-PAY (DUPLICATE)', '0', NULL, 'Staf Keuangan (Human Error)', '2026-10-27 00:37:07'); INSERT INTO `journal_entries` (`id`, `entry_no`, `entry_date`, `description`, `source_doc`, `is_reversed`, `reversed_by_id`, `created_by`, `created_at`) VALUES ('7', 'GR-TRX-1027-001', '2026-10-27', 'Penerimaan parsial 200 unit Bahan B terhadap PO-2026-B350', 'GR-DOC-B200', '0', NULL, 'Gudang & Sistem Integrasi', '2026-10-27 00:37:11'); -- --------------------------------------------------------- -- Data tabel: `journal_details` -- --------------------------------------------------------- INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('1', '1', '1-1200', '8000000', '0'); INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('2', '1', '2-1000', '0', '8000000'); INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('3', '2', '2-1000', '3000000', '0'); INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('4', '2', '1-1000', '0', '3000000'); INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('5', '3', '1-1100', '12000000', '0'); INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('6', '3', '4-1000', '0', '12000000'); INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('7', '4', '1-1000', '5000000', '0'); INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('8', '4', '1-1100', '0', '5000000'); INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('9', '5', '6-1000', '1500000', '0'); INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('10', '5', '1-1000', '0', '1500000'); INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('11', '6', '2-1000', '3000000', '0'); INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('12', '6', '1-1000', '0', '3000000'); INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('13', '7', '1-1200', '8000000', '0'); INSERT INTO `journal_details` (`id`, `journal_id`, `account_code`, `debit`, `credit`) VALUES ('14', '7', '2-1000', '0', '8000000'); -- --------------------------------------------------------- -- Data tabel: `items` -- --------------------------------------------------------- INSERT INTO `items` (`code`, `name`, `type`, `stock_qty`, `reserved_qty`, `unit`, `lead_time_days`, `unit_price`) VALUES ('P-01', 'Komponen Presisi P-01', 'FG', '0', '0', 'Unit', '2', '150000'); INSERT INTO `items` (`code`, `name`, `type`, `stock_qty`, `reserved_qty`, `unit`, `lead_time_days`, `unit_price`) VALUES ('RAW-A', 'Bahan Baku A', 'RAW', '400', '0', 'Unit', '4', '30000'); INSERT INTO `items` (`code`, `name`, `type`, `stock_qty`, `reserved_qty`, `unit`, `lead_time_days`, `unit_price`) VALUES ('RAW-B', 'Bahan Baku B', 'RAW', '450', '0', 'Unit', '7', '40000'); INSERT INTO `items` (`code`, `name`, `type`, `stock_qty`, `reserved_qty`, `unit`, `lead_time_days`, `unit_price`) VALUES ('K-01', 'Komponen Otomotif K-01 (Praktikum 1)', 'FG', '40', '0', 'Unit', '3', '150000'); INSERT INTO `items` (`code`, `name`, `type`, `stock_qty`, `reserved_qty`, `unit`, `lead_time_days`, `unit_price`) VALUES ('MAT-A', 'Bahan A (Praktikum 1)', 'RAW', '150', '0', 'Unit', '5', '25000'); INSERT INTO `items` (`code`, `name`, `type`, `stock_qty`, `reserved_qty`, `unit`, `lead_time_days`, `unit_price`) VALUES ('MAT-B', 'Bahan B (Praktikum 1)', 'RAW', '50', '0', 'Unit', '10', '35000'); -- --------------------------------------------------------- -- Data tabel: `bom` -- --------------------------------------------------------- INSERT INTO `bom` (`id`, `parent_code`, `component_code`, `quantity`) VALUES ('1', 'P-01', 'RAW-A', '3'); INSERT INTO `bom` (`id`, `parent_code`, `component_code`, `quantity`) VALUES ('2', 'P-01', 'RAW-B', '2'); INSERT INTO `bom` (`id`, `parent_code`, `component_code`, `quantity`) VALUES ('3', 'K-01', 'MAT-A', '2'); INSERT INTO `bom` (`id`, `parent_code`, `component_code`, `quantity`) VALUES ('4', 'K-01', 'MAT-B', '1'); -- --------------------------------------------------------- -- Data tabel: `purchase_orders` -- --------------------------------------------------------- INSERT INTO `purchase_orders` (`id`, `po_no`, `item_code`, `vendor_name`, `qty_ordered`, `qty_received`, `unit_price`, `lead_time_days`, `order_date`, `expected_date`, `status`, `created_at`) VALUES ('1', 'PO-2026-A100', 'RAW-A', 'PT Sumber Logam Perkasa', '100', '0', '30000', '4', '2026-10-24', '2026-10-28', 'OPEN', '2026-10-26 12:17:14'); INSERT INTO `purchase_orders` (`id`, `po_no`, `item_code`, `vendor_name`, `qty_ordered`, `qty_received`, `unit_price`, `lead_time_days`, `order_date`, `expected_date`, `status`, `created_at`) VALUES ('2', 'PO-2026-B350', 'RAW-B', 'PT Reksa Kimia Industri', '350', '200', '40000', '7', '2026-10-27', '2026-11-03', 'PARTIAL', '2026-10-27 00:37:09'); -- --------------------------------------------------------- -- Data tabel: `purchase_requisitions` -- --------------------------------------------------------- INSERT INTO `purchase_requisitions` (`id`, `pr_no`, `item_code`, `qty`, `requester`, `department`, `need_date`, `status`, `created_at`) VALUES ('1', 'PR-001', 'RAW-A', '400', 'Sistem MRP Terintegrasi', 'Perencanaan Produksi', '2026-10-31', 'APPROVED', '2026-10-27 00:37:09'); INSERT INTO `purchase_requisitions` (`id`, `pr_no`, `item_code`, `qty`, `requester`, `department`, `need_date`, `status`, `created_at`) VALUES ('2', 'PR-002', 'RAW-B', '350', 'Sistem MRP Terintegrasi', 'Perencanaan Produksi', '2026-11-02', 'APPROVED', '2026-10-27 00:37:09'); -- --------------------------------------------------------- -- Data tabel: `security_audit_logs` -- --------------------------------------------------------- INSERT INTO `security_audit_logs` (`id`, `timestamp`, `username`, `role`, `action_attempted`, `resource`, `status`, `notes`) VALUES ('1', '2026-10-26 12:17:14', 'staf_pembelian', 'Staf Pembelian', 'CREATE_PO', '/modul-pembelian/po/create', 'ALLOWED', 'Pembuatan PO PR-001 berhasil divalidasi'); INSERT INTO `security_audit_logs` (`id`, `timestamp`, `username`, `role`, `action_attempted`, `resource`, `status`, `notes`) VALUES ('2', '2026-10-26 12:17:14', 'staf_gudang', 'Staf Gudang', 'VIEW_FINANCIAL_REPORT', '/modul-keuangan/neraca-saldo', 'BLOCKED', 'Akses ditolak: Staf Gudang tidak memiliki hak ases laporan keuangan'); INSERT INTO `security_audit_logs` (`id`, `timestamp`, `username`, `role`, `action_attempted`, `resource`, `status`, `notes`) VALUES ('3', '2026-10-26 12:18:38', 'staf_penjualan', 'Staf penjualan', 'ACCESS_TEST', 'approve_po', 'BLOCKED', 'Akses DITOLAK: Staf operasional tidak memiliki wewenang persetujuan belanja'); INSERT INTO `security_audit_logs` (`id`, `timestamp`, `username`, `role`, `action_attempted`, `resource`, `status`, `notes`) VALUES ('4', '2026-10-27 00:37:07', 'staf_keuangan', 'Staf Keuangan', 'POST_JOURNAL_DUPLICATE', '/modul-keuangan/jurnal/input', 'ALLOWED', 'Transaksi duplikat Rp 3.000.000 berhasil diinput oleh user'); -- --------------------------------------------------------- -- Data tabel: `lab_purchase_requests` -- --------------------------------------------------------- INSERT INTO `lab_purchase_requests` (`id`, `request_no`, `item_name`, `qty`, `estimated_price`, `total_estimated`, `actual_quotation`, `requester_lecturer`, `urgency`, `status`, `approval_level`, `approved_by`, `created_at`) VALUES ('1', 'PR-LAB-001', 'Insert Bubut Carbide Sandvik (Praktik Manufaktur)', '20', '225000', '4500000', '4700000', 'Dosen Pengampu CNC (Dr. Budi / Ir. Kusna)', 'NORMAL', 'APPROVED_LAB', 'KEPALA_LAB', 'Kepala Laboratorium Manufaktur', '2026-10-26 12:17:14'); INSERT INTO `lab_purchase_requests` (`id`, `request_no`, `item_name`, `qty`, `estimated_price`, `total_estimated`, `actual_quotation`, `requester_lecturer`, `urgency`, `status`, `approval_level`, `approved_by`, `created_at`) VALUES ('2', 'PR-LAB-002-EMG', 'Sensor Proximity & Pelumas Hidrolik Mesin Milling (Ujian Mahasiswa)', '10', '650000', '6500000', '6500000', 'Dosen Penguji Ujian TRPL', 'EMERGENCY_24H', 'APPROVED_LEADERSHIP', 'PIMPINAN', 'Direktur / Wakil Direktur', '2026-10-26 12:17:14');