/*
SQLyog Ultimate v13.1.1 (64 bit)
MySQL - 8.0.23-0ubuntu0.20.04.1 : Database - koperasi
*********************************************************************
*/



/*Table structure for table `agama` */


CREATE TABLE `agama` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nama` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `agama` */

insert  into `agama`(`id`,`nama`,`created_at`,`updated_at`) values 
(1,'Islam','2017-09-18 17:37:57','2017-09-18 17:37:59'),
(2,'Kristen','2017-09-18 17:38:01','2017-09-18 17:38:02'),
(3,'Khatolik','2017-09-18 17:38:04','2017-09-18 17:38:05'),
(4,'Budha','2017-09-18 17:38:07','2017-09-18 17:38:08'),
(5,'Hindu','2017-09-18 17:38:09','2017-09-18 17:38:11'),
(6,'Khonghucu','2017-09-18 17:38:12','2017-09-18 17:38:14'),
(7,'Lain-Lain','2017-09-18 17:38:16','2017-09-18 17:38:18');

/*Table structure for table `agenda` */


CREATE TABLE `agenda` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nama_agenda` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `waktu_mulai` date NOT NULL,
  `waktu_selesai` date NOT NULL,
  `libur` enum('0','1') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `agenda_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `agenda_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `agenda` */

/*Table structure for table `anggota` */


CREATE TABLE `anggota` (
  `id` int NOT NULL AUTO_INCREMENT,
  `no_urut` int NOT NULL,
  `tanggal_daftar` date DEFAULT NULL,
  `no_registrasi` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `no_anggota` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nama` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `alamat` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `telepon` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `grup_id` int DEFAULT NULL,
  `identitas_id` int DEFAULT NULL,
  `berlaku_sampai` date DEFAULT NULL,
  `no_identitas` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `agama_id` int DEFAULT NULL,
  `tempat_lahir` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `tanggal_lahir` date DEFAULT NULL,
  `nama_suami_atau_istri` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `pekerjaan` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `pendapatan` double DEFAULT NULL,
  `alamat_kantor` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `petugas_id` int DEFAULT NULL,
  `jenis_kelamin` enum('P','W') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `status_anggota_id` int DEFAULT NULL,
  `status_keluar` enum('0','1') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '0',
  `pengurus` enum('0','1') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '0',
  `foto` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `is_lama` int DEFAULT NULL,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `anggota_no_registrasi_index` (`no_registrasi`) USING BTREE,
  UNIQUE KEY `anggota_no_anggota_index` (`no_anggota`) USING BTREE,
  UNIQUE KEY `anggota_email_index` (`email`) USING BTREE,
  KEY `anggota_grup_id_index` (`grup_id`) USING BTREE,
  KEY `anggota_identitas_id_index` (`identitas_id`) USING BTREE,
  KEY `anggota_agama_id_index` (`agama_id`) USING BTREE,
  KEY `anggota_petugas_id_index` (`petugas_id`) USING BTREE,
  KEY `anggota_status_anggota_id_index` (`status_anggota_id`) USING BTREE,
  KEY `anggota_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `anggota_agama_id_foreign` FOREIGN KEY (`agama_id`) REFERENCES `agama` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `anggota_grup_id_foreign` FOREIGN KEY (`grup_id`) REFERENCES `grup` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `anggota_identitas_id_foreign` FOREIGN KEY (`identitas_id`) REFERENCES `jenis_id` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `anggota_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `anggota_petugas_id_foreign` FOREIGN KEY (`petugas_id`) REFERENCES `petugas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `anggota_status_anggota_id_foreign` FOREIGN KEY (`status_anggota_id`) REFERENCES `status_anggota` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=82 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `anggota` */

insert  into `anggota`(`id`,`no_urut`,`tanggal_daftar`,`no_registrasi`,`no_anggota`,`nama`,`alamat`,`email`,`telepon`,`grup_id`,`identitas_id`,`berlaku_sampai`,`no_identitas`,`agama_id`,`tempat_lahir`,`tanggal_lahir`,`nama_suami_atau_istri`,`pekerjaan`,`pendapatan`,`alamat_kantor`,`keterangan`,`petugas_id`,`jenis_kelamin`,`status_anggota_id`,`status_keluar`,`pengurus`,`foto`,`is_lama`,`input_by`,`created_at`,`updated_at`) values 
(63,1,'2021-09-13','REG/AMR/000001','A00001','A. AGUNG SK.','WATUONDO RT V / III NGUMBUL TODANAN',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-14',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:45','2021-09-13 14:02:45'),
(64,2,'2021-09-13','REG/AMR/000002','A00002','A. HANAFI','BAKAL',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-15',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:45','2021-09-13 14:02:45'),
(65,3,'2021-09-13','REG/AMR/000003','A00003','ACHMAD HANDIYANTO SOFWATIN NIK','TUNJUNGAN RT. 04/01 BLORA',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-16',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(66,4,'2021-09-13','REG/AMR/000004','A00004','A. HAYYU MUIS BIN ASMUNI','BAKAL',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-17',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(67,5,'2021-09-13','REG/AMR/000005','A00005','A. HUDA MAHBUB','SEDANGWUNGU BANJAREJO',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-18',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(68,6,'2021-09-13','REG/AMR/000006','A00006','A. JALAL','PLATUNGAN',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-19',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:47','2021-09-13 14:02:47'),
(69,7,'2021-09-13','REG/AMR/000007','A00007','A. KHAMBALI','KARANGGENENG KUNDURAN',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-20',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:48','2021-09-13 14:02:48'),
(70,8,'2021-09-13','REG/AMR/000008','A00008','A. KHOIRUL UMAM ASSARIF','KENDAYAAN RT. 04 / 01 NGAWEN',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-21',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:48','2021-09-13 14:02:48'),
(71,9,'2021-09-13','REG/AMR/000009','A00009','AHMAD MASHARI SRIWATI','BALONGREJO RT. 04/01 BANJAREJO BLORA',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-22',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:49','2021-09-13 14:02:49'),
(72,10,'2021-09-13','REG/AMR/000010','A00010','AHMAD MUJAHID','KAUMAN RT. 02/04 BLORA',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-23',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:50','2021-09-13 14:02:50'),
(73,11,'2021-09-13','REG/AMR/000011','A00011','A. MUKHLISON','PALON JEPON',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-24',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(74,12,'2021-09-13','REG/AMR/000012','A00012','A. MUNDIR','GONDONG NGAWEN',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-25',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(75,13,'2021-09-13','REG/AMR/000013','A00013','ACHMAD MUSLIKIN SITI SHOLIKHAT','TEMPEL LEMAHBANG RT. 01/02 JEPON',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-26',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(76,14,'2021-09-13','REG/AMR/000014','A00014','A. MUSLIMIN','PULO MOJOWETAN BANJAREJO',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-27',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(77,15,'2021-09-13','REG/AMR/000015','A00015','A. NUR CHOLIK','KEDUWANG GEDANGDOWO',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-28',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(78,16,'2021-09-13','REG/AMR/000016','A00016','A. NUR KHOLIS','KEDUWANG GEDANGDOWO JEPON',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-29',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(79,17,'2021-09-13','REG/AMR/000017','A00017','A. SAIDUL HILMI','PUDAK RT. 02 / 01 SRIMULYO NGAWEN',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-11-30',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(80,18,'2021-09-13','REG/AMR/000018','A00018','A. SHODIQIN','KEMIRI JOMBLANG RT. 03/05 KUNDURAN',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-12-01',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(81,19,'2021-09-13','REG/AMR/000019','A00019','A. SHOLIHUDDIN','BULOH RT. 02 / 07 PUYOH DAWE',NULL,'81393724486',9,NULL,NULL,'1234567890',NULL,'Semarang','1993-12-02',NULL,'Swasta',NULL,NULL,NULL,NULL,NULL,2,'0','0',NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54');

/*Table structure for table `anggota_keluar` */


CREATE TABLE `anggota_keluar` (
  `id` int NOT NULL AUTO_INCREMENT,
  `anggota_id` int NOT NULL,
  `tanggal_keluar` date NOT NULL,
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `petugas_id` int DEFAULT NULL,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `anggota_keluar_anggota_id_index` (`anggota_id`) USING BTREE,
  KEY `anggota_keluar_petugas_id_index` (`petugas_id`) USING BTREE,
  KEY `anggota_keluar_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `anggota_keluar_anggota_id_foreign` FOREIGN KEY (`anggota_id`) REFERENCES `anggota` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `anggota_keluar_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `anggota_keluar_petugas_id_foreign` FOREIGN KEY (`petugas_id`) REFERENCES `petugas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `anggota_keluar` */

/*Table structure for table `angsuran` */


CREATE TABLE `angsuran` (
  `id` int NOT NULL AUTO_INCREMENT,
  `pinjaman_id` int NOT NULL,
  `no_angsuran` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_urut` int DEFAULT NULL,
  `angsuran_ke` int DEFAULT NULL,
  `est_tanggal` date DEFAULT NULL,
  `est_sisa_angsur` double NOT NULL DEFAULT '0',
  `est_pokok` double NOT NULL DEFAULT '0',
  `est_jasa` double NOT NULL DEFAULT '0',
  `est_jumlah_angsur` double NOT NULL DEFAULT '0',
  `terlambat` int DEFAULT '0',
  `est_denda` double NOT NULL DEFAULT '0',
  `tanggal` date DEFAULT NULL,
  `sisa_angsur` double NOT NULL DEFAULT '0',
  `angsur_pokok` double NOT NULL DEFAULT '0',
  `angsur_jasa` double NOT NULL DEFAULT '0',
  `denda` double NOT NULL DEFAULT '0',
  `posted_id` int DEFAULT NULL,
  `jv_id` int DEFAULT NULL,
  `ubah_id` int DEFAULT NULL,
  `sisa_pokok` double NOT NULL DEFAULT '0',
  `sisa_jasa` double NOT NULL DEFAULT '0',
  `sisa_tempo` int DEFAULT NULL,
  `sisa_pokok_jasa` double DEFAULT '0',
  `kurang_jasa` double NOT NULL DEFAULT '0',
  `kurang_denda` double NOT NULL DEFAULT '0',
  `kurang_pokok` double NOT NULL DEFAULT '0',
  `potongan` double NOT NULL DEFAULT '0',
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `tipe_angsur_id` int DEFAULT NULL,
  `swk_id` int DEFAULT NULL,
  `swk_rp` double NOT NULL DEFAULT '0',
  `swk_persen` float DEFAULT NULL,
  `trans_swk_id` int DEFAULT NULL,
  `rehab_id` int DEFAULT NULL,
  `view_urut` int DEFAULT NULL,
  `simp_sukarela_id` int DEFAULT NULL,
  `simp_sukarela_rp` double NOT NULL DEFAULT '0',
  `sukarela_persen` float DEFAULT NULL,
  `trans_simpanan_id` int DEFAULT NULL,
  `petugas_id` int DEFAULT NULL,
  `is_lama` int DEFAULT NULL,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `angsuran_no_angsuran_index` (`no_angsuran`) USING BTREE,
  KEY `angsuran_pinjaman_id_index` (`pinjaman_id`) USING BTREE,
  KEY `angsuran_jv_id_index` (`jv_id`) USING BTREE,
  KEY `angsuran_petugas_id_index` (`petugas_id`) USING BTREE,
  KEY `angsuran_input_by_index` (`input_by`) USING BTREE,
  KEY `angsuran_trans_swk_id_index` (`trans_swk_id`) USING BTREE,
  KEY `angsuran_swk_id_index` (`swk_id`) USING BTREE,
  KEY `angsuran_trans_simpanan_id_index` (`trans_simpanan_id`) USING BTREE,
  KEY `angsuran_simp_sukarela_id_index` (`simp_sukarela_rp`) USING BTREE,
  KEY `angsuran_simp_sukarela_id_foreign` (`simp_sukarela_id`) USING BTREE,
  CONSTRAINT `angsuran_input_by_index` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `angsuran_jv_id_foreign` FOREIGN KEY (`jv_id`) REFERENCES `jv` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `angsuran_petugas_id_foreign` FOREIGN KEY (`petugas_id`) REFERENCES `petugas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `angsuran_pinjaman_id_foreign` FOREIGN KEY (`pinjaman_id`) REFERENCES `pinjaman` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `angsuran_simp_sukarela_id_foreign` FOREIGN KEY (`simp_sukarela_id`) REFERENCES `simpanan_rekening` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `angsuran_swk_id_foreign` FOREIGN KEY (`swk_id`) REFERENCES `simpanan_rekening` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `angsuran_trans_simpanan_id_foreign` FOREIGN KEY (`trans_simpanan_id`) REFERENCES `simpanan_transaksi` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `angsuran_trans_swk_id_foreign` FOREIGN KEY (`trans_swk_id`) REFERENCES `simpanan_transaksi` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `angsuran` */

insert  into `angsuran`(`id`,`pinjaman_id`,`no_angsuran`,`no_urut`,`angsuran_ke`,`est_tanggal`,`est_sisa_angsur`,`est_pokok`,`est_jasa`,`est_jumlah_angsur`,`terlambat`,`est_denda`,`tanggal`,`sisa_angsur`,`angsur_pokok`,`angsur_jasa`,`denda`,`posted_id`,`jv_id`,`ubah_id`,`sisa_pokok`,`sisa_jasa`,`sisa_tempo`,`sisa_pokok_jasa`,`kurang_jasa`,`kurang_denda`,`kurang_pokok`,`potongan`,`keterangan`,`tipe_angsur_id`,`swk_id`,`swk_rp`,`swk_persen`,`trans_swk_id`,`rehab_id`,`view_urut`,`simp_sukarela_id`,`simp_sukarela_rp`,`sukarela_persen`,`trans_simpanan_id`,`petugas_id`,`is_lama`,`input_by`,`created_at`,`updated_at`) values 
(11,9,NULL,NULL,1,'2021-09-10',12000000,1000000,50000,1050000,0,0,NULL,0,0,0,0,NULL,NULL,NULL,0,0,NULL,0,0,0,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1,'2021-09-14 15:53:27','2021-09-14 15:53:27'),
(12,9,NULL,NULL,2,'2021-10-31',11000000,1000000,50000,1050000,0,0,NULL,0,0,0,0,NULL,NULL,NULL,0,0,NULL,0,0,0,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1,'2021-09-14 15:53:27','2021-09-14 15:53:27'),
(13,9,NULL,NULL,3,'2021-11-30',10000000,1000000,50000,1050000,0,0,NULL,0,0,0,0,NULL,NULL,NULL,0,0,NULL,0,0,0,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1,'2021-09-14 15:53:27','2021-09-14 15:53:27'),
(14,9,NULL,NULL,4,'2021-12-31',9000000,1000000,50000,1050000,0,0,NULL,0,0,0,0,NULL,NULL,NULL,0,0,NULL,0,0,0,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1,'2021-09-14 15:53:27','2021-09-14 15:53:27'),
(15,9,NULL,NULL,5,'2022-01-31',8000000,1000000,50000,1050000,0,0,NULL,0,0,0,0,NULL,NULL,NULL,0,0,NULL,0,0,0,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1,'2021-09-14 15:53:27','2021-09-14 15:53:27'),
(16,9,NULL,NULL,6,'2022-02-28',7000000,1000000,50000,1050000,0,0,NULL,0,0,0,0,NULL,NULL,NULL,0,0,NULL,0,0,0,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1,'2021-09-14 15:53:27','2021-09-14 15:53:27'),
(17,9,NULL,NULL,7,'2022-03-31',6000000,1000000,50000,1050000,0,0,NULL,0,0,0,0,NULL,NULL,NULL,0,0,NULL,0,0,0,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1,'2021-09-14 15:53:27','2021-09-14 15:53:27'),
(18,9,NULL,NULL,8,'2022-04-30',5000000,1000000,50000,1050000,0,0,NULL,0,0,0,0,NULL,NULL,NULL,0,0,NULL,0,0,0,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1,'2021-09-14 15:53:27','2021-09-14 15:53:27'),
(19,9,NULL,NULL,9,'2022-05-31',4000000,1000000,50000,1050000,0,0,NULL,0,0,0,0,NULL,NULL,NULL,0,0,NULL,0,0,0,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1,'2021-09-14 15:53:27','2021-09-14 15:53:27'),
(20,9,NULL,NULL,10,'2022-06-30',3000000,1000000,50000,1050000,0,0,NULL,0,0,0,0,NULL,NULL,NULL,0,0,NULL,0,0,0,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1,'2021-09-14 15:53:27','2021-09-14 15:53:27'),
(21,9,NULL,NULL,11,'2022-07-31',2000000,1000000,50000,1050000,0,0,NULL,0,0,0,0,NULL,NULL,NULL,0,0,NULL,0,0,0,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1,'2021-09-14 15:53:27','2021-09-14 15:53:27'),
(22,9,NULL,NULL,12,'2022-08-31',1000000,1000000,50000,1050000,0,0,NULL,0,0,0,0,NULL,NULL,NULL,0,0,NULL,0,0,0,0,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,1,1,'2021-09-14 15:53:27','2021-09-14 15:53:27');

/*Table structure for table `backup_data` */


CREATE TABLE `backup_data` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nama_file` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `backup_data_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `backup_data_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;

/*Data for the table `backup_data` */

/*Table structure for table `biaya` */


CREATE TABLE `biaya` (
  `id` int NOT NULL AUTO_INCREMENT,
  `no_transaksi` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `no_urut` int NOT NULL,
  `tanggal` date NOT NULL,
  `akun_id` int NOT NULL,
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `jumlah` double DEFAULT '0',
  `input_by` int NOT NULL,
  `id_jv` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `biaya_no_transaksi_index` (`no_transaksi`) USING BTREE,
  KEY `biaya_akun_id_index` (`akun_id`) USING BTREE,
  KEY `biaya_input_by_index` (`input_by`) USING BTREE,
  KEY `biaya_jv_id_index` (`id_jv`) USING BTREE,
  CONSTRAINT `biaya_akun_id_foreign` FOREIGN KEY (`akun_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `biaya_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `biaya_jv_id_foreign` FOREIGN KEY (`id_jv`) REFERENCES `jv` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `biaya` */

/*Table structure for table `biaya_detail` */


CREATE TABLE `biaya_detail` (
  `id` int NOT NULL AUTO_INCREMENT,
  `biaya_id` int NOT NULL,
  `daftar_akun_id` int NOT NULL,
  `jumlah` double DEFAULT '0',
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `biaya_detail_biaya_id_index` (`biaya_id`) USING BTREE,
  KEY `biaya_detail_daftar_akun_id_index` (`daftar_akun_id`) USING BTREE,
  KEY `biaya_detail_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `biaya_detail_biaya_id_foreign` FOREIGN KEY (`biaya_id`) REFERENCES `biaya` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `biaya_detail_daftar_akun_id_foreign` FOREIGN KEY (`daftar_akun_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `biaya_detail_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `biaya_detail` */

/*Table structure for table `cabang` */


CREATE TABLE `cabang` (
  `id` int NOT NULL AUTO_INCREMENT,
  `cabang` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `kode_prefix` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `telepon` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `alamat` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `kota` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `cabang_cabang_index` (`cabang`) USING BTREE,
  UNIQUE KEY `cabang_kode_prefix_index` (`kode_prefix`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `cabang` */

insert  into `cabang`(`id`,`cabang`,`kode_prefix`,`telepon`,`alamat`,`kota`,`created_at`,`updated_at`) values 
(1,'Cabang Jerman','JER','3242423','Jl. Damar No, 342 Bandung','Semarang','2021-09-13 13:08:52','2018-01-15 22:01:33'),
(2,'Cabang Belgia','BEL','081393724486','Jl. Damar No, 342 Bandung','Semarang','2021-09-13 13:08:32','2018-01-15 21:53:11'),
(3,'Cabang Jepang','JEP','081393724486','Jl. Damar No, 342 Bandung','Kota Semarang','2021-09-13 13:08:33','2018-01-15 21:53:22'),
(4,'Cabang Denmark','DEN','081393724486','Jl. Durian Raya No. 15 Semarang','Kota Semarang','2021-09-13 13:08:34','2018-01-15 21:53:34'),
(5,'Cabang Amerika','AMR','00000000','Jl. Damar No, 342 Bandung','Bandung','2018-01-16 00:32:55','2018-01-15 21:52:58'),
(6,'Cabang Inggris','ING','081393724486','Jl. Damar No, 342 Bandung','Semarang','2021-09-13 13:08:46','2018-01-15 21:54:16'),
(7,'Cabang Kanada','KAN','081393724486','Jl. Damar No, 342 Bandung','Semarang','2021-09-13 13:08:50','2018-01-15 21:54:34');

/*Table structure for table `grup` */


CREATE TABLE `grup` (
  `id` int NOT NULL AUTO_INCREMENT,
  `kode` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nama` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `grup_kode_index` (`kode`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `grup` */

insert  into `grup`(`id`,`kode`,`nama`,`created_at`,`updated_at`) values 
(1,'01','Semarang','2017-09-17 18:37:26','2017-09-17 18:37:26'),
(2,'02','Demak','2017-09-17 18:37:31','2017-09-17 18:37:31'),
(3,'03','Jepara','2017-09-17 18:37:38','2017-09-17 18:37:38'),
(4,'04','Pati','2017-09-17 18:37:47','2017-09-17 18:37:47'),
(5,'05','Kudus','2017-09-17 18:38:00','2017-09-17 18:38:00'),
(6,'06','Purwodadi','2017-09-17 18:38:17','2017-09-17 18:38:17'),
(7,'07','Ungaran','2017-09-17 18:38:22','2017-09-17 18:38:22'),
(8,'08','Kendal','2017-09-17 18:38:27','2017-09-17 18:38:27'),
(9,'09','Blora','2017-09-17 18:38:39','2017-09-17 18:38:39'),
(10,'10','Batang','2017-09-17 22:14:29','2017-09-17 22:14:29'),
(11,'11','Salatiga','2017-09-19 10:36:37','2017-09-19 10:36:50');

/*Table structure for table `jenis_id` */


CREATE TABLE `jenis_id` (
  `id` int NOT NULL AUTO_INCREMENT,
  `kode` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nama` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `jenis_id_kode_index` (`kode`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `jenis_id` */

insert  into `jenis_id`(`id`,`kode`,`nama`,`created_at`,`updated_at`) values 
(1,'01','KTP','2017-09-17 18:52:55','2017-09-17 18:52:57'),
(2,'02','SIM','2017-09-17 18:53:04','2017-09-17 18:53:06'),
(3,'03','Kartu Keluarga','2017-09-17 11:53:27','2017-09-17 18:53:25'),
(4,'04','Lain-Lain','2017-09-17 18:53:32','2017-09-17 18:53:34');

/*Table structure for table `jenis_pinjaman` */


CREATE TABLE `jenis_pinjaman` (
  `id` int NOT NULL AUTO_INCREMENT,
  `kode` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nama_pinjaman` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `jenis_angsuran` enum('1','2','3') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '1',
  `tempo_angsuran` int DEFAULT NULL,
  `jasa_anggota` float DEFAULT '0',
  `bea_administrasi` enum('1','2') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '1',
  `jumlah_1` double DEFAULT '0',
  `jasa_non_anggota` float DEFAULT '0',
  `bea_asuransi` enum('1','2') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '1',
  `jumlah_2` double DEFAULT '0',
  `jenis_jasa` enum('1','2') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '1',
  `denda_per_hari` float DEFAULT '1',
  `dikalikan` enum('1','2','3') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '1',
  `jatuh_tempo_angsur` enum('1','2','3','4') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '1',
  `akun_kas_id` int DEFAULT NULL,
  `akun_pinjaman_id` int DEFAULT NULL,
  `akun_jasa_pinjaman_id` int DEFAULT NULL,
  `akun_bea_administrasi_id` int DEFAULT NULL,
  `akun_bea_asuransi_id` int DEFAULT NULL,
  `akun_pendapatan_lain_lain_id` int DEFAULT NULL,
  `akun_denda_angsuran_terlambat_id` int DEFAULT NULL,
  `akun_biaya_potongan_angsuran_id` int DEFAULT NULL,
  `akun_biaya_pemutihan_angsuran_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `jenis_pinjaman_kode_index` (`kode`) USING BTREE,
  KEY `jenis_pinjaman_akun_kas_id_index` (`akun_kas_id`) USING BTREE,
  KEY `jenis_pinjaman_akun_pinjaman_id_index` (`akun_pinjaman_id`) USING BTREE,
  KEY `jenis_pinjaman_akun_jasa_pinjaman_id_index` (`akun_jasa_pinjaman_id`) USING BTREE,
  KEY `jenis_pinjaman_akun_bea_administrsi_id_index` (`akun_bea_administrasi_id`) USING BTREE,
  KEY `jenis_pinjaman_akun_bea_asuransi_id_index` (`akun_bea_asuransi_id`) USING BTREE,
  KEY `jenis_pinjaman_akun_pendapatan_lain_lain_id_index` (`akun_pendapatan_lain_lain_id`) USING BTREE,
  KEY `jenis_pinjaman_akun_denda_angsuran_terlambat_id_index` (`akun_denda_angsuran_terlambat_id`) USING BTREE,
  KEY `jenis_pinjaman_akun_biaya_potongan_angsuran_id_index` (`akun_biaya_potongan_angsuran_id`) USING BTREE,
  KEY `jenis_pinjaman_akun_biaya_pemutihan_angsuran_id_index` (`akun_biaya_pemutihan_angsuran_id`) USING BTREE,
  CONSTRAINT `jenis_pinjaman_akun_bea_administrsi_id_foreign` FOREIGN KEY (`akun_bea_administrasi_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `jenis_pinjaman_akun_bea_asuransi_id_foreign` FOREIGN KEY (`akun_bea_asuransi_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `jenis_pinjaman_akun_biaya_pemutihan_angsuran_id_foreign` FOREIGN KEY (`akun_biaya_pemutihan_angsuran_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `jenis_pinjaman_akun_biaya_potongan_angsuran_id_foreign` FOREIGN KEY (`akun_biaya_potongan_angsuran_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `jenis_pinjaman_akun_denda_angsuran_terlambat_id_foreign` FOREIGN KEY (`akun_denda_angsuran_terlambat_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `jenis_pinjaman_akun_jasa_pinjaman_id_foreign` FOREIGN KEY (`akun_jasa_pinjaman_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `jenis_pinjaman_akun_kas_id_foreign` FOREIGN KEY (`akun_kas_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `jenis_pinjaman_akun_pendapatan_lain_lain_id_foreign` FOREIGN KEY (`akun_pendapatan_lain_lain_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `jenis_pinjaman_akun_pinjaman_id_foreign` FOREIGN KEY (`akun_pinjaman_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `jenis_pinjaman` */

insert  into `jenis_pinjaman`(`id`,`kode`,`nama_pinjaman`,`jenis_angsuran`,`tempo_angsuran`,`jasa_anggota`,`bea_administrasi`,`jumlah_1`,`jasa_non_anggota`,`bea_asuransi`,`jumlah_2`,`jenis_jasa`,`denda_per_hari`,`dikalikan`,`jatuh_tempo_angsur`,`akun_kas_id`,`akun_pinjaman_id`,`akun_jasa_pinjaman_id`,`akun_bea_administrasi_id`,`akun_bea_asuransi_id`,`akun_pendapatan_lain_lain_id`,`akun_denda_angsuran_terlambat_id`,`akun_biaya_potongan_angsuran_id`,`akun_biaya_pemutihan_angsuran_id`,`created_at`,`updated_at`) values 
(1,'B10','BULANAN 10 X ANGSUR','1',10,2,'1',2000,4,'1',4000,'1',1,'1','1',161,163,209,210,213,215,212,216,239,'2021-09-13 13:04:10','2017-10-06 17:50:28'),
(2,'B12','BULANAN 12 X ANGSUR','1',12,2,'1',5000,4,'1',10000,'1',1,'1','2',161,163,209,210,213,215,212,238,239,'2021-09-13 13:04:11','2017-10-18 11:38:54'),
(3,'MG','MINGGUAN','2',10,2.5,'2',10.5,5,'2',15.25,'2',1,'1','2',161,163,209,210,211,214,212,238,239,'2021-09-13 13:04:19','2017-10-14 18:53:34'),
(4,'B15','BULANAN 15 X ANGSUR','1',15,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:20','2017-09-16 17:06:09'),
(5,'B5','BULANAN 5 X ANGSUR','1',5,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:26','2017-09-16 17:06:09'),
(6,'B20','BULANAN 20 X ANGSUR','1',20,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:29','2017-09-16 17:06:09'),
(7,'B23','BULANAN 23 X ANGSUR','1',23,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:30','2017-09-16 17:06:09'),
(8,'B24','BULANAN 24 X ANGSUR','1',24,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:31','2017-09-16 17:06:09'),
(9,'B25','BULANAN 25 X ANGSUR','1',25,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:32','2017-09-16 17:06:09'),
(10,'B29','BULANAN 29 X ANGSUR','1',29,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:34','2017-09-16 17:06:09'),
(11,'B30','BULANAN 30 X ANGSUR','1',30,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:36','2017-09-16 17:06:09'),
(12,'B36','BULANAN 36 X ANGSUR','1',36,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:37','2017-09-16 17:06:09'),
(13,'B48','BULANAN 48 X ANGSUR','1',48,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:39','2017-09-16 17:06:09'),
(14,'B60','BULANAN 60 X ANGSUR','1',60,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:42','2017-09-16 17:06:09'),
(15,'B19','BULANAN 19 X ANGSUR','1',19,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:45','2017-09-16 17:06:09'),
(16,'B21','BULANAN 21 X ANGSUR','1',21,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:47','2017-09-16 17:06:09'),
(17,'B26','BULANAN 26 X ANGSUR','1',26,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:50','2017-09-16 17:06:09'),
(18,'B28','BULANAN 28 X ANGSUR','1',28,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:52','2017-09-16 17:06:09'),
(19,'B32','BULANAN 32 X ANGSUR','1',32,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:56','2017-09-16 17:06:09'),
(20,'B35','BULANAN 35 X ANGSUR','1',35,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:04:59','2017-09-16 17:06:09'),
(21,'B37','BULANAN 37 X ANGSUR','1',37,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:01','2017-09-16 17:06:09'),
(22,'B38','BULANAN 38 X ANGSUR','1',38,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:02','2017-09-16 17:06:09'),
(23,'B39','BULANAN 39 X ANGSUR','1',39,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:04','2017-09-16 17:06:09'),
(24,'B42','BULANAN 42 X ANGSUR','1',42,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:06','2017-09-16 17:06:09'),
(25,'B45','BULANAN 45 X ANGSUR','1',45,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:11','2017-09-16 17:06:09'),
(26,'B46','BULANAN 46 X ANGSUR','1',46,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:17','2017-09-16 17:06:09'),
(27,'B50','BULANAN 50 X ANGSUR','1',50,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:20','2017-09-16 17:06:09'),
(28,'B52','BULANAN 52 X ANGSUR','1',52,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:24','2017-09-16 17:06:09'),
(29,'B55','BULANAN 55 X ANGSUR','1',55,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:26','2017-09-16 17:06:09'),
(30,'B58','BULANAN 58 X ANGSUR','1',58,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:29','2017-09-16 17:06:09'),
(31,'B59','BULANAN 59 X ANGSUR','1',59,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:38','2017-09-16 17:06:09'),
(32,'B61','BULANAN 61 X ANGSUR','1',61,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:40','2017-09-16 17:06:09'),
(33,'B70','BULANAN 70 X ANGSUR','1',70,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:51','2017-09-16 17:06:09'),
(34,'B71','BULANAN 71 X ANGSUR','1',71,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:53','2017-09-16 17:06:09'),
(35,'B72','BULANAN 72 X ANGSUR','1',72,0.75,'1',0,0,'1',0,'1',1,'1','1',161,163,210,210,211,215,212,238,239,'2021-09-13 13:05:57','2017-09-16 17:06:09'),
(36,'H-01','HARIAN','3',NULL,1,'1',1000,2,'1',2000,'1',500,'1','4',161,163,208,215,205,211,206,228,218,'2021-09-13 13:06:04','2017-10-17 10:23:55');

/*Table structure for table `jurnal` */


CREATE TABLE `jurnal` (
  `id` int NOT NULL AUTO_INCREMENT,
  `no_transaksi` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `no_urut` int NOT NULL,
  `tanggal` date NOT NULL,
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `jumlah` double DEFAULT '0',
  `input_by` int NOT NULL,
  `id_jv` int DEFAULT NULL,
  `id_posted` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `jurnal_no_transaksi_index` (`no_transaksi`) USING BTREE,
  KEY `jurnal_input_by_index` (`input_by`) USING BTREE,
  KEY `jurnal_jv_id_index` (`id_jv`) USING BTREE,
  CONSTRAINT `jurnal_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `jurnal_jv_id_foreign` FOREIGN KEY (`id_jv`) REFERENCES `jv` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `jurnal` */

/*Table structure for table `jurnal_detail` */


CREATE TABLE `jurnal_detail` (
  `id` int NOT NULL AUTO_INCREMENT,
  `jurnal_id` int NOT NULL,
  `daftar_akun_id` int NOT NULL,
  `debet` double DEFAULT '0',
  `kredit` double DEFAULT '0',
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `jurnal_detail_jurnal_id_index` (`jurnal_id`) USING BTREE,
  KEY `jurnal_detail_daftar_akun_id_index` (`daftar_akun_id`) USING BTREE,
  KEY `jurnal_detail_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `jurnal_detail_daftar_akun_id_foreign` FOREIGN KEY (`daftar_akun_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `jurnal_detail_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `jurnal_detail_jurnal_id_foreign` FOREIGN KEY (`jurnal_id`) REFERENCES `jurnal` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `jurnal_detail` */

/*Table structure for table `jv` */


CREATE TABLE `jv` (
  `id` int NOT NULL AUTO_INCREMENT,
  `no_urut` int NOT NULL,
  `nomor` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `format_jurnal_id` int NOT NULL,
  `transaksi_id` int NOT NULL,
  `tanggal` date NOT NULL,
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `jumlah` double NOT NULL DEFAULT '0',
  `posting_id` int DEFAULT NULL,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `jv_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `jv_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `jv` */

/*Table structure for table `jv_dtl` */


CREATE TABLE `jv_dtl` (
  `id` int NOT NULL AUTO_INCREMENT,
  `no_urut` int NOT NULL,
  `jv_id` int NOT NULL,
  `tipe_akun_detail_id` int NOT NULL,
  `debet` double NOT NULL DEFAULT '0',
  `kredit` double NOT NULL DEFAULT '0',
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `jv_dtl_jv_id_index` (`jv_id`) USING BTREE,
  KEY `jv_dtl_tipe_akun_detail_id_index` (`tipe_akun_detail_id`) USING BTREE,
  KEY `jv_dtl_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `jv_dtl_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `jv_dtl_jv_id_foreign` FOREIGN KEY (`jv_id`) REFERENCES `jv` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `jv_dtl_tipe_akun_detail_id_foreign` FOREIGN KEY (`tipe_akun_detail_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `jv_dtl` */

/*Table structure for table `kas` */


CREATE TABLE `kas` (
  `id` int NOT NULL AUTO_INCREMENT,
  `no_transaksi` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `no_urut` int DEFAULT NULL,
  `tanggal` date DEFAULT NULL,
  `jenis_kas` int DEFAULT NULL,
  `id_daftar_akun` int NOT NULL,
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `posted_id` int DEFAULT NULL,
  `jv_id` int DEFAULT NULL,
  `ket_detail` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `id_daftar_akun_tujuan` int NOT NULL,
  `jumlah` double NOT NULL DEFAULT '0',
  `petugas` int NOT NULL,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `kas_no_transaksi_index` (`no_transaksi`) USING BTREE,
  KEY `kas_id_daftar_akun_index` (`id_daftar_akun`) USING BTREE,
  KEY `kas_id_daftar_akun_tujuan_index` (`id_daftar_akun_tujuan`) USING BTREE,
  KEY `kas_petugas_index` (`petugas`) USING BTREE,
  KEY `kas_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `kas_id_daftar_akun_foreign` FOREIGN KEY (`id_daftar_akun`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `kas_id_daftar_akun_tujuan_foreign` FOREIGN KEY (`id_daftar_akun_tujuan`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `kas_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `kas_petugas_foreign` FOREIGN KEY (`petugas`) REFERENCES `petugas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `kas` */

/*Table structure for table `libur_umum` */


CREATE TABLE `libur_umum` (
  `id` int NOT NULL AUTO_INCREMENT,
  `hari_ke` int NOT NULL,
  `nama` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `libur` enum('0','1') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `libur_umum` */

insert  into `libur_umum`(`id`,`hari_ke`,`nama`,`libur`,`created_at`,`updated_at`) values 
(2,1,'Senin','0','2017-10-17 13:44:31','2017-10-20 19:33:25'),
(3,2,'Selasa','0','2017-10-17 13:44:35','2017-10-20 19:33:25'),
(4,3,'Rabu','0','2017-11-01 13:44:38','2017-10-20 19:33:25'),
(5,4,'Kamis','0','2017-10-17 13:44:45','2017-10-20 19:33:25'),
(6,5,'Jumat','0','2017-10-17 13:44:48','2017-10-20 19:55:33'),
(7,6,'Sabtu','1','2017-10-17 13:44:51','2017-10-24 18:32:58'),
(8,0,'Minggu','1','2017-10-17 13:44:28','2017-10-20 19:33:32');

/*Table structure for table `migrations` */


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

/*Data for the table `migrations` */

/*Table structure for table `model_has_permissions` */


CREATE TABLE `model_has_permissions` (
  `permission_id` int unsigned NOT NULL,
  `model_id` int unsigned NOT NULL,
  `model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`permission_id`,`model_id`,`model_type`) USING BTREE,
  KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`) USING BTREE,
  CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `model_has_permissions` */

/*Table structure for table `model_has_roles` */


CREATE TABLE `model_has_roles` (
  `role_id` int unsigned NOT NULL,
  `model_id` int NOT NULL,
  `model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`role_id`,`model_id`,`model_type`) USING BTREE,
  KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`) USING BTREE,
  CONSTRAINT `model_has_roles_model_id_index` FOREIGN KEY (`model_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `model_has_roles` */

insert  into `model_has_roles`(`role_id`,`model_id`,`model_type`) values 
(23,1,'App\\Models\\User'),
(23,2,'App\\Models\\User'),
(33,3,'App\\Models\\User'),
(33,4,'App\\Models\\User'),
(33,5,'App\\Models\\User'),
(33,6,'App\\Models\\User'),
(33,7,'App\\Models\\User'),
(33,19,'App\\Models\\User');

/*Data for the table `password_resets` */

/*Table structure for table `pemutihan` */


CREATE TABLE `pemutihan` (
  `id` int NOT NULL AUTO_INCREMENT,
  `no_urut` int DEFAULT NULL,
  `no_transaksi` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `pinjaman_id` int NOT NULL,
  `sisa_pokok` double DEFAULT '0',
  `sisa_jasa` double DEFAULT '0',
  `sisa_tempo` double DEFAULT '0',
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `petugas` int DEFAULT NULL,
  `akun_id` int NOT NULL,
  `jv_id` int DEFAULT NULL,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `pemutihan_no_transaksi_index` (`no_transaksi`) USING BTREE,
  KEY `pemutihan_pinjaman_id_index` (`pinjaman_id`) USING BTREE,
  KEY `pemutihan_petugas_index` (`petugas`) USING BTREE,
  KEY `pemutihan_akun_id_index` (`akun_id`) USING BTREE,
  KEY `pemutihan_jv_id_index` (`jv_id`) USING BTREE,
  KEY `pemutihan_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `pemutihan_akun_id_foreign` FOREIGN KEY (`akun_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pemutihan_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pemutihan_jv_id_foreign` FOREIGN KEY (`jv_id`) REFERENCES `jv` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pemutihan_petugas_foreign` FOREIGN KEY (`petugas`) REFERENCES `petugas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pemutihan_pinjaman_id_foreign` FOREIGN KEY (`pinjaman_id`) REFERENCES `pinjaman` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `pemutihan` */

/*Table structure for table `pendapatan` */


CREATE TABLE `pendapatan` (
  `id` int NOT NULL AUTO_INCREMENT,
  `no_transaksi` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `no_urut` int NOT NULL,
  `tanggal` date NOT NULL,
  `akun_id` int NOT NULL,
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `jumlah` double DEFAULT '0',
  `input_by` int NOT NULL,
  `id_jv` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `pendapatan_no_transaksi_index` (`no_transaksi`) USING BTREE,
  KEY `pendapatan_akun_id_index` (`akun_id`) USING BTREE,
  KEY `pendapatan_input_by_index` (`input_by`) USING BTREE,
  KEY `pendapatan_jv_id_index` (`id_jv`) USING BTREE,
  CONSTRAINT `pendapatan_akun_id_foreign` FOREIGN KEY (`akun_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pendapatan_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pendapatan_jv_id_foreign` FOREIGN KEY (`id_jv`) REFERENCES `jv` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `pendapatan` */

/*Table structure for table `pendapatan_detail` */


CREATE TABLE `pendapatan_detail` (
  `id` int NOT NULL AUTO_INCREMENT,
  `pendapatan_id` int NOT NULL,
  `daftar_akun_id` int NOT NULL,
  `jumlah` double DEFAULT '0',
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `pendapatan_detail_pendapatan_id_index` (`pendapatan_id`) USING BTREE,
  KEY `pendapatan_detail_daftar_akun_id_index` (`daftar_akun_id`) USING BTREE,
  KEY `pendapatan_detail_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `pendapatan_detail_daftar_akun_id_foreign` FOREIGN KEY (`daftar_akun_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pendapatan_detail_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pendapatan_detail_pendapatan_id_foreign` FOREIGN KEY (`pendapatan_id`) REFERENCES `pendapatan` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `pendapatan_detail` */

/*Table structure for table `pengajuan` */


CREATE TABLE `pengajuan` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tanggal` date NOT NULL,
  `no_urut` int NOT NULL,
  `no_transaksi` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `anggota_id` int NOT NULL,
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `plafond` double NOT NULL DEFAULT '0',
  `jenis_pinjaman_id` int NOT NULL,
  `tempo` int DEFAULT NULL,
  `jasapct` double NOT NULL DEFAULT '0',
  `status_id` int NOT NULL,
  `pinjaman_id` int DEFAULT NULL,
  `est_tgl_realisasi` date DEFAULT NULL,
  `jumlah_disetujui` double NOT NULL DEFAULT '0',
  `tempo_disetujui` int NOT NULL DEFAULT '0',
  `keterangan2` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `petugas_penyetujuan_id` int DEFAULT NULL,
  `input_by_penyetujuan_id` int DEFAULT NULL,
  `tgl_persetujuan` date DEFAULT NULL,
  `agunan` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `petugas_id` int DEFAULT NULL,
  `input_by` int NOT NULL,
  `total_jasa` double DEFAULT '0',
  `plafond_jasa` double DEFAULT '0',
  `angsur_pokok` double DEFAULT '0',
  `angsur_jasa` double DEFAULT '0',
  `jumlah_angsur` double DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `pengajuan_no_transaksi_index` (`no_transaksi`) USING BTREE,
  KEY `pengajuan_anggota_id_index` (`anggota_id`) USING BTREE,
  KEY `pengajuan_jenis_pinjaman_id_index` (`jenis_pinjaman_id`) USING BTREE,
  KEY `pengajuan_petugas_id_index` (`petugas_id`) USING BTREE,
  KEY `pengajuan_input_by_index` (`input_by`) USING BTREE,
  KEY `pengajuan_petugas_penyetujuan_id_index` (`petugas_penyetujuan_id`) USING BTREE,
  KEY `pengajuan_input_by_penyetujuan_id_index` (`input_by_penyetujuan_id`) USING BTREE,
  CONSTRAINT `pengajuan_anggota_id_foreign` FOREIGN KEY (`anggota_id`) REFERENCES `anggota` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pengajuan_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pengajuan_input_by_penyetujuan_id_foreign` FOREIGN KEY (`input_by_penyetujuan_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pengajuan_jenis_pinjaman_id_foreign` FOREIGN KEY (`jenis_pinjaman_id`) REFERENCES `jenis_pinjaman` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pengajuan_petugas_id_foreign` FOREIGN KEY (`petugas_id`) REFERENCES `petugas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pengajuan_petugas_penyetujuan_id_foreign` FOREIGN KEY (`petugas_penyetujuan_id`) REFERENCES `petugas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `pengajuan` */

/*Table structure for table `permissions` */


CREATE TABLE `permissions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `menu` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `aktif` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `permissions` */

insert  into `permissions`(`id`,`name`,`menu`,`guard_name`,`aktif`,`created_at`,`updated_at`) values 
(1,'Pendaftaran Anggota','Anggota','web','1','2017-09-12 08:25:09',NULL),
(2,'Lihat Daftar Anggota','Anggota','web','1','2017-09-12 08:25:12',NULL),
(3,'Grup / Wilayah Anggota','Anggota','web','1','2017-09-12 08:25:14',NULL),
(4,'Update Anggota Keluar','Anggota','web','1','2017-09-12 08:25:16',NULL),
(5,'Lihat Saldo Anggota','Anggota','web','0','2017-09-12 08:25:25',NULL),
(6,'Lihat Transaksi Anggota','Anggota','web','0','2017-09-12 08:25:27',NULL),
(7,'Pembukaan Rekening','Simpanan','web','1','2017-09-12 08:26:21',NULL),
(8,'Transaksi Setoran / Pengambilan','Simpanan','web','1','2017-09-12 08:27:00',NULL),
(9,'Pemberian Jasa','Simpanan','web','1','2017-09-12 08:27:26',NULL),
(10,'Pembebanan Bea Admin Bulanan','Simpanan','web','1','2017-09-12 08:27:58',NULL),
(11,'Penutupan Rekening','Simpanan','web','1','2017-09-12 08:28:26',NULL),
(12,'Lihat Transaksi Per Rekening','Simpanan','web','0','2017-09-12 08:28:55',NULL),
(13,'Lihat Rekap Saldo','Simpanan','web','0','2017-09-12 08:29:15',NULL),
(14,'Lihat Grafik Transaksi Bulanan','Simpanan','web','0','2017-09-12 08:29:50',NULL),
(15,'Lihat Grafik Total Saldo Per Akhir Bulan','Simpanan','web','0','2017-09-12 08:30:31',NULL),
(16,'Pengajuan','Pinjaman','web','1','2017-09-12 08:31:18',NULL),
(17,'Persetujuan Pengajuan','Pinjaman','web','1','2017-09-12 08:31:40',NULL),
(18,'Realisasi','Pinjaman','web','1','2017-09-12 08:32:00',NULL),
(19,'Angsuran','Pinjaman','web','1','2017-09-12 08:32:15',NULL),
(20,'Rehab Pinjaman','Pinjaman','web','0','2017-09-12 08:32:38',NULL),
(21,'Perubahan Sisa Angsuran','Pinjaman','web','0','2017-09-12 08:33:10',NULL),
(22,'Pemutihan','Pinjaman','web','1','2017-09-12 08:34:17',NULL),
(23,'Lihat Kartu Pinjaman','Pinjaman','web','0','2017-09-12 08:34:45',NULL),
(24,'Lihat Sisa Anguran','Pinjaman','web','0','2017-09-12 08:35:45',NULL),
(25,'Lihat Estimasi Penerimaan Angsuran','Pinjaman','web','0','2017-09-12 08:36:15',NULL),
(26,'Lihat Grafik Total Realisasi Pinjaman Per Bulan','Pinjaman','web','0','2017-09-12 08:37:03',NULL),
(27,'Lihat Grafik Total Realisasi Pinjaman Per Grup Anggota','Pinjaman','web','0','2017-09-12 08:37:43',NULL),
(28,'Mutasi Kas','Akuntansi','web','1','2017-09-12 08:38:09',NULL),
(29,'Pendapatan Lain-Lain','Akuntansi','web','1','2017-09-12 08:38:50',NULL),
(30,'Biaya Lain-Lain','Akuntansi','web','1','2017-09-12 08:39:18',NULL),
(31,'Transaksi Jurnal Umum','Akuntansi','web','1','2017-09-12 08:39:33',NULL),
(32,'Lihat Daftar Jurnal','Akuntansi','web','0','2017-09-12 08:40:01',NULL),
(33,'Lihat Detail Jurnal','Akuntansi','web','0','2017-09-12 08:40:16',NULL),
(34,'Proses Tutup Tahun','Akuntansi','web','1','2017-09-12 08:40:38',NULL),
(35,'Alokasi SHU','SHU','web','1','2017-09-12 08:41:04',NULL),
(36,'Lihat Detail Pembagian SHU','SHU','web','1','2017-09-12 08:41:22',NULL),
(37,'Pengambilan SHU','SHU','web','1','2017-09-12 08:42:01',NULL),
(38,'Laporan Anggota','Laporan','web','1','2017-09-12 08:42:24',NULL),
(39,'Laporan Simpanan','Laporan','web','1','2017-09-12 08:42:38',NULL),
(40,'Laporan Pinjaman','Laporan','web','1','2017-09-12 08:43:54',NULL),
(41,'Laporan Akuntansi','Laporan','web','1','2017-09-12 08:44:31',NULL),
(42,'Setting Manajemen Koperasi','Pengaturan','web','1','2017-09-12 12:42:13',NULL),
(43,'Setting Program','Pengaturan','web','0','2017-09-12 12:42:32',NULL),
(44,'User Program','Pengaturan','web','1','2017-09-12 12:42:45',NULL),
(45,'Hak Akses','Pengaturan','web','1','2017-09-12 12:43:03',NULL),
(46,'Petugas','Pengaturan','web','1','2017-09-12 12:43:13',NULL),
(47,'Akun Perkiraaan','Pengaturan','web','1','2017-09-12 12:43:35',NULL),
(48,'Produk Simpanan','Pengaturan','web','1','2017-09-12 12:43:51',NULL),
(49,'Jenis Simpanan','Pengaturan','web','1','2017-09-12 12:44:14',NULL),
(50,'Libur Umum','Pengaturan','web','1','2017-09-12 12:44:26',NULL),
(51,'Libur Khusus','Pengaturan','web','1','2017-11-15 14:42:06',NULL),
(52,'Backup Data','Pengaturan','web','1','2017-11-19 09:46:12',NULL),
(53,'Restore Data','Pengaturan','web','1','2017-11-19 09:46:27',NULL),
(54,'Cabang','Pengaturan','web','1','2018-01-16 09:01:19',NULL);

/*Table structure for table `petugas` */


CREATE TABLE `petugas` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nik` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `alamat` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `telepon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `foto` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `petugas_email_unique` (`email`) USING BTREE,
  UNIQUE KEY `petugas_nik_unique` (`nik`) USING BTREE,
  KEY `petugas_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `petugas_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `petugas` */

insert  into `petugas`(`id`,`nik`,`name`,`alamat`,`telepon`,`email`,`foto`,`input_by`,`created_at`,`updated_at`) values 
(1,'PDEN-01','Petugas Denmark 1','Jl. Suryana No. 23','0812322343','denmark1@demo.com',NULL,6,'2018-01-16 11:33:48','2018-01-16 11:34:22'),
(2,'PDEN-02','Petugas Denmark 2','Jl. Suryana No. 24','0812322323','demo@demo.com',NULL,6,'2018-01-16 11:34:47','2018-01-16 11:34:47'),
(3,'PJER-01','Petugas Jerman 1','Jl. Ahmah Dahlan 1','089893453','jerman1@demo.com',NULL,19,'2018-01-16 11:38:57','2018-01-16 11:38:57'),
(11,'PJER-02','Petugas Jerman 2','Jl. Ahmah Dahlan 2','08989989','jerman2@demo.com',NULL,19,'2018-01-16 11:39:22','2018-01-16 11:39:22');

/*Table structure for table `pinjaman` */


CREATE TABLE `pinjaman` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tanggal` date NOT NULL,
  `no_pinjaman` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `id_ambil_pengajuan` enum('0','1') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `pengajuan_id` int DEFAULT NULL,
  `no_urut` int DEFAULT NULL,
  `anggota_id` int NOT NULL,
  `agunan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `keperluan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `plafond` double NOT NULL DEFAULT '0',
  `daftar_pinjaman_id` int NOT NULL,
  `tempo_angsuran` int DEFAULT NULL,
  `jenis_angsuran` int DEFAULT NULL,
  `jasapct` double NOT NULL DEFAULT '0',
  `jenis_jasa` enum('1','2') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `tipe_bea_administrasi` int DEFAULT NULL,
  `bea_administrasi` double NOT NULL DEFAULT '0',
  `persen_bea_administrasi` float DEFAULT '0',
  `tipe_bea_asuransi` int DEFAULT NULL,
  `bea_asuransi` double NOT NULL,
  `persen_bea_asuransi` float DEFAULT '0',
  `bea_lain` double NOT NULL DEFAULT '0',
  `swk_persen` float DEFAULT '0',
  `swk_rp` double DEFAULT '0',
  `swk_id` int DEFAULT NULL,
  `trans_swk_id` int DEFAULT NULL,
  `total_jasa` double NOT NULL DEFAULT '0',
  `plafond_jasa` double NOT NULL DEFAULT '0',
  `angsur_pokok` double NOT NULL DEFAULT '0',
  `angsur_jasa` double NOT NULL DEFAULT '0',
  `jumlah_angsur` double NOT NULL DEFAULT '0',
  `total_diterima` double DEFAULT '0',
  `jatuh_tempo_id` int DEFAULT NULL,
  `tgl_mulai_angsur` date DEFAULT NULL,
  `sudah_angsur_pokok` double NOT NULL DEFAULT '0',
  `sudah_angsur_jasa` double NOT NULL DEFAULT '0',
  `sudah_angsur_kali` int NOT NULL DEFAULT '0',
  `posted_id` int DEFAULT NULL,
  `jv_id` int DEFAULT NULL,
  `edit_pokok` double NOT NULL DEFAULT '0',
  `edit_jasa` double NOT NULL DEFAULT '0',
  `edit_tempo` int NOT NULL DEFAULT '0',
  `sisa_pokok` double NOT NULL DEFAULT '0',
  `sisa_jasa` double NOT NULL DEFAULT '0',
  `sisa_tempo` int DEFAULT '0',
  `sisa_pokok_jasa` double DEFAULT '0',
  `status_id` int DEFAULT NULL,
  `tgl_lunas` date DEFAULT NULL,
  `perubahan_id` int DEFAULT NULL,
  `petugas_id` int DEFAULT NULL,
  `is_lama` int DEFAULT NULL,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `pinjaman_no_pinjaman_index` (`no_pinjaman`) USING BTREE,
  KEY `pinjaman_anggota_id_index` (`anggota_id`) USING BTREE,
  KEY `pinjaman_daftar_pinjaman_id_index` (`daftar_pinjaman_id`) USING BTREE,
  KEY `pinjaman_jv_id_index` (`jv_id`) USING BTREE,
  KEY `pinjaman_petugas_id_index` (`petugas_id`) USING BTREE,
  KEY `pinjaman_input_by_index` (`input_by`) USING BTREE,
  KEY `pinjaman_pengajuan_id_foreign` (`pengajuan_id`) USING BTREE,
  KEY `pinjaman_status_id_index` (`status_id`) USING BTREE,
  KEY `pinjaman_swk_id_index` (`swk_id`) USING BTREE,
  CONSTRAINT `pinjaman_anggota_id_foreign` FOREIGN KEY (`anggota_id`) REFERENCES `anggota` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pinjaman_daftar_pinjaman_id_foreign` FOREIGN KEY (`daftar_pinjaman_id`) REFERENCES `jenis_pinjaman` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pinjaman_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pinjaman_jv_id_foreign` FOREIGN KEY (`jv_id`) REFERENCES `jv` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pinjaman_pengajuan_id_foreign` FOREIGN KEY (`pengajuan_id`) REFERENCES `pengajuan` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pinjaman_petugas_id_foreign` FOREIGN KEY (`petugas_id`) REFERENCES `petugas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pinjaman_status_id_foreign` FOREIGN KEY (`status_id`) REFERENCES `status_pinjaman` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `pinjaman_swk_id_foreign` FOREIGN KEY (`swk_id`) REFERENCES `simpanan_rekening` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `pinjaman` */

insert  into `pinjaman`(`id`,`tanggal`,`no_pinjaman`,`id_ambil_pengajuan`,`pengajuan_id`,`no_urut`,`anggota_id`,`agunan`,`keperluan`,`plafond`,`daftar_pinjaman_id`,`tempo_angsuran`,`jenis_angsuran`,`jasapct`,`jenis_jasa`,`tipe_bea_administrasi`,`bea_administrasi`,`persen_bea_administrasi`,`tipe_bea_asuransi`,`bea_asuransi`,`persen_bea_asuransi`,`bea_lain`,`swk_persen`,`swk_rp`,`swk_id`,`trans_swk_id`,`total_jasa`,`plafond_jasa`,`angsur_pokok`,`angsur_jasa`,`jumlah_angsur`,`total_diterima`,`jatuh_tempo_id`,`tgl_mulai_angsur`,`sudah_angsur_pokok`,`sudah_angsur_jasa`,`sudah_angsur_kali`,`posted_id`,`jv_id`,`edit_pokok`,`edit_jasa`,`edit_tempo`,`sisa_pokok`,`sisa_jasa`,`sisa_tempo`,`sisa_pokok_jasa`,`status_id`,`tgl_lunas`,`perubahan_id`,`petugas_id`,`is_lama`,`input_by`,`created_at`,`updated_at`) values 
(9,'2021-09-14','000001/AMR/2021',NULL,NULL,1,63,NULL,NULL,12000000,1,12,1,600000,'1',NULL,0,0,NULL,0,0,0,0,0,NULL,NULL,600000,0,0,0,0,0,NULL,NULL,0,0,0,NULL,NULL,0,0,0,12000000,600000,12,12600000,0,NULL,NULL,NULL,1,1,'2021-09-14 15:53:27','2021-09-14 15:53:27');

/*Table structure for table `produk_simpanan` */


CREATE TABLE `produk_simpanan` (
  `id` int NOT NULL AUTO_INCREMENT,
  `kode` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nama_simpanan` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `prefik_rekening` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `jenis_jasa` enum('1','2','3') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '1',
  `bunga_per_bulan` float DEFAULT '0',
  `minimal_setoran_awal` double DEFAULT '0',
  `bea_adm_pendaftaran` double DEFAULT '0',
  `minimal_saldo` double DEFAULT '0',
  `minimal_transaksi` double DEFAULT '0',
  `bea_adm_bulanan` enum('1','2') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '1',
  `jumlah` double DEFAULT '0',
  `dihitung_dalam_shu` enum('0','1') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '0',
  `akun_kas_id` int DEFAULT NULL,
  `akun_simpanan_id` int DEFAULT NULL,
  `akun_bea_adm_pendaftaran_id` int DEFAULT NULL,
  `akun_bea_adm_bulanan_id` int DEFAULT NULL,
  `akun_beban_jasa_id` int DEFAULT NULL,
  `penutupan_rekening_id` int DEFAULT NULL,
  `akun_pendapatan_koreksi_id` int DEFAULT NULL,
  `akun_biaya_koreksi_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `produk_simpanan_kode_index` (`kode`) USING BTREE,
  UNIQUE KEY `produk_simpanan_prefik_rekening_index` (`prefik_rekening`) USING BTREE,
  KEY `produk_simpanan_akun_kas_id_index` (`akun_kas_id`) USING BTREE,
  KEY `produk_simpanan_akun_simpanan_id_index` (`akun_simpanan_id`) USING BTREE,
  KEY `produk_simpanan_akun_bea_adm_pendaftaran_id_index` (`akun_bea_adm_pendaftaran_id`) USING BTREE,
  KEY `produk_simpanan_akun_bea_adm_bulanan_id_index` (`akun_bea_adm_bulanan_id`) USING BTREE,
  KEY `produk_simpanan_akun_beban_jasa_id_index` (`akun_beban_jasa_id`) USING BTREE,
  KEY `produk_simpanan_penutupan_rekening_id_index` (`penutupan_rekening_id`) USING BTREE,
  KEY `produk_simpanan_akun_pendapatan_koreksi_id_index` (`akun_pendapatan_koreksi_id`) USING BTREE,
  KEY `produk_simpanan_akun_biaya_koreksi_id_index` (`akun_biaya_koreksi_id`) USING BTREE,
  CONSTRAINT `produk_simpanan_akun_bea_adm_bulanan_id_foreign` FOREIGN KEY (`akun_bea_adm_bulanan_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `produk_simpanan_akun_bea_adm_pendaftaran_id_foreign` FOREIGN KEY (`akun_bea_adm_pendaftaran_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `produk_simpanan_akun_beban_jasa_id_foreign` FOREIGN KEY (`akun_beban_jasa_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `produk_simpanan_akun_biaya_koreksi_id_foreign` FOREIGN KEY (`akun_biaya_koreksi_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `produk_simpanan_akun_kas_id_foreign` FOREIGN KEY (`akun_kas_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `produk_simpanan_akun_pendapatan_koreksi_id_foreign` FOREIGN KEY (`akun_pendapatan_koreksi_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `produk_simpanan_akun_simpanan_id_foreign` FOREIGN KEY (`akun_simpanan_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `produk_simpanan_penutupan_rekening_id_foreign` FOREIGN KEY (`penutupan_rekening_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `produk_simpanan` */

insert  into `produk_simpanan`(`id`,`kode`,`nama_simpanan`,`prefik_rekening`,`jenis_jasa`,`bunga_per_bulan`,`minimal_setoran_awal`,`bea_adm_pendaftaran`,`minimal_saldo`,`minimal_transaksi`,`bea_adm_bulanan`,`jumlah`,`dihitung_dalam_shu`,`akun_kas_id`,`akun_simpanan_id`,`akun_bea_adm_pendaftaran_id`,`akun_bea_adm_bulanan_id`,`akun_beban_jasa_id`,`penutupan_rekening_id`,`akun_pendapatan_koreksi_id`,`akun_biaya_koreksi_id`,`created_at`,`updated_at`) values 
(1,'SP','Simpanan Pokok','SP-','3',2.5,100000,75000,50000,10000,'1',20000,'1',161,176,204,204,216,206,204,216,'2021-09-13 13:00:43','2017-11-07 17:15:16'),
(2,'SW','Simpanan Wajib','SW-','2',1,20000,0,100000,15000,'2',2,'1',163,178,207,205,217,206,206,220,'2021-09-13 13:00:45','2017-09-30 15:11:39'),
(3,'SWK','Simpanan Wajib Kredit','SWK-','1',1,100000,20000,50000,30000,'2',2,'1',163,178,206,206,218,206,206,218,'2021-09-13 13:00:47','2017-09-27 19:57:49'),
(4,'SS','Simpanan Murobahah','SS-','2',1,20000,30000,50000,10000,'2',4,'0',164,179,207,207,219,207,207,219,'2021-09-13 13:00:53','2021-09-13 12:38:29'),
(5,'SH','Simpanan Harkop','SH-','2',1,200000,10000,100000,10000,'1',10000,'0',175,182,206,207,229,215,215,218,'2021-09-13 13:01:02','2017-09-23 10:49:11');

/*Table structure for table `rekap_jv` */


CREATE TABLE `rekap_jv` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tipe_akun_detail_id` int NOT NULL,
  `tahun` int NOT NULL,
  `sa_debet` double DEFAULT '0',
  `sa_kredit` double DEFAULT '0',
  `debet_1` double DEFAULT '0',
  `kredit_1` double DEFAULT '0',
  `debet_2` double DEFAULT '0',
  `kredit_2` double DEFAULT '0',
  `debet_3` double DEFAULT '0',
  `kredit_3` double DEFAULT '0',
  `debet_4` double DEFAULT '0',
  `kredit_4` double DEFAULT '0',
  `debet_5` double DEFAULT '0',
  `kredit_5` double DEFAULT '0',
  `debet_6` double DEFAULT '0',
  `kredit_6` double DEFAULT '0',
  `debet_7` double DEFAULT '0',
  `kredit_7` double DEFAULT '0',
  `debet_8` double DEFAULT '0',
  `kredit_8` double DEFAULT '0',
  `debet_9` double DEFAULT '0',
  `kredit_9` double DEFAULT '0',
  `debet_10` double DEFAULT '0',
  `kredit_10` double DEFAULT '0',
  `debet_11` double DEFAULT '0',
  `kredit_11` double DEFAULT '0',
  `debet_12` double DEFAULT '0',
  `kredit_12` double DEFAULT '0',
  `debet_temp` double NOT NULL DEFAULT '0',
  `kredit_temp` double NOT NULL DEFAULT '0',
  `debet_shu` double NOT NULL DEFAULT '0',
  `kredit_shu` double NOT NULL DEFAULT '0',
  `debet_akhir` double DEFAULT '0',
  `kredit_akhir` double DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `rekap_jv_tipe_akun_detail_id_index` (`tipe_akun_detail_id`) USING BTREE,
  CONSTRAINT `rekap_jv_tipe_akun_detail_id_foreign` FOREIGN KEY (`tipe_akun_detail_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `rekap_jv` */

/*Table structure for table `restore_data` */


CREATE TABLE `restore_data` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nama_file` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `backup_data_input_by_index` (`input_by`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;

/*Data for the table `restore_data` */

/*Table structure for table `role_has_permissions` */


CREATE TABLE `role_has_permissions` (
  `permission_id` int unsigned NOT NULL,
  `role_id` int unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`role_id`) USING BTREE,
  KEY `role_has_permissions_role_id_foreign` (`role_id`) USING BTREE,
  CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `role_has_permissions` */

insert  into `role_has_permissions`(`permission_id`,`role_id`) values 
(1,23),
(2,23),
(3,23),
(4,23),
(7,23),
(8,23),
(9,23),
(10,23),
(11,23),
(16,23),
(17,23),
(18,23),
(19,23),
(22,23),
(28,23),
(29,23),
(30,23),
(31,23),
(34,23),
(35,23),
(36,23),
(37,23),
(38,23),
(39,23),
(40,23),
(41,23),
(42,23),
(44,23),
(45,23),
(46,23),
(47,23),
(48,23),
(49,23),
(50,23),
(51,23),
(52,23),
(53,23),
(54,23),
(1,33),
(2,33),
(4,33),
(7,33),
(8,33),
(9,33),
(10,33),
(11,33),
(16,33),
(17,33),
(18,33),
(19,33),
(22,33),
(28,33),
(29,33),
(30,33),
(31,33),
(34,33),
(35,33),
(36,33),
(37,33),
(38,33),
(39,33),
(40,33),
(41,33),
(46,33),
(47,33);

/*Table structure for table `roles` */


CREATE TABLE `roles` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `roles` */

insert  into `roles`(`id`,`name`,`guard_name`,`keterangan`,`created_at`,`updated_at`) values 
(23,'Administrator','web','Hak akses untuk administrator','2017-09-12 13:22:04','2018-01-16 10:15:15'),
(33,'Petugas Cabang','web','Hak akses untuk petugas cabang','2018-01-16 09:57:14','2018-01-16 10:11:17');

/*Table structure for table `shu_alokasi` */


CREATE TABLE `shu_alokasi` (
  `id` int NOT NULL AUTO_INCREMENT,
  `kode` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nama` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `tipe_akun_detail_id` int NOT NULL,
  `presentase` float DEFAULT '0',
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `shu_alokasi_kode_index` (`kode`) USING BTREE,
  KEY `shu_tipe_akun_detail_id_index` (`tipe_akun_detail_id`) USING BTREE,
  KEY `shu_alokasi_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `shu_alokasi_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `shu_tipe_akun_detail_id_foreign` FOREIGN KEY (`tipe_akun_detail_id`) REFERENCES `tipe_akun_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `shu_alokasi` */

insert  into `shu_alokasi`(`id`,`kode`,`nama`,`tipe_akun_detail_id`,`presentase`,`input_by`,`created_at`,`updated_at`) values 
(1,'01','Pembagian ke Anggota',161,10,1,'2017-10-12 09:51:43','2017-10-12 09:51:45'),
(2,'02','Dana Pengurus',165,10,1,'2017-10-12 09:51:47','2017-10-12 18:19:40'),
(3,'03','Dana Sosial',166,10,1,'2017-10-12 09:51:49','2017-10-12 09:52:04'),
(4,'04','Pembangunan Koperasi',169,10,1,'2017-10-12 09:51:51','2017-10-12 18:19:31'),
(5,'05','Cadangan',202,60,1,'2017-10-12 18:19:16','2017-10-12 18:19:16');

/*Table structure for table `simpanan_bea_adm` */


CREATE TABLE `simpanan_bea_adm` (
  `id` int NOT NULL AUTO_INCREMENT,
  `no_urut` int NOT NULL,
  `no_transaksi` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `produk_simpanan_id` int NOT NULL,
  `bulan` int NOT NULL,
  `tahun` int NOT NULL,
  `tipe_bea_adm` int NOT NULL,
  `bea_adm_bulanan` double NOT NULL DEFAULT '0',
  `jv_id` int DEFAULT NULL,
  `jumlah` double DEFAULT '0',
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `simpanan_bea_adm_no_transaksi_index` (`no_transaksi`) USING BTREE,
  KEY `simpanan_bea_adm_produk_simpanan_id_index` (`produk_simpanan_id`) USING BTREE,
  KEY `simpanan_bea_adm_input_by_index` (`input_by`) USING BTREE,
  KEY `simpanan_bea_adm_jv_id_index` (`jv_id`) USING BTREE,
  CONSTRAINT `simpanan_bea_adm_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_bea_adm_jv_id_foreign` FOREIGN KEY (`jv_id`) REFERENCES `jv` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_bea_adm_produk_simpanan_id_foreign` FOREIGN KEY (`produk_simpanan_id`) REFERENCES `produk_simpanan` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `simpanan_bea_adm` */

/*Table structure for table `simpanan_jasa` */


CREATE TABLE `simpanan_jasa` (
  `id` int NOT NULL AUTO_INCREMENT,
  `no_urut` int NOT NULL,
  `no_transaksi` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `produk_simpanan_id` int NOT NULL,
  `bulan` int NOT NULL,
  `tahun` int NOT NULL,
  `jasapct` float NOT NULL,
  `jenis_jasa` int NOT NULL,
  `jv_id` int DEFAULT NULL,
  `total_jasa` double DEFAULT '0',
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `simpanan_jasa_no_transaksi_index` (`no_transaksi`) USING BTREE,
  KEY `simpanan_jasa_produk_simpanan_id_index` (`produk_simpanan_id`) USING BTREE,
  KEY `simpanan_jasa_input_by_index` (`input_by`) USING BTREE,
  KEY `simpanan_jasa_jv_id_index` (`jv_id`) USING BTREE,
  CONSTRAINT `simpanan_jasa_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_jasa_jv_id_foreign` FOREIGN KEY (`jv_id`) REFERENCES `jv` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_jasa_produk_simpanan_id_foreing` FOREIGN KEY (`produk_simpanan_id`) REFERENCES `produk_simpanan` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `simpanan_jasa` */

/*Table structure for table `simpanan_rekening` */


CREATE TABLE `simpanan_rekening` (
  `id` int NOT NULL AUTO_INCREMENT,
  `produk_simpanan_id` int NOT NULL,
  `anggota_id` int NOT NULL,
  `no_transaksi` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `no_urut` int NOT NULL,
  `tanggal` date NOT NULL,
  `no_rekening` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `jumlah_setoran` double NOT NULL DEFAULT '0',
  `bea_administrasi` double NOT NULL DEFAULT '0',
  `total_setoran` double NOT NULL DEFAULT '0',
  `petugas` int DEFAULT NULL,
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `tidak_aktif` enum('0','1') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '0',
  `tgl_tidak_aktif` date DEFAULT NULL,
  `tgl_transaksi_terakhir` date NOT NULL,
  `saldo` double NOT NULL DEFAULT '0',
  `id_jv` int DEFAULT NULL,
  `is_lama` int DEFAULT NULL,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `simpanan_rek_no_transaksi_index` (`no_transaksi`) USING BTREE,
  UNIQUE KEY `simpanan_rek_no_rekening_index` (`no_rekening`) USING BTREE,
  KEY `simpanan_rek_produk_simpanan_id_index` (`produk_simpanan_id`) USING BTREE,
  KEY `simpanan_rek_anggota_id_index` (`anggota_id`) USING BTREE,
  KEY `simpanan_rek_petugas_index` (`petugas`) USING BTREE,
  KEY `simpanan_rek_input_by_index` (`input_by`) USING BTREE,
  KEY `simpanan_rek_id_jv_index` (`id_jv`) USING BTREE,
  CONSTRAINT `simpanan_rek_anggota_id_foreign` FOREIGN KEY (`anggota_id`) REFERENCES `anggota` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_rek_id_jv_foreign` FOREIGN KEY (`id_jv`) REFERENCES `jv` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_rek_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_rek_petugas_foreign` FOREIGN KEY (`petugas`) REFERENCES `petugas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_rek_produk_simpanan_id_foreign` FOREIGN KEY (`produk_simpanan_id`) REFERENCES `produk_simpanan` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=105 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `simpanan_rekening` */

insert  into `simpanan_rekening`(`id`,`produk_simpanan_id`,`anggota_id`,`no_transaksi`,`no_urut`,`tanggal`,`no_rekening`,`jumlah_setoran`,`bea_administrasi`,`total_setoran`,`petugas`,`keterangan`,`tidak_aktif`,`tgl_tidak_aktif`,`tgl_transaksi_terakhir`,`saldo`,`id_jv`,`is_lama`,`input_by`,`created_at`,`updated_at`) values 
(66,1,63,'000001/AMR/2021',1,'2021-09-13','SP-A00001',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:45','2021-09-13 14:02:45'),
(67,2,63,'000002/AMR/2021',2,'2021-09-13','SW-A00001',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:45','2021-09-13 14:02:45'),
(68,1,64,'000003/AMR/2021',3,'2021-09-13','SP-A00002',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(69,2,64,'000004/AMR/2021',4,'2021-09-13','SW-A00002',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(70,1,65,'000005/AMR/2021',5,'2021-09-13','SP-A00003',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(71,2,65,'000006/AMR/2021',6,'2021-09-13','SW-A00003',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(72,1,66,'000007/AMR/2021',7,'2021-09-13','SP-A00004',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(73,2,66,'000008/AMR/2021',8,'2021-09-13','SW-A00004',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(74,1,67,'000009/AMR/2021',9,'2021-09-13','SP-A00005',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:47','2021-09-13 14:02:47'),
(75,2,67,'000010/AMR/2021',10,'2021-09-13','SW-A00005',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:47','2021-09-13 14:02:47'),
(76,1,68,'000011/AMR/2021',11,'2021-09-13','SP-A00006',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:47','2021-09-13 14:02:47'),
(77,2,68,'000012/AMR/2021',12,'2021-09-13','SW-A00006',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:48','2021-09-13 14:02:48'),
(78,1,69,'000013/AMR/2021',13,'2021-09-13','SP-A00007',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:48','2021-09-13 14:02:48'),
(79,2,69,'000014/AMR/2021',14,'2021-09-13','SW-A00007',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:48','2021-09-13 14:02:48'),
(80,1,70,'000015/AMR/2021',15,'2021-09-13','SP-A00008',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:48','2021-09-13 14:02:48'),
(81,2,70,'000016/AMR/2021',16,'2021-09-13','SW-A00008',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:48','2021-09-13 14:02:48'),
(82,1,71,'000017/AMR/2021',17,'2021-09-13','SP-A00009',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:50','2021-09-13 14:02:50'),
(83,2,71,'000018/AMR/2021',18,'2021-09-13','SW-A00009',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:50','2021-09-13 14:02:50'),
(84,1,72,'000019/AMR/2021',19,'2021-09-13','SP-A00010',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(85,2,72,'000020/AMR/2021',20,'2021-09-13','SW-A00010',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(86,1,73,'000021/AMR/2021',21,'2021-09-13','SP-A00011',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(87,2,73,'000022/AMR/2021',22,'2021-09-13','SW-A00011',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(88,1,74,'000023/AMR/2021',23,'2021-09-13','SP-A00012',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(89,2,74,'000024/AMR/2021',24,'2021-09-13','SW-A00012',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(90,1,75,'000025/AMR/2021',25,'2021-09-13','SP-A00013',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(91,2,75,'000026/AMR/2021',26,'2021-09-13','SW-A00013',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:53','2021-09-13 14:02:53'),
(92,1,76,'000027/AMR/2021',27,'2021-09-13','SP-A00014',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(93,2,76,'000028/AMR/2021',28,'2021-09-13','SW-A00014',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(94,1,77,'000029/AMR/2021',29,'2021-09-13','SP-A00015',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(95,2,77,'000030/AMR/2021',30,'2021-09-13','SW-A00015',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(96,1,78,'000031/AMR/2021',31,'2021-09-13','SP-A00016',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(97,2,78,'000032/AMR/2021',32,'2021-09-13','SW-A00016',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(98,1,79,'000033/AMR/2021',33,'2021-09-13','SP-A00017',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(99,2,79,'000034/AMR/2021',34,'2021-09-13','SW-A00017',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(100,1,80,'000035/AMR/2021',35,'2021-09-13','SP-A00018',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(101,2,80,'000036/AMR/2021',36,'2021-09-13','SW-A00018',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(102,1,81,'000037/AMR/2021',37,'2021-09-13','SP-A00019',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:55','2021-09-13 14:02:55'),
(103,2,81,'000038/AMR/2021',38,'2021-09-13','SW-A00019',100000,0,100000,NULL,NULL,'0',NULL,'2021-09-13',100000,NULL,1,1,'2021-09-13 14:02:55','2021-09-13 14:02:55'),
(104,3,63,'000039/AMR/2021',39,'2021-09-13','SWK-A00001',15000000,0,15000000,NULL,NULL,'0',NULL,'2021-09-13',15000000,NULL,1,1,'2021-09-13 16:02:05','2021-09-13 16:02:05');

/*Table structure for table `simpanan_transaksi` */


CREATE TABLE `simpanan_transaksi` (
  `id` int NOT NULL AUTO_INCREMENT,
  `no_urut` int DEFAULT NULL,
  `no_transaksi` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `simpanan_rek_id` int NOT NULL,
  `smk_simpanan_id` int NOT NULL,
  `jumlah` double NOT NULL DEFAULT '0',
  `saldo` double NOT NULL DEFAULT '0',
  `id_jv` int DEFAULT NULL,
  `petugas` int DEFAULT NULL,
  `input_by` int NOT NULL,
  `jasa_simpanan_id` int DEFAULT NULL,
  `bea_adm_simpanan_id` int DEFAULT NULL,
  `shu_ambil_id` int DEFAULT NULL,
  `pinjaman_id` int DEFAULT NULL,
  `angsuran_id` int DEFAULT NULL,
  `is_lama` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `simpanan_transaksi_no_transaksi_index` (`no_transaksi`) USING BTREE,
  KEY `simpanan_transaksi_simpanan_rek_id_index` (`simpanan_rek_id`) USING BTREE,
  KEY `simpanan_transaksi_smk_simpanan_id_index` (`smk_simpanan_id`) USING BTREE,
  KEY `simpanan_transaksi_petugas_index` (`petugas`) USING BTREE,
  KEY `simpanan_transaksi_input_by_index` (`input_by`) USING BTREE,
  KEY `simpanan_transaksi_id_jv_index` (`id_jv`) USING BTREE,
  KEY `simpanan_transaksi_jasa_simpanan_id_index` (`jasa_simpanan_id`) USING BTREE,
  KEY `simpanan_transaksi_bea_adm_simpanan_id_index` (`bea_adm_simpanan_id`) USING BTREE,
  KEY `simpanan_transaksi_shu_ambil_id_index` (`shu_ambil_id`) USING BTREE,
  KEY `simpanan_transaksi_pinjaman_id_index` (`pinjaman_id`) USING BTREE,
  KEY `simpanan_transaksi_angsuran_id_index` (`angsuran_id`) USING BTREE,
  CONSTRAINT `simpanan_transaksi_bea_adm_simpanan_id_foreign` FOREIGN KEY (`bea_adm_simpanan_id`) REFERENCES `simpanan_bea_adm` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_transaksi_id_jv_foreign` FOREIGN KEY (`id_jv`) REFERENCES `jv` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_transaksi_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_transaksi_jasa_simpanan_id_foreign` FOREIGN KEY (`jasa_simpanan_id`) REFERENCES `simpanan_jasa` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_transaksi_petugas_foreign` FOREIGN KEY (`petugas`) REFERENCES `petugas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_transaksi_pinjaman_id_index` FOREIGN KEY (`pinjaman_id`) REFERENCES `pinjaman` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_transaksi_simpanan_rek_id_foreign` FOREIGN KEY (`simpanan_rek_id`) REFERENCES `simpanan_rekening` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_transaksi_smk_simpanan_id_foreign` FOREIGN KEY (`smk_simpanan_id`) REFERENCES `smk_simpanan` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=128 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `simpanan_transaksi` */

insert  into `simpanan_transaksi`(`id`,`no_urut`,`no_transaksi`,`tanggal`,`simpanan_rek_id`,`smk_simpanan_id`,`jumlah`,`saldo`,`id_jv`,`petugas`,`input_by`,`jasa_simpanan_id`,`bea_adm_simpanan_id`,`shu_ambil_id`,`pinjaman_id`,`angsuran_id`,`is_lama`,`created_at`,`updated_at`) values 
(89,1,'000001/AMR/2021','2021-09-13',66,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:45','2021-09-13 14:02:45'),
(90,2,'000002/AMR/2021','2021-09-13',67,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:45','2021-09-13 14:02:45'),
(91,3,'000003/AMR/2021','2021-09-13',68,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(92,4,'000004/AMR/2021','2021-09-13',69,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(93,5,'000005/AMR/2021','2021-09-13',70,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(94,6,'000006/AMR/2021','2021-09-13',71,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(95,7,'000007/AMR/2021','2021-09-13',72,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(96,8,'000008/AMR/2021','2021-09-13',73,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:46','2021-09-13 14:02:46'),
(97,9,'000009/AMR/2021','2021-09-13',74,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:47','2021-09-13 14:02:47'),
(98,10,'000010/AMR/2021','2021-09-13',75,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:47','2021-09-13 14:02:47'),
(99,11,'000011/AMR/2021','2021-09-13',76,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:47','2021-09-13 14:02:47'),
(100,12,'000012/AMR/2021','2021-09-13',77,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:48','2021-09-13 14:02:48'),
(101,13,'000013/AMR/2021','2021-09-13',78,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:48','2021-09-13 14:02:48'),
(102,14,'000014/AMR/2021','2021-09-13',79,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:48','2021-09-13 14:02:48'),
(103,15,'000015/AMR/2021','2021-09-13',80,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:48','2021-09-13 14:02:48'),
(104,16,'000016/AMR/2021','2021-09-13',81,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:49','2021-09-13 14:02:49'),
(105,17,'000017/AMR/2021','2021-09-13',82,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:50','2021-09-13 14:02:50'),
(106,18,'000018/AMR/2021','2021-09-13',83,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:50','2021-09-13 14:02:50'),
(107,19,'000019/AMR/2021','2021-09-13',84,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(108,20,'000020/AMR/2021','2021-09-13',85,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(109,21,'000021/AMR/2021','2021-09-13',86,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(110,22,'000022/AMR/2021','2021-09-13',87,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(111,23,'000023/AMR/2021','2021-09-13',88,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(112,24,'000024/AMR/2021','2021-09-13',89,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(113,25,'000025/AMR/2021','2021-09-13',90,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:52','2021-09-13 14:02:52'),
(114,26,'000026/AMR/2021','2021-09-13',91,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:53','2021-09-13 14:02:53'),
(115,27,'000027/AMR/2021','2021-09-13',92,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(116,28,'000028/AMR/2021','2021-09-13',93,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(117,29,'000029/AMR/2021','2021-09-13',94,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(118,30,'000030/AMR/2021','2021-09-13',95,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(119,31,'000031/AMR/2021','2021-09-13',96,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(120,32,'000032/AMR/2021','2021-09-13',97,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(121,33,'000033/AMR/2021','2021-09-13',98,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(122,34,'000034/AMR/2021','2021-09-13',99,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(123,35,'000035/AMR/2021','2021-09-13',100,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(124,36,'000036/AMR/2021','2021-09-13',101,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:54','2021-09-13 14:02:54'),
(125,37,'000037/AMR/2021','2021-09-13',102,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:55','2021-09-13 14:02:55'),
(126,38,'000038/AMR/2021','2021-09-13',103,1,100000,100000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 14:02:55','2021-09-13 14:02:55'),
(127,39,'000039/AMR/2021','2021-09-13',104,1,15000000,15000000,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2021-09-13 16:02:05','2021-09-13 16:02:05');

/*Table structure for table `simpanan_tutup` */


CREATE TABLE `simpanan_tutup` (
  `id` int NOT NULL AUTO_INCREMENT,
  `no_urut` int DEFAULT NULL,
  `no_transaksi` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `simpanan_id` int NOT NULL,
  `saldo` double DEFAULT '0',
  `keterangan` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
  `jv_id` int DEFAULT NULL,
  `petugas_id` int DEFAULT NULL,
  `input_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `simpanan_tutup_no_transaksi_index` (`no_transaksi`) USING BTREE,
  KEY `simpanan_tutup_simpanan_id_index` (`simpanan_id`) USING BTREE,
  KEY `simpanan_tutup_jv_id_index` (`jv_id`) USING BTREE,
  KEY `simpanan_tutup_petugas_id_index` (`petugas_id`) USING BTREE,
  KEY `simpanna_tutup_input_by_index` (`input_by`) USING BTREE,
  CONSTRAINT `simpanan_tutup_jv_id_foreign` FOREIGN KEY (`jv_id`) REFERENCES `jv` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_tutup_petugas_id_foreign` FOREIGN KEY (`petugas_id`) REFERENCES `petugas` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanan_tutup_simpanan_id_foreign` FOREIGN KEY (`simpanan_id`) REFERENCES `simpanan_rekening` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `simpanna_tutup_input_by_foreign` FOREIGN KEY (`input_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `simpanan_tutup` */

/*Table structure for table `smk_akuntansi` */


CREATE TABLE `smk_akuntansi` (
  `id` int NOT NULL,
  `tahun_fiskal` int DEFAULT NULL,
  `akun_laba_rugi` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `sub_tipe_akun_kas_bank` int DEFAULT NULL,
  `creted_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `smk_akuntansi_sub_tipe_akun_kas_bank_index` (`sub_tipe_akun_kas_bank`) USING BTREE,
  CONSTRAINT `smk_akuntansi_sub_tipe_akun_kas_bank_foreign` FOREIGN KEY (`sub_tipe_akun_kas_bank`) REFERENCES `tipe_akun_sub` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `smk_akuntansi` */

insert  into `smk_akuntansi`(`id`,`tahun_fiskal`,`akun_laba_rugi`,`sub_tipe_akun_kas_bank`,`creted_at`,`updated_at`) values 
(1,2017,'Laba Rugi / SHU',10,'2017-09-17 15:20:04','2017-11-22 10:41:53');

/*Table structure for table `smk_format_jurnal` */


CREATE TABLE `smk_format_jurnal` (
  `id` int NOT NULL AUTO_INCREMENT,
  `kode` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nama` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `prefik` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `smk_format_jurnal_kode` (`kode`) USING BTREE,
  UNIQUE KEY `smk_format_jurnal_prefik` (`prefik`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `smk_format_jurnal` */

insert  into `smk_format_jurnal`(`id`,`kode`,`nama`,`prefik`,`created_at`,`updated_at`) values 
(1,'01','Pendaftaran Anggota','PA-','2017-09-17 15:23:23',NULL),
(2,'02','Pembukaan Rekening Simpanan','PRS-','2017-09-17 15:23:26','2017-09-17 15:25:25'),
(3,'03','Transaksi Simpanan','TS-','2017-09-17 15:23:28','2017-09-17 15:25:25'),
(4,'04','Pemberian Jasa Simpanan','PJS-','2017-09-17 15:23:29','2017-09-17 15:25:25'),
(5,'05','Penutupan Rekening Simpanan','TRS-','2017-09-17 15:23:31','2017-09-17 15:25:25'),
(6,'06','Realisasi Pinjaman','RP-','2017-09-17 15:23:33','2017-09-17 15:25:25'),
(7,'07','Angsuran','A-','2017-09-17 15:23:35','2017-09-17 15:25:25'),
(8,'08','Mutasi Kas / Bank','MKB-','2017-09-17 15:23:37','2017-09-17 15:25:25'),
(9,'09','Jurnal Umum','JU-','2017-09-17 15:23:39','2017-09-17 15:25:25'),
(10,'10','Bea Adm. Simpanan','BES-','2017-09-17 15:23:41','2017-09-17 15:25:25'),
(11,'11','Pembagian SHU','PSHU-','2017-09-17 15:23:55','2017-09-17 15:25:25'),
(12,'12','Perubahan Sisa Angsuran','PSA-','2017-09-17 15:23:46','2017-09-17 15:25:25'),
(13,'13','Biaya Lain-Lain','BLL-','2017-09-17 15:23:52','2017-09-17 15:25:25'),
(14,'14','Pendapatan Lain-Lain','PLL-','2017-09-17 15:23:54','2017-09-17 15:25:25'),
(15,'15','Pemutihan Pinjaman','PP-','2017-09-17 15:23:47','2017-09-17 15:25:25'),
(16,'16','Pengambilan SHU','ASHU-','2017-09-17 15:23:49','2017-09-17 15:25:25'),
(17,'17','Rehab Pinjaman','HP-','2017-09-17 15:23:50','2017-09-17 15:25:25');

/*Table structure for table `smk_pinjaman` */


CREATE TABLE `smk_pinjaman` (
  `id` int NOT NULL,
  `pembulatan_angsuran` double DEFAULT '0',
  `pinjaman_dianggap_lunas` enum('1','2') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '1',
  `simp_wajib_kredit` int DEFAULT NULL,
  `presentase_swk_realisasi` float DEFAULT '0',
  `presentase_swk_angsuran_1` float DEFAULT '0',
  `simpanan_jasa_angsuran` int DEFAULT NULL,
  `presentase_dari_jasa` float DEFAULT '0',
  `pinjaman_melalui_pengajuan` enum('0','1') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `smk_pinjaman_simp_wajib_kredit_index` (`simp_wajib_kredit`) USING BTREE,
  KEY `smk_pinjaman_simpanan_jasa_angsuran_index` (`simpanan_jasa_angsuran`) USING BTREE,
  CONSTRAINT `smk_pinjaman_simp_wajib_kredit_foreign` FOREIGN KEY (`simp_wajib_kredit`) REFERENCES `produk_simpanan` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `smk_pinjaman_simpanan_jasa_angsuran_foreign` FOREIGN KEY (`simpanan_jasa_angsuran`) REFERENCES `produk_simpanan` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `smk_pinjaman` */

insert  into `smk_pinjaman`(`id`,`pembulatan_angsuran`,`pinjaman_dianggap_lunas`,`simp_wajib_kredit`,`presentase_swk_realisasi`,`presentase_swk_angsuran_1`,`simpanan_jasa_angsuran`,`presentase_dari_jasa`,`pinjaman_melalui_pengajuan`,`created_at`,`updated_at`) values 
(1,0,'1',NULL,0,0,NULL,0,'0',NULL,NULL);

/*Table structure for table `smk_setting_umum` */


CREATE TABLE `smk_setting_umum` (
  `id` int NOT NULL,
  `nama_koperasi` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `slogan` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `email` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `alamat` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `kota` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `telepon` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `no_badan_hukum` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `foto` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `setup_data_awal` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `smk_setting_umum` */

insert  into `smk_setting_umum`(`id`,`nama_koperasi`,`slogan`,`email`,`alamat`,`kota`,`telepon`,`no_badan_hukum`,`foto`,`setup_data_awal`,`created_at`,`updated_at`) values 
(1,'KSPPS AL-BAROKAH','Tumbuh Kembang Bersama Kami','jayaselalu@gmail.com','Jl. Beringin No. 24','Jepara','024 - 65646343','11.23.AS/233/23/IV/2015','1511062320_1510141171_logo koperasi fix.png',NULL,'2017-09-16 20:14:10','2021-09-13 12:38:54');

/*Table structure for table `smk_shu` */


CREATE TABLE `smk_shu` (
  `id` int NOT NULL,
  `alokasi_shu` int DEFAULT NULL,
  `perhitungan_presentase` enum('1','2') CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '1',
  `presentase_dari_simpanan` float DEFAULT '0',
  `presentase_dari_pinjaman` float DEFAULT '0',
  `total_presentase` float DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `smk_shu_alokasi_shu_id` (`alokasi_shu`) USING BTREE,
  CONSTRAINT `smk_shu_alokasi_shu_foreign` FOREIGN KEY (`alokasi_shu`) REFERENCES `shu_alokasi` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `smk_shu` */

insert  into `smk_shu`(`id`,`alokasi_shu`,`perhitungan_presentase`,`presentase_dari_simpanan`,`presentase_dari_pinjaman`,`total_presentase`,`created_at`,`updated_at`) values 
(1,1,'1',25,75,100,'2017-09-22 12:07:16','2021-09-13 12:39:35');

/*Table structure for table `smk_simpanan` */


CREATE TABLE `smk_simpanan` (
  `id` int NOT NULL AUTO_INCREMENT,
  `kode` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nama` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `smk_simpanan_kode_index` (`kode`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `smk_simpanan` */

insert  into `smk_simpanan`(`id`,`kode`,`nama`,`created_at`,`updated_at`) values 
(1,'01','Pembukaan Rekening','2017-09-17 10:11:47','2017-09-17 10:12:52'),
(2,'02','Setoran','2017-09-17 10:11:51','2017-09-17 10:12:52'),
(3,'03','Pengambilan','2017-09-17 10:11:53','2017-09-17 10:12:52'),
(4,'04','Koreksi','2017-09-17 10:11:54','2017-09-17 10:12:52'),
(5,'05','Jasa','2017-09-17 10:11:56','2017-09-17 10:12:52'),
(6,'06','Bea Administrasi','2017-09-17 10:12:02','2017-09-17 10:12:52'),
(7,'07','Tutup Rekening','2017-09-17 10:12:04','2017-09-17 10:12:52');

/*Table structure for table `status_anggota` */


CREATE TABLE `status_anggota` (
  `id` int NOT NULL AUTO_INCREMENT,
  `kode` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nama` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `status_anggota_kode_index` (`kode`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `status_anggota` */

insert  into `status_anggota`(`id`,`kode`,`nama`,`created_at`,`updated_at`) values 
(1,'01','Calon Nasabah / Anggota','2017-09-18 11:26:59','2017-09-17 18:49:52'),
(2,'02','Nasabah Non Anggota','2017-09-17 18:50:15','2017-09-17 18:50:16'),
(3,'03','Anggota','2017-09-17 18:50:28','2017-09-17 18:50:29');

/*Table structure for table `status_pinjaman` */


CREATE TABLE `status_pinjaman` (
  `id` int NOT NULL,
  `nama` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Data for the table `status_pinjaman` */

insert  into `status_pinjaman`(`id`,`nama`) values 
(0,'Aktif'),
(1,'Lunas'),
(2,'Pemutihan');

/*Table structure for table `tipe_akun` */


CREATE TABLE `tipe_akun` (
  `id` int NOT NULL AUTO_INCREMENT,
  `kode` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nama` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `tipe_akun_kode_unique` (`kode`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `tipe_akun` */

insert  into `tipe_akun`(`id`,`kode`,`nama`,`created_at`,`updated_at`) values 
(1,'1','AKTIVA','2017-09-14 09:14:42','2017-09-14 16:27:14'),
(2,'2','KEWAJIBAN','2017-09-14 09:14:49','2017-09-14 09:14:51'),
(3,'3','MODAL','2017-09-14 09:14:53','2017-09-14 09:14:55'),
(4,'4','PENDAPATAN','2017-09-14 09:14:57','2017-09-14 09:14:58'),
(5,'5','BIAYA','2017-09-14 09:15:00','2017-09-14 09:15:02');

/*Table structure for table `tipe_akun_detail` */


CREATE TABLE `tipe_akun_detail` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tipe_akun_sub_id` int NOT NULL,
  `kode` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `kode_sub2` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `kode_sub3` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nama` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `tipe_akun_detail_kode` (`kode`) USING BTREE,
  KEY `tipe_akun_detail_tipe_akun_sub_id_index` (`tipe_akun_sub_id`) USING BTREE,
  CONSTRAINT `tipe_akun_detail_tipe_akun_sub_id_foreign` FOREIGN KEY (`tipe_akun_sub_id`) REFERENCES `tipe_akun_sub` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=241 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `tipe_akun_detail` */

insert  into `tipe_akun_detail`(`id`,`tipe_akun_sub_id`,`kode`,`kode_sub2`,`kode_sub3`,`nama`,`created_at`,`updated_at`) values 
(161,10,'100-01','100','01','Kas','2017-09-14 20:10:48','2017-09-14 20:10:48'),
(162,10,'100-02','100','02','Bank','2017-09-14 20:11:03','2017-09-14 20:11:03'),
(163,10,'100-03','100','03','Piutang Anggota','2017-09-14 20:11:25','2017-09-14 20:11:25'),
(164,10,'100-04','100','04','Deposito','2017-09-14 20:11:43','2017-09-14 20:11:43'),
(165,10,'100-05','100','05','Persediaan','2017-09-14 20:12:14','2017-09-14 20:12:14'),
(166,10,'100-06','100','06','Biaya Sewa Dibayar Dimuka','2017-09-14 20:12:39','2017-09-14 20:12:39'),
(167,10,'100-07','100','07','Biaya Asuransi Dibayar Dimuka','2017-09-14 20:13:06','2017-09-14 20:13:06'),
(168,10,'100-08','100','08','Pajak Dibayar Dimuka','2017-09-14 20:13:27','2017-09-14 20:13:27'),
(169,12,'120-01','120','01','Simpanan di PKP-RI','2017-09-14 20:17:29','2017-09-14 20:17:29'),
(170,12,'120-02','120','02','Simpanan di Dekopinda','2017-09-14 20:17:54','2017-09-14 20:17:54'),
(171,13,'130-01','130','01','Tanah','2017-09-14 20:18:09','2017-09-14 20:18:09'),
(172,13,'130-02','130','02','Bangunan','2017-09-14 20:18:26','2017-09-14 20:18:26'),
(173,13,'130-03','130','03','Kendaraan','2017-09-14 20:18:45','2017-09-14 20:18:45'),
(174,13,'130-04','130','04','Peralatan','2017-09-14 20:19:03','2017-09-14 20:19:03'),
(175,13,'130-05','130','05','Akumulasi Penyusutan','2017-09-14 20:19:20','2017-09-14 20:19:20'),
(176,14,'200-01','200','01','Simpanan Pendidikan','2017-09-14 20:22:53','2017-09-14 20:22:53'),
(177,14,'200-02','200','02','Simpanan Hari Raya','2017-09-14 20:23:13','2017-09-14 20:23:13'),
(178,14,'200-03','200','03','Simpanan Modal','2017-09-14 20:24:12','2017-09-14 20:24:12'),
(179,14,'200-04','200','04','Simpanan Umroh','2017-09-14 20:24:44','2017-09-14 20:24:44'),
(180,14,'200-05','200','05','Simpanan Hari Koperasi','2017-09-14 20:25:17','2017-09-14 20:25:17'),
(181,14,'200-06','200','06','Simpanan Mana Suka','2017-09-14 20:25:33','2017-09-14 20:25:33'),
(182,14,'200-07','200','07','Simpanan Darma Wisata','2017-09-14 20:25:54','2017-09-14 20:25:54'),
(183,14,'200-08','200','08','Simpanan Sosial','2017-09-14 20:26:09','2017-09-14 20:26:09'),
(184,14,'200-09','200','09','Simpanan Karyawan','2017-09-14 20:27:26','2017-09-14 20:27:26'),
(185,14,'200-10','200','10','Simpanan Pengurus dan Pengawas','2017-09-14 20:28:14','2017-09-14 20:28:14'),
(186,14,'200-11','200','11','Simpanan Pembangunan Koperasi','2017-09-14 20:28:36','2017-09-14 20:28:36'),
(187,14,'200-12','200','12','Simpanan Pemupukan Modal','2017-09-14 20:29:04','2017-09-14 20:29:04'),
(188,14,'200-13','200','13','Cadangan RAT','2017-09-14 20:29:25','2017-09-14 20:29:25'),
(189,14,'200-14','200','14','Kesra Anggota','2017-09-14 20:29:46','2017-09-14 20:29:46'),
(190,14,'200-15','200','15','Dana Pendidikan, Sosial, PDK','2017-09-14 20:30:16','2017-09-14 20:30:16'),
(191,14,'200-16','200','16','Biaya Gaji Yang Masih Harus Dibayar','2017-09-14 20:31:10','2017-09-14 20:31:10'),
(192,14,'200-17','200','17','Biaya PPh Yang Masih Harus Dibayar','2017-09-14 20:31:50','2017-09-14 20:31:50'),
(193,14,'200-18','200','18','Biaya Lain Yang Masih Harus Dibayar','2017-09-14 20:32:17','2017-09-14 20:32:17'),
(194,14,'200-19','200','19','Hutang Pajak','2017-09-14 20:32:30','2017-09-14 20:32:30'),
(195,15,'210-01','210','01','Hutang Bank','2017-09-14 20:20:47','2017-09-14 20:20:47'),
(196,15,'210-02','210','02','Hutang Pada PKP-RI','2017-09-14 20:21:13','2017-09-14 20:21:13'),
(197,15,'210-03','210','03','Hutang Pada Pihak ke-3','2017-09-14 20:21:34','2017-09-14 20:21:34'),
(198,15,'210-04','210','04','Simpanan Wajib Kredit','2017-09-14 20:22:14','2017-09-14 20:22:14'),
(199,15,'210-05','210','05','BKE','2017-09-14 20:22:27','2017-09-14 20:22:27'),
(200,16,'300-01','300','01','Simpanan Pokok','2017-09-14 20:32:50','2017-09-14 20:32:50'),
(201,16,'300-02','300','02','Simpanan Wajib','2017-09-14 20:33:10','2017-09-14 20:33:10'),
(202,17,'310-01','310','01','Dana Cadangan SHU','2017-09-14 20:33:41','2017-09-14 20:33:41'),
(203,17,'310-02','310','02','Dana Cadangan Koperasi','2017-09-14 20:34:06','2017-09-14 20:34:06'),
(204,19,'410-01','410','01','Pendapatan Bea Adm. Pendaftaran Simpanan','2017-09-14 20:35:30','2017-09-14 20:35:30'),
(205,19,'410-02','410','02','Pendapatan Bea Adm. Bulanan Simpanan','2017-09-14 20:36:01','2017-09-14 20:36:01'),
(206,19,'410-03','410','03','Pendapatan Penutupan Rekening Simpanan','2017-09-14 20:36:33','2017-09-14 20:36:33'),
(207,19,'410-04','410','04','Pendapatan Adm. Asuransi Simpanan','2017-09-14 20:37:02','2017-09-14 20:37:02'),
(208,19,'410-05','410','05','Pendapatan Selisih Saldo Simpanan','2017-09-14 20:37:33','2017-09-14 20:37:33'),
(209,20,'420-01','420','01','Pendapatan Jasa Pinjaman','2017-09-14 20:38:31','2017-09-14 20:38:31'),
(210,20,'420-02','420','02','Pendapatan Bea Adm. Pinjaman','2017-09-14 20:39:02','2017-09-14 20:39:02'),
(211,20,'420-03','420','03','Pendapatan Bea Asuransi','2017-09-14 20:39:30','2017-09-14 20:39:30'),
(212,20,'420-04','420','04','Pendapatan Denda Angsuran','2017-09-14 20:40:03','2017-09-14 20:40:03'),
(213,20,'420-05','420','05','Pendapatan Asuransi Pinjaman','2017-09-14 20:40:25','2017-09-14 20:40:25'),
(214,21,'430-01','430','01','Pendaoatan Bunga Bank','2017-09-14 20:40:46','2017-09-14 20:40:46'),
(215,21,'430-02','430','02','Pendapatan Lain-Lain','2017-09-14 20:41:15','2017-09-14 20:41:15'),
(216,22,'500-01','500','01','Beban Jasa Simpanan Pokok','2017-09-14 20:43:09','2017-09-14 20:43:09'),
(217,22,'500-03','500','03','Beban Jasa Simpanan Pendidikan','2017-09-14 20:43:55','2017-09-14 20:43:55'),
(218,22,'500-04','500','04','Beban Jasa Simpanan Hari Raya','2017-09-14 20:44:23','2017-09-14 20:44:23'),
(219,22,'500-05','500','05','Beban Jasa Simpanan Mana Suka','2017-09-14 20:44:52','2017-09-14 20:44:52'),
(220,22,'500-06','500','06','Beban Jasa Simpanan Pemupukan Modal','2017-09-14 20:45:26','2017-09-14 20:45:26'),
(221,22,'500-07','500','07','Beban Jasa Simpanan Pengurus / Pengawas','2017-09-14 20:46:05','2017-09-14 20:46:30'),
(222,22,'500-08','500','08','Beban Jasa Simpanan Pembangunan Koperasi','2017-09-14 20:47:10','2017-09-14 20:47:10'),
(223,22,'500-09','500','09','Beban Jasa Simpanan Sosial','2017-09-14 20:47:43','2017-09-14 20:47:43'),
(224,22,'500-10','500','10','Beban Jasa Simpanan Karyawan','2017-09-14 20:48:18','2017-09-14 20:48:18'),
(225,22,'500-11','500','11','Beban Jasa Simpanan Darmawisata','2017-09-14 20:48:39','2017-09-14 20:48:39'),
(226,22,'500-12','500','12','Beban Jasa Simpanan Lain-Lain','2017-09-14 20:48:59','2017-09-14 20:48:59'),
(227,23,'510-01','510','01','Biaya Listrik','2017-09-14 20:49:23','2017-09-14 20:49:23'),
(228,23,'510-02','510','02','Biaya Transportasi','2017-09-14 20:49:40','2017-09-14 20:49:40'),
(229,23,'510-03','510','03','Biaya Gaji','2017-09-14 20:50:03','2017-09-14 20:50:03'),
(230,23,'510-04','510','04','Biaya Rapat','2017-09-14 20:50:23','2017-09-14 20:50:23'),
(231,23,'510-05','510','05','Biaya Operasional Lain-Lain','2017-09-14 20:50:47','2017-09-14 20:50:47'),
(232,24,'520-01','520','01','Biaya Software','2017-09-14 20:52:28','2017-09-14 20:52:28'),
(233,24,'520-02','520','02','Bonus Karyawan','2017-09-14 20:52:51','2017-09-14 20:52:51'),
(234,24,'520-03','520','03','Biaya Selisih Saldo Simpanan','2017-09-14 20:53:14','2017-09-14 20:53:14'),
(235,25,'530-01','530','01','Biaya Penyusutan','2017-09-14 20:54:09','2017-09-14 20:54:09'),
(236,25,'530-02','530','02','Biaya Penyusutan Bangunan','2017-09-14 20:54:35','2017-09-14 20:54:35'),
(237,25,'530-03','530','03','Biaya Penyusutan Kendaraan','2017-09-14 20:54:59','2017-09-14 20:54:59'),
(238,26,'540-01','540','01','Potongan Angsuran Pokok','2017-09-14 20:53:30','2017-09-14 20:53:30'),
(239,26,'540-02','540','02','Piutang Tak Tertagih','2017-09-14 20:53:50','2017-09-14 20:53:50'),
(240,18,'320-20','320','20','LABA RUGI / SHU','2017-11-22 13:20:36','2017-11-22 13:20:36');

/*Table structure for table `tipe_akun_sub` */


CREATE TABLE `tipe_akun_sub` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tipe_akun_id` int NOT NULL,
  `kode` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nama` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `tipe_akun_sub_kode_index` (`kode`) USING BTREE,
  KEY `tipe_akun_sub_tipe_akun_id_index` (`tipe_akun_id`) USING BTREE,
  CONSTRAINT `tipe_akun_sub_tipe_akun_id_foreign` FOREIGN KEY (`tipe_akun_id`) REFERENCES `tipe_akun` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;

/*Data for the table `tipe_akun_sub` */

insert  into `tipe_akun_sub`(`id`,`tipe_akun_id`,`kode`,`nama`,`created_at`,`updated_at`) values 
(10,1,'10','Aktiva Lancar','2017-09-14 13:43:55','2017-09-14 16:37:11'),
(11,1,'11','Aktiva Tidak Lancar','2017-09-14 13:44:00','2017-09-14 13:44:01'),
(12,1,'12','Investasi','2017-09-14 13:44:03','2017-09-14 13:44:04'),
(13,1,'13','Aset Tetap','2017-09-14 13:44:06','2017-09-14 13:44:08'),
(14,2,'20','Hutang Lancar','2017-09-14 13:44:09','2017-09-14 13:44:11'),
(15,2,'21','Hutang Tidak Lancar','2017-09-14 13:44:13','2017-09-14 13:44:14'),
(16,3,'30','Simpanan Anggota','2017-09-14 13:44:16','2017-09-14 13:44:18'),
(17,3,'31','Cadangan','2017-09-14 13:44:19','2017-09-14 13:44:21'),
(18,3,'32','SHU Tahun Berjalan','2017-09-14 13:44:23','2017-09-14 13:44:25'),
(19,4,'41','Pendapatan Simpanan','2017-09-14 13:44:27','2017-09-14 13:44:29'),
(20,4,'42','Pendapatan Pinjaman','2017-09-14 13:44:31','2017-09-14 13:44:33'),
(21,4,'43','Pendapatan Lain-Lain','2017-09-14 13:44:41','2017-09-14 13:44:43'),
(22,5,'50','Beban Jasa Simpanan','2017-09-14 13:44:45','2017-09-14 13:44:46'),
(23,5,'51','Biaya Operasional','2017-09-14 13:44:48','2017-09-14 13:44:50'),
(24,5,'52','Biaya Lain-Lain','2017-09-14 13:44:51','2017-09-14 13:44:52'),
(25,5,'53','Biaya Penyusutan','2017-09-14 13:44:55','2017-09-14 13:44:56'),
(26,5,'54','Kerugian Pinjaman','2017-09-14 13:44:58','2017-09-14 13:44:59');

