--
-- Host: localhost    Database: jatim_hardware
-- ------------------------------------------------------


--
-- Table structure for table `akun`
--

CREATE TABLE `akun` (
  `id` int NOT NULL AUTO_INCREMENT,
  `kategori` int DEFAULT NULL,
  `nama_akun` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `akun`
--

INSERT INTO `akun` VALUES (1,1,'KAS','2025-03-20 09:19:16','2025-03-25 05:16:57'),(3,2,'BENSIN','2025-03-20 09:20:26','2025-03-25 05:17:02'),(4,2,'BIAYA OPERASIONAL','2025-03-22 08:50:03','2025-03-25 05:15:20'),(5,2,'BIAYA PERJALANAN','2025-03-25 05:15:08','2025-03-25 05:15:27'),(6,2,'DOORPRIZE','2025-03-25 05:15:39','2025-03-25 05:15:39'),(7,2,'EKSPEDISI CUSTOMER','2025-03-25 05:15:46','2025-03-25 05:15:46'),(8,2,'EKSPEDISI SUPPLIER','2025-03-25 05:15:54','2025-03-25 05:15:54'),(9,2,'GAJI PEGAWAI','2025-03-25 05:16:02','2025-03-25 05:16:02'),(10,2,'KOLIAN','2025-03-25 05:16:11','2025-03-25 05:16:11'),(11,2,'KOMISI SALES','2025-03-25 05:16:19','2025-03-25 05:16:19'),(12,2,'PAJAK','2025-03-25 05:16:24','2025-03-25 05:16:24'),(13,2,'PARCEL','2025-03-25 05:16:28','2025-03-25 05:16:28'),(14,2,'PARKIR','2025-03-25 05:16:33','2025-03-25 05:16:33'),(15,2,'SERVIS MOTOR DAN MOBIL','2025-03-25 05:16:45','2025-03-25 05:16:45'),(16,2,'THR','2025-03-25 05:16:51','2025-03-25 05:16:51'),(19,2,'PEMBELIAN BARANG','2025-05-07 04:58:39','2025-05-07 04:58:39'),(20,2,'RETURN PENJUALAN BARANG','2025-05-07 04:59:00','2025-05-07 04:59:00'),(21,2,'PEMBAYARAN HUTANG','2025-05-07 04:59:10','2025-05-07 04:59:10'),(22,1,'PEMBAYARAN PIUTANG','2025-05-07 04:59:20','2025-05-07 04:59:20'),(23,1,'PENJUALAN BARANG','2025-05-07 04:59:26','2025-05-07 04:59:26'),(24,1,'RETURN PEMBELIAN BARANG','2025-05-07 04:59:34','2025-05-07 04:59:34');

--
-- Table structure for table `barang`
--

CREATE TABLE `barang` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `kode` varchar(50) NOT NULL,
  `nama` varchar(255) NOT NULL,
  `harga_beli` decimal(15,2) DEFAULT NULL,
  `harga_jual` decimal(15,2) NOT NULL DEFAULT '0.00',
  `satuan` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `supplier_id` int DEFAULT NULL,
  `hpp` decimal(15,2) DEFAULT NULL,
  `dpp` decimal(15,2) DEFAULT NULL,
  `ppn` decimal(15,2) DEFAULT NULL,
  `diskon_1` decimal(15,2) DEFAULT NULL,
  `diskon_2` decimal(15,2) DEFAULT NULL,
  `diskon_3` decimal(15,2) DEFAULT NULL,
  `harga_1` decimal(15,2) DEFAULT NULL,
  `harga_jual_eceran` decimal(15,2) DEFAULT NULL,
  `harga_jual_grosir` decimal(15,2) DEFAULT NULL,
  `tanggal_ubah_harga` date DEFAULT NULL,
  `quantity_grosir` int DEFAULT NULL,
  `stok_minimal` decimal(15,2) DEFAULT NULL,
  `deskripsi` text,
  `lokasi` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `gambar` varchar(100) DEFAULT NULL,
  `discontinue` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `barang`
--

INSERT INTO `barang` VALUES (1,'8293892','koki',200000.00,1000.00,'Ton',1,NULL,NULL,NULL,30.00,20.00,NULL,NULL,260000.00,240000.00,'2025-05-03',3,2.00,'gambar produk 21','Gudang 1','background3.jpg',1,'2025-03-13 16:06:28','2025-05-08 14:36:59'),(2,'456','baut',6789.00,45678.00,'cm',2,NULL,NULL,NULL,20.00,20.00,20.00,NULL,5431.20,4344.96,'2025-04-28',5,1.00,'dsfsdfsd','Gudang 1','background.jpg',0,'2025-03-13 16:22:29','2025-05-08 14:37:21'),(4,'001','AMNB METERAN AIR 4JARUM PVC',NULL,0.00,'PCS',4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00,'dfdfdfdfdfd','Gudang 1',NULL,0,'2025-04-11 02:07:48','2025-04-30 09:07:10'),(7,'asdasd','koko',10000.00,11000.00,'Ton',1,10045.99,NULL,NULL,NULL,NULL,NULL,NULL,13000.00,11000.00,NULL,15,12.00,'sdsdsdsdsd','Gudang 1',NULL,NULL,'2025-04-23 13:18:22','2025-05-01 14:49:45'),(8,'45678','Baut Bunder',4000.00,0.00,'meter',3,4100.00,3603.60,396.40,30.00,20.00,NULL,NULL,5330.00,4920.00,'2025-05-08',NULL,10.00,'Tes','Gudang 1',NULL,0,'2025-04-23 15:31:44','2025-05-08 05:01:46'),(10,'123','dfdfdf',NULL,0.00,'Ton',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10.00,'fdfdfdf','Gudang 1','EKS5.jpg',NULL,'2025-04-25 11:12:32','2025-04-25 11:12:32'),(11,'123','koki',NULL,0.00,'Ton',1,54783.37,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12.00,'fgfg','Gudang 1','1745580101_EKS5.jpg',NULL,'2025-04-25 11:21:41','2025-04-30 10:57:19'),(12,'1234','123123',10000.00,0.00,'metric',2,NULL,NULL,NULL,10.00,20.00,NULL,NULL,11000.00,12000.00,'2025-04-30',NULL,123.00,'dsfsdf','Gudang 1','1745580163_EKS5.jpg',NULL,'2025-04-25 11:22:43','2025-04-30 08:49:00'),(13,'34234','fdgdfg',NULL,0.00,'metric',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,123.00,'sdfsdf','Gudang 1','/tmp/phpxLk612',NULL,'2025-04-25 11:23:22','2025-04-25 11:23:22'),(14,'34234','fdgdfg',NULL,0.00,'metric',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,123.00,'sdfsdf','Gudang 1','/tmp/phpibaBkc',NULL,'2025-04-25 11:23:33','2025-04-25 11:23:33'),(15,'34234','fdgdfg',NULL,0.00,'metric',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,123.00,'sdfsdf','Gudang 1','/tmp/phpz0axZ1',NULL,'2025-04-25 11:23:47','2025-04-25 11:23:47'),(16,'34234','fdgdfg',NULL,0.00,'metric',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,123.00,'sdfsdf','Gudang 1','1745580294_EKS5.jpg',NULL,'2025-04-25 11:24:54','2025-04-25 11:24:54'),(17,'12121212','ssdsdsd',NULL,0.00,'Ton',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12.00,NULL,'Gudang 1','1745583641_brosur.jpg',NULL,'2025-04-25 12:20:41','2025-04-25 12:20:41'),(18,'1212','1dfdf',NULL,0.00,'Ton',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12.00,'r46456','Gudang 1','1745583822_EKS5.jpg',NULL,'2025-04-25 12:23:42','2025-04-25 12:23:42'),(19,'445','4sd',NULL,0.00,'metric',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12.00,'sdsd','Gudang 1','1745583890_EKS5.jpg',NULL,'2025-04-25 12:24:50','2025-04-25 12:24:50'),(20,'s23','23sd',NULL,0.00,'Ton',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,23.00,'fdf','Gudang 1','1745583929_EKS5.jpg',NULL,'2025-04-25 12:25:29','2025-04-25 12:25:29'),(21,'dfdf','dfdf',NULL,0.00,'Ton',2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,122.00,'dff','Gudang 1','1745584052_EKS5.jpg',NULL,'2025-04-25 12:27:32','2025-04-25 12:27:32'),(22,'2323','dfdf',NULL,0.00,'metric',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,122.00,'dfdf','Gudang 1','1745584091_EKS5.jpg',NULL,'2025-04-25 12:28:11','2025-04-25 12:28:11'),(23,'8293892','skldjsld',NULL,0.00,'Ton',1,-204322.22,NULL,NULL,NULL,NULL,NULL,NULL,10000.00,8000.00,NULL,15,112.00,'bagus','Gudang 1','1745838915_background2.jpeg',NULL,'2025-04-28 11:15:15','2025-05-01 14:50:42'),(25,'paku-0001','Paku Payung Besar',NULL,0.00,'PCS',1,3471.43,NULL,NULL,NULL,NULL,NULL,NULL,4500.00,3500.00,NULL,20,NULL,'Paku Payung Besar dan Bagus','Gudang 1','1746191002_133677587183176408.jpg',NULL,'2025-05-02 13:03:22','2025-05-03 08:51:54'),(26,'paku-0002','Paku Payung Kecil',4000.00,0.00,'PCS',1,4150.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,20,NULL,'Paku payung kecil berkualitas','Gudang 1','1746327442_133708422510945066.jpg',NULL,'2025-05-04 02:57:22','2025-05-04 14:32:31'),(27,'paku-0003','Paku Beton Besar',5000.00,0.00,'PCS',1,5166.67,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,20,NULL,'Paku beton kuat dan berkualitas','Gudang 1','1746369443_133677587183176408.jpg',NULL,'2025-05-04 14:37:23','2025-05-04 14:47:32'),(28,'paku-0004','Paku Beton Kecil',4000.00,0.00,'PCS',1,4310.57,4000.00,0.00,30.00,20.00,NULL,NULL,5289.38,4882.50,'2025-05-06',20,NULL,'Paku beton andalan dan berkualitas','Gudang 1','1746374298_133708422510945066.jpg',NULL,'2025-05-04 15:58:18','2025-05-08 02:51:41'),(30,'paku-0005','Paku Kayu Besar',4000.00,0.00,'PCS',1,4356.17,3603.60,396.40,30.00,20.00,NULL,NULL,5352.26,4940.54,'2025-05-06',15,NULL,'Paku kayu berkualitas','Gudang 1','1746403975_133677587183176408.jpg',NULL,'2025-05-05 00:12:54','2025-05-08 13:47:22'),(31,'roda-0001','RODA KARET 4\" MATI',13000.00,0.00,'PCS',4,13000.00,13000.00,0.00,10.00,5.00,NULL,NULL,14300.00,13650.00,'2025-05-08',50,NULL,NULL,'Gudang 1',NULL,NULL,'2025-05-08 03:43:26','2025-05-08 05:16:39');

--
-- Table structure for table `barang_retur`
--

CREATE TABLE `barang_retur` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `retur_id` bigint unsigned NOT NULL,
  `barang_id` bigint unsigned NOT NULL,
  `jumlah` int NOT NULL,
  `jumlah_retur` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `barang_retur`
--


--
-- Table structure for table `barang_transaksi`
--

CREATE TABLE `barang_transaksi` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `transaksi_id` bigint unsigned NOT NULL,
  `barang_id` bigint unsigned NOT NULL,
  `jumlah` int NOT NULL,
  `satuan` varchar(20) DEFAULT NULL,
  `harga_beli` decimal(15,2) DEFAULT NULL,
  `harga_jual` decimal(15,2) DEFAULT NULL,
  `diskon` decimal(5,2) DEFAULT '0.00',
  `diskon_2` decimal(5,2) DEFAULT '0.00',
  `pajak` decimal(5,2) DEFAULT '0.00',
  `harga_total` decimal(15,2) DEFAULT NULL,
  `hpp` decimal(15,2) DEFAULT NULL,
  `harga_jual_1` decimal(15,2) DEFAULT NULL,
  `harga_jual_2` decimal(15,2) DEFAULT NULL,
  `harga_jual_3` decimal(15,2) DEFAULT NULL,
  `tipe_retur` varchar(50) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=265 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `barang_transaksi`
--

INSERT INTO `barang_transaksi` VALUES (39,46,7,100,'Ton',10000.00,NULL,5.00,0.00,11.00,1054500.00,NULL,NULL,NULL,NULL,NULL,'2025-04-30 10:46:02','2025-04-30 10:46:02'),(43,50,7,20,'Ton',11000.00,NULL,5.00,0.00,10.00,229900.00,NULL,NULL,NULL,NULL,NULL,'2025-04-30 11:29:51','2025-04-30 11:29:51'),(51,60,7,20,NULL,20000.00,NULL,0.00,0.00,0.00,400000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-01 11:15:33','2025-05-01 11:15:33'),(52,60,23,30,NULL,150000.00,NULL,0.00,0.00,0.00,4500000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-01 11:15:33','2025-05-01 11:15:33'),(53,8,23,200,'Ton',NULL,150000.00,0.00,0.00,0.00,30000000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-01 10:50:27','2025-05-01 12:45:04'),(54,8,7,100,'Ton',NULL,20000.00,0.00,0.00,0.00,2000000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-01 10:50:27','2025-05-01 12:45:09'),(95,81,23,30,NULL,NULL,150000.00,0.00,0.00,0.00,4500000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-01 13:16:15','2025-05-01 13:16:15'),(96,81,7,20,NULL,NULL,20000.00,0.00,0.00,0.00,400000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-01 13:16:15','2025-05-01 13:16:15'),(97,82,7,2,NULL,11000.00,NULL,0.00,0.00,0.00,22000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-01 13:49:41','2025-05-01 13:49:41'),(98,86,7,20,'Ton',20000.00,NULL,0.00,0.00,0.00,400000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-01 13:54:53','2025-05-01 13:54:53'),(99,86,23,20,'Ton',15000.00,NULL,0.00,0.00,0.00,300000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-01 13:54:53','2025-05-01 13:54:53'),(100,87,7,100,'Ton',10000.00,NULL,0.00,0.00,0.00,1000000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-01 14:49:45','2025-05-01 14:49:45'),(101,87,23,100,'Ton',15000.00,NULL,0.00,0.00,0.00,1500000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-01 14:49:45','2025-05-01 14:49:45'),(102,88,23,300,'Ton',15000.00,NULL,0.00,0.00,0.00,4500000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-01 14:50:42','2025-05-01 14:50:42'),(107,92,7,16,'Ton',NULL,11000.00,0.00,0.00,0.00,176000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-01 15:52:37','2025-05-01 15:52:37'),(108,92,23,14,'Ton',NULL,10000.00,0.00,0.00,0.00,140000.00,0.00,0.00,0.00,0.00,NULL,'2025-05-01 15:52:37','2025-05-01 15:52:37'),(111,95,25,500,'PCS',3000.00,NULL,0.00,0.00,0.00,1500000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-02 13:22:29','2025-05-02 13:22:29'),(112,96,7,20,NULL,NULL,11000.00,0.00,0.00,0.00,220000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-03 08:34:02','2025-05-03 08:34:02'),(113,97,25,200,'PCS',4000.00,NULL,0.00,0.00,0.00,800000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-03 08:51:54','2025-05-03 08:51:54'),(114,99,26,200,'PCS',4000.00,NULL,0.00,0.00,0.00,800000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-04 14:32:31','2025-05-04 14:32:31'),(115,100,27,300,'PCS',5000.00,NULL,0.00,0.00,0.00,1500000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-04 14:47:32','2025-05-04 14:47:32'),(116,101,28,300,'PCS',4000.00,NULL,0.00,0.00,0.00,1200000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-04 16:04:57','2025-05-04 16:04:57'),(118,113,28,50,NULL,4000.00,NULL,0.00,0.00,0.00,200000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-04 23:35:18','2025-05-04 23:35:18'),(120,115,28,30,NULL,4000.00,NULL,0.00,0.00,0.00,120000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-04 23:41:21','2025-05-04 23:41:21'),(123,120,30,300,'PCS',4000.00,NULL,0.00,0.00,0.00,1200000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-05 00:13:48','2025-05-05 00:13:48'),(124,121,30,30,NULL,4000.00,NULL,0.00,0.00,0.00,120000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-05 00:16:44','2025-05-05 00:16:44'),(126,124,30,30,'PCS',NULL,5200.00,0.00,0.00,0.00,156000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-05 10:46:49','2025-05-05 10:46:49'),(127,124,28,30,'PCS',NULL,4920.00,5.00,0.00,10.00,154242.00,0.00,0.00,0.00,0.00,NULL,'2025-05-05 10:46:50','2025-05-05 10:46:50'),(128,125,30,10,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-05 10:46:50','2025-05-05 10:46:50'),(129,125,28,5,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-05 10:46:50','2025-05-05 10:46:50'),(130,126,28,30,'PCS',NULL,4920.00,0.00,0.00,0.00,147600.00,NULL,NULL,NULL,NULL,NULL,'2025-05-05 10:59:09','2025-05-07 17:48:06'),(131,126,30,25,'PCS',NULL,5200.00,5.00,0.00,10.00,135850.00,0.00,0.00,0.00,0.00,NULL,'2025-05-05 10:59:09','2025-05-07 17:47:48'),(132,127,28,5,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-05 10:59:09','2025-05-05 10:59:09'),(133,127,30,10,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-05 10:59:09','2025-05-05 10:59:09'),(134,128,7,50,'Ton',NULL,11000.00,2.00,0.00,10.00,592900.00,NULL,NULL,NULL,NULL,NULL,'2025-05-05 13:56:19','2025-05-05 13:56:19'),(135,130,7,10,'Ton',NULL,13000.00,4.00,0.00,10.00,137280.00,NULL,NULL,NULL,NULL,NULL,'2025-05-05 14:30:32','2025-05-05 14:30:32'),(136,132,30,15,'PCS',NULL,5200.00,0.00,0.00,0.00,78000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-05 16:43:30','2025-05-05 16:43:30'),(137,132,28,20,'PCS',NULL,4920.00,5.00,0.00,10.00,102828.00,0.00,0.00,0.00,0.00,NULL,'2025-05-05 16:43:31','2025-05-05 16:43:31'),(138,134,30,10,'PCS',NULL,5633.33,0.00,0.00,0.00,56333.30,NULL,NULL,NULL,NULL,NULL,'2025-05-05 17:17:28','2025-05-05 17:17:28'),(139,134,28,10,'PCS',NULL,5330.00,5.00,0.00,10.00,55698.50,0.00,0.00,0.00,0.00,NULL,'2025-05-05 17:17:30','2025-05-05 17:17:30'),(140,135,30,30,'PCS',NULL,5200.00,0.00,0.00,0.00,156000.00,0.00,0.00,0.00,0.00,NULL,'2025-05-06 01:39:29','2025-05-06 01:39:29'),(141,135,28,30,'PCS',NULL,4920.00,5.00,0.00,10.00,154242.00,0.00,0.00,0.00,0.00,NULL,'2025-05-06 01:39:29','2025-05-06 01:39:29'),(142,136,30,10,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-06 01:39:29','2025-05-06 01:39:29'),(143,136,28,5,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-06 01:39:29','2025-05-06 01:39:29'),(144,137,28,30,'PCS',NULL,4920.00,2.00,0.00,11.00,160559.28,0.00,0.00,0.00,0.00,NULL,'2025-05-06 02:16:14','2025-05-06 02:16:14'),(145,137,25,10,'PCS',NULL,4500.00,5.00,0.00,10.00,47025.00,0.00,0.00,0.00,0.00,NULL,'2025-05-06 02:16:14','2025-05-06 02:16:14'),(146,138,28,5,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-06 02:16:14','2025-05-06 02:16:14'),(147,139,30,30,'PCS',NULL,5200.00,0.00,0.00,0.00,156000.00,0.00,0.00,0.00,0.00,NULL,'2025-05-06 08:12:33','2025-05-06 08:12:33'),(148,139,28,20,'PCS',NULL,4920.00,5.00,0.00,10.00,102828.00,0.00,0.00,0.00,0.00,NULL,'2025-05-06 08:12:34','2025-05-06 08:12:34'),(149,140,30,10,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-06 08:12:34','2025-05-06 08:12:34'),(150,141,30,15,'PCS',NULL,5200.00,0.00,0.00,0.00,78000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-06 08:33:59','2025-05-06 08:33:59'),(151,141,28,10,'PCS',NULL,5330.00,5.00,0.00,10.00,55698.50,0.00,0.00,0.00,0.00,NULL,'2025-05-06 08:33:59','2025-05-06 08:33:59'),(152,142,23,5,'Ton',NULL,10000.00,1.00,0.00,2.00,50490.00,NULL,NULL,NULL,NULL,NULL,'2025-05-06 12:51:08','2025-05-06 12:51:08'),(153,143,30,300,'PCS',4000.00,NULL,0.00,0.00,0.00,1200000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-06 14:00:34','2025-05-06 14:00:34'),(154,143,28,300,'PCS',4000.00,NULL,0.00,0.00,0.00,1200000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-06 14:00:34','2025-05-06 14:00:34'),(155,144,30,10,'PCS',NULL,5352.26,0.00,0.00,0.00,53522.60,NULL,NULL,NULL,NULL,NULL,'2025-05-06 14:07:30','2025-05-06 14:07:30'),(156,144,28,25,'PCS',NULL,4882.50,0.00,0.00,0.00,122062.50,0.00,0.00,0.00,0.00,NULL,'2025-05-06 14:07:30','2025-05-06 14:07:30'),(157,145,28,5,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-06 14:07:30','2025-05-06 14:07:30'),(158,146,30,30,'PCS',NULL,4940.54,0.00,0.00,0.00,148216.20,NULL,NULL,NULL,NULL,NULL,'2025-05-06 14:12:04','2025-05-06 14:12:04'),(159,146,28,10,'PCS',NULL,5289.38,0.00,0.00,0.00,52893.80,0.00,0.00,0.00,0.00,NULL,'2025-05-06 14:12:04','2025-05-06 14:12:04'),(160,147,30,10,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-06 14:12:04','2025-05-06 14:12:04'),(161,148,30,5,'PCS',NULL,5352.26,0.00,0.00,0.00,26761.30,0.00,0.00,0.00,0.00,NULL,'2025-05-06 14:20:30','2025-05-06 14:20:30'),(162,148,28,5,'PCS',NULL,5289.38,0.00,0.00,0.00,26446.90,0.00,0.00,0.00,0.00,NULL,'2025-05-06 14:20:30','2025-05-06 14:20:30'),(163,149,30,30,'PCS',NULL,4940.54,0.00,0.00,0.00,148216.20,NULL,NULL,NULL,NULL,NULL,'2025-05-07 05:14:48','2025-05-07 05:14:48'),(164,149,28,200,'PCS',NULL,4882.50,0.00,0.00,0.00,976500.00,0.00,0.00,0.00,0.00,NULL,'2025-05-07 05:14:48','2025-05-07 05:14:48'),(165,150,30,10,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-07 05:14:48','2025-05-07 05:14:48'),(166,150,28,5,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-07 05:14:48','2025-05-07 05:14:48'),(208,178,23,10,'Ton',NULL,10000.00,0.00,0.00,0.00,100000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-07 13:04:52','2025-05-07 13:04:52'),(209,179,23,100,'Ton',NULL,8000.00,0.00,0.00,0.00,800000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-07 13:26:34','2025-05-07 13:26:34'),(215,183,28,5,NULL,NULL,4920.00,0.00,0.00,0.00,24600.00,NULL,NULL,NULL,NULL,'tukar_barang','2025-05-07 17:30:53','2025-05-07 17:48:23'),(216,183,30,5,NULL,NULL,5200.00,0.00,0.00,0.00,26000.00,NULL,NULL,NULL,NULL,'potong_nota','2025-05-07 17:30:53','2025-05-07 17:48:14'),(217,184,30,5,NULL,NULL,5200.00,0.00,0.00,0.00,26000.00,NULL,NULL,NULL,NULL,'tukar_barang','2025-05-07 19:40:45','2025-05-07 19:40:45'),(218,184,28,5,NULL,NULL,4920.00,0.00,0.00,0.00,24600.00,NULL,NULL,NULL,NULL,'potong_nota','2025-05-07 19:40:45','2025-05-07 19:40:45'),(219,185,30,8,NULL,NULL,5200.00,0.00,0.00,0.00,41600.00,NULL,NULL,NULL,NULL,'potong_nota','2025-05-07 19:49:58','2025-05-07 19:49:58'),(220,185,28,8,NULL,NULL,4920.00,0.00,0.00,0.00,39360.00,NULL,NULL,NULL,NULL,'tukar_barang','2025-05-07 19:49:58','2025-05-07 19:49:58'),(222,194,30,5,NULL,4000.00,NULL,0.00,0.00,0.00,20000.00,NULL,NULL,NULL,NULL,'potong_nota','2025-05-08 01:06:18','2025-05-08 01:06:18'),(223,194,28,5,NULL,4000.00,NULL,0.00,0.00,0.00,20000.00,NULL,NULL,NULL,NULL,'tukar_barang','2025-05-08 01:06:19','2025-05-08 01:06:19'),(236,207,28,60,'PCS',4000.00,NULL,0.00,0.00,0.00,240000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-08 02:51:41','2025-05-08 02:51:41'),(237,208,30,30,'PCS',4000.00,NULL,5.00,0.00,11.00,120000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-08 02:57:32','2025-05-08 02:57:32'),(238,209,31,38,'PCS',13000.00,NULL,0.00,0.00,0.00,494000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-08 03:49:35','2025-05-08 03:49:35'),(239,210,30,30,'PCS',NULL,4940.54,0.00,0.00,0.00,148216.20,NULL,NULL,NULL,NULL,NULL,'2025-05-08 04:02:25','2025-05-08 04:02:25'),(240,211,30,10,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-08 04:02:25','2025-05-08 04:02:25'),(241,212,30,30,'PCS',NULL,4940.54,3.00,0.00,5.00,150958.20,NULL,NULL,NULL,NULL,NULL,'2025-05-08 04:05:32','2025-05-08 04:05:32'),(242,213,30,10,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-08 04:05:32','2025-05-08 04:05:32'),(243,215,7,1,'Ton',NULL,13000.00,0.00,0.00,0.00,13000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-08 04:26:10','2025-05-08 04:26:10'),(244,215,23,2,'Ton',NULL,10000.00,0.00,0.00,0.00,20000.00,0.00,0.00,0.00,0.00,NULL,'2025-05-08 04:26:10','2025-05-08 04:26:10'),(245,215,25,3,'PCS',NULL,4500.00,0.00,0.00,0.00,13500.00,0.00,0.00,0.00,0.00,NULL,'2025-05-08 04:26:11','2025-05-08 04:26:11'),(246,215,26,5,'PCS',NULL,NULL,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,NULL,'2025-05-08 04:26:11','2025-05-08 04:26:11'),(247,215,27,4,'PCS',NULL,NULL,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,NULL,'2025-05-08 04:26:11','2025-05-08 04:26:11'),(248,215,30,6,'PCS',NULL,5352.26,0.00,0.00,0.00,32113.56,0.00,0.00,0.00,0.00,NULL,'2025-05-08 04:26:11','2025-05-08 04:26:11'),(249,215,31,7,'PCS',NULL,14300.00,0.00,0.00,0.00,100100.00,0.00,0.00,0.00,0.00,NULL,'2025-05-08 04:26:11','2025-05-08 04:26:11'),(250,216,30,5,'PCS',NULL,5352.26,0.00,0.00,0.00,26761.30,0.00,0.00,0.00,0.00,NULL,'2025-05-08 04:31:12','2025-05-08 04:31:12'),(251,216,25,3,'PCS',NULL,4500.00,0.00,0.00,0.00,13500.00,0.00,0.00,0.00,0.00,NULL,'2025-05-08 04:31:12','2025-05-08 04:31:12'),(252,216,23,3,'Ton',NULL,10000.00,0.00,0.00,0.00,30000.00,0.00,0.00,0.00,0.00,NULL,'2025-05-08 04:31:12','2025-05-08 04:31:12'),(254,218,8,300,'meter',4000.00,NULL,5.00,0.00,11.00,1200000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-08 05:01:19','2025-05-08 05:01:19'),(255,219,31,20,'PCS',NULL,14300.00,0.00,0.00,0.00,286000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-08 05:01:30','2025-05-08 05:01:30'),(256,219,25,100,'PCS',NULL,3500.00,0.00,0.00,0.00,350000.00,0.00,0.00,0.00,0.00,NULL,'2025-05-08 05:01:30','2025-05-08 05:01:30'),(257,220,31,2,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-08 05:01:30','2025-05-08 05:01:30'),(258,221,8,100,'meter',NULL,4920.00,0.00,0.00,0.00,492000.00,0.00,0.00,0.00,0.00,NULL,'2025-05-08 05:05:56','2025-05-08 05:05:56'),(259,221,28,50,'PCS',NULL,4882.50,0.00,0.00,0.00,244125.00,0.00,0.00,0.00,0.00,NULL,'2025-05-08 05:05:56','2025-05-08 05:05:56'),(260,222,28,5,'PCS',NULL,NULL,0.00,0.00,0.00,NULL,NULL,NULL,NULL,NULL,NULL,'2025-05-08 05:05:56','2025-05-08 05:05:56'),(261,223,31,50,'PCS',13000.00,NULL,0.00,0.00,0.00,650000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-08 05:16:39','2025-05-08 05:16:39'),(262,224,8,5,NULL,NULL,4920.00,0.00,0.00,0.00,24600.00,NULL,NULL,NULL,NULL,'tukar_barang','2025-05-08 05:49:55','2025-05-08 05:49:55'),(263,224,28,5,NULL,NULL,4882.50,0.00,0.00,0.00,24412.50,NULL,NULL,NULL,NULL,'potong_nota','2025-05-08 05:49:56','2025-05-08 05:49:56'),(264,225,30,200,'PCS',4000.00,NULL,5.00,0.00,11.00,800000.00,NULL,NULL,NULL,NULL,NULL,'2025-05-08 13:47:22','2025-05-08 13:47:22');

--
-- Table structure for table `buku_besar`
--

CREATE TABLE `buku_besar` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `tanggal` date NOT NULL,
  `akun_id` bigint unsigned NOT NULL,
  `keterangan` text,
  `debit` decimal(15,2) DEFAULT '0.00',
  `kredit` decimal(15,2) DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `buku_besar`
--

INSERT INTO `buku_besar` VALUES (1,'2025-03-19',3,'dsd',0.00,10000.00,'2025-03-22 09:19:40','2025-03-22 09:37:19'),(3,'2025-03-19',3,'dsd',0.00,10000.00,'2025-03-22 09:19:40','2025-03-22 09:37:19'),(4,'2025-03-19',3,'dsd',0.00,10000.00,'2025-03-22 09:19:40','2025-03-22 09:37:19'),(5,'2025-03-20',3,'dsd',0.00,10000.00,'2025-03-22 09:19:40','2025-03-22 09:45:04'),(6,'2025-03-19',3,'dsd',0.00,10000.00,'2025-03-22 09:19:40','2025-03-22 09:37:19'),(7,'2025-03-19',3,'dsd',0.00,10000.00,'2025-03-22 09:19:40','2025-03-22 09:37:19'),(8,'2025-03-19',3,'dsd',0.00,10000.00,'2025-03-22 09:19:40','2025-03-22 09:37:19'),(9,'2025-03-19',3,'dsd',0.00,10000.00,'2025-03-22 09:19:40','2025-03-22 09:37:19'),(10,'2025-03-18',3,'rubah keterangan',0.00,10000.00,'2025-03-22 09:19:40','2025-03-22 09:48:13'),(11,'2025-03-19',1,'dsd',10000.00,0.00,'2025-03-22 09:19:40','2025-03-22 09:46:18'),(12,'2025-03-26',3,'dsd',0.00,10000.00,'2025-03-22 09:19:40','2025-03-22 09:45:19'),(13,'2025-03-19',3,'dsd',0.00,10000.00,'2025-03-22 09:19:40','2025-03-22 09:37:19'),(14,'2025-03-20',3,'dsd',0.00,10000.00,'2025-03-22 09:19:40','2025-03-22 09:45:31'),(15,'2025-03-19',1,'dsd',0.00,10000.00,'2025-03-22 09:19:40','2025-03-22 09:45:50'),(16,'2025-05-07',20,'Retur Penjualan Barang',0.00,24600.00,'2025-05-07 19:40:45','2025-05-07 19:40:45'),(17,'2025-05-07',20,'Retur Penjualan Barang',0.00,41600.00,'2025-05-07 19:49:58','2025-05-07 19:49:58'),(18,'2025-05-08',1,'Dana dari pemerintah',200000.00,0.00,'2025-05-07 20:16:16','2025-05-07 20:16:16'),(21,'2025-05-08',24,'Retur Pembelian Barang',20000.00,0.00,'2025-05-08 01:06:18','2025-05-08 01:06:18'),(34,'2025-05-08',19,'Pembelian Barang',0.00,240000.00,'2025-05-08 02:51:41','2025-05-08 02:51:41'),(35,'2025-05-08',19,'Pembelian Barang',120000.00,120000.00,'2025-05-08 02:57:33','2025-05-08 02:57:33'),(36,'2025-05-08',19,'Pembelian Barang',494000.00,494000.00,'2025-05-08 03:49:35','2025-05-08 03:49:35'),(37,'2025-05-08',23,'Penjualan Barang',148216.20,148216.20,'2025-05-08 04:02:25','2025-05-08 04:02:25'),(38,'2025-05-08',23,'Penjualan Barang',150958.20,150958.20,'2025-05-08 04:05:32','2025-05-08 04:05:32'),(39,'2025-05-08',23,'Penjualan Barang',178713.56,178713.56,'2025-05-08 04:26:11','2025-05-08 04:26:11'),(40,'2025-05-08',23,'Penjualan Barang',70261.30,70261.30,'2025-05-08 04:31:12','2025-05-08 04:31:12'),(41,'2025-05-08',19,'Pembelian Barang',0.00,1200000.00,'2025-05-08 05:01:19','2025-05-08 05:01:19'),(42,'2025-05-08',23,'Penjualan Barang',636000.00,636000.00,'2025-05-08 05:01:30','2025-05-08 05:01:30'),(43,'2025-05-08',23,'Penjualan Barang',736125.00,736125.00,'2025-05-08 05:05:56','2025-05-08 05:05:56'),(44,'2025-05-08',19,'Pembelian Barang',645000.00,645000.00,'2025-05-08 05:16:40','2025-05-08 05:16:40'),(45,'2025-05-08',15,'SUPRA GANTI OLI',0.00,200000.00,'2025-05-08 05:42:28','2025-05-08 05:42:28'),(46,'2025-05-08',20,'Retur Penjualan Barang',0.00,24412.50,'2025-05-08 05:49:56','2025-05-08 05:49:56'),(47,'2025-05-08',19,'Pembelian Barang',0.00,800000.00,'2025-05-08 13:47:22','2025-05-08 13:47:22'),(48,'2025-05-09',22,'Pembayaran Penjualan Barang',20.00,0.00,'2025-05-08 15:35:47','2025-05-08 15:35:47'),(49,'2025-05-08',22,'Pembayaran Penjualan Barang',50.26,0.00,'2025-05-08 15:36:12','2025-05-08 15:36:12');

--
-- Table structure for table `customer`
--

CREATE TABLE `customer` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nama` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `last_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `telepon` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `alamat` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
  `kota` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `postal_code` varchar(10) DEFAULT NULL,
  `plafond` int DEFAULT NULL,
  `sisa_plafond` int DEFAULT NULL,
  `tenggat_pembayaran` int DEFAULT NULL,
  `sales_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `ekspedisi_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `nomor_identitas` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `jenis_identitas` varchar(50) DEFAULT NULL,
  `rating` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `customer`
--

INSERT INTO `customer` VALUES (1,'gerpuk',NULL,NULL,'09388494','jl. kali kepiliting','jogja',NULL,30070261,1000000,2,'3',1,'2025-03-13 15:51:21','2025-05-08 15:36:12','32412345','NIK','kurang_terpercaya'),(8,'sdsdsd',NULL,NULL,'400000000','sdsds','sdsd',NULL,60000000,NULL,32,'4',2,'2025-04-14 15:25:02','2025-05-08 10:56:15','351234124945','NIK','sangat_terpercaya'),(9,'CV. Kiat Ananda',NULL,NULL,'0871238124','Jl. Mojosantren','Sidoarjo',NULL,60000000,NULL,15,'5',4,'2025-04-28 13:30:36','2025-05-08 12:37:16','123123123123','NPWP','sangat_terpercaya'),(11,'Hartono',NULL,NULL,'0783452314','Jl Raya','Malang',NULL,100000000,NULL,45,'4',5,'2025-05-08 10:33:43','2025-05-08 10:33:43','345213431','NIK','sangat_terpercaya'),(14,'coba2',NULL,NULL,'74568346','ciobaoba','coba',NULL,20000000,NULL,120,'4',4,'2025-05-08 14:54:41','2025-05-08 14:55:06','31237678567','NPWP','kurang_terpercaya');

--
-- Table structure for table `ekspedisi`
--

CREATE TABLE `ekspedisi` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `alamat` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `telepon` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `jurusan` varchar(25) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `ekspedisi`
--

INSERT INTO `ekspedisi` VALUES (1,'sdfsdfsdf','ksjdlksjd','30920392','surabaya','2025-03-13 16:19:41','2025-03-17 17:56:42'),(2,'sdfsdfsdf','ksjdlksjd','30920392','malang','2025-03-13 16:19:56','2025-03-17 17:56:49'),(4,'Raskita','Jl. Bypass','0871238124','ALL JATIM','2025-04-28 13:21:50','2025-04-28 13:21:50'),(5,'Garuda','Jalan Baru','2345678','Kembang','2025-04-30 06:37:05','2025-04-30 06:37:05');

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `failed_jobs`
--


--
-- Table structure for table `history_pindah_barang`
--

CREATE TABLE `history_pindah_barang` (
  `id` int NOT NULL AUTO_INCREMENT,
  `barang_id` int NOT NULL,
  `lokasi_barang_id` int DEFAULT NULL,
  `jumlah_pindah` int NOT NULL,
  `lokasi_asal` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `lokasi_tujuan` varchar(255) NOT NULL,
  `stok_awal` int NOT NULL DEFAULT '0',
  `stok_akhir` int NOT NULL DEFAULT '0',
  `tanggal_pindah` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `history_pindah_barang`
--

INSERT INTO `history_pindah_barang` VALUES (2,25,1,200,'Gudang 1','Gudang 2',0,200,'2025-05-02','2025-05-02 16:38:54','2025-05-02 16:38:54'),(3,25,1,10,'Gudang 2','Gudang 1',300,310,'2025-05-03','2025-05-03 08:21:08','2025-05-03 08:21:08'),(4,28,4,30,'Gudang 1','Gudang Karantina',50,80,'2025-05-04','2025-05-04 23:41:21','2025-05-04 23:41:21'),(6,30,6,30,'Gudang 1','Gudang Karantina',0,30,'2025-05-05','2025-05-05 00:16:45','2025-05-05 00:16:45'),(7,8,10,200,'Gudang 1','Gudang 2',0,200,'2025-05-08','2025-05-08 05:02:11','2025-05-08 05:02:11'),(8,26,2,10,'Gudang 1','Gudang 2',0,10,'2025-05-08','2025-05-08 05:02:56','2025-05-08 05:02:56'),(9,8,10,100,'Gudang 2','Gudang 1',200,300,'2025-05-08','2025-05-08 05:03:59','2025-05-08 05:03:59'),(10,31,7,20,'Gudang 1','Gudang 2',0,20,'2025-05-08','2025-05-08 05:21:35','2025-05-08 05:21:35');

--
-- Table structure for table `jabatan`
--

CREATE TABLE `jabatan` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nama_jabatan` varchar(100) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `jabatan`
--

INSERT INTO `jabatan` VALUES (1,'Sales','2025-03-15 19:22:16','2025-03-15 19:22:16'),(2,'Owner','2025-03-15 19:32:22','2025-03-17 15:51:27'),(3,'Admin','2025-03-17 15:51:33','2025-03-17 15:51:33'),(4,'Operasional','2025-03-17 15:51:40','2025-03-17 15:51:40'),(5,'Gudang','2025-03-17 15:51:46','2025-03-17 15:51:46'),(6,'Pengiriman','2025-03-17 15:51:51','2025-03-17 15:51:51'),(7,'Produksi','2025-04-22 12:30:19','2025-04-22 12:31:00');

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_jobs` int NOT NULL,
  `pending_jobs` int NOT NULL,
  `failed_jobs` int NOT NULL,
  `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` mediumtext COLLATE utf8mb4_unicode_ci,
  `cancelled_at` int DEFAULT NULL,
  `created_at` int NOT NULL,
  `finished_at` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `job_batches`
--


--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint unsigned NOT NULL,
  `reserved_at` int unsigned DEFAULT NULL,
  `available_at` int unsigned NOT NULL,
  `created_at` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `jobs`
--


--
-- Table structure for table `kategori_barang`
--

CREATE TABLE `kategori_barang` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `deskripsi` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `kategori_barang`
--

INSERT INTO `kategori_barang` VALUES (1,'alat yang sangat berat','coba deskripsi 2',NULL,'2025-03-17 18:05:31'),(2,'ganti nama','ganti deskripsi','2025-03-16 15:51:55','2025-03-17 18:03:42');

--
-- Table structure for table `lokasi_barang`
--

CREATE TABLE `lokasi_barang` (
  `id` int NOT NULL AUTO_INCREMENT,
  `barang_id` int DEFAULT NULL,
  `nama_lokasi_1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `stok_lokasi_1` int DEFAULT NULL,
  `nama_lokasi_2` varchar(255) DEFAULT NULL,
  `stok_lokasi_2` int DEFAULT NULL,
  `nama_lokasi_3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `stok_lokasi_3` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `lokasi_barang`
--

INSERT INTO `lokasi_barang` VALUES (1,25,'Gudang 1',394,'Gudang 2',190,'Gudang Karantina',0,'2025-05-02 13:03:22','2025-05-08 05:01:30'),(2,26,'Gudang 1',185,'Gudang 2',10,'Gudang Karantina',0,'2025-05-04 02:57:22','2025-05-08 05:02:56'),(3,27,'Gudang 1',296,'Gudang 2',0,'Gudang Karantina',0,'2025-05-04 14:37:23','2025-05-08 04:26:11'),(4,28,'Gudang 1',64,'Gudang 2',0,'Gudang Karantina',93,'2025-05-04 15:58:18','2025-05-08 05:49:56'),(6,30,'Gudang 1',404,'Gudang 2',0,'Gudang Karantina',38,'2025-05-05 00:12:54','2025-05-08 13:47:22'),(7,31,'Gudang 1',39,'Gudang 2',20,'Gudang Karantina',0,'2025-05-08 03:43:26','2025-05-08 05:21:35'),(8,7,'Gudang 1',1,'Gudang 2',0,'Gudang Karantina',0,'2025-05-08 11:09:30','2025-05-08 04:26:10'),(9,23,'Gudang 1',26,'Gudang 2',0,'Gudang Karantina',0,'2025-05-08 11:10:25','2025-05-08 04:31:12'),(10,8,'Gudang 1',90,'Gudang 2',100,'Gudang Karantina',5,'2025-05-08 12:00:55','2025-05-08 05:49:55');

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` VALUES (1,'0001_01_01_000000_create_users_table',1),(2,'0001_01_01_000001_create_cache_table',1),(3,'0001_01_01_000002_create_jobs_table',1);

--
-- Table structure for table `pegawai`
--

CREATE TABLE `pegawai` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `jabatan_id` int DEFAULT NULL,
  `nama` varchar(100) NOT NULL,
  `tanggal_lahir` date DEFAULT NULL,
  `alamat` text,
  `no_telepon` varchar(15) DEFAULT NULL,
  `tanggal_masuk` date DEFAULT NULL,
  `komisi` decimal(10,2) DEFAULT NULL,
  `created_at` timestamp NOT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `pegawai`
--

INSERT INTO `pegawai` VALUES (2,5,'budi','2025-03-20','griyo','578456677','2025-03-18',2.00,'2025-03-13 16:22:02','2025-03-19 04:09:18'),(3,1,'gerpuk',NULL,'jl. kalpet','09820',NULL,NULL,'2025-03-16 07:33:38','2025-03-16 07:33:38'),(4,1,'ipin tes lengkap','2025-03-18','jl. yang panjang','08458488','2025-03-19',NULL,'2025-03-17 16:37:11','2025-03-17 17:24:18'),(5,1,'koko','1988-10-28','jl. naga','07812348','2024-11-12',3.00,'2025-04-28 13:24:44','2025-05-07 14:26:54');

--
-- Table structure for table `pembayaran`
--

CREATE TABLE `pembayaran` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tanggal_pembayaran` date DEFAULT NULL,
  `metode_pembayaran` varchar(40) DEFAULT NULL,
  `no_faktur` varchar(50) DEFAULT NULL,
  `jumlah_bayar` decimal(15,2) DEFAULT NULL,
  `jumlah_tagihan` decimal(15,2) DEFAULT NULL,
  `transaksi_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `bank` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `other_bank` varchar(255) DEFAULT NULL,
  `status_pembayaran` varchar(255) DEFAULT NULL,
  `sisa_bayar` decimal(15,2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `pembayaran`
--

INSERT INTO `pembayaran` VALUES (1,'2025-03-18',NULL,'11',300000.00,300.00,11,'2025-03-18 12:10:11','2025-03-18 12:10:11',NULL,NULL,NULL,NULL),(2,'2025-03-18',NULL,'11',300000.00,300.00,11,'2025-03-18 12:11:39','2025-03-18 12:11:39',NULL,NULL,NULL,NULL),(3,'2025-03-17',NULL,'12',300000.00,300.00,12,'2025-03-18 12:14:52','2025-03-18 12:14:52',NULL,NULL,NULL,NULL),(4,'2025-03-17',NULL,'13',300000.00,300.00,13,'2025-03-18 12:15:38','2025-03-18 12:15:38',NULL,NULL,NULL,NULL),(5,'2025-03-19',NULL,'14',300000.00,300.00,14,'2025-03-18 12:18:38','2025-03-18 12:18:38',NULL,NULL,NULL,NULL),(6,'2025-03-19',NULL,'14',300000.00,300.00,14,'2025-03-18 12:18:56','2025-03-18 12:18:56',NULL,NULL,NULL,NULL),(7,'2025-03-19',NULL,'14',300000.00,300.00,14,'2025-03-18 12:19:29','2025-03-18 12:19:29',NULL,NULL,NULL,NULL),(8,'2025-03-19','transfer',NULL,121212.00,NULL,8,'2025-03-18 15:41:28','2025-03-18 15:41:28',NULL,NULL,NULL,NULL),(9,'2025-03-19','transfer',NULL,121212.00,NULL,8,'2025-03-18 15:41:39','2025-03-18 15:41:39',NULL,NULL,NULL,NULL),(10,'2025-03-17','transfer',NULL,10000.00,NULL,8,'2025-03-18 15:41:55','2025-03-18 15:41:55',NULL,NULL,NULL,NULL),(11,NULL,NULL,NULL,NULL,NULL,8,'2025-03-18 15:42:12','2025-03-18 15:42:12',NULL,NULL,NULL,NULL),(12,NULL,NULL,NULL,NULL,NULL,8,'2025-03-18 15:42:35','2025-03-18 15:42:35',NULL,NULL,NULL,NULL),(13,NULL,NULL,NULL,10000.00,NULL,20,'2025-03-18 15:43:07','2025-03-18 15:43:07',NULL,NULL,NULL,NULL),(14,NULL,NULL,NULL,10000.00,NULL,8,'2025-03-18 15:43:58','2025-03-18 15:43:58',NULL,NULL,NULL,NULL),(15,NULL,NULL,NULL,NULL,NULL,8,'2025-03-18 15:44:09','2025-03-18 15:44:09',NULL,NULL,NULL,NULL),(16,'2025-04-22',NULL,NULL,NULL,NULL,NULL,'2025-04-22 12:34:20','2025-04-22 12:34:20',NULL,NULL,NULL,NULL),(17,NULL,NULL,NULL,NULL,NULL,8,'2025-04-22 12:34:37','2025-04-22 12:34:37',NULL,NULL,NULL,NULL),(18,'2025-04-09','transfer',NULL,20000000.00,NULL,20,'2025-04-22 12:35:04','2025-04-22 12:35:04',NULL,NULL,NULL,NULL),(19,'2025-05-01','transfer',NULL,26000.00,NULL,92,'2025-05-03 13:31:53','2025-05-03 13:31:53','BCA',NULL,'Termin 1',NULL),(20,'2025-05-03','transfer',NULL,50000.00,NULL,92,'2025-05-03 13:55:24','2025-05-03 13:55:24','BCA',NULL,'Termin 2',NULL),(21,'2025-05-03','cash',NULL,300000.00,NULL,92,'2025-05-05 13:12:26','2025-05-05 13:12:26',NULL,NULL,'Lunas',NULL),(22,'2025-05-02','cash',NULL,592900.00,NULL,128,'2025-05-05 13:59:49','2025-05-05 13:59:49',NULL,NULL,'Lunas',NULL),(23,'2025-05-04','cash',NULL,180000.00,NULL,130,'2025-05-06 03:10:22','2025-05-06 03:10:22',NULL,NULL,'Lunas',NULL),(24,'2025-05-06','transfer',NULL,40000.00,NULL,141,'2025-05-06 10:13:41','2025-05-06 10:13:41','BCA',NULL,'Termin 1',NULL),(25,'2025-05-06','transfer',NULL,40242.00,NULL,124,'2025-05-06 12:53:27','2025-05-06 12:53:27','Bank Jatim',NULL,'Termin 1',NULL),(26,'2025-05-06','transfer',NULL,50000.00,NULL,124,'2025-05-06 12:54:47','2025-05-06 12:54:47','Bank Jatim',NULL,'Termin 2',NULL),(27,'2025-05-06','transfer','202505050002',50620.00,NULL,126,'2025-05-06 12:57:59','2025-05-06 12:57:59','BRI',NULL,'Termin 1',NULL),(28,'2025-05-06','transfer','202505050003',30000.00,220828.00,132,'2025-05-06 13:11:48','2025-05-06 13:11:48','BNI',NULL,'Termin 2',NULL),(29,'2025-05-06','transfer','202505060007',40000.00,133698.50,141,'2025-05-06 13:24:22','2025-05-06 13:24:22','BNI','','Termin 2',53698.50),(30,'2025-05-06','transfer','202505050003',190828.00,220828.00,132,'2025-05-06 13:34:07','2025-05-06 13:34:07','Bank Syariah','Bank Syariah','Lunas',0.00),(31,'2025-05-06','transfer','202505060006',30000.00,258828.00,139,'2025-05-06 13:36:21','2025-05-06 13:36:21','BRI','','Termin 1',228828.00),(32,'2025-05-06','transfer','202505060006',28828.00,258828.00,139,'2025-05-06 13:37:05','2025-05-06 13:37:05','Mandiri','','Termin 2',200000.00),(33,'2025-05-06','transfer','202505060006',200000.00,258828.00,139,'2025-05-06 13:37:26','2025-05-06 13:37:26','bank dodo','bank dodo','Lunas',0.00),(34,'2025-05-06','transfer','202505050004',20000.00,112031.80,134,'2025-05-06 13:45:10','2025-05-06 13:45:10','BCA','','Termin 1',92031.80),(35,'2025-05-06','transfer','202505050004',92032.00,112031.80,134,'2025-05-06 13:45:30','2025-05-06 13:45:30','BRI','','Lunas',-0.20),(36,'2025-05-06','cash',NULL,50490.00,NULL,142,'2025-05-06 14:23:50','2025-05-06 14:23:50',NULL,NULL,'Lunas',NULL),(37,'2025-05-06','transfer',NULL,50000.00,NULL,144,'2025-05-06 14:43:39','2025-05-06 14:43:39','BCA',NULL,'Termin 1',NULL),(38,'2025-05-06','transfer',NULL,50000.00,NULL,144,'2025-05-06 16:36:05','2025-05-06 16:36:05','BCA',NULL,'Termin 2',NULL),(39,'2025-05-07','transfer','202505060009',75585.00,175585.10,144,'2025-05-06 18:11:48','2025-05-06 18:11:48','BCA',NULL,'Lunas',0.10),(40,'2025-05-07','transfer','202505060010',100000.00,201110.00,146,'2025-05-07 01:23:06','2025-05-07 01:23:06','BCA',NULL,'Termin 1',101110.00),(41,'2025-05-07','cash','202505060010',50000.00,201110.00,146,'2025-05-07 01:24:38','2025-05-07 01:24:38',NULL,NULL,'Termin 2',51110.00),(42,'2025-05-07','cash','2038234',500000.00,2400000.00,143,'2025-05-07 01:26:56','2025-05-07 01:26:56',NULL,NULL,'Termin 1',1900000.00),(43,'2025-05-07','cash','2038234',1000000.00,2400000.00,143,'2025-05-07 01:47:41','2025-05-07 01:47:41',NULL,NULL,'Termin 2',900000.00),(44,'2025-05-07','cash','2038234',900.00,2400000.00,143,'2025-05-07 01:53:00','2025-05-07 01:53:00',NULL,NULL,'Lunas',899100.00),(45,'2025-05-07','cash','202412310001',800000.00,800000.00,179,'2025-05-07 13:59:21','2025-05-07 13:59:21',NULL,NULL,'Lunas',0.00),(57,'2025-05-08','cash',NULL,240000.00,240000.00,207,'2025-05-08 02:51:41','2025-05-08 02:51:41',NULL,NULL,'Lunas',0.00),(58,'2025-05-08','cash','050437450',30000.00,120000.00,208,'2025-05-08 02:57:33','2025-05-08 02:57:33',NULL,NULL,'Uang Muka',90000.00),(59,'2025-05-08','cash','2504',0.00,494000.00,209,'2025-05-08 03:49:36','2025-05-08 03:49:36',NULL,NULL,'Uang Muka',494000.00),(60,'2025-05-08','cash',NULL,1200000.00,1200000.00,218,'2025-05-08 05:01:19','2025-05-08 05:01:19',NULL,NULL,'Lunas',0.00),(61,'2025-05-08','cash','1234',5000.00,650000.00,223,'2025-05-08 05:16:40','2025-05-08 05:16:40',NULL,NULL,'Uang Muka',645000.00),(62,'2025-05-08','cash','03459345',800000.00,800000.00,225,'2025-05-08 13:47:22','2025-05-08 13:47:22',NULL,NULL,'Lunas',0.00),(63,'2025-05-09','cash','202505080015',20000.00,70261.30,216,'2025-05-08 15:35:47','2025-05-08 15:35:47',NULL,NULL,'Termin 1',50261.30),(64,'2025-05-08','cash','202505080015',50261.00,70261.30,216,'2025-05-08 15:36:12','2025-05-08 15:36:12',NULL,NULL,'Lunas',0.30);

--
-- Table structure for table `promo`
--

CREATE TABLE `promo` (
  `id` int NOT NULL AUTO_INCREMENT,
  `barang_id` int NOT NULL,
  `judul` varchar(255) NOT NULL,
  `minimum_quantity` int NOT NULL,
  `promo_quantity` int NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `promo`
--

INSERT INTO `promo` VALUES (3,28,'Beli 25 Gratis 5',25,5,'2025-05-05','2025-06-10','2025-05-05 04:04:57','2025-05-05 04:04:57'),(5,30,'Beli 30 Gratis 10',30,10,'2025-05-05','2025-06-05','2025-05-05 04:36:53','2025-05-05 04:36:53'),(6,27,'Beli 15 Gratis 5',15,5,'2025-05-06','2025-06-06','2025-05-06 01:46:54','2025-05-06 01:50:07'),(7,31,'BELI 10 GRATIS 2',10,2,'2025-05-08','2025-06-08','2025-05-08 04:21:54','2025-05-08 04:21:54');

--
-- Table structure for table `range_plafond`
--

CREATE TABLE `range_plafond` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rating` enum('Sangat Terpercaya','Terpercaya','Kurang Terpercaya') NOT NULL,
  `plafond_minimal` int NOT NULL,
  `plafond_maksimal` int DEFAULT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `range_plafond`
--

INSERT INTO `range_plafond` VALUES (1,'Kurang Terpercaya',30000000,60000000,'2025-05-08 13:19:29','2025-05-08 14:55:44'),(2,'Terpercaya',60000001,100000000,'2025-05-08 13:19:43','2025-05-08 14:55:44'),(3,'Sangat Terpercaya',100000001,NULL,'2025-05-08 13:20:17','2025-05-08 14:55:44');

--
-- Table structure for table `retur`
--

CREATE TABLE `retur` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `tanggal_retur` date NOT NULL,
  `supplier_id` bigint unsigned NOT NULL,
  `transaksi_id` bigint unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `retur`
--

INSERT INTO `retur` VALUES (1,'2025-03-18',2,12,'2025-03-18 16:37:23','2025-03-18 16:37:23'),(2,'2025-03-18',2,12,'2025-03-18 16:38:21','2025-03-18 16:38:21'),(3,'2025-03-18',2,12,'2025-03-18 16:39:12','2025-03-18 16:39:12'),(4,'2025-03-18',2,12,'2025-03-18 16:42:05','2025-03-18 16:42:05'),(5,'2025-03-19',2,10,'2025-03-19 05:59:08','2025-03-19 05:59:08'),(6,'2025-04-25',3,1,'2025-04-25 07:27:37','2025-04-25 07:27:37'),(7,'2025-05-01',1,7,'2025-05-01 08:02:16','2025-05-01 08:02:16');

--
-- Table structure for table `satuan`
--

CREATE TABLE `satuan` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nama_satuan` varchar(50) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `satuan`
--

INSERT INTO `satuan` VALUES (1,'Ton','2025-03-13 16:12:28','2025-03-13 16:48:03'),(2,'metric','2025-03-13 16:20:59','2025-03-13 16:47:45'),(3,'meter','2025-03-13 16:24:27','2025-03-13 16:24:27'),(5,'kilogram','2025-03-13 16:45:26','2025-03-13 16:45:26'),(6,'cm','2025-03-13 16:45:36','2025-03-13 16:45:36'),(7,'Pcs','2025-03-16 14:20:25','2025-05-08 15:28:23');

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint unsigned DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sessions_user_id_index` (`user_id`),
  KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` VALUES ('4KT8XRVlQkmbY9XWAeH35gLUOPFE13m5D3T4EWat',1,'127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36','YTo0OntzOjY6Il90b2tlbiI7czo0MDoiWmJZQlVDNlZBd0FLbHFyOEVXTml4Qk1haDJxRVdWTmpPRHdSODRSTSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzA6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9jdXN0b21lciI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fXM6NTA6ImxvZ2luX3dlYl81OWJhMzZhZGRjMmIyZjk0MDE1ODBmMDE0YzdmNThlYTRlMzA5ODlkIjtpOjE7fQ==',1746720431),('dsPs4q0vxs138jbh4Aj76s9s57RDZTFGS9p4Y43J',NULL,'118.99.84.27','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36','YTozOntzOjY6Il90b2tlbiI7czo0MDoienVMTk9BeDYxUkVyUEtZRFdnZHJ4WUhTNlVzR3Fma2FNY0VHU2dBcCI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NjA6Imh0dHA6Ly8xNTYuNjcuMjIxLjExOC9qYXRpbV9oYXJkd2FyZS9wdWJsaWMvcGVtYmVsaWFuLWJhcmFuZyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=',1746714658),('LJJl51njwwPoIrOE1uev2kfBWH7NUVVIdyec6Y0X',NULL,'157.15.216.26','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36','YTozOntzOjY6Il90b2tlbiI7czo0MDoiYjVaSFpoemFsWmJjanNac0xaUzhMY3JmMkhwU1lqbXI2VU9WMTUzWSI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NjA6Imh0dHA6Ly8xNTYuNjcuMjIxLjExOC9qYXRpbV9oYXJkd2FyZS9wdWJsaWMvcGVtYmVsaWFuLWJhcmFuZyI7fX0=',1746719608),('xYAdZC54VGD3JP8QRdFKNV2jtpN3YIqJcaREQCpu',1,'125.164.243.117','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36','YTo0OntzOjY6Il90b2tlbiI7czo0MDoiRndwcnpOMlZ5NklYc0RZaG1PcFB1ekxtcEFlM2l6T3VBTG9pY2lwNCI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NTI6Imh0dHA6Ly8xNTYuNjcuMjIxLjExOC9qYXRpbV9oYXJkd2FyZS9wdWJsaWMvY3VzdG9tZXIiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX1zOjUwOiJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI7aToxO30=',1746718990);

--
-- Table structure for table `supplier`
--

CREATE TABLE `supplier` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `nama_perusahaan` varchar(255) NOT NULL,
  `alamat` text,
  `nomor_telepon` varchar(20) DEFAULT NULL,
  `no_rekening` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `nama_bank` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `nama_rekening` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `other_bank` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `supplier`
--

INSERT INTO `supplier` VALUES (1,'pt. percobaan','jl. nginden','2198198192812','5465','BCA','sapi@gmail.com','hartono','2025-03-13 16:37:46','2025-04-24 12:38:18',NULL),(2,'pt. percobaan','jl. nginden','2198198192812','5465','BCA','sapi@gmail.com',NULL,'2025-03-13 16:37:46','2025-03-20 08:17:56',NULL),(3,'CV. Elang Gemilang','Jalan Topas','0856332213423',NULL,NULL,NULL,NULL,'2025-03-19 03:45:25','2025-03-19 03:45:25',NULL),(4,'KING KOK','Surabaya','0856332213423',NULL,NULL,NULL,NULL,'2025-04-11 02:02:17','2025-04-11 02:02:17',NULL),(5,'PT. Sukses Bersama','Jl. Kesuksesan','098123123','241212','Bank Sukses',NULL,'Herlambang','2025-04-24 14:33:15','2025-04-24 14:33:15','Bank Sukses'),(11,'PT. Sukses Bersama','Jl. Kesuksesan','0823456','123512','BCA',NULL,'Herlambang','2025-04-28 11:14:12','2025-04-28 11:14:12',NULL),(12,'PT. Sukses Bersama','Jl. Kesuksesan','0982349','43234','Bank Sukses',NULL,'Hartawan','2025-04-28 12:49:23','2025-04-28 12:49:23','Bank Sukses'),(18,'PT. Kapur Barus','Jalan lama','085783357892',NULL,NULL,NULL,NULL,'2025-04-30 07:05:17','2025-04-30 07:05:17',NULL),(19,'PT. Garuda','Jalan Baru','735389202','3456789','Bank Papua',NULL,'John Cena','2025-04-30 07:06:57','2025-04-30 07:06:57','Bank Papua'),(20,'PT. Coba','Jl. coba','089672374','356712354','Mandiri',NULL,'Hadi','2025-05-08 12:36:33','2025-05-08 12:36:33',NULL);

--
-- Table structure for table `transaksi`
--

CREATE TABLE `transaksi` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `jenis` int NOT NULL,
  `no_faktur` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `tanggal_faktur` date NOT NULL,
  `supplier_id` bigint unsigned DEFAULT NULL,
  `total_harga` decimal(15,2) NOT NULL DEFAULT '0.00',
  `uang_muka` decimal(15,2) NOT NULL DEFAULT '0.00',
  `jenis_pembayaran` varchar(50) NOT NULL DEFAULT 'kredit',
  `jatuh_tempo` date DEFAULT NULL,
  `status_pembayaran` varchar(255) DEFAULT NULL,
  `keterangan` text,
  `ekspedisi_id` int DEFAULT NULL,
  `customer_id` int DEFAULT NULL,
  `terbayar` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `biaya_ekspedisi` decimal(10,2) DEFAULT NULL,
  `deskripsi` text,
  `sisa` decimal(15,2) DEFAULT NULL,
  `jumlah_terbayar` decimal(15,2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=227 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `transaksi`
--

INSERT INTO `transaksi` VALUES (1,1,'1212','2025-03-15',1,133334664.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,NULL,'2025-03-15 17:19:35','2025-05-01 10:21:53',NULL,NULL,NULL,NULL),(3,1,'122','2025-03-15',1,133334664.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,NULL,'2025-03-15 17:20:46','2025-03-15 17:20:46',NULL,NULL,NULL,NULL),(6,1,'122','2025-03-15',1,133334664.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,NULL,'2025-03-15 17:22:22','2025-03-15 17:22:22',NULL,NULL,NULL,NULL),(7,1,'122','2025-03-15',1,133334664.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,NULL,'2025-03-15 17:22:46','2025-03-15 17:22:46',NULL,NULL,NULL,NULL),(8,2,'122','2025-03-15',1,133334664.00,0.00,'kredit',NULL,'Termin 1',NULL,NULL,1,1,'2025-03-15 17:23:00','2025-05-06 13:05:25',NULL,NULL,133052240.00,NULL),(9,1,'122','2025-03-15',1,133334664.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,NULL,'2025-03-15 17:23:39','2025-03-15 17:23:39',NULL,NULL,NULL,NULL),(10,1,'12345678','2025-03-15',2,2540000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-03-15 17:36:47','2025-03-18 11:53:45',NULL,NULL,NULL,NULL),(11,1,'678','2025-03-15',2,300000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,1,'2025-03-15 17:38:51','2025-03-18 12:11:39',NULL,NULL,NULL,NULL),(12,1,'678','2025-03-15',2,300000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,1,'2025-03-15 17:38:57','2025-03-18 12:14:52',NULL,NULL,NULL,NULL),(13,1,'678','2025-03-15',2,300000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,1,'2025-03-15 17:39:12','2025-03-18 12:15:38',NULL,NULL,NULL,NULL),(14,1,'678','2025-03-15',2,300000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,1,'2025-03-15 17:39:15','2025-03-18 12:18:38',NULL,NULL,NULL,NULL),(15,1,'4ffffg','2025-03-18',1,0.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-03-16 17:41:14','2025-03-18 12:18:14',NULL,NULL,NULL,NULL),(16,1,'4ffffg','2025-03-18',1,0.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,NULL,'2025-03-16 17:41:33','2025-03-16 17:41:33',NULL,NULL,NULL,NULL),(17,1,'4ffffg','2025-03-18',1,10000000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,NULL,'2025-03-16 17:41:44','2025-03-16 17:41:44',NULL,NULL,NULL,NULL),(20,2,'93820928','2025-03-16',NULL,0.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,1,1,'2025-03-16 18:07:10','2025-03-18 15:43:07',NULL,NULL,NULL,NULL),(21,2,'93820928','2025-03-16',NULL,0.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,1,0,'2025-03-16 18:07:24','2025-03-18 15:40:25',NULL,NULL,NULL,NULL),(22,1,'123','2025-03-18',2,2000000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-03-18 12:21:11','2025-03-18 12:21:11',NULL,NULL,NULL,NULL),(23,3,NULL,'2025-03-22',NULL,0.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-03-22 15:54:44','2025-03-22 15:54:44',NULL,NULL,NULL,NULL),(24,3,NULL,'2025-03-22',NULL,0.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-03-22 15:55:05','2025-03-22 15:55:05',NULL,NULL,NULL,NULL),(25,3,NULL,'2025-03-22',NULL,0.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-03-22 15:55:35','2025-03-22 15:55:35',NULL,NULL,NULL,NULL),(26,3,NULL,'2025-03-22',NULL,0.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-03-22 15:56:32','2025-03-22 15:56:32',NULL,NULL,NULL,NULL),(27,3,NULL,'2025-03-22',NULL,0.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-03-22 15:57:04','2025-03-22 15:57:04',NULL,NULL,NULL,NULL),(28,3,NULL,'2025-03-22',NULL,0.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-03-22 15:57:50','2025-03-22 15:57:50',NULL,NULL,NULL,NULL),(29,1,'2504','2025-04-09',4,5650000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-11 02:21:26','2025-04-11 02:21:26',NULL,NULL,NULL,NULL),(30,1,'2504','2025-04-09',4,6200000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-11 02:23:54','2025-04-11 02:23:54',NULL,NULL,NULL,NULL),(31,1,'2504','2025-04-09',4,6200000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-11 02:23:59','2025-04-11 02:23:59',NULL,NULL,NULL,NULL),(32,1,'2504','2025-04-09',4,6200000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-11 02:24:00','2025-04-11 02:24:00',NULL,NULL,NULL,NULL),(33,1,'2504','2025-04-09',4,6200000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-11 02:24:26','2025-04-11 02:24:26',NULL,NULL,NULL,NULL),(34,3,NULL,'2025-04-14',NULL,0.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-14 15:26:19','2025-04-14 15:26:19',NULL,NULL,NULL,NULL),(35,1,'12345','2025-04-14',3,500000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-14 15:58:09','2025-04-14 15:58:09',NULL,NULL,NULL,NULL),(36,1,'123456','2025-04-14',3,414804.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-14 16:13:40','2025-04-14 16:13:40',NULL,NULL,NULL,NULL),(37,1,'1','2025-04-22',1,1.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-22 13:50:34','2025-04-22 13:50:34',NULL,NULL,NULL,NULL),(38,1,' 123','2025-04-22',1,123000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-22 15:13:19','2025-04-22 15:13:19',NULL,NULL,NULL,NULL),(39,1,'1234','2025-04-22',4,20000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-22 15:17:27','2025-04-22 15:17:27',NULL,NULL,NULL,NULL),(40,1,NULL,'2025-04-30',1,1000000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-30 09:36:10','2025-04-30 09:36:10',NULL,NULL,NULL,NULL),(41,1,'1000','2025-04-30',1,1000000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-30 09:36:36','2025-04-30 09:36:36',NULL,NULL,NULL,NULL),(42,1,'123123123','2025-04-30',1,100000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-30 09:41:40','2025-04-30 09:41:40',NULL,NULL,NULL,NULL),(43,1,'123123123222','2025-04-30',1,100000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-30 09:41:56','2025-04-30 09:41:56',NULL,NULL,NULL,NULL),(44,1,'1222','2025-04-30',1,100000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-30 09:42:08','2025-04-30 09:42:08',NULL,NULL,NULL,NULL),(45,1,'121212','2025-04-30',1,3722000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-30 10:42:16','2025-04-30 10:42:16',NULL,NULL,NULL,NULL),(46,1,'100100','2025-04-30',1,3722000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-30 10:46:02','2025-04-30 10:46:02',NULL,NULL,NULL,NULL),(47,1,'123123123123123123','2025-04-30',1,229900.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-30 11:18:46','2025-04-30 11:18:46',NULL,NULL,NULL,NULL),(48,1,'111222','2025-04-30',1,229900.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-30 11:20:42','2025-04-30 11:20:42',NULL,NULL,NULL,NULL),(49,1,'123321','2025-04-30',1,229900.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-30 11:23:41','2025-04-30 11:23:41',NULL,NULL,NULL,NULL),(50,1,'567765','2025-04-30',1,229900.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-04-30 11:29:51','2025-04-30 11:29:51',NULL,NULL,NULL,NULL),(60,3,'58','2025-05-01',1,4900000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-05-01 11:15:33','2025-05-01 11:15:33',NULL,NULL,NULL,NULL),(81,4,'8','2025-05-01',NULL,4900000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,1,0,'2025-05-01 13:16:15','2025-05-01 13:16:15',NULL,NULL,NULL,NULL),(82,3,'50','2025-05-01',1,22000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-05-01 13:49:41','2025-05-01 13:49:41',NULL,NULL,NULL,NULL),(86,1,'FB-2025-0004','2025-05-01',1,700000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-05-01 13:54:53','2025-05-01 13:54:53',30000.00,NULL,NULL,NULL),(87,1,'FB-2025-0005','2025-05-01',1,2500000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-05-01 14:49:45','2025-05-01 14:49:45',NULL,NULL,NULL,NULL),(88,1,'FB-2024-0006','2025-05-01',1,4500000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-05-01 14:50:42','2025-05-01 14:50:42',30000.00,NULL,NULL,NULL),(92,2,'202505010001','2025-05-01',NULL,376000.00,0.00,'kredit',NULL,'Lunas',NULL,1,1,0,'2025-05-01 15:52:37','2025-05-05 13:12:25',30000.00,NULL,0.00,NULL),(95,1,'FB-2024-0007','2025-05-02',1,1500000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-05-02 13:22:29','2025-05-02 13:22:29',30000.00,NULL,NULL,NULL),(96,4,'92','2025-05-03',NULL,220000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,1,0,'2025-05-03 08:34:02','2025-05-03 08:34:02',NULL,NULL,NULL,NULL),(97,1,NULL,'2025-05-03',1,800000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-05-03 08:51:54','2025-05-03 08:51:54',100000.00,NULL,NULL,NULL),(99,1,'3943434','2025-05-04',1,800000.00,0.00,'kredit',NULL,NULL,NULL,NULL,NULL,0,'2025-05-04 14:32:31','2025-05-04 14:32:31',30000.00,NULL,NULL,NULL),(100,1,'9348373','2025-05-04',1,1500000.00,0.00,'kredit',NULL,NULL,NULL,NULL,NULL,0,'2025-05-04 14:47:32','2025-05-04 14:47:32',50000.00,NULL,NULL,NULL),(101,1,'45430584','2025-05-04',1,1200000.00,0.00,'kredit',NULL,NULL,NULL,NULL,NULL,0,'2025-05-04 16:04:57','2025-05-04 16:04:57',30000.00,NULL,NULL,NULL),(113,3,'5406054','2025-05-04',1,200000.00,0.00,'kredit',NULL,NULL,'Barang pembelian yang cacat',NULL,NULL,0,'2025-05-04 23:35:18','2025-05-04 23:35:18',NULL,NULL,NULL,NULL),(115,3,'32948934','2025-05-04',1,120000.00,0.00,'kredit',NULL,NULL,'Tambahan barang pembelian yang cacat',NULL,NULL,0,'2025-05-04 23:41:21','2025-05-04 23:41:21',NULL,NULL,NULL,NULL),(120,1,'0689054','2025-05-05',1,1200000.00,0.00,'kredit',NULL,NULL,NULL,NULL,NULL,0,'2025-05-05 00:13:48','2025-05-05 00:13:48',100000.00,NULL,NULL,NULL),(121,3,'05690546','2025-05-05',1,120000.00,0.00,'kredit',NULL,NULL,'Paku kayu bengkok',NULL,NULL,0,'2025-05-05 00:16:44','2025-05-05 00:16:45',NULL,NULL,NULL,NULL),(124,2,'202505050001','2025-05-05',NULL,340242.00,0.00,'kredit',NULL,'Lunas',NULL,1,1,0,'2025-05-05 10:46:49','2025-05-06 13:03:30',30000.00,NULL,-60242.00,NULL),(125,5,'202505050001','2025-05-05',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-05 10:46:50','2025-05-05 10:46:50',NULL,NULL,NULL,NULL),(126,2,'202505050002','2025-05-05',NULL,283450.00,0.00,'kredit',NULL,'Termin 2',NULL,1,1,0,'2025-05-05 10:59:09','2025-05-07 17:30:53',40000.00,NULL,280000.00,NULL),(127,5,'202505050002','2025-05-05',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-05 10:59:09','2025-05-05 10:59:09',NULL,NULL,NULL,NULL),(128,2,'202504100001','2025-04-10',NULL,602900.00,0.00,'kredit',NULL,'Lunas',NULL,4,9,0,'2025-05-05 13:56:19','2025-05-05 13:59:49',10000.00,NULL,10000.00,NULL),(129,5,'202504100001','2025-04-10',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,4,9,0,'2025-05-05 13:56:19','2025-05-05 13:56:19',NULL,NULL,NULL,NULL),(130,2,'202504220001','2025-04-22',NULL,147280.00,0.00,'kredit',NULL,'Lunas',NULL,4,9,0,'2025-05-05 14:30:32','2025-05-06 03:10:21',10000.00,NULL,-32720.00,NULL),(131,5,'202504220001','2025-04-22',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,4,9,0,'2025-05-05 14:30:32','2025-05-05 14:30:32',NULL,NULL,NULL,NULL),(132,2,'202505050003','2025-05-05',NULL,220828.00,0.00,'kredit',NULL,'Lunas',NULL,1,1,0,'2025-05-05 16:43:30','2025-05-06 13:34:07',40000.00,NULL,0.00,NULL),(133,5,'202505050003','2025-05-05',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-05 16:43:31','2025-05-05 16:43:31',NULL,NULL,NULL,NULL),(134,2,'202505050004','2025-05-05',NULL,112031.80,0.00,'kredit',NULL,'Lunas',NULL,1,1,0,'2025-05-05 17:17:28','2025-05-06 13:45:30',40000.00,NULL,-0.20,NULL),(135,2,'202505060005','2025-05-06',NULL,310242.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-06 01:39:29','2025-05-06 01:39:29',40000.00,NULL,NULL,NULL),(136,5,'202505060005','2025-05-06',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-06 01:39:29','2025-05-06 01:39:29',NULL,NULL,NULL,NULL),(137,2,'202504220002','2025-04-22',NULL,207584.28,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-06 02:16:14','2025-05-06 02:16:14',100000.00,NULL,NULL,NULL),(138,5,'202504220002','2025-04-22',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-06 02:16:14','2025-05-06 02:16:14',NULL,NULL,NULL,NULL),(139,2,'202505060006','2025-05-06',NULL,258828.00,0.00,'kredit',NULL,'Lunas',NULL,1,1,0,'2025-05-06 08:12:33','2025-05-06 13:37:26',40000.00,NULL,0.00,NULL),(140,5,'202505060006','2025-05-06',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-06 08:12:34','2025-05-06 08:12:34',NULL,NULL,NULL,NULL),(141,2,'202505060007','2025-05-06',NULL,133698.50,0.00,'kredit',NULL,'Termin 2',NULL,1,1,0,'2025-05-06 08:33:59','2025-05-06 13:24:22',40000.00,NULL,53698.50,NULL),(142,2,'202505060008','2025-05-06',NULL,50490.00,0.00,'kredit',NULL,'Lunas',NULL,1,1,0,'2025-05-06 12:51:08','2025-05-06 14:23:50',20000.00,NULL,0.00,NULL),(143,1,'2038234','2025-05-06',1,2400000.00,0.00,'kredit',NULL,'Lunas',NULL,NULL,NULL,0,'2025-05-06 14:00:34','2025-05-07 01:53:00',40000.00,NULL,899100.00,NULL),(144,2,'202505060009','2025-05-06',NULL,175585.10,0.00,'kredit',NULL,'Lunas',NULL,1,1,0,'2025-05-06 14:07:30','2025-05-06 18:11:48',20000.00,NULL,0.10,NULL),(145,5,'202505060009','2025-05-06',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-06 14:07:30','2025-05-06 14:07:30',NULL,NULL,NULL,NULL),(146,2,'202505060010','2025-05-06',NULL,201110.00,0.00,'kredit',NULL,'Termin 2',NULL,1,1,0,'2025-05-06 14:12:04','2025-05-07 01:24:38',20000.00,NULL,51110.00,NULL),(147,5,'202505060010','2025-05-06',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-06 14:12:04','2025-05-06 14:12:04',NULL,NULL,NULL,NULL),(148,2,'202505060011','2025-05-06',NULL,53208.20,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-06 14:20:30','2025-05-06 14:20:30',10000.00,NULL,NULL,NULL),(149,2,'202501010001','2025-01-01',NULL,1124716.20,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-07 05:14:48','2025-05-07 13:00:00',100000.00,NULL,NULL,NULL),(150,5,'202501010001','2025-01-01',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-07 05:14:48','2025-05-07 13:00:11',NULL,NULL,NULL,NULL),(171,4,'202505060010','2025-05-07',NULL,0.00,0.00,'kredit',NULL,NULL,'sfdsfdsf',NULL,1,0,'2025-05-07 12:20:50','2025-05-07 12:20:50',NULL,NULL,NULL,NULL),(178,2,'202501010002','2025-01-01',NULL,100000.00,0.00,'kredit',NULL,NULL,NULL,4,9,0,'2025-05-07 13:04:52','2025-05-07 13:04:52',10000.00,NULL,NULL,NULL),(179,2,'202412310001','2024-12-31',NULL,800000.00,0.00,'kredit',NULL,'Lunas',NULL,4,9,0,'2025-05-07 13:26:34','2025-05-07 13:59:21',10000.00,NULL,0.00,NULL),(183,4,'202505050002','2025-05-07',NULL,50600.00,0.00,'kredit',NULL,NULL,'gfdgdgdfg',NULL,1,0,'2025-05-07 17:30:53','2025-05-07 17:30:53',NULL,NULL,NULL,NULL),(184,4,'202505050003','2025-05-07',NULL,50600.00,0.00,'kredit',NULL,NULL,'wqh cowiqhoiqwhdo',NULL,1,0,'2025-05-07 19:40:45','2025-05-07 19:40:45',NULL,NULL,NULL,NULL),(185,4,'202505050001','2025-05-07',NULL,80960.00,0.00,'kredit',NULL,NULL,'ds;fjdsfdsfdslfdkshfl',NULL,1,0,'2025-05-07 19:49:58','2025-05-07 19:49:58',NULL,NULL,NULL,NULL),(194,3,'2038234','2025-05-08',1,40000.00,0.00,'kredit',NULL,NULL,'efwefwefewfewffad',NULL,NULL,0,'2025-05-08 01:06:18','2025-05-08 01:24:59',NULL,NULL,NULL,NULL),(207,1,'234234','2025-05-08',1,240000.00,240000.00,'tunai',NULL,'lunas',NULL,NULL,NULL,0,'2025-05-08 02:51:41','2025-05-08 02:51:41',30000.00,NULL,0.00,NULL),(208,1,'050437450','2025-05-08',1,120000.00,30000.00,'kredit',NULL,'belum_lunas','Pembayaran kredit',NULL,NULL,0,'2025-05-08 02:57:32','2025-05-08 02:57:32',30000.00,NULL,90000.00,NULL),(209,1,'2504','2025-05-08',4,494000.00,0.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-05-08 03:49:35','2025-05-08 03:49:35',0.00,NULL,494000.00,NULL),(210,2,'202505080012','2025-05-08',NULL,148216.20,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-08 04:02:25','2025-05-08 04:02:25',40000.00,NULL,NULL,NULL),(211,5,'202505080012','2025-05-08',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-08 04:02:25','2025-05-08 04:02:25',NULL,NULL,NULL,NULL),(212,2,'202505080013','2025-05-08',NULL,150958.20,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-08 04:05:32','2025-05-08 04:05:32',40000.00,NULL,NULL,NULL),(213,5,'202505080013','2025-05-08',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-08 04:05:32','2025-05-08 04:05:32',NULL,NULL,NULL,NULL),(215,2,'202505080014','2025-05-08',NULL,178713.56,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-08 04:26:10','2025-05-08 04:26:10',30000.00,NULL,NULL,NULL),(216,2,'202505080015','2025-05-08',NULL,70261.30,0.00,'kredit',NULL,'Lunas',NULL,1,1,0,'2025-05-08 04:31:12','2025-05-08 15:36:12',30000.00,NULL,0.30,NULL),(218,1,NULL,'2025-05-08',3,1200000.00,1200000.00,'tunai',NULL,'lunas','fjoewpfwewhe',NULL,NULL,0,'2025-05-08 05:01:19','2025-05-08 05:01:19',30000.00,NULL,0.00,NULL),(219,2,'202505080016','2025-05-08',NULL,636000.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-08 05:01:30','2025-05-08 05:01:30',10000.00,NULL,NULL,NULL),(220,5,'202505080016','2025-05-08',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,1,1,0,'2025-05-08 05:01:30','2025-05-08 05:01:30',NULL,NULL,NULL,NULL),(221,2,'202505080017','2025-05-08',NULL,736125.00,0.00,'kredit',NULL,NULL,NULL,4,9,0,'2025-05-08 05:05:56','2025-05-08 05:05:56',10000.00,NULL,NULL,NULL),(222,5,'202505080017','2025-05-08',NULL,0.00,0.00,'kredit',NULL,NULL,NULL,4,9,0,'2025-05-08 05:05:56','2025-05-08 05:05:56',NULL,NULL,NULL,NULL),(223,1,'1234','2025-05-08',4,650000.00,5000.00,'kredit',NULL,'belum_lunas',NULL,NULL,NULL,0,'2025-05-08 05:16:39','2025-05-08 05:16:39',NULL,NULL,645000.00,NULL),(224,4,'202505080017','2025-05-08',NULL,49012.50,0.00,'kredit',NULL,NULL,NULL,NULL,9,0,'2025-05-08 05:49:55','2025-05-08 05:49:56',NULL,NULL,NULL,NULL),(225,1,'03459345','2025-05-08',1,800000.00,800000.00,'tunai',NULL,'lunas','dslldgkdnsgldls',NULL,NULL,0,'2025-05-08 13:47:22','2025-05-08 13:47:22',100000.00,NULL,0.00,NULL);

--
-- Temporary view structure for view `v_hpp`
--

/*!50001 DROP VIEW IF EXISTS `v_hpp`*/;
/*!50001 CREATE VIEW `v_hpp` AS SELECT 
 1 AS `barang_id`,
 1 AS `hpp`*/;

--
-- Temporary view structure for view `v_stok`
--

/*!50001 DROP VIEW IF EXISTS `v_stok`*/;
/*!50001 CREATE VIEW `v_stok` AS SELECT 
 1 AS `barang_id`,
 1 AS `stok`,
 1 AS `hpp`,
 1 AS `total_nilai`*/;

--
-- Temporary view structure for view `v_stok_history`
--

/*!50001 DROP VIEW IF EXISTS `v_stok_history`*/;
/*!50001 CREATE VIEW `v_stok_history` AS SELECT 
 1 AS `barang_id`,
 1 AS `jumlah`,
 1 AS `tanggal_faktur`,
 1 AS `jenis`*/;

--
-- Final view structure for view `v_hpp`
--

/*!50001 DROP VIEW IF EXISTS `v_hpp`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`ipin`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_hpp` AS select `barang_transaksi`.`barang_id` AS `barang_id`,(sum((`barang_transaksi`.`harga_beli` * `barang_transaksi`.`jumlah`)) / sum(`barang_transaksi`.`jumlah`)) AS `hpp` from `barang_transaksi` group by `barang_transaksi`.`barang_id` */;

--
-- Final view structure for view `v_stok`
--

/*!50001 DROP VIEW IF EXISTS `v_stok`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`ipin`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_stok` AS select `v_stok_history`.`barang_id` AS `barang_id`,sum(`v_stok_history`.`jumlah`) AS `stok`,`barang`.`hpp` AS `hpp`,sum((`v_stok_history`.`jumlah` * `barang`.`hpp`)) AS `total_nilai` from (`v_stok_history` join `barang` on((`v_stok_history`.`barang_id` = `barang`.`id`))) group by `v_stok_history`.`barang_id` */;

--
-- Final view structure for view `v_stok_history`
--

/*!50001 DROP VIEW IF EXISTS `v_stok_history`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`ipin`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_stok_history` AS select `bt`.`barang_id` AS `barang_id`,if((`t`.`jenis` = 1),`bt`.`jumlah`,-(`bt`.`jumlah`)) AS `jumlah`,`t`.`tanggal_faktur` AS `tanggal_faktur`,`t`.`jenis` AS `jenis` from (`barang_transaksi` `bt` left join `transaksi` `t` on((`bt`.`transaksi_id` = `t`.`id`))) */;


